This repository is an example of how to integration screenshot-tests-for-android with Screenshotbot.
In this particular example, we use Firebase Test Lab for emulators, and run the tests on CircleCI.
See .circleci/config.yml to see the steps required for
configuration.
To translate this to a different CI you need to do a few steps
-
First, make sure that your image has
gcloudtool, install it if required. -
Call
gcloud auth activate-service-accountto authenticate gcloud. You'll need a service user key from the Google Cloud console. -
Use
gcloud firebase test android runto run your Instrumentation tests. Use--directories-to-pullto pull the images from the sdcard. Use--results-bucketto specify the google cloud storage bucket to store the results in. For now we only support one--device-idat a time. -
The screenshotbot CLI tool can parse the output from the previous command. It can figure out where to pull the screenshots from Google Cloud Storage, and delete the artifacts so you don't incur charges.