NameMangleListener

public abstract class NameMangleListener
extends Object implements ITestInvocationListener

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


Um listener de proxy para traduzir métodos de teste, classes e nomes de pacotes 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, testMetrics)

void testFailed(TestDescription test, String trace)

void testIgnored(TestDescription test)

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

void testRunEnded(long elapsedTime, runMetrics)

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 TestDescriptions 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).

String mangleTestRunName(String name)

Esse método é executado em todos os nomes de execução de teste passados para o método testRunStarted(String, int).

Construtores públicos

NameMangleListener

public NameMangleListener (ITestInvocationListener listener)

Parâmetros
listener ITestInvocationListener

Métodos públicos

getResumo

public TestSummary getSummary ()

Retorna
TestSummary

invocaçãoFinalizada

public void invocationEnded (long elapsedTime)

Parâmetros
elapsedTime long

InvocationFalha

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

testIgnorado

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

testRunSStop

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 TestDescriptions 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 deve retornar uma TestDescription possivelmente diferente que será transmitido para o ITestInvocationListener downstream que foi 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 não modificado.

Parâmetros
test TestDescription

Retorna
TestDescription

Nome da execução de teste mangle

protected String mangleTestRunName (String name)

Esse método é executado em todos os nomes de execução de teste passados para o método testRunStarted(String, int). O método deve retornar uma resposta que será transmitido ao ITestInvocationListener downstream que foi 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 passa o nome da execução de teste recebida por não modificado.

Parâmetros
name String

Retorna
String