ShardListener

public class ShardListener
extends CollectingTestListener implements ISupportGranularResults

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


Ein ITestInvocationListener, das Ergebnisse aus einem Aufruf-Shard (d. h. einer Aufrufaufteilung, die parallel auf mehreren Ressourcen ausgeführt wird) erfasst und an einen anderen Listener weiterleitet.

Zusammenfassung

Öffentliche Konstruktoren

ShardListener(ITestInvocationListener main)

Erstellen Sie eine 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)

void testRunFailed(FailureDescription failure)

void testRunFailed(String failureMessage)

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

Öffentliche Konstruktoren

ShardListener

public ShardListener (ITestInvocationListener main)

Erstellen Sie eine ShardListener.

Parameter
main ITestInvocationListener: die ITestInvocationListener, an die die Ergebnisse gesendet werden sollen. Um Kollisionen mit anderen ShardListeners zu vermeiden, wird dieses Objekt beim Weiterleiten von Ergebnissen mit main synchronisiert. Die Ergebnisse werden erst gesendet, wenn der Aufruf-Shard abgeschlossen ist.

Öffentliche Methoden

invocationEnded

public void invocationEnded (long elapsedTime)

Parameter
elapsedTime long

invocationFailed

public void invocationFailed (FailureDescription failure)

Parameter
failure FailureDescription

invocationFailed

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

Returns
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