ResultAggregator

public class ResultAggregator
extends CollectingTestListener

java.lang.Object
   ↳ com.android.tradefed.result.CollectingTestListener
     ↳ com.android.tradefed.retry.ResultAggregator


Special forwarder that aggregates the results when needed, based on the retry strategy that was taken.

Summary

Public constructors

ResultAggregator( listeners, RetryStrategy strategy)

Public methods

void cleanEventsFiles()
final void forwardAggregatedInvocationLogs()

Forward all the invocation level logs to the result reporters that don't support the granular results.

void invocationEnded(long elapsedTime)

void invocationFailed(FailureDescription failure)

void invocationFailed(Throwable cause)

void invocationStarted(IInvocationContext context)

void logAssociation(String dataName, LogFile logFile)

void setLogSaver(ILogSaver logSaver)

void setUpdatedReporting(boolean updatedReporting)

Sets the new reporting.

void testAssumptionFailure(TestDescription test, String trace)
void testAssumptionFailure(TestDescription test, FailureDescription failure)
void testEnded(TestDescription test, long endTime, testMetrics)

void testFailed(TestDescription test, FailureDescription failure)
void testFailed(TestDescription test, String trace)

void testIgnored(TestDescription test)
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 errorMessage)

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

void testStarted(TestDescription test, long startTime)

Protected methods

File[] getEventsLogs()

Public constructors

ResultAggregator

public ResultAggregator ( listeners, 
                RetryStrategy strategy)

Parameters
listeners

strategy RetryStrategy

Public methods

cleanEventsFiles

public void cleanEventsFiles ()

forwardAggregatedInvocationLogs

public final void forwardAggregatedInvocationLogs ()

Forward all the invocation level logs to the result reporters that don't support the granular results.

invocationEnded

public void invocationEnded (long elapsedTime)

Parameters
elapsedTime long

invocationFailed

public void invocationFailed (FailureDescription failure)

Parameters
failure FailureDescription

invocationFailed

public void invocationFailed (Throwable cause)

Parameters
cause Throwable

invocationStarted

public void invocationStarted (IInvocationContext context)

Parameters
context IInvocationContext

logAssociation

public void logAssociation (String dataName, 
                LogFile logFile)

Parameters
dataName String

logFile LogFile

setLogSaver

public void setLogSaver (ILogSaver logSaver)

Parameters
logSaver ILogSaver

setUpdatedReporting

public void setUpdatedReporting (boolean updatedReporting)

Sets the new reporting.

Parameters
updatedReporting boolean

testAssumptionFailure

public void testAssumptionFailure (TestDescription test, 
                String trace)

Parameters
test TestDescription

trace String

testAssumptionFailure

public void testAssumptionFailure (TestDescription test, 
                FailureDescription failure)

Parameters
test TestDescription

failure FailureDescription

testEnded

public void testEnded (TestDescription test, 
                long endTime, 
                 testMetrics)

Parameters
test TestDescription

endTime long

testMetrics

testFailed

public void testFailed (TestDescription test, 
                FailureDescription failure)

Parameters
test TestDescription

failure FailureDescription

testFailed

public void testFailed (TestDescription test, 
                String trace)

Parameters
test TestDescription

trace String

testIgnored

public void testIgnored (TestDescription test)

Parameters
test TestDescription

testLog

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

Parameters
dataName String

dataType LogDataType

dataStream InputStreamSource

testLogSaved

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

Parameters
dataName String

dataType LogDataType

dataStream InputStreamSource

logFile LogFile

testModuleEnded

public void testModuleEnded ()

testModuleStarted

public void testModuleStarted (IInvocationContext moduleContext)

Parameters
moduleContext IInvocationContext

testRunEnded

public void testRunEnded (long elapsedTime, 
                 runMetrics)

Parameters
elapsedTime long

runMetrics

testRunFailed

public void testRunFailed (FailureDescription failure)

Parameters
failure FailureDescription

testRunFailed

public void testRunFailed (String errorMessage)

Parameters
errorMessage String

testRunStarted

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

Parameters
name String

testCount int

attemptNumber int

startTime long

testStarted

public void testStarted (TestDescription test, 
                long startTime)

Parameters
test TestDescription

startTime long

Protected methods

getEventsLogs

protected File[] getEventsLogs ()

Returns
File[]