ShardListener

public class ShardListener
extends CollectingTestListener implements ISupportGranularResults

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


Ein ITestInvocationListener , der Ergebnisse von einem Aufruf-Shard (auch bekannt als Aufrufaufteilung zur parallelen Ausführung auf mehreren Ressourcen) sammelt und sie an einen anderen Listener weiterleitet.

Zusammenfassung

Öffentliche Bauträger

ShardListener (ITestInvocationListener main)

Erstellen Sie einen ShardListener .

Öffentliche Methoden

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)

Öffentliche Bauträger

ShardListener

public ShardListener (ITestInvocationListener main)

Erstellen Sie einen ShardListener .

Parameter
main ITestInvocationListener : Der ITestInvocationListener , dessen Ergebnisse weitergeleitet werden sollen. Um Kollisionen mit anderen ShardListener zu verhindern, wird dieses Objekt bei der Weiterleitung von Ergebnissen auf main synchronisiert. Und Ergebnisse werden erst gesendet, wenn der Aufruf-Shard abgeschlossen ist.

Öffentliche Methoden

invocationEnded

public void invocationEnded (long elapsedTime)

Parameter
elapsedTime long

Aufruf fehlgeschlagen

public void invocationFailed (FailureDescription failure)

Parameter
failure FailureDescription

Aufruf fehlgeschlagen

public void invocationFailed (Throwable cause)

Parameter
cause Throwable

invocationStarted

public void invocationStarted (IInvocationContext context)

Parameter
context IInvocationContext

setSupportGranularResults

public void setSupportGranularResults (boolean enableGranularResults)

Parameter
enableGranularResults boolean

supportGranularResults

public boolean supportGranularResults ()

Kehrt zurück
boolean

testLog

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

Parameter
dataName String

dataType LogDataType

dataStream InputStreamSource

testLogSaved

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

Parameter
dataName String

dataType LogDataType

dataStream InputStreamSource

logFile LogFile

testModuleEnded

public void testModuleEnded ()

testModuleStarted

public void testModuleStarted (IInvocationContext moduleContext)

Parameter
moduleContext IInvocationContext

testRunEnded

public void testRunEnded (long elapsedTime, 
                 runMetrics)

Parameter
elapsedTime long

runMetrics

testRunFailed

public void testRunFailed (FailureDescription failure)

Parameter
failure FailureDescription

testRunFailed

public void testRunFailed (String failureMessage)

Parameter
failureMessage String

testRunStarted

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

Parameter
name String

numTests int

attemptNumber int

startTime long