This repo gives example on how to do unit testing under the MVP approach on Android.
The tools involved are:
I also included Cobertura in this repo since it helps if you want to analyze the test coverage.
The gradle plugin is Kageiit's Gradle Robojava Plugin
Unit testing on android is hard and usually requires you to use a device or emulator. Robolectric helps us to do a headless testing so we can do quick TDD iteration that can boost the code quality
However, most available references are not that clear. This repo gives you an example on how you can do unit testing from command line leveraging gradle.
To try out this repo simple clone this repo.
$ git clone email@example.com:femmerling/MVPTest.git
$ cd MVPTest
To run tests simply run
$ ./gradlew test