AndroidTestingPlease

Additional

Language
Java
Version
N/A
Created
Oct 23, 2014
Updated
Jul 8, 2015 (Retired)
Owner
FarmaProm Lab (farmapromlab)
Contributor
Piotr Ślesarew (sliskiCode)
1
Activity
Badge
Generate
Download
Source code

Advertisement

#[DEPRECATED] AndroidTestingPlease

AndroidTestingPlease is an Android project that uses Robolectric and Espresso for testing and Gradle to build. Project uses several jars:

  • espresso-1.1.jar
  • testrunner-1.1.jar
  • testrunner-runtime-1.1.jar
  • robolectric-2.4-SNAPSHOT-jar-with-dependencies.jar

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: robolectric/robolectric#898

##Setup

Setup required Java 1.6, Android SDK, Gradle 2.1 and git.

  1. Clone AndroidTestingPlease
git clone https://github.com/farmapromlab/AndroidTestingPlease.git
  1. Build project
./gradlew clean build
  1. Run robolectric tests
./gradlew clean test
  1. 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?

  1. Unit tests results
./IdeaProjects/AndroidTestingPlease/app/build/test-report/index.html
  1. Espresso tests results
./IdeaProjects/AndroidTestingPlease/app/build/outputs/reports/androidTests/connected/index.html