With IntelliJ IDEA you can generate and run unit tests for your Android applications using
Android Testing Framework
.
When the Android project is created, IntelliJ IDEA creates the following test directories containing sample tests:
- test directory - for running Unit tests

- androidTest directory - for running Instrumented Unit tests

To execute unit tests, IntelliJ IDEA provides an Android-specific run configuration.
-
Specify the tests that you want to run. Do one of the following:
- To run a single test, open it in the editor and select Run | name of the test from the context menu. IntelliJ IDEA creates a temporary run configuration for your test.
- To run all tests in a class or an entire test module, create an Android Test run/debug configuration.
- Select a run/debug configuration from the drop-down list on the main toolbar and start the test according to it.
- Monitor the test execution and view test results in the Test Runner tab of the Run tool window.
See Also
Procedures:
- Getting Started with Android Development
- Configuring Projects
- Running and Debugging Android Applications
- Android
Reference:
Concepts:
External Links: