Shot is an Android screenshot-testing framework built as a Gradle plugin and core Android library. It lets developers record reference screenshots and compare them against later test runs to detect visual regressions. Tests use a ScreenshotTest interface and a ready-to-use instrumentation runner integrated with the Android testing workflow. The framework supports traditional Android Views as well as Jetpack Compose components. Gradle tasks handle recording, verification, downloading screenshots, cleanup, and flavor-specific test configurations. When comparisons fail, Shot generates reports that help developers inspect visual differences. It is designed for local development and continuous integration, with emulator configuration guidance for more stable rendering across environments.
Features
- Android screenshot regression testing
- Android Views and Jetpack Compose support
- Reference screenshot recording and verification
- Dedicated ScreenshotTest interface and test runner
- Flavor-aware Gradle testing tasks
- Visual difference reports for failed comparisons