NameMangleListener
public
abstract
class
NameMangleListener
extends Object
implements
ITestInvocationListener
| java.lang.Object | |
| ↳ | com.android.tradefed.result.NameMangleListener |
โปรแกรมรับฟังพร็อกซีเพื่อแปลชื่อเมธอดทดสอบ คลาส และแพ็กเกจเมื่อมีการรายงานผลลัพธ์
สรุป
ตัวสร้างแบบสาธารณะ | |
|---|---|
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,
|
void
|
testFailed(TestDescription test, String trace)
|
void
|
testIgnored(TestDescription test)
|
void
|
testLog(String dataName, LogDataType dataType, InputStreamSource dataStream)
|
void
|
testRunEnded(long elapsedTime,
|
void
|
testRunFailed(String errorMessage)
|
void
|
testRunStarted(String runName, int testCount)
|
void
|
testRunStopped(long elapsedTime)
|
void
|
testStarted(TestDescription test)
|
วิธีการที่มีการป้องกัน | |
|---|---|
TestDescription
|
mangleTestId(TestDescription test)
ระบบจะเรียกใช้เมธอดนี้กับ |
String
|
mangleTestRunName(String name)
ระบบจะเรียกใช้เมธอดนี้กับชื่อการทดสอบทั้งหมดที่ส่งไปยังการเรียกกลับ |
ตัวสร้างแบบสาธารณะ
NameMangleListener
public NameMangleListener (ITestInvocationListener listener)
| พารามิเตอร์ | |
|---|---|
listener |
ITestInvocationListener |
เมธอดสาธารณะ
getSummary
public TestSummary getSummary ()
| คิกรีเทิร์น | |
|---|---|
TestSummary |
|
invocationEnded
public void invocationEnded (long elapsedTime)
| พารามิเตอร์ | |
|---|---|
elapsedTime |
long |
invocationFailed
public void invocationFailed (Throwable cause)
| พารามิเตอร์ | |
|---|---|
cause |
Throwable |
invocationStarted
public void invocationStarted (IInvocationContext context)
| พารามิเตอร์ | |
|---|---|
context |
IInvocationContext |
testAssumptionFailure
public void testAssumptionFailure (TestDescription test,
String trace)
| พารามิเตอร์ | |
|---|---|
test |
TestDescription |
trace |
String |
testEnded
public void testEnded (TestDescription test,
testMetrics)
| พารามิเตอร์ | |
|---|---|
test |
TestDescription |
testMetrics |
|
testFailed
public void testFailed (TestDescription test,
String trace)
| พารามิเตอร์ | |
|---|---|
test |
TestDescription |
trace |
String |
testIgnored
public void testIgnored (TestDescription test)
| พารามิเตอร์ | |
|---|---|
test |
TestDescription |
testLog
public void testLog (String dataName,
LogDataType dataType,
InputStreamSource dataStream)
| พารามิเตอร์ | |
|---|---|
dataName |
String |
dataType |
LogDataType |
dataStream |
InputStreamSource |
testRunEnded
public void testRunEnded (long elapsedTime,
runMetrics)
| พารามิเตอร์ | |
|---|---|
elapsedTime |
long |
runMetrics |
|
testRunFailed
public void testRunFailed (String errorMessage)
| พารามิเตอร์ | |
|---|---|
errorMessage |
String |
testRunStarted
public void testRunStarted (String runName,
int testCount)
| พารามิเตอร์ | |
|---|---|
runName |
String |
testCount |
int |
testRunStopped
public void testRunStopped (long elapsedTime)
| พารามิเตอร์ | |
|---|---|
elapsedTime |
long |
testStarted
public void testStarted (TestDescription test)
| พารามิเตอร์ | |
|---|---|
test |
TestDescription |
วิธีการที่มีการป้องกัน
mangleTestId
protected TestDescription mangleTestId (TestDescription test)
ระบบจะเรียกใช้เมธอดนี้กับ TestDescription ทั้งหมดที่ส่งไปยังการเรียกกลับ 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 |
|
mangleTestRunName
protected String mangleTestRunName (String name)
ระบบจะเรียกใช้เมธอดนี้กับชื่อการทดสอบทั้งหมดที่ส่งไปยังการเรียกกลับ testRunStarted(String, int) เมธอดควรแสดงผลลัพธ์เป็นชื่อการทดสอบที่อาจแตกต่างออกไป ซึ่งจะส่งไปยัง ITestInvocationListener ดาวน์สตรีมที่ระบุไว้ในระหว่างการสร้าง
การติดตั้งใช้งานควรระมัดระวังที่จะไม่แก้ไขชื่อการเรียกใช้เดิม
การใช้งานเริ่มต้นจะส่งชื่อการทดสอบขาเข้าโดยไม่มีการแก้ไข
| พารามิเตอร์ | |
|---|---|
name |
String |
| คิกรีเทิร์น | |
|---|---|
String |
|