Setting up Android testing in Intellij IDEA

Does anyone have tutorials on Android testing in Intellij? I am looking for resources similar to what you find for Eclipse, with the ability to create a test project for my Android project.

+4
source share
2 answers

You can find help in the IDEA forum forum .

Tests for the Android application should be located in a separate module with its own AndroidManifest.xml file . To learn how to create tests for your Android, you can use the samples in the Android SDK (ie the β€œSnake” sample).

Create an IDEA project from existing sources. 2 modules from Android Border will be created automatically: the base module and the β€œtests”. then add the dependency between this module and compilation. If compilation is successful, open some test class (ie "SkeletonAppTest" in the "Snake" sample) in the editor and select Run-> SkeletonAppTest (with the Android icon) in the menu pop-up window: the tests will run on the emulator or device. You can create Android Tests are configured to run tests in different areas.

Unfortunately, IDEA 9 does not have the ability to create a test module for some basic Android modules. You can create it using the SDK command line tool .

+2
source
-1
source

All Articles