Screenshot testing for Android

For local runs, we provide a tight integration with screenshot-tests-for-android. In theory we can make this work for other frameworks/platforms, just reach out to us. (You don’t need this integration for running Screenshotbot in CI., and we also have simple integration with ios-snapshot-test-case)

There are two parts to setup. First we set up for developer use using a Gradle plugin, and then we set up your CI server

Setting up Gradle for local development

We have a Gradle plugin, available via Maven that will manage everything for you:

buildscript {
  dependencies {
     classpath "io.screenshotbot:plugin:0.1.6"

apply plugin: ‘io.screenshotbot.plugin’

You also need to create the file ~/.screenshotbot. You’ll need to copy the API key and API secret you’ll get from your dashboard:

   "apiKey": "...",
   "apiSecretKey": "...",

At this point you can run your screenshots on your development branch as follows:

$ ./gradlew :connectedDebugAndroidTest :debugAndroidTestScreenshotbot

If you now go to, you’ll be able to view your recent runs. You can select multiple runs and you can compare them. Note that any developer run will not be “promoted”: i.e. we won’t send tasks for changes. We’ll get to how to set up promotions in the section on CircleCI and Jenkins.

Powered by BetterDocs