Listener NameMangle
public
abstract
class
NameMangleListener
extends Object
implements
ITestInvocationListener
java.lang.Object | |
🎞 | com.android.tradefed.result.NameMangleListener |
Un listener proxy per tradurre nomi di metodi, classi e pacchetti di test quando 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,
|
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)
|
Metodi protetti | |
---|---|
TestDescription
|
mangleTestId(TestDescription test)
Questo metodo viene eseguito su tutti gli elementi |
String
|
mangleTestRunName(String name)
Questo metodo viene eseguito su tutti i nomi di esecuzioni di test passati al
Chiamata di |
Costruttori pubblici
Listener NameMangle
public NameMangleListener (ITestInvocationListener listener)
Parametri | |
---|---|
listener |
ITestInvocationListener |
Metodi pubblici
getRiepilogo
public TestSummary getSummary ()
Ritorni | |
---|---|
TestSummary |
chiamata terminata
public void invocationEnded (long elapsedTime)
Parametri | |
---|---|
elapsedTime |
long |
chiamata non riuscita
public void invocationFailed (Throwable cause)
Parametri | |
---|---|
cause |
Throwable |
chiamataIniziata
public void invocationStarted (IInvocationContext context)
Parametri | |
---|---|
context |
IInvocationContext |
testAssumptionFailure
public void testAssumptionFailure (TestDescription test, String trace)
Parametri | |
---|---|
test |
TestDescription |
trace |
String |
testTerminato
public void testEnded (TestDescription test,testMetrics)
Parametri | |
---|---|
test |
TestDescription |
testMetrics |
|
testNon riuscito
public void testFailed (TestDescription test, String trace)
Parametri | |
---|---|
test |
TestDescription |
trace |
String |
testIgnorato
public void testIgnored (TestDescription test)
Parametri | |
---|---|
test |
TestDescription |
Diariotest
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 |
|
testRunNon riuscito
public void testRunFailed (String errorMessage)
Parametri | |
---|---|
errorMessage |
String |
testRunStarted
public void testRunStarted (String runName, int testCount)
Parametri | |
---|---|
runName |
String |
testCount |
int |
testRunArrestato
public void testRunStopped (long elapsedTime)
Parametri | |
---|---|
elapsedTime |
long |
testIniziato
public void testStarted (TestDescription test)
Parametri | |
---|---|
test |
TestDescription |
Metodi protetti
TestId mangle
protected TestDescription mangleTestId (TestDescription test)
Questo metodo viene eseguito su tutti gli elementi TestDescription
passati ai callback testStarted(com.android.tradefed.result.TestDescription)
, testFailed(com.android.tradefed.result.TestDescription, String)
e ITestLifeCycleReceiver.testEnded(com.android.tradefed.result.TestDescription, HashMap)
. Il metodo dovrebbe restituire un
TestDescription
potenzialmente diverso che verrà trasferito al ITestInvocationListener
a valle specificato durante la costruzione.
L'implementazione deve fare attenzione a non modificare il file TestDescription
originale.
L'implementazione predefinita trasmette l'identificatore in arrivo senza modifiche.
Parametri | |
---|---|
test |
TestDescription |
Ritorni | |
---|---|
TestDescription |
mangleTestRunName
protected String mangleTestRunName (String name)
Questo metodo viene eseguito su tutti i nomi di esecuzioni di test passati al
Chiamata di testRunStarted(String, int)
. Il metodo dovrebbe restituire una risposta
nome dell'esecuzione di test che verrà passato all'ITestInvocationListener
downstream che è
specificato durante la costruzione.
L'implementazione deve fare attenzione a non modificare il nome originale dell'esecuzione.
L'implementazione predefinita trasmette il nome dell'esecuzione di test in entrata senza modifiche.
Parametri | |
---|---|
name |
String |
Ritorni | |
---|---|
String |