Skip Navigation

Execute tests from the 
Android Studio

The tests that you can run from the command line (Execute all tests from the command line with Gradle and Execute specific tests from the command line with Gradle) can also be run from within the IDE. This can be useful for investigating test failures with breakpoints or for running tests as you write the code.
  1. In 
    Run > Edit Configurations
    , add a new test configuration.
  2. Set the following parameters for the test configuration:
    • Module: 
    • Instrumentation runner:
  3. Save the configuration.
  4. Select the new configuration and Run or Debug.
The tests will run and generate results. The IDE will show progress and results. If Debug was selected, you can insert breakpoints in the code.