NameMangleListener
public
abstract
class
NameMangleListener
extends Object
implements
ITestInvocationListener
java.lang.Object | |
↳ | com.android.tradefed.result.NameMangleListener |
Um listener de proxy para traduzir os nomes de método, classe e pacote de teste conforme os resultados são informados.
Resumo
Construtores públicos | |
---|---|
NameMangleListener(ITestInvocationListener listener)
|
Métodos públicos | |
---|---|
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)
|
Métodos protegidos | |
---|---|
TestDescription
|
mangleTestId(TestDescription test)
Esse método é executado em todos os |
String
|
mangleTestRunName(String name)
Esse método é executado em todos os nomes de execução de teste transmitidos para o
callback |
Construtores públicos
NameMangleListener
public NameMangleListener (ITestInvocationListener listener)
Parâmetros | |
---|---|
listener |
ITestInvocationListener |
Métodos públicos
getSummary
public TestSummary getSummary ()
Retorna | |
---|---|
TestSummary |
invocationEnded
public void invocationEnded (long elapsedTime)
Parâmetros | |
---|---|
elapsedTime |
long |
invocationFailed
public void invocationFailed (Throwable cause)
Parâmetros | |
---|---|
cause |
Throwable |
invocationStarted
public void invocationStarted (IInvocationContext context)
Parâmetros | |
---|---|
context |
IInvocationContext |
testAssumptionFailure
public void testAssumptionFailure (TestDescription test, String trace)
Parâmetros | |
---|---|
test |
TestDescription |
trace |
String |
testEnded
public void testEnded (TestDescription test,testMetrics)
Parâmetros | |
---|---|
test |
TestDescription |
testMetrics |
|
testFailed
public void testFailed (TestDescription test, String trace)
Parâmetros | |
---|---|
test |
TestDescription |
trace |
String |
testIgnored
public void testIgnored (TestDescription test)
Parâmetros | |
---|---|
test |
TestDescription |
testLog
public void testLog (String dataName, LogDataType dataType, InputStreamSource dataStream)
Parâmetros | |
---|---|
dataName |
String |
dataType |
LogDataType |
dataStream |
InputStreamSource |
testRunEnded
public void testRunEnded (long elapsedTime,runMetrics)
Parâmetros | |
---|---|
elapsedTime |
long |
runMetrics |
|
testRunFailed
public void testRunFailed (String errorMessage)
Parâmetros | |
---|---|
errorMessage |
String |
testRunStarted
public void testRunStarted (String runName, int testCount)
Parâmetros | |
---|---|
runName |
String |
testCount |
int |
testRunStopped
public void testRunStopped (long elapsedTime)
Parâmetros | |
---|---|
elapsedTime |
long |
testStarted
public void testStarted (TestDescription test)
Parâmetros | |
---|---|
test |
TestDescription |
Métodos protegidos
mangleTestId
protected TestDescription mangleTestId (TestDescription test)
Esse método é executado em todos os TestDescription
s transmitidos aos callbacks testStarted(com.android.tradefed.result.TestDescription)
, testFailed(com.android.tradefed.result.TestDescription, String)
e ITestLifeCycleReceiver.testEnded(com.android.tradefed.result.TestDescription, HashMap)
. O método precisa retornar um
TestDescription
possivelmente diferente, que será transmitido para o ITestInvocationListener
downstream especificado durante a construção.
A implementação precisa ter cuidado para não modificar o TestDescription
original.
A implementação padrão transmite o identificador de entrada sem modificações.
Parâmetros | |
---|---|
test |
TestDescription |
Retorna | |
---|---|
TestDescription |
mangleTestRunName
protected String mangleTestRunName (String name)
Esse método é executado em todos os nomes de execução de teste transmitidos para o
callback testRunStarted(String, int)
. O método precisa retornar um nome de execução de teste possivelmente diferente, que será transmitido para o ITestInvocationListener
downstream especificado durante a construção.
A implementação precisa ter cuidado para não modificar o nome da execução original.
A implementação padrão transmite o nome da execução de teste recebido sem modificações.
Parâmetros | |
---|---|
name |
String |
Retorna | |
---|---|
String |