LUCIResultReporter
public
class
LUCIResultReporter
extends CollectingTestListener
implements
ILogSaverListener,
ISupportGranularResults
java.lang.Object | ||
↳ | com.android.tradefed.result.CollectingTestListener | |
↳ | com.android.tradefed.result.LUCIResultReporter |
A result reporter that saves test results needed by ResultDB and LUCI into JSON format (go/result-sink) and logs the file location in the console. https://pkg.go.dev/go.chromium.org/luci/resultdb/proto/v1#TestResult It stores the test result for each test case in the test run in an array.
Summary
Public constructors | |
---|---|
LUCIResultReporter()
|
Public methods | |
---|---|
void
|
invocationEnded(long elapsedTime)
Reports that the invocation has terminated, whether successfully or due to some error condition. |
void
|
invocationFailed(Throwable cause)
Reports an incomplete invocation due to some error condition. |
void
|
invocationStarted(IInvocationContext context)
Reports the start of the test invocation. |
void
|
logAssociation(String dataName, LogFile logFile)
Collects result files. |
void
|
saveJsonFile(JSONObject jsonResults)
Saves the JSON result file. |
void
|
setGranularResults(boolean granularResults)
|
boolean
|
supportGranularResults()
Returns True if the reporter support granular results, false otherwise. |
Public constructors
LUCIResultReporter
public LUCIResultReporter ()
Public methods
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 |
invocationFailed
public void invocationFailed (Throwable cause)
Reports an incomplete invocation due to some error condition.
Will be automatically called by the TradeFederation framework.Parameters | |
---|---|
cause |
Throwable : the Throwable cause of the failure |
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 |
logAssociation
public void logAssociation (String dataName, LogFile logFile)
Collects result files.
Parameters | |
---|---|
dataName |
String : The name of the data |
logFile |
LogFile : the LogFile that was logged before and should be associated with the
test case. |
saveJsonFile
public void saveJsonFile (JSONObject jsonResults)
Saves the JSON result file.
Parameters | |
---|---|
jsonResults |
JSONObject |
setGranularResults
public void setGranularResults (boolean granularResults)
Parameters | |
---|---|
granularResults |
boolean |
supportGranularResults
public boolean supportGranularResults ()
Returns True if the reporter support granular results, false otherwise.
Returns | |
---|---|
boolean |