Nick Palmer Nick Palmer - 2 months ago 27
Android Question

Running gradle's connectedAndroidTest on a specific device

How do you run

on a particular device?

I would expect something like:

./gradlew connectedAndroidTest -DconnectedAndroidTest.device=XXXX

We have a number of devices plugged into our CI server and I can't seem to find any documentation on how to target a specific connected device.

runs the tests on ALL connected devices currently.



It's not supported. The documentation for connectedCheck at, which delegates to connectedAndroidTest for these sorts of on-device non-UI-automated tests, explicitly states:

Runs checks that requires a connected device or emulator. They will run on all connected devices in parallel.

There is a feature request for the ability to select individual devices; you can track its progress at