Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio creates a test folder, why?

Android studio creates a test folder called androidTest with an ApplicationTest.java file by default upon creating a new project. It's obviously used for testing, but what kind of testing? In what circumstances should I use the test folder when developing an Android app?

like image 768
Andy Avatar asked Feb 10 '26 18:02

Andy


2 Answers

but what kind of testing

The instrumentation testing that centers around the technologies in the Testing Support Library (e.g., Espresso, UI Automator).

like image 68
CommonsWare Avatar answered Feb 13 '26 09:02

CommonsWare


You can do Android Instumentation Tests, or regular Junit4 testing. I recommend you do some kind of testing, if only to prevent regression of bugs. I favor test driven development (TDD), cf http://blog.pivotal.io/labs/labs/tdd-android-pov

like image 29
Christine Avatar answered Feb 13 '26 09:02

Christine



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!