NameMangleListener

public abstract class NameMangleListener
extends Object implements ITestInvocationListener

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


מאזין proxy לתרגום שמות של שיטות בדיקה, כיתות וחבילות בזמן הדיווח על התוצאות.

סיכום

קונסטרוקטורים גלויים לכולם

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 שמועברים ל-callbacks של 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)

ה-method הזה מופעל בכל שמות הרצאות הבדיקה שמועברים ל-callback‏ testRunStarted(String, int).

קונסטרוקטורים גלויים לכולם

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 שמועברים ל-callbacks של testStarted(com.android.tradefed.result.TestDescription), testFailed(com.android.tradefed.result.TestDescription, String) ו-ITestLifeCycleReceiver.testEnded(com.android.tradefed.result.TestDescription, HashMap). ה-method צריך להחזיר TestDescription שעשוי להיות שונה, שיעבור ל-ITestInvocationListener במורד הזרם שצוין במהלך היצירה.

חשוב להקפיד שלא לשנות את TestDescription המקורי במהלך ההטמעה.

בהטמעה שמוגדרת כברירת מחדל, המזהה הנכנס מועבר ללא שינוי.

פרמטרים
test TestDescription

החזרות
TestDescription

mangleTestRunName

protected String mangleTestRunName (String name)

ה-method הזה מופעל בכל שמות הרצאות הבדיקה שמועברים ל-callback‏ testRunStarted(String, int). השיטה צריכה להחזיר שם של הרצה של בדיקה, שעשוי להיות שונה, שיוענק ל-ITestInvocationListener במורד הזרם שצוין במהלך היצירה.

חשוב להקפיד שלא לשנות את שם ההרצה המקורי במהלך ההטמעה.

בהטמעה שמוגדרת כברירת מחדל, שם ההרצה הנכנסת של הבדיקה מועבר ללא שינוי.

פרמטרים
name String

החזרות
String