From the docs
New: instrumentation tests with Orchestrator Android Test Orchestrator runs each of your app's instrumentation tests independently, which has several benefits, but also one drawback:
Benefits
No shared state: Each test runs in its own Instrumentation instance, so the shared state doesn't accumulate across tests.
Isolated crashes: If test crashes, it takes down only its own instance of Instrumentation, so the other tests in your suite still run.
Drawback
Longer runtime: Each test running its own Instrumentation instance means that the testing process takes slightly longer overall. The increased runtime could impact your quota usage or billed time and might cause you to hit devices' time-out limits.
Now it recommends running the new orchestrator locally to make sure it works. so I ran it after adding testOptions to my module's build.gradle file:
testOptions {
execution 'ANDROID_TEST_ORCHESTRATOR'
}
with gradle dependencies:
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestUtil 'com.android.support.test:orchestrator:1.0.1'
but I don't see any difference when doing ./gradlew connectedCheck
I tried plugging in a physical device and running emulator api 26 at the same time. So i would have two devices attached to adb now. then executing ./gradlew connectedCheck. i see the following output in the console terminal:
#./gradlew connectedCheck
Parallel execution with configuration on demand is an incubating feature.
> Configure project :app
Configuration 'compile' in project ':app' is deprecated. Use 'implementation' instead.
The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
at build_495ocpxnm4a4fvowoj4qizq7q.run(/Users/me/Development/QA/android/MyApp/app/build.gradle:303)
(Run with --stacktrace to get the full stack trace of this deprecation warning.)
The CompileOptions.bootClasspath property has been deprecated and is scheduled to be removed in Gradle 5.0. Please use the CompileOptions.bootstrapClasspath property instead.
[newrelic.info] Android Gradle plugin version 3.+ detected. Using transform API
registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
> Task :app:processLabsDebugGoogleServices
Parsing json file: /Users/me/Development/QA/android/Myapp/app/google-services.json
Starting 39 tests on Nexus_6P_API_26_oreo_xxhdpi(AVD) - 8.0.0
Starting 39 tests on SM-G610F - 7.0
<====---------> 33% EXECUTING [4m 40s]
it was running the test on both devices. is this what orchestrator does ?
what is the purpose of the orchestrator?
Android Test Orchestrator makes sure that each of your tests runs in an isolated environment. This means that the results of a prior test are less likely to affect the outcome of future tests (due to shared state).
Read more on the Android Developers blog and on this question.