NameMangleListener
public
abstract
class
NameMangleListener
extends Object
implements
ITestInvocationListener
java.lang.Object | |
↳ | com.android.tradefed.result.NameMangleListener |
Un ascoltatore proxy per tradurre i nomi del metodo di test, della classe e del pacchetto quando vengono generati 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 i |
String
|
mangleTestRunName(String name)
Questo metodo viene eseguito su tutti i nomi di esecuzione del test passati al callback |
Costruttori pubblici
NameMangleListener
public NameMangleListener (ITestInvocationListener listener)
Parametri | |
---|---|
listener |
ITestInvocationListener |
Metodi pubblici
getSummary
public TestSummary getSummary ()
Ritorni | |
---|---|
TestSummary |
invocationEnded
public void invocationEnded (long elapsedTime)
Parametri | |
---|---|
elapsedTime |
long |
invocationFailed
public void invocationFailed (Throwable cause)
Parametri | |
---|---|
cause |
Throwable |
invocationStarted
public void invocationStarted (IInvocationContext context)
Parametri | |
---|---|
context |
IInvocationContext |
testAssumptionFailure
public void testAssumptionFailure (TestDescription test, String trace)
Parametri | |
---|---|
test |
TestDescription |
trace |
String |
testEnded
public void testEnded (TestDescription test,testMetrics)
Parametri | |
---|---|
test |
TestDescription |
testMetrics |
|
testFailed
public void testFailed (TestDescription test, String trace)
Parametri | |
---|---|
test |
TestDescription |
trace |
String |
testIgnored
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 |
testStarted
public void testStarted (TestDescription test)
Parametri | |
---|---|
test |
TestDescription |
Metodi protetti
mangleTestId
protected TestDescription mangleTestId (TestDescription test)
Questo metodo viene eseguito su tutti i 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 deve restituire un TestDescription
possibilmente diverso che verrà passato al ITestInvocationListener
a valle specificato durante la compilazione.
L'implementazione deve fare attenzione a non modificare l'TestDescription
originale.
L'implementazione predefinita passa 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 esecuzione del test passati al callback testRunStarted(String, int)
. Il metodo deve restituire un nome di esecuzione del test eventualmente diverso che verrà passato al ITestInvocationListener
a valle specificato durante la compilazione.
L'implementazione deve fare attenzione a non modificare il nome dell'esecuzione originale.
L'implementazione predefinita passa il nome dell'esecuzione del test in arrivo senza modifiche.
Parametri | |
---|---|
name |
String |
Ritorni | |
---|---|
String |