FileProtoResultReporter

public class FileProtoResultReporter
extends ProtoResultReporter

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


Proto reporter that dumps the TestRecord into a file.

Summary

Fields

public static final String PERIODIC_PROTO_WRITING_OPTION

public static final String PROTO_OUTPUT_FILE

public static final String USE_DELIMITED_API

Public constructors

FileProtoResultReporter()

Public methods

boolean isPeriodicWriting()

Whether or not periodic writing is enabled.

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 processTestModuleEnd(TestRecordProto.TestRecord moduleRecord)

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

void processTestRunEnded(TestRecordProto.TestRecord runRecord, boolean moduleInProgress)

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

void setDelimitedOutput(boolean delimitedOutput)
void setFileOutput(File output)

Sets the file where to output the result.

void setOutputFile(File outputFile)
void setPeriodicWriting(boolean enabled)

Enable writing each module individualy to a file.

Protected methods

TestRecordProto.ChildReference createModuleChildReference(TestRecordProto.TestRecord record)

Creates a child reference for a module.

Fields

PERIODIC_PROTO_WRITING_OPTION

public static final String PERIODIC_PROTO_WRITING_OPTION

PROTO_OUTPUT_FILE

public static final String PROTO_OUTPUT_FILE

USE_DELIMITED_API

public static final String USE_DELIMITED_API

Public constructors

FileProtoResultReporter

public FileProtoResultReporter ()

Public methods

isPeriodicWriting

public boolean isPeriodicWriting ()

Whether or not periodic writing is enabled.

Returns
boolean

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.

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.

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.

setDelimitedOutput

public void setDelimitedOutput (boolean delimitedOutput)

Parameters
delimitedOutput boolean

setFileOutput

public void setFileOutput (File output)

Sets the file where to output the result.

Parameters
output File

setOutputFile

public void setOutputFile (File outputFile)

Parameters
outputFile File

setPeriodicWriting

public void setPeriodicWriting (boolean enabled)

Enable writing each module individualy to a file.

Parameters
enabled boolean

Protected methods

createModuleChildReference

protected TestRecordProto.ChildReference createModuleChildReference (TestRecordProto.TestRecord record)

Creates a child reference for a module.

Parameters
record TestRecordProto.TestRecord

Returns
TestRecordProto.ChildReference