Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.
...
like image 842
j2emanue Avatar asked Aug 13 '15 13:08

j2emanue


1 Answers

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.

like image 182
Piotr Wittchen Avatar answered Nov 08 '22 11:11

Piotr Wittchen