NazwaMangleListener

public abstract class NameMangleListener
extends Object implements ITestInvocationListener

Obiekt Java.lang.Object
com.android.tradefed.result.NameMangleListener


Słuchacz proxy do tłumaczenia nazw metod testowych, klas i pakietów w miarę raportowania wyników.

Streszczenie

Konstruktorzy publiczni

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) 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) testRunEnded (long elapsedTime, runMetrics)

void testRunFailed (String errorMessage)

void testRunStarted (String runName, int testCount)

void testRunStopped (long elapsedTime)

void testStarted (TestDescription test)

Metody chronione

TestDescription mangleTestId (TestDescription test)

Ta metoda jest uruchamiana na wszystkich plikach TestDescription przekazywanych do metod testStarted(com.android.tradefed.result.TestDescription) , testFailed(com.android.tradefed.result.TestDescription, String) i ITestLifeCycleReceiver.testEnded(com.android.tradefed.result.TestDescription, HashMap) wywołania zwrotne ITestLifeCycleReceiver.testEnded(com.android.tradefed.result.TestDescription, HashMap) .

String mangleTestRunName (String name)

Ta metoda jest uruchamiana dla wszystkich nazw przebiegu testu, które są przekazywane do wywołania zwrotnego testRunStarted(String, int) .

Konstruktorzy publiczni

NazwaMangleListener

public NameMangleListener (ITestInvocationListener listener)

Parametry
listener ITestInvocationListener

Metody publiczne

pobierz podsumowanie

public TestSummary getSummary ()

Zwroty
TestSummary

wywołanieZakończone

public void invocationEnded (long elapsedTime)

Parametry
elapsedTime long

wywołanie nie powiodło się

public void invocationFailed (Throwable cause)

Parametry
cause Throwable

wywołanieRozpoczęte

public void invocationStarted (IInvocationContext context)

Parametry
context IInvocationContext

testZałożenieNiepowodzenie

public void testAssumptionFailure (TestDescription test, 
                String trace)

Parametry
test TestDescription

trace String

testZakończony

public void testEnded (TestDescription test, 
                 testMetrics)

Parametry
test TestDescription

testMetrics

Test nieudany

public void testFailed (TestDescription test, 
                String trace)

Parametry
test TestDescription

trace String

testIgnorowany

public void testIgnored (TestDescription test)

Parametry
test TestDescription

dziennik testowy

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

Parametry
dataName String

dataType LogDataType

dataStream InputStreamSource

testRunZakończony

public void testRunEnded (long elapsedTime, 
                 runMetrics)

Parametry
elapsedTime long

runMetrics

testRun nie powiódł się

public void testRunFailed (String errorMessage)

Parametry
errorMessage String

Uruchomiono testRun

public void testRunStarted (String runName, 
                int testCount)

Parametry
runName String

testCount int

testRunZatrzymany

public void testRunStopped (long elapsedTime)

Parametry
elapsedTime long

test rozpoczęty

public void testStarted (TestDescription test)

Parametry
test TestDescription

Metody chronione

mangleTestId

protected TestDescription mangleTestId (TestDescription test)

Ta metoda jest uruchamiana na wszystkich plikach TestDescription przekazywanych do metod testStarted(com.android.tradefed.result.TestDescription) , testFailed(com.android.tradefed.result.TestDescription, String) i ITestLifeCycleReceiver.testEnded(com.android.tradefed.result.TestDescription, HashMap) wywołania zwrotne ITestLifeCycleReceiver.testEnded(com.android.tradefed.result.TestDescription, HashMap) . Metoda powinna zwrócić możliwie inny TestDescription , który zostanie przekazany do dalszego elementu ITestInvocationListener określonego podczas konstruowania.

Implementacja powinna uważać, aby nie zmodyfikować oryginalnego TestDescription .

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

Parametry
test TestDescription

Zwroty
TestDescription

nazwa_mangleTestRun

protected String mangleTestRunName (String name)

Ta metoda jest uruchamiana dla wszystkich nazw przebiegu testu, które są przekazywane do wywołania zwrotnego testRunStarted(String, int) . Metoda powinna zwracać możliwie inną nazwę przebiegu testu, która zostanie przekazana do dalszego elementu ITestInvocationListener określonego podczas konstruowania.

Podczas implementacji należy zachować ostrożność, aby nie zmodyfikować oryginalnej nazwy uruchomienia.

Domyślna implementacja przekazuje nazwę przychodzącego przebiegu testu przez niezmodyfikowaną.

Parametry
name String

Zwroty
String