1

Am seeing crashes while running tests from CI. Read this article(https://developer.android.com/training/testing/junit-runner#ato-gradle) about using Android Test Orchestrator. Am using adb to run my tests from CI. want to know how do I install orchestrator. apk in command line ?

Suba Ram
  • 31
  • 2

2 Answers2

5

If using orchestrator, you need the test service apk too.

  1. Get the apk:s from web repo, or you local machine. Local path is somethin like:

    <your cache dir>\.gradle\caches\modules-2\files-2.1\androidx.test\orchestrator\1.4.0-alpha05\ffa651bbb898f0f2bc93c8e9f1296ed5e77768f5\orchestrator-1.4.0-alpha05.apk

    <your cache dir>\.gradle\caches\modules-2\files-2.1\androidx.test.services\test-services\1.4.0-alpha05\2a8f8a5c3f033d0c33e0faf35c6151713a9b0f9d\test-services-1.4.0-alpha05.apk

  2. Put them somewhere, where accessible from cmd line.

  3. Run these lines from that location:

    adb install -g -r --force-queryable orchestrator-1.4.0-alpha05.apk

    adb install -g -r --force-queryable test-services-1.4.0-alpha05.apk

Nilzor
  • 18,082
  • 22
  • 100
  • 167
j4kk1
  • 61
  • 1
  • 3
  • 4
    THANK YOU! The `--force-queryable` parameter is essential for Android 11 and up. Solved a problem I've been struggling with for weeks. Why is this answer downvoted? – Nilzor Jan 12 '22 at 13:26
-1

I am also struggling but this --force-queryable solve my problem. Thanks #nilzor

Amir Dora.
  • 2,831
  • 4
  • 40
  • 61
Varun RTR
  • 29
  • 3
  • Please don't add "thank you" as an answer. Instead, vote up the answers that you find helpful. - [From Review](/review/late-answers/34753102) – Amir Dora. Aug 01 '23 at 20:13