TestRunResultListener
public
final
class
TestRunResultListener
extends Object
implements
ITestInvocationListener
java.lang.Object | |
↳ | com.android.tradefed.result.TestRunResultListener |
Listener that allows to read the final test run status.
Summary
Public constructors | |
---|---|
TestRunResultListener()
|
Public methods | |
---|---|
boolean
|
isTestFailed(String testName)
|
boolean
|
isTestRunFailed(String testRunName)
|
void
|
testFailed(TestDescription test, FailureDescription failure)
Reports the failure of a individual test case. |
void
|
testFailed(TestDescription test, String trace)
Reports the failure of a individual test case. |
void
|
testRunEnded(long elapsedTime,
Reports end of test run. |
void
|
testRunFailed(FailureDescription failure)
Reports test run failed to complete due to a failure described by |
void
|
testRunFailed(String errorMessage)
Reports test run failed to complete due to a fatal error. |
void
|
testRunStarted(String runName, int testCount)
Reports the start of a test run. |
Public constructors
TestRunResultListener
public TestRunResultListener ()
Public methods
isTestFailed
public boolean isTestFailed (String testName)
Parameters | |
---|---|
testName |
String |
Returns | |
---|---|
boolean |
isTestRunFailed
public boolean isTestRunFailed (String testRunName)
Parameters | |
---|---|
testRunName |
String |
Returns | |
---|---|
boolean |
testFailed
public void testFailed (TestDescription test, FailureDescription failure)
Reports the failure of a individual test case.
Will be called between testStarted and testEnded.
Parameters | |
---|---|
test |
TestDescription : identifies the test |
failure |
FailureDescription : FailureDescription describing the failure and its context. |
testFailed
public void testFailed (TestDescription test, String trace)
Reports the failure of a individual test case.
Will be called between testStarted and testEnded.
Parameters | |
---|---|
test |
TestDescription : identifies the test |
trace |
String : stack trace of failure |
testRunEnded
public void testRunEnded (long elapsedTime,runMetrics)
Reports end of test run.
Parameters | |
---|---|
elapsedTime |
long : device reported elapsed time, in milliseconds |
runMetrics |
: key-value pairs reported at the end of a test run |
testRunFailed
public void testRunFailed (FailureDescription failure)
Reports test run failed to complete due to a failure described by FailureDescription
.
Parameters | |
---|---|
failure |
FailureDescription : FailureDescription describing the failure and its context. |
testRunFailed
public void testRunFailed (String errorMessage)
Reports test run failed to complete due to a fatal error.
Parameters | |
---|---|
errorMessage |
String : String describing reason for run failure. |
testRunStarted
public void testRunStarted (String runName, int testCount)
Reports the start of a test run.
Parameters | |
---|---|
runName |
String : the test run name |
testCount |
int : total number of tests in test run |