| java.lang.Object | ||||
| ↳ | android.app.Instrumentation | |||
| ↳ | android.support.test.internal.runner.hidden.ExposedInstrumentationApi | |||
| ↳ | android.support.test.runner.MonitoringInstrumentation | |||
| ↳ | android.support.test.orchestrator.AndroidTestOrchestrator | |||
An Instrumentation that executes other instrumentations.
Takes parameters targetPackage and targetInstrumentation, and executes that
instrumentation with the same class parameters.
When run normally (i.e. without setting the isolated flag to false) the on device orchestrator will handle test collection and execution. The target instrumentation is executed via shell commmands on the device, with one shell command for test collection, followed by one shell comand per test.
Each test runs in its own isolated process when its own instrumentation.
The AndroidTestOrchestrator requires installation of a test services APK android.support.test.services, and the stubapp APK android.support.test.orchestrator.stubapp. The orchestrator is technically instrumenting the
stubapp, but it's real purpose is to issue commands to ERROR(/AndroidJUnitRunner) or another
instrumentation, to run your tests.
Whereas previously you might have called am instrument -w
com.example.app/android.support.test.runner.AndroidJUnitRunner you would now execute 'CLASSPATH=$(pm path com.google.android.apps.common.testing.services) app_process /
android.support.test.services.shellexecutor.ShellMain am instrument -w -e targetInstrumentation
com.example.app/android.support.test.runner.AndroidJUnitRunner
android.support.test.orchestrator/android.support.test.orchestrator.AndroidTestOrchestrator'
Pass the -e isolated false flag if you wish the orchestrator to run all your tests in a
single process (as if you invoked the target instrumentation directly
All flags besides isolated and targetInstrumentation are passed by the
orchestrator to the target instrumentation.
|
[Expand]
Inherited Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
| |||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Returns a callback representing the OrchestratorCallback.aidl
| |||||||||||
Invoked every time the TestRunnable finishes, including after test collection.
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
| |||||||||||
| From class android.support.test.internal.runner.hidden.ExposedInstrumentationApi | |||||||||||
|
| |||||||||||
|
| |||||||||||
|
| |||||||||||
Returns a callback representing the OrchestratorCallback.aidl
| Returns | |
|---|---|
OrchestratorCallback.Stub |
An instance of OrchestratorCallback.Stub
|
| Parameters | |
|---|---|
classArg |
String |
| Returns | |
|---|---|
boolean |
|
| Parameters | |
|---|---|
obj |
Object |
e |
Throwable |
| Returns | |
|---|---|
boolean |
|
Invoked every time the TestRunnable finishes, including after test collection.