NameMangleListener

public abstract class NameMangleListener
extends Object implements ITestInvocationListener

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


Słuchający pośrednik służący do tłumaczenia nazw metody testu, klasy i pakietu podczas raportowania wyników.

Podsumowanie

Konstruktory publiczne

NameMangleListener(ITestInvocationListener listener)

Metody publiczne

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)

Chronione metody

TestDescription mangleTestId(TestDescription test)

Ta metoda jest wykonywana dla wszystkich wartości TestDescription przekazywanych do funkcji zwracających wartości 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)

Ta metoda jest wywoływana w przypadku wszystkich nazw testów, które są przekazywane do funkcji wywołania zwrotnego testRunStarted(String, int).

Konstruktory publiczne

NameMangleListener

public NameMangleListener (ITestInvocationListener listener)

Parametry
listener ITestInvocationListener

Metody publiczne

getSummary

public TestSummary getSummary ()

Zwroty
TestSummary

invocationEnded

public void invocationEnded (long elapsedTime)

Parametry
elapsedTime long

invocationFailed

public void invocationFailed (Throwable cause)

Parametry
cause Throwable

invocationStarted

public void invocationStarted (IInvocationContext context)

Parametry
context IInvocationContext

testAssumptionFailure

public void testAssumptionFailure (TestDescription test, 
                String trace)

Parametry
test TestDescription

trace String

testEnded

public void testEnded (TestDescription test, 
                 testMetrics)

Parametry
test TestDescription

testMetrics

testFailed

public void testFailed (TestDescription test, 
                String trace)

Parametry
test TestDescription

trace String

testIgnored

public void testIgnored (TestDescription test)

Parametry
test TestDescription

testLog

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

Parametry
dataName String

dataType LogDataType

dataStream InputStreamSource

testRunEnded

public void testRunEnded (long elapsedTime, 
                 runMetrics)

Parametry
elapsedTime long

runMetrics

testRunFailed

public void testRunFailed (String errorMessage)

Parametry
errorMessage String

testRunStarted

public void testRunStarted (String runName, 
                int testCount)

Parametry
runName String

testCount int

testRunStopped

public void testRunStopped (long elapsedTime)

Parametry
elapsedTime long

testStarted

public void testStarted (TestDescription test)

Parametry
test TestDescription

Chronione metody

mangleTestId

protected TestDescription mangleTestId (TestDescription test)

Ta metoda jest wykonywana dla wszystkich wartości TestDescription przekazywanych do funkcji zwracających wartości testStarted(com.android.tradefed.result.TestDescription), testFailed(com.android.tradefed.result.TestDescription, String)ITestLifeCycleReceiver.testEnded(com.android.tradefed.result.TestDescription, HashMap). Metoda powinna zwrócić TestDescription, który może być inny niż ITestInvocationListener przekazywany do następnego ITestInvocationListener, który został określony podczas tworzenia.

Implementacja powinna być ostrożna, aby nie zmodyfikować oryginalnego TestDescription.

Domyślna implementacja przekazuje przychodzący identyfikator bez zmian.

Parametry
test TestDescription

Zwroty
TestDescription

mangleTestRunName

protected String mangleTestRunName (String name)

Ta metoda jest wywoływana w przypadku wszystkich nazw testów, które są przekazywane do funkcji wywołania zwrotnego testRunStarted(String, int). Metoda powinna zwracać nazwę testu, która może być inna niż nazwa przekazywana do ITestInvocationListener, która została określona podczas tworzenia.

Implementacja powinna być ostrożna, aby nie zmodyfikować pierwotnej nazwy uruchomienia.

Domyślna implementacja przekazuje przychodzącą nazwę testu bez zmian.

Parametry
name String

Zwroty
String