public interface ITestRunListener
Patterned after org.junit.runner.notification.RunListener
The sequence of calls will be:
| Modifier and Type | Method and Description |
|---|---|
void |
testAssumptionFailure(TestIdentifier test,
java.lang.String trace)
Called when an atomic test flags that it assumes a condition that is
false
|
default void |
testEnded(TestIdentifier test,
long endTime,
java.util.Map<java.lang.String,java.lang.String> testMetrics)
Alternative to
testEnded(TestIdentifier, Map) where we can specify the end time
directly. |
void |
testEnded(TestIdentifier test,
java.util.Map<java.lang.String,java.lang.String> testMetrics)
Reports the execution end of an individual test case.
|
void |
testFailed(TestIdentifier test,
java.lang.String trace)
Reports the failure of a individual test case.
|
void |
testIgnored(TestIdentifier test)
Called when a test will not be run, generally because a test method is annotated
with org.junit.Ignore.
|
void |
testRunEnded(long elapsedTime,
java.util.Map<java.lang.String,java.lang.String> runMetrics)
Reports end of test run.
|
void |
testRunFailed(java.lang.String errorMessage)
Reports test run failed to complete due to a fatal error.
|
void |
testRunStarted(java.lang.String runName,
int testCount)
Reports the start of a test run.
|
void |
testRunStopped(long elapsedTime)
Reports test run stopped before completion due to a user request.
|
void |
testStarted(TestIdentifier test)
Reports the start of an individual test case.
|
default void |
testStarted(TestIdentifier test,
long startTime)
Alternative to
testStarted(TestIdentifier) where we also specify when the test was
started, combined with testEnded(TestIdentifier, long, Map) for accurate measure. |
void testRunStarted(java.lang.String runName,
int testCount)
runName - the test run nametestCount - total number of tests in test runvoid testStarted(TestIdentifier test)
test - identifies the testdefault void testStarted(TestIdentifier test, long startTime)
testStarted(TestIdentifier) where we also specify when the test was
started, combined with testEnded(TestIdentifier, long, Map) for accurate measure.test - identifies the teststartTime - the time the test started, measured via System.currentTimeMillis()void testFailed(TestIdentifier test, java.lang.String trace)
Will be called between testStarted and testEnded.
test - identifies the testtrace - stack trace of failurevoid testAssumptionFailure(TestIdentifier test, java.lang.String trace)
test - identifies the testtrace - stack trace of failurevoid testIgnored(TestIdentifier test)
test - identifies the testvoid testEnded(TestIdentifier test, java.util.Map<java.lang.String,java.lang.String> testMetrics)
If testFailed(com.android.ddmlib.testrunner.TestIdentifier, java.lang.String) was not invoked, this test passed. Also returns any key/value
metrics which may have been emitted during the test case's execution.
test - identifies the testtestMetrics - a Map of the metrics emitteddefault void testEnded(TestIdentifier test, long endTime, java.util.Map<java.lang.String,java.lang.String> testMetrics)
testEnded(TestIdentifier, Map) where we can specify the end time
directly. Combine with testStarted(TestIdentifier, long) for accurate measure.test - identifies the testendTime - the time the test ended, measured via System.currentTimeMillis()testMetrics - a Map of the metrics emittedvoid testRunFailed(java.lang.String errorMessage)
errorMessage - String describing reason for run failure.void testRunStopped(long elapsedTime)
TODO: currently unused, consider removing
elapsedTime - device reported elapsed time, in millisecondsvoid testRunEnded(long elapsedTime,
java.util.Map<java.lang.String,java.lang.String> runMetrics)
elapsedTime - device reported elapsed time, in millisecondsrunMetrics - key-value pairs reported at the end of a test run