Droidcon 2013 Gradle workshop is an example project. It shows how to write Unit and Integration tests.
A sample android starter project to demonstrate the integration of the following tools:
Sample Tasks:
Fork is the fastest way to execute Android instrumentation test suites by Shazam developers.
AndroidTestingPlease is an Android project that uses Robolectric and Espresso for testing and Gradle to build.
Burst is a set of test runners which rely on enums for varying both the instantiation of test classes and the methods inside of them.
The goal of this project is to speed up the setup of Robolectric, Robotuim, Roboguice, and Mockito in Android Studio. Since there is not built in support for Robolectric there is a lot of manual set up that has to be done. This project uses Robolectric-gralde plugin as well as his InjectedTestRunner.
The uiautomator testing framework lets you test your user interface (UI) efficiently by creating automated functional UI testcases that can be run against your app on one or more devices.
Robotium is an Android test automation framework that has full support for native and hybrid applications. Robotium makes it easy to write powerful and robust automatic black-box UI tests for Android applications.
Robolectric is a unit test framework that de-fangs the Android SDK jar so you can test-drive the development of your Android app. Tests run inside the JVM on your workstation in seconds.