SuiteResultReporter

public class SuiteResultReporter
extends CollectingTestListener

java.lang.Object
   ↳ com.android.tradefed.result.CollectingTestListener
     ↳ com.android.tradefed.result.suite.SuiteResultReporter


Collect test results for an entire suite invocation and output the final results.

Summary

Nested classes

class SuiteResultReporter.ModulePrepTimes

Object holder for the preparation and tear down time of one module. 

Fields

public static final String SUITE_REPORTER_SOURCE

Public constructors

SuiteResultReporter()

Public methods

int getCompleteModules()
long getFailedTests()
Map<String, IAbi> getModulesAbi()

Returns a map of modules abi: .

long getPassedTests()
TestSummary getSummary()

Allows the InvocationListener to return a summary.

int getTotalModules()
long getTotalTests()
void invocationEnded(long elapsedTime)

Reports that the invocation has terminated, whether successfully or due to some error condition.

void invocationStarted(IInvocationContext context)

Reports the start of the test invocation.

void testModuleStarted(IInvocationContext moduleContext)

Reports the beginning of a module running.

void testRunStarted(String name, int numTests)

Reports the start of a test run.

Protected methods

long getElapsedTime()

Returns the elapsed time of the full run.

long getStartTime()

Returns the start time of the run.

Fields

SUITE_REPORTER_SOURCE

public static final String SUITE_REPORTER_SOURCE

Public constructors

SuiteResultReporter

public SuiteResultReporter ()

Public methods

getCompleteModules

public int getCompleteModules ()

Returns
int

getFailedTests

public long getFailedTests ()

Returns
long

getModulesAbi

public Map<String, IAbi> getModulesAbi ()

Returns a map of modules abi: .

Returns
Map<String, IAbi>

getPassedTests

public long getPassedTests ()

Returns
long

getSummary

public TestSummary getSummary ()

Allows the InvocationListener to return a summary.

Returns
TestSummary A TestSummary summarizing the run, or null

getTotalModules

public int getTotalModules ()

Returns
int

getTotalTests

public long getTotalTests ()

Returns
long

invocationEnded

public void invocationEnded (long elapsedTime)

Reports that the invocation has terminated, whether successfully or due to some error condition.

Will be automatically called by the TradeFederation framework.

Parameters
elapsedTime long: the elapsed time of the invocation in ms

invocationStarted

public void invocationStarted (IInvocationContext context)

Reports the start of the test invocation.

Will be automatically called by the TradeFederation framework. Reporters need to override this method to support multiple devices reporting.

Parameters
context IInvocationContext: information about the invocation

testModuleStarted

public void testModuleStarted (IInvocationContext moduleContext)

Reports the beginning of a module running. This callback is associated with testModuleEnded() and is optional in the sequence. It is only used during a run that uses modules: ITestSuite based runners.

Parameters
moduleContext IInvocationContext: the IInvocationContext of the module.

testRunStarted

public void testRunStarted (String name, 
                int numTests)

Reports the start of a test run.

Parameters
name String: the test run name

numTests int: total number of tests in test run

Protected methods

getElapsedTime

protected long getElapsedTime ()

Returns the elapsed time of the full run.

Returns
long

getStartTime

protected long getStartTime ()

Returns the start time of the run.

Returns
long