Ok I want to use gradle to run my tests in an emulator.
gradle has two targets that allow me to run tests:
If I understood correctly, we should use deviceCheck to test stuff in an emulator, but when I run it runs no tests.
connectedCheck also doesn't work because it can't find a device (emulators don't appear in the Android Studio the way my cell phone do).
What I would like is (ideally):
I would also like to have a target that won't boot or turn down the emulator, but it will use one if one is up.
It's possible to do any of these things? I can't find documentation anywhere on how to configure gradle android plugin.
An emulated device is a connected device. I can't tell that gradle has a way of starting an emulator for you short of an Exec task. I leave a couple emulators always running in the background with -no-window, and on our CI I did up a little bash script to fire up a few at various API levels before gradle is invoked and then shut them down afterward.
I came here searching for an example of how deviceCheck is used. It seems like it's supposed to be self-evident.
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