We want to test that an Android library works on all emulators from Android 9 to 25. To do it, we downloaded emulators from 9 to 25, created them one by one, and went within the loop of starting an emulator, passing the tests on its version and closing the emulator when the tests are green.
If one of my colleagues wants to do the same than me, he has to repeat all the manual process: download them all, create an emulator of every version, start it, launch the tests manually, stop it and go for the next emulator.
There's any way of automating the process? I know that the tests will last for several time, but we expect our best of the library we're going to release :·)
One approach is to use Fastlane
and in particular the automated_test_emulator_run
plugin (https://github.com/AzimoLabs/fastlane-plugin-automated-test-emulator-run)
For example:
lane :Automation_EmulatorRun_Gradle do
automated_test_emulator_run(
AVD_setup_path: "~/<path to your avd setup>/AVD_setup.json",
gradle_task:"<your test task>"
)
end
you could try also spoon by square that launch the instrumentation test to all devices visibles via adb devices
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With