Google is committed to advancing racial equity for Black communities. See how.

ProtoResultReporter

public abstract class ProtoResultReporter
extends Object implements ITestInvocationListener, ILogSaverListener, ISupportGranularResults

java.lang.Object
   ↳ com.android.tradefed.result.proto.ProtoResultReporter


Result reporter build a TestRecord protobuf with all the results inside. Should be extended to handle what to do with the final proto in processFinalProto(com.android.tradefed.result.proto.TestRecordProto.TestRecord).

Summary

Public constructors

ProtoResultReporter()

Public methods

final void invocationEnded(long elapsedTime)
void invocationFailed(FailureDescription failure)
void invocationFailed(Throwable cause)
final void invocationStarted(IInvocationContext context)
final void logAssociation(String dataName, LogFile logFile)
void processFinalProto(TestRecordProto.TestRecord finalRecord)

Handling of the final proto with all results.

void processStartInvocation(TestRecordProto.TestRecord invocationStartRecord, IInvocationContext invocationContext)

Handling of the partial invocation test record proto after invocationStarted(com.android.tradefed.invoker.IInvocationContext) occurred.

void processTestCaseEnded(TestRecordProto.TestRecord testCaseRecord)

Handling of the finalized test case record proto after ITestLifeCycleReceiver.testEnded(com.android.tradefed.result.TestDescription, long, HashMap) occurred.

void processTestCaseStarted(TestRecordProto.TestRecord testCaseStartedRecord)

Handling of the partial test case record proto after testStarted(com.android.tradefed.result.TestDescription, long) occurred.

void processTestModuleEnd(TestRecordProto.TestRecord moduleRecord)

Handling of the finalized module record proto after testModuleEnded() occurred.

void processTestModuleStarted(TestRecordProto.TestRecord moduleStartRecord)

Handling of the partial module record proto after testModuleStarted(com.android.tradefed.invoker.IInvocationContext) occurred.

void processTestRunEnded(TestRecordProto.TestRecord runRecord, boolean moduleInProgress)

Handling of the finalized run record proto after ITestLifeCycleReceiver.testRunEnded(long, HashMap) occurred.

void processTestRunStarted(TestRecordProto.TestRecord runStartedRecord)

Handling of the partial test run record proto after testRunStarted(String, int) occurred.

boolean supportGranularResults()
final void testAssumptionFailure(TestDescription test, String trace)
final void testAssumptionFailure(TestDescription test, FailureDescription failure)
final void testEnded(TestDescription test, long endTime, testMetrics)
void testEnded(TestDescription test, testMetrics)
final void testFailed(TestDescription test, FailureDescription failure)
final void testFailed(TestDescription test, String trace)
final void testIgnored(TestDescription test)
final void testModuleEnded()
final void testModuleStarted(IInvocationContext moduleContext)
final void testRunEnded(long elapsedTimeMillis, runMetrics)
final void testRunFailed(FailureDescription failure)
final void testRunFailed(String errorMessage)
void testRunStarted(String runName, int testCount, int attemptNumber)
final void testRunStarted(String runName, int testCount)
void testRunStarted(String runName, int testCount, int attemptNumber, long startTime)
final void testStarted(TestDescription test, long startTime)
final void testStarted(TestDescription test)

Public constructors

ProtoResultReporter

public ProtoResultReporter ()

Public methods

invocationEnded

public final 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 final void invocationStarted (IInvocationContext context)

Parameters
context IInvocationContext

logAssociation

public final void logAssociation (String dataName, 
                LogFile logFile)

Parameters
dataName String

logFile LogFile

processFinalProto

public void processFinalProto (TestRecordProto.TestRecord finalRecord)

Handling of the final proto with all results.

Parameters
finalRecord TestRecordProto.TestRecord: The finalized proto with all the invocation results.

processStartInvocation

public void processStartInvocation (TestRecordProto.TestRecord invocationStartRecord, 
                IInvocationContext invocationContext)

Handling of the partial invocation test record proto after invocationStarted(com.android.tradefed.invoker.IInvocationContext) occurred.

