{% setvar book_path %}/reference/kotlin/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}
class OrchestrationResultPrinter
A line by line reimplementation of
androidx.test.orchestrator.AndroidTestOrchestrator needs to mirror the output of a non-orchestrated AndroidJUnitRunner multi-test run, and thus requires a result printer. InstrumentationResultPrinter cannot be reused because it extends from the JUnit RunListener, which passes in JUnit specific objects which cannot access.
TODO(b/35394729): Refactor expertise from this and InstrumentationResultPrinter to one place.
Constants |
|
|---|---|
String |
If included in the status or final bundle sent to an IInstrumentationWatcher, this key identifies the name of the current test class. |
String |
If included in the status or final bundle sent to an IInstrumentationWatcher, this key identifies the name of the current test. |
String |
If included in the status or final bundle sent to an IInstrumentationWatcher, this key identifies the sequence number of the current test. |
String |
If included in the status or final bundle sent to an IInstrumentationWatcher, this key identifies the total number of tests that are being run. |
String |
If included in the status bundle sent to an IInstrumentationWatcher, this key identifies a stack trace describing an error or failure. |
String |
This value, if stored with key REPORT_KEY_IDENTIFIER, identifies AndroidJUnitRunner as the source of the report. |
Int |
The test completed with an assumption failure. |
Int |
This property is deprecated. not supported in JUnit4, use REPORT_VALUE_RESULT_FAILURE instead |
Int |
The test completed with a failure. |
Int |
The test was ignored. |
Int |
The test completed successfully. |
Int |
The test is starting. |
Public constructors |
|
|---|---|
Public functions |
|
|---|---|
Unit |
orchestrationRunFinished( |
Unit |
orchestrationRunStarted(testCount: Int) |
Unit |
Produce a more meaningful crash report including stack trace and report it back to Instrumentation results. |
Unit |
sendStatus(code: Int, bundle: Bundle)Convenience method for getInstrumentation |
Unit |
testAssumptionFailure(failure: ParcelableFailure) |
Unit |
testFailure(failure: ParcelableFailure) |
Unit |
testFinished(description: ParcelableDescription) |
Unit |
testIgnored(description: ParcelableDescription) |
Unit |
testStarted(description: ParcelableDescription)send a status for the start of a each test, so long tests can be seen as "running" |
val REPORT_KEY_NAME_CLASS: String
If included in the status or final bundle sent to an IInstrumentationWatcher, this key identifies the name of the current test class. This is sent with any status message describing a specific test being started or completed.
val REPORT_KEY_NAME_TEST: String
If included in the status or final bundle sent to an IInstrumentationWatcher, this key identifies the name of the current test. This is sent with any status message describing a specific test being started or completed.
val REPORT_KEY_NUM_CURRENT: String
If included in the status or final bundle sent to an IInstrumentationWatcher, this key identifies the sequence number of the current test. This is sent with any status message describing a specific test being started or completed.
val REPORT_KEY_NUM_TOTAL: String
If included in the status or final bundle sent to an IInstrumentationWatcher, this key identifies the total number of tests that are being run. This is sent with all status messages.
val REPORT_KEY_STACK: String
If included in the status bundle sent to an IInstrumentationWatcher, this key identifies a stack trace describing an error or failure. This is sent with any status message describing a specific test being completed.
val REPORT_VALUE_ID: String
This value, if stored with key REPORT_KEY_IDENTIFIER, identifies AndroidJUnitRunner as the source of the report. This is sent with all status messages.
val REPORT_VALUE_RESULT_ASSUMPTION_FAILURE: Int
The test completed with an assumption failure.
fun orchestrationRunFinished(
streamResult: PrintStream,
orchestrationResults: OrchestrationResult
): Unit
fun reportProcessCrash(t: Throwable): Unit
Produce a more meaningful crash report including stack trace and report it back to Instrumentation results.
fun sendStatus(code: Int, bundle: Bundle): Unit
Convenience method for getInstrumentation
fun testStarted(description: ParcelableDescription): Unit
send a status for the start of a each test, so long tests can be seen as "running"