InstrumentationResultProtoParser
public
class
InstrumentationResultProtoParser
extends Object
implements
IShellOutputReceiver
java.lang.Object | |
↳ | com.android.tradefed.result.ddmlib.InstrumentationResultProtoParser |
Parses the instrumentation result proto collected during instrumentation test run and informs ITestRunListener of the results.
Summary
Fields | |
---|---|
public
static
final
String |
INVALID_TEST_RESULTS_FILE
Error message supplied when no test result file is found. |
public
static
final
String |
NO_TEST_RESULTS_FILE
Error message supplied when no test result file is found. |
public
static
final
String |
NO_TEST_RESULTS_MSG
Error message supplied when no test results are received from test run. |
Public constructors | |
---|---|
InstrumentationResultProtoParser(String runName,
|
Public methods | |
---|---|
void
|
addOutput(byte[] protoData, int bytes, int length)
|
void
|
flush()
|
boolean
|
isCancelled()
|
void
|
processProtoFile(File protoFile)
Process the instrumentation result proto file collected during the instrumentation test run. |
void
|
processSessionStatus(InstrumentationData.SessionStatus sessionStatus)
Preprocess the instrumentation session status which includes the instrumentation test results and the session status code to shell output format for further processing by InstrumentationResultParser. |
void
|
processTestStatus(InstrumentationData.TestStatus testStatus)
Preprocess the single TestStatus proto message which includes the test info or test results and result code in to shell output format for further processing by InstrumentationResultParser. |
Fields
INVALID_TEST_RESULTS_FILE
public static final String INVALID_TEST_RESULTS_FILE
Error message supplied when no test result file is found.
NO_TEST_RESULTS_FILE
public static final String NO_TEST_RESULTS_FILE
Error message supplied when no test result file is found.
NO_TEST_RESULTS_MSG
public static final String NO_TEST_RESULTS_MSG
Error message supplied when no test results are received from test run.
Public constructors
InstrumentationResultProtoParser
public InstrumentationResultProtoParser (String runName,listeners)
Parameters | |
---|---|
runName |
String |
listeners |
|
Public methods
addOutput
public void addOutput (byte[] protoData, int bytes, int length)
Parameters | |
---|---|
protoData |
byte |
bytes |
int |
length |
int |
flush
public void flush ()
isCancelled
public boolean isCancelled ()
Returns | |
---|---|
boolean |
processProtoFile
public void processProtoFile (File protoFile)
Process the instrumentation result proto file collected during the instrumentation test run. Instrumentation proto file consist of test status and instrumentation session status. This method will be used only when complete instrumentation results proto file is available for parsing.
Parameters | |
---|---|
protoFile |
File : that contains the test status and instrumentation session results. |
processSessionStatus
public void processSessionStatus (InstrumentationData.SessionStatus sessionStatus)
Preprocess the instrumentation session status which includes the instrumentation test results and the session status code to shell output format for further processing by InstrumentationResultParser.
Parameters | |
---|---|
sessionStatus |
InstrumentationData.SessionStatus : The SessionStatus holding the current instrumentation session
info collected during the test run.
|
processTestStatus
public void processTestStatus (InstrumentationData.TestStatus testStatus)
Preprocess the single TestStatus proto message which includes the test info or test results and result code in to shell output format for further processing by InstrumentationResultParser.
Parameters | |
---|---|
testStatus |
InstrumentationData.TestStatus : The TestStatus holding the current test info collected during the
test.
|