# Dropshots

Dropshots is a Gradle plugin and library that runs Android screenshot assertions on-device, inside your instrumentation tests, instead of pulling screenshots to a host machine for separate comparison.

Dropshots makes on-device screenshot testing easy for Android by performing screenshot assertions directly inside an instrumentation test, alongside the rest of a test suite, rather than pulling captured images to a host machine and comparing them in a separate step afterward. Its Gradle plugin ensures version-controlled reference images are available on the test device so a test's captured screenshots can be compared against them right there.

It installs by applying the com.dropbox.dropshots Gradle plugin, either through the plugins DSL with Maven Central added to the repositories list, or through the legacy buildscript classpath syntax. Once applied, new Gradle tasks create, validate and manage reference images and are wired automatically into a project's normal test task graph. Writing a test means adding the Dropshots JUnit rule to a standard Android instrumentation test and calling Dropshots.assertSnapshot to validate a captured view or activity against its stored reference image; running connectedAndroidTest then validates all such screenshots as part of the normal test run.

Website: https://github.com/dropbox/dropshots
