Google is committed to advancing racial equity for Black communities. See how.
Questa pagina è stata tradotta dall'API Cloud Translation.
Switch to English

ShardListener

public class ShardListener
extends CollectingTestListener implements ISupportGranularResults

java.lang.Object
com.android.tradefed.result.CollectingTestListener
com.android.tradefed.invoker.ShardListener


Un ITestInvocationListener che raccoglie i risultati da un frammento di ITestInvocationListener (ovvero una divisione di ITestInvocationListener da eseguire su più risorse in parallelo) e li inoltra a un altro listener.

Sommario

Costruttori pubblici

ShardListener (ITestInvocationListener main)

Crea uno ShardListener .

Metodi pubblici

void invocationEnded (long elapsedTime)

void invocationFailed (FailureDescription failure)

void invocationFailed (Throwable cause)

void invocationStarted (IInvocationContext context)

void setSupportGranularResults (boolean enableGranularResults)
boolean supportGranularResults ()

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

void testLogSaved (String dataName, LogDataType dataType, InputStreamSource dataStream, LogFile logFile)

void testModuleEnded ()

void testModuleStarted (IInvocationContext moduleContext)

void testRunEnded (long elapsedTime, runMetrics) testRunEnded (long elapsedTime, runMetrics)

void testRunFailed (FailureDescription failure)

void testRunFailed (String failureMessage)

void testRunStarted (String name, int numTests, int attemptNumber, long startTime)

Costruttori pubblici

ShardListener

public ShardListener (ITestInvocationListener main)

Crea uno ShardListener .

Parametri
main ITestInvocationListener : il ITestInvocationListener i risultati devono essere inoltrati. Per evitare collisioni con altri ShardListener , questo oggetto si sincronizzerà su main durante l'inoltro dei risultati. E i risultati verranno inviati solo una volta completato il frammento di invocazione.

Metodi pubblici

invocationEnded

public void invocationEnded (long elapsedTime)

Parametri
elapsedTime long

invocationFailed

public void invocationFailed (FailureDescription failure)

Parametri
failure FailureDescription

invocationFailed

public void invocationFailed (Throwable cause)

Parametri
cause Throwable

invocationStarted

public void invocationStarted (IInvocationContext context)

Parametri
context IInvocationContext

setSupportGranularResults

public void setSupportGranularResults (boolean enableGranularResults)

Parametri
enableGranularResults boolean

supportGranularResults

public boolean supportGranularResults ()

ritorna
boolean

testLog

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

Parametri
dataName String

dataType LogDataType

dataStream InputStreamSource

testLogSaved

public void testLogSaved (String dataName, 
                LogDataType dataType, 
                InputStreamSource dataStream, 
                LogFile logFile)

Parametri
dataName String

dataType LogDataType

dataStream InputStreamSource

logFile LogFile

testModuleEnded

public void testModuleEnded ()

testModuleStarted

public void testModuleStarted (IInvocationContext moduleContext)

Parametri
moduleContext IInvocationContext

testRunEnded

public void testRunEnded (long elapsedTime, 
                 runMetrics)

Parametri
elapsedTime long

runMetrics

testRunFailed

public void testRunFailed (FailureDescription failure)

Parametri
failure FailureDescription

testRunFailed

public void testRunFailed (String failureMessage)

Parametri
failureMessage String

testRunStarted

public void testRunStarted (String name, 
                int numTests, 
                int attemptNumber, 
                long startTime)

Parametri
name String

numTests int

attemptNumber int

startTime long