NameMangleListener

public abstract class NameMangleListener
extends Object implements ITestInvocationListener

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


Un objeto de escucha de proxy para traducir los nombres de método, clase y paquete de prueba a medida que se informan los resultados.

Resumen

Constructores 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)

Este método se ejecuta en todos los TestDescription que se pasan a las devoluciones de llamada testStarted(com.android.tradefed.result.TestDescription), testFailed(com.android.tradefed.result.TestDescription, String) y ITestLifeCycleReceiver.testEnded(com.android.tradefed.result.TestDescription, HashMap).

String mangleTestRunName(String name)

Este método se ejecuta en todos los nombres de ejecuciones de prueba que se pasan a la devolución de llamada testRunStarted(String, int).

Constructores públicos

NameMangleListener

public NameMangleListener (ITestInvocationListener listener)

Parámetros
listener ITestInvocationListener

Métodos públicos

getSummary

public TestSummary getSummary ()

Muestra
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)

Este método se ejecuta en todos los TestDescription que se pasan a las devoluciones de llamada testStarted(com.android.tradefed.result.TestDescription), testFailed(com.android.tradefed.result.TestDescription, String) y ITestLifeCycleReceiver.testEnded(com.android.tradefed.result.TestDescription, HashMap). El método debe mostrar un TestDescription posiblemente diferente que se pasará al ITestInvocationListener descendente que se especificó durante la construcción.

La implementación debe tener cuidado de no modificar el TestDescription original.

La implementación predeterminada pasa el identificador entrante sin modificaciones.

Parámetros
test TestDescription

Muestra
TestDescription

mangleTestRunName

protected String mangleTestRunName (String name)

Este método se ejecuta en todos los nombres de ejecuciones de prueba que se pasan a la devolución de llamada testRunStarted(String, int). El método debe mostrar un nombre de ejecución de prueba posiblemente diferente que se pasará al ITestInvocationListener descendente que se especificó durante la compilación.

La implementación debe tener cuidado de no modificar el nombre de la ejecución original.

La implementación predeterminada pasa el nombre de la ejecución de prueba entrante sin modificarlo.

Parámetros
name String

Devuelve
String