Nick Palmer Nick Palmer - 1 year ago 202
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.


Answer Source

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

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download