Execute all tests from the command line with Gradle
- Change the directory to samples/<app_name>.
-
Run the following command:
./gradlew connectedAppDebugAndroidTest
Test results are written to the following sub-directory: <app_name>/build/reports/androidTests/connected/flavors/APP.
You can save test results using a continuous integration system. You can also use a JUnit plug-in to display the test results in a readable form, to send email messages to project members, or to take other common continuous integration actions.
For more information about running tests using the command line, see Android Studio: Test from the command line.