Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Instrumentation testing in Android Studio

enter image description hereI'm new to testing and currently trying to write some tests in Android Studio. I have a sample application module and now trying to figure out, whether the instrumentation test needs to be a module of its own or whether the tests should go inside the src folder... I have read contradicting information on the web. If anyone had a sample, that would be great!


2 Answers

With eclipse ADT plugin and older version of the SDK it was a requirement to put the integration tests in a separate module.

With the gradle build system and android-studio you should be able to put your integration tests in src/test/java and running them from the IDE or gradle command line without pain.

That's why you find contradicting information on the web.

Here is the reference

like image 55
ben75 Avatar answered Feb 20 '26 22:02

ben75


This post contains a very good explanantion on how to do the integration testing in Android Studio: How can I create tests in Android Studio?

like image 25
markonovak Avatar answered Feb 20 '26 22:02

markonovak



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!