Skip to content

blink22/android-testing

 
 

Repository files navigation

Run instrumentation tests concurrently on Firebase test lab

This repository shows how you can severely reduce the time taken to run instrumentation tests on cloud-based app-testing infrastructure like Firebase test lab. It forks an Android testing codelab to act as a sample project to show a demo.

The idea is simply based on:

  1. Importing an annotation processor, in your project, which creates a file with the full names of all the instrumentation test cases at the build time.
  2. Run a bash script which executes those tests concurrently on Firebase test lab.

Getting Started

These are the steps to to integrate the tweak to the sample project Android testing codelab:

  1. Import the annotation processor module as shown in this commit.
  2. Add these bash scripts to the root of the project.
  3. Uncomment this bash code after doing the necessary substitution.
  4. Make sure you have configured local gcloud sdk environment.
  5. Execute the following bash code in the project root directory:
./gradlew clean
./gradlew assembleMockDebug # builds app APK
./gradlew assembleMockDebugAndroidTest # builds ui-test APK and generates "ui-tests" file
bash firebase-run-tests-concurrently.sh ui-tests  

About

This repository shows a demo how to run UI tests on Firebase test-lab, or any similar service, in a time and cost efficient way. Check this relevant medium article

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 98.0%
  • Shell 2.0%