Parameters
invocationStartRecord TestRecordProto.TestRecord: The partial proto populated after the invocationStart.

invocationContext IInvocationContext: The invocation IInvocationContext.

processTestCaseEnded

public void processTestCaseEnded (TestRecordProto.TestRecord testCaseRecord)

Handling of the finalized test case record proto after ITestLifeCycleReceiver.testEnded(com.android.tradefed.result.TestDescription, long, HashMap) occurred.

Parameters
testCaseRecord TestRecordProto.TestRecord: The finalized proto representing a test case.

processTestCaseStarted

public void processTestCaseStarted (TestRecordProto.TestRecord testCaseStartedRecord)

Handling of the partial test case record proto after testStarted(com.android.tradefed.result.TestDescription, long) occurred.

Parameters
testCaseStartedRecord TestRecordProto.TestRecord: The partial proto representing the test case.

processTestModuleEnd

public void processTestModuleEnd (TestRecordProto.TestRecord moduleRecord)

Handling of the finalized module record proto after testModuleEnded() occurred.

Parameters
moduleRecord TestRecordProto.TestRecord: The finalized proto representing the module.

processTestModuleStarted

public void processTestModuleStarted (TestRecordProto.TestRecord moduleStartRecord)

Handling of the partial module record proto after testModuleStarted(com.android.tradefed.invoker.IInvocationContext) occurred.

Parameters
moduleStartRecord TestRecordProto.TestRecord: The partial proto representing the module.

processTestRunEnded

public void processTestRunEnded (TestRecordProto.TestRecord runRecord, 
                boolean moduleInProgress)

Handling of the finalized run record proto after ITestLifeCycleReceiver.testRunEnded(long, HashMap) occurred.

Parameters
runRecord TestRecordProto.TestRecord: The finalized proto representing the run.

moduleInProgress boolean: whether or not a module is in progress.

processTestRunStarted

public void processTestRunStarted (TestRecordProto.TestRecord runStartedRecord)

Handling of the partial test run record proto after testRunStarted(String, int) occurred.

Parameters
runStartedRecord TestRecordProto.TestRecord: The partial proto representing the run.

supportGranularResults

public boolean supportGranularResults ()

Returns
boolean

testAssumptionFailure

public final void testAssumptionFailure (TestDescription test, 
                String trace)

Parameters
test TestDescription

trace String

testAssumptionFailure

public final void testAssumptionFailure (TestDescription test, 
                FailureDescription failure)

Parameters
test TestDescription

failure FailureDescription

testEnded

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

Parameters
test TestDescription

endTime long

testMetrics

testEnded

public void testEnded (TestDescription test, 
                 testMetrics)

Parameters
test TestDescription

testMetrics

testFailed

public final void testFailed (TestDescription test, 
                FailureDescription failure)

Parameters
test TestDescription

failure FailureDescription

testFailed

public final void testFailed (TestDescription test, 
                String trace)

Parameters
test TestDescription

trace String

testIgnored

public final void testIgnored (TestDescription test)

Parameters
test TestDescription

testModuleEnded

public final void testModuleEnded ()

testModuleStarted

public final void testModuleStarted (IInvocationContext moduleContext)

Parameters
moduleContext IInvocationContext

testRunEnded

public final void testRunEnded (long elapsedTimeMillis, 
                 runMetrics)

Parameters
elapsedTimeMillis long

runMetrics

testRunFailed

public final void testRunFailed (FailureDescription failure)

Parameters
failure FailureDescription

testRunFailed

public final void testRunFailed (String errorMessage)

Parameters
errorMessage String

testRunStarted

public void testRunStarted (String runName, 
                int testCount, 
                int attemptNumber)

Parameters
runName String

testCount int

attemptNumber int

testRunStarted

public final void testRunStarted (String runName, 
                int testCount)

Parameters
runName String

testCount int

testRunStarted

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

Parameters
runName String

testCount int

attemptNumber int

startTime long

testStarted

public final void testStarted (TestDescription test, 
                long startTime)

Parameters
test TestDescription

startTime long

testStarted

public final void testStarted (TestDescription test)

Parameters
test TestDescription