0

For Android Espresso Testing, i'm using the following commands to run our tests:

 ./gradlew pixel4api30DebugAndroidTest 
-Pandroid.testInstrumentationRunnerArguments.class=com.aaa.bbb.ccc.Suites.TestSuite 
-Pandroid.experimental.androidTest.numManagedDeviceShards=2

This splits all the tests in the TestSuites across 2 pixel 4 emulators.

If I have the following in the TestSuite:

TestClass1

  • Test1
  • Test2
  • Test3

TestClass2

  • Test1
  • Test2
  • Test3

It may run TestClass1.Test1 on 1 emulator and TestClass1.Test2 on emulator 2. (it could pick any emulator to run any of the tests on).

Is there a way to force it to split the shards by TestClasses? So it will run TestClass1 and all tests on one emulator, TestClass2 and all tests on an emulator.

I believe if you have used Spoon in the past, you may have been able to accomplish this by using singleInstrumentationCall property as noted here: https://github.com/jaredsburrows/gradle-spoon-plugin

asked Jan 11, 2023 at 20:54
2
  • Hello, any progress on this? Having the same question... Commented Jul 31, 2023 at 9:45
  • Unfortunately no Commented Oct 4, 2023 at 19:33

0

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.