AndroidTestingPlease is an Android project that uses Robolectric and Espresso for testing and Gradle to build. Project uses several jars:
Robolectric is added as a jar because we had to compiled Robolectric repo with one shadow added. It had to be done because of robolectric issue: https://github.com/robolectric/robolectric/issues/898
Setup required Java 1.6, Android SDK, Gradle 2.1 and git.
- Clone AndroidTestingPlease
git clone https://github.com/farmapromlab/AndroidTestingPlease.git
- Build project
./gradlew clean build
- Run robolectric tests
./gradlew clean test
- Run espresso tests (Make sure that your phone or emulator is connected)
./gradlew clean connectedAndroidTest
##You can also fire your tests in IntelliJ IDEA 14
Before importing project to Intellij install plugin Android Studio Unit Test
##Where are tests results?
- Unit tests results
- Espresso tests results