This shows a simple project with Robolectric Tests
Project is broken into 2 modules
/app
- Your Android application
/robolectric-tests
- tests for the /app
module
Tests can be ran using one of the following:
./gradlew test
./gradlew check
./gradlew build
There is an explanatory blog post here: http://blog.blundell-apps.com/android-gradle-app-with-robolectric-junit-tests/