Stack Exchange
androidx.test:orchestrator in test-only module ('com.android.test')
We are struggling to use the test orchestrator in our new test only module. We had it working fine when the tests were located in the app module.
One observation is that when working within a test-only module, dependencies are brought in slightly differently
Test only
implementation "androidx.test:runner:$androidTestRunnerVersion"
implementation "androidx.test:rules:$androidTestRulesVersion"
implementation "androidx.test.ext:truth:$androidTestTruthExtensionsVersion"

Normal app module
androidTestimplementation "androidx.test:runner:$androidTestRunnerVersion"
androidTestimplementation "androidx.test:rules:$androidTestRulesVersion"
androidTestimplementation "androidx.test.ext:truth:$androidTestTruthExtensionsVersion"

As you can see, the androidTest element is omitted. Test orchestrator is brought in using androidTestUtil.. does anyone know if there an equivalent syntax for test-only modules? Is it possible that a test-only module ignores the androidTestUtil option?
androidTestUtil 'androidx.test:orchestrator:1.3.0'
Has anyone combined test orchestrator with a test only module?!

What is the "test only" module testing? Need more details about where are your actual test code is, what are the dependencies between the modules, and what code is /main and /android Test

The "test only" module is testing elements of the app. It's just a separate module to house some android instrumented tests that require the use of a different AndroidJunitRunner/Application class.
https://developer.android.com/studio/test#use_separate_test_modules_for_instrumented_tests
