NameMangleListener

public abstract class NameMangleListener
extends Object implements ITestInvocationListener

java.lang.Object
com.android.tradefed.result.NameMangleListener


Listener พร็อกซีสำหรับแปลเมธอดทดสอบ คลาส และชื่อแพ็กเกจเมื่อมีการรายงานผลลัพธ์

สรุป

ช่างก่อสร้างสาธารณะ

NameMangleListener(ITestInvocationListener listener)

วิธีการสาธารณะ

TestSummary getSummary()

void invocationEnded(long elapsedTime)

void invocationFailed(Throwable cause)

void invocationStarted(IInvocationContext context)

void testAssumptionFailure(TestDescription test, String trace)

void testEnded(TestDescription test, testMetrics)

void testFailed(TestDescription test, String trace)

void testIgnored(TestDescription test)

void testLog(String dataName, LogDataType dataType, InputStreamSource dataStream)

void testRunEnded(long elapsedTime, runMetrics)

void testRunFailed(String errorMessage)

void testRunStarted(String runName, int testCount)

void testRunStopped(long elapsedTime)

void testStarted(TestDescription test)

วิธีการป้องกัน

TestDescription mangleTestId(TestDescription test)

เมธอดนี้จะทำงานใน TestDescription ทั้งหมดที่ส่งไปยัง Callback testStarted(com.android.tradefed.result.TestDescription), testFailed(com.android.tradefed.result.TestDescription, String) และ ITestLifeCycleReceiver.testEnded(com.android.tradefed.result.TestDescription, HashMap)

String mangleTestRunName(String name)

เมธอดนี้จะทำงานกับชื่อตัวดำเนินการทดสอบทั้งหมดที่ส่งไปยัง การติดต่อกลับของ testRunStarted(String, int)

ช่างก่อสร้างสาธารณะ

NameMangleListener

public NameMangleListener (ITestInvocationListener listener)

พารามิเตอร์
listener ITestInvocationListener

วิธีการสาธารณะ

getสรุป

public TestSummary getSummary ()

คิกรีเทิร์น
TestSummary

สิ้นสุดการเรียกใช้

public void invocationEnded (long elapsedTime)

พารามิเตอร์
elapsedTime long

การเรียกใช้ล้มเหลว

public void invocationFailed (Throwable cause)

พารามิเตอร์
cause Throwable

เริ่มคำขอแล้ว

public void invocationStarted (IInvocationContext context)

พารามิเตอร์
context IInvocationContext

testAssumptionFailure

public void testAssumptionFailure (TestDescription test, 
                String trace)

พารามิเตอร์
test TestDescription

trace String

สิ้นสุดการทดสอบ

public void testEnded (TestDescription test, 
                 testMetrics)

พารามิเตอร์
test TestDescription

testMetrics

การทดสอบล้มเหลว

public void testFailed (TestDescription test, 
                String trace)

พารามิเตอร์
test TestDescription

trace String

ละเว้นการทดสอบแล้ว

public void testIgnored (TestDescription test)

พารามิเตอร์
test TestDescription

บันทึกการทดสอบ

public void testLog (String dataName, 
                LogDataType dataType, 
                InputStreamSource dataStream)

พารามิเตอร์
dataName String

dataType LogDataType

dataStream InputStreamSource

สิ้นสุดการทดสอบแล้ว

public void testRunEnded (long elapsedTime, 
                 runMetrics)

พารามิเตอร์
elapsedTime long

runMetrics

testRunFailed

public void testRunFailed (String errorMessage)

พารามิเตอร์
errorMessage String

เริ่มการทดสอบแล้ว

public void testRunStarted (String runName, 
                int testCount)

พารามิเตอร์
runName String

testCount int

หยุดการทดสอบแล้ว

public void testRunStopped (long elapsedTime)

พารามิเตอร์
elapsedTime long

เริ่มทดสอบแล้ว

public void testStarted (TestDescription test)

พารามิเตอร์
test TestDescription

วิธีการป้องกัน

รหัสการทดสอบ mangle

protected TestDescription mangleTestId (TestDescription test)

เมธอดนี้จะทำงานใน TestDescription ทั้งหมดที่ส่งไปยัง Callback testStarted(com.android.tradefed.result.TestDescription), testFailed(com.android.tradefed.result.TestDescription, String) และ ITestLifeCycleReceiver.testEnded(com.android.tradefed.result.TestDescription, HashMap) เมธอดควรแสดงผล TestDescription ที่อาจแตกต่างออกไปซึ่งจะส่งไปยัง ITestInvocationListener ดาวน์สตรีมที่ระบุไว้ในระหว่างการสร้าง

การติดตั้งใช้งานไม่ควรเป็นการแก้ไข TestDescription เดิม

การใช้งานเริ่มต้นจะส่งผ่านตัวระบุขาเข้าผ่านรายการที่ไม่มีการแก้ไข

พารามิเตอร์
test TestDescription

คิกรีเทิร์น
TestDescription

ชื่อการเรียกใช้การทดสอบของ mangle

protected String mangleTestRunName (String name)

เมธอดนี้จะทำงานกับชื่อตัวดำเนินการทดสอบทั้งหมดที่ส่งไปยัง การติดต่อกลับของ testRunStarted(String, int) เมธอดควรแสดงผลค่าที่แตกต่าง ชื่อการเรียกใช้ทดสอบที่จะส่งไปยังดาวน์สตรีม ITestInvocationListener ที่ ที่ระบุระหว่างการสร้าง

การติดตั้งใช้งานควรระมัดระวังอย่าแก้ไขชื่อการเรียกใช้เดิม

การใช้งานเริ่มต้นจะส่งผ่านชื่อการเรียกใช้การทดสอบขาเข้าผ่านที่ไม่มีการแก้ไข

พารามิเตอร์
name String

คิกรีเทิร์น
String