Where is the "Create Test Module" in Android Studio?

Before I switched to Android Studio, I used the “Create Test Module” in IntelliJ IDEA to create a test module to save my unit tests there. However, I can not find it in Android Studio. How can I create it to record and run tests? Thanks.

+4
source share
1 answer

You can put them in the same module as the sources of your apk. Create a directory structure as follows:

-<Project root> |-<Module name> |-src |-main |-com |-<company name> |-<app name> |-instrumentTest |-com |-<company name> |-<app name> <- Put your unittests here 

You can launch them by creating a new launch configuration in Android Studio. Select a new Android test run.

+1
source

Source: https://habr.com/ru/post/1490048/