I am new to Android Studio.
My questions are :
Refer Android Studio Overview
Each instance of Android Studio contains a project with one or more application modules. Each application module folder contains the complete source sets for that module, including src/main/
and src/androidTest/
directories. For the most part, you will need to modify the files under each module's src/main/
directory for source code updates, the gradle.build file for build specification and the files under src/androidTest/
directory for test case creation.
In Android Studio 1.0 the scheme has changed a little bit.
Your path should be (app)/src/androidTest/java/com/myapp/HelloWorldTest.java
Here's how I set up Unit Tests in a new Android Studio project:
Open app in Android Studio. Set the Project explorer (left hand window) to display 'Project' mode. Tap the little drop-down at the top left and select 'Project'. Right click the 'src' directory, 'New -> Directory'. Call new directory androidTest Right click androidTest and add a 'java' directory. It will appear in green (indicating it's a test src directory). Now right-click again and add a package, e.g. com.mycompany.myapp.tests Add a new class that extends AndroidTestCase.
http://envyandroid.com/content/images/2014/02/project-structure.png
For putting the classes:- src folder --> main folder --> then java
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With