Closed Johnson-OpNet closed 10 months ago
GMD should be able to work with orchestrator. See https://github.com/android/android-test/blob/main/gradle-tests/orchestrator/build.gradle which does this.
If you're having issues with GMD, I'd recommend filing bugs under the gradle component listed here https://source.android.com/docs/setup/contribute/report-bugs
@Johnson-OpNet hi! Have you solved the issue? I faced with same issue at the same configuration but can not find the solution
I think you also need use androidTestUtil
to add orchestrator to your dependencies. At least, I can run it locally with orchestrator + GMD.
@utzcoz hi! I did not get it, sorry. What do you mean use androidTestUtil
?
Declare your dependency like this: 'androidTestUtil androidx.test:orchestrator:1.4.2'
Please see the example I gave above for more details. Specifically this line https://github.com/android/android-test/blob/7071e3175d7262f2dabc6981d632c44339b99792/gradle-tests/orchestrator/build.gradle#L53
I tried both variants
androidTestUtil 'androidx.test:orchestrator:1.4.2'
in app build.gradle
and
androidTestUtil libs.testOrchestrator
in app build.gradle which is linked to testOrchestrator = { group = "androidx.test", name = "orchestrator", version.ref = "testOrchestrator" }
in settings.gradle
Both variant leads to Starting 0 tests
Would it be possible to narrow down the cause of the failure by starting from the working sample I provided, and incrementally introducing changes until you get a failure?
@EgorUdev Another occasion that I have faced is that: your tests code has compiling errors or other code related errors, and the compilation failed that causes "Starting 0 tests". So you can check whether your test suite can work with ./gradlew cAT
without orchestrator.
I am currently trying to use Gradle Managed Devices to replace instrumented tests, after completing the official setup steps, the execution fails with the log message
Starting 0 tests on pixel2Api29
I found that it's because ofANDROIDX_TEST_ORCHESTRATOR
, can these 2 utils goes together? If not, how can I remove all shared state from your device's CPU and memory after each test and how to isolate crashes if I run the test by GMD? Thanks in advance.My current settings
gradle:
https\://services.gradle.org/distributions/gradle-8.0-all.zip
AGP:com.android.tools.build:gradle:8.1.4
orchestrator:androidx.test:orchestrator:1.4.2