Skip to content

Latest commit

 

History

History
21 lines (18 loc) · 1.92 KB

README.md

File metadata and controls

21 lines (18 loc) · 1.92 KB

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