NomeMangleListener

public abstract class NameMangleListener
extends Object implements ITestInvocationListener

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


Un listener proxy per tradurre i nomi del metodo di test, della classe e del pacchetto man mano che vengono riportati i risultati.

Riepilogo

Costruttori pubblici

NameMangleListener (ITestInvocationListener listener)

Metodi pubblici

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)

Metodi protetti

TestDescription mangleTestId (TestDescription test)

Questo metodo viene eseguito su tutti TestDescription passati a testStarted(com.android.tradefed.result.TestDescription) , testFailed(com.android.tradefed.result.TestDescription, String) e ITestLifeCycleReceiver.testEnded(com.android.tradefed.result.TestDescription, HashMap) callback.

String mangleTestRunName (String name)

Questo metodo viene eseguito su tutti i nomi di esecuzione dei test passati al callback testRunStarted(String, int) .

Costruttori pubblici

NomeMangleListener

public NameMangleListener (ITestInvocationListener listener)

Parametri
listener ITestInvocationListener

Metodi pubblici

getSummary

public TestSummary getSummary ()

ritorna
TestSummary

invocationEnded

public void invocationEnded (long elapsedTime)

Parametri
elapsedTime long

invocazioneFailed

public void invocationFailed (Throwable cause)

Parametri
cause Throwable

invocationStarted

public void invocationStarted (IInvocationContext context)

Parametri
context IInvocationContext

testAssunzioneFailure

public void testAssumptionFailure (TestDescription test, 
                String trace)

Parametri
test TestDescription

trace String

testEnded

public void testEnded (TestDescription test, 
                 testMetrics)

Parametri
test TestDescription

testMetrics

prova non riuscita

public void testFailed (TestDescription test, 
                String trace)

Parametri
test TestDescription

trace String

testIgnorato

public void testIgnored (TestDescription test)

Parametri
test TestDescription

testLog

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

Parametri
dataName String

dataType LogDataType

dataStream InputStreamSource

testRunEnded

public void testRunEnded (long elapsedTime, 
                 runMetrics)

Parametri
elapsedTime long

runMetrics

testRunFailed

public void testRunFailed (String errorMessage)

Parametri
errorMessage String

testRunStarted

public void testRunStarted (String runName, 
                int testCount)

Parametri
runName String

testCount int

testRunStopped

public void testRunStopped (long elapsedTime)

Parametri
elapsedTime long

testAvviato

public void testStarted (TestDescription test)

Parametri
test TestDescription

Metodi protetti

mangleTestId

protected TestDescription mangleTestId (TestDescription test)

Questo metodo viene eseguito su tutti TestDescription passati a testStarted(com.android.tradefed.result.TestDescription) , testFailed(com.android.tradefed.result.TestDescription, String) e ITestLifeCycleReceiver.testEnded(com.android.tradefed.result.TestDescription, HashMap) callback. Il metodo deve restituire una TestDescription possibilmente diversa che verrà passata ITestInvocationListener downstream specificato durante la costruzione.

L'implementazione dovrebbe fare attenzione a non modificare la TestDescription originale.

L'implementazione predefinita passa l'identificatore in entrata senza modifiche.

Parametri
test TestDescription

ritorna
TestDescription

mangleTestRunName

protected String mangleTestRunName (String name)

Questo metodo viene eseguito su tutti i nomi di esecuzione dei test passati al callback testRunStarted(String, int) . Il metodo deve restituire un nome di esecuzione del test possibilmente diverso che verrà passato ITestInvocationListener downstream specificato durante la costruzione.

L'implementazione dovrebbe fare attenzione a non modificare il nome della corsa originale.

L'implementazione predefinita passa il nome dell'esecuzione del test in entrata senza modifiche.

Parametri
name String

ritorna
String