j2emanue
j2emanue

Reputation: 62549

Android - what is gradle task connectedCheck used for

When I run the following command I get a description of connectedCheck but I'm still not sure what it's used for. Could anyone give me a real world example?

./gradlew tasks prints

...
Verification tasks
------------------
check - Runs all checks.
connectedCheck - Runs all device checks on currently connected devices.
connectedInstrumentTest - Installs and runs the tests for Build 'Debug' on connected devices.
deviceCheck - Runs all device checks using Device Providers and Test Servers.
...

Upvotes: 10

Views: 11651

Answers (1)

Piotr Wittchen
Piotr Wittchen

Reputation: 3922

Command ./gradlew connectedCheck executes instrumentation tests located in src/androidTests/ directory on connected Android device or emulator. Such tests can have dependencies to Android API. These tests can be simple assertions or UI tests with Espresso framework or something similar. Yesterday I wrote post about Android automated tests including more detailed description of them. You can check it out here.

Upvotes: 30

Related Questions