Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Test Sharding with Spoon

I am using Spoon and Espresso to automate UI/Functional instrumentation tests on our android app.

I would like to know if there is a way to distribute instrumentation tests across the multiple connected devices and/or emulators so that i can reduce the test execution time.

Ex: I have say 300 tests that take 15 mins to run on 1 emulator. Is there a way i can add more emulators (say 4), distribute 75 tests to each emulator and reduce the test execution time?

Appreciate your inputs on this.

like image 296
Pavan Agarwal Avatar asked Jun 16 '26 01:06

Pavan Agarwal


1 Answers

What you are looking for is called auto-sharding. You have to call the spoon-runner with --shard and add the serials from all connected devices with -serial. You can find the serials with adb devices.

like image 51
sebokopter Avatar answered Jun 21 '26 08:06

sebokopter



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!