Roborazzi
Roborazzi is a screenshot testing library for Android that runs on the JVM using
Robolectric Native Graphics,
so screenshot tests run as JVM unit tests without a device or emulator. It works with plain
Android views, Jetpack Compose (including Compose Previews), and Compose Multiplatform.
The typical workflow: record baseline images with ./gradlew recordRoborazziDebug, then compare or
verify against them with compareRoborazziDebug / verifyRoborazziDebug (task names vary by
variant; see the build setup reference).
Reference index
Read the reference that matches the task at hand:
| File |
Read when |
| references/top.md |
You need an overview of what Roborazzi is and why to use it over device tests or Paparazzi. |
| references/try_it_out.md |
You want a minimal quick start or a sample project to try Roborazzi. |
| references/build_setup.md |
Setting up the Gradle plugin and dependencies, or running/understanding the record/compare/verify Gradle tasks and their outputs. |
| references/how_to_use.md |
Writing tests: captureRoboImage for views/Compose/Espresso, RoborazziRule and its options, output paths and file naming, RoborazziOptions (thresholds, image comparators, dump mode). |
| references/gif_and_video.md |
Capturing GIFs and videos of test interactions: captureRoboGif, recordRoboVideo / recordScreenRoboVideo, RoboVideoOptions, GIF vs APNG output. |
| references/ui_tree_dump.md |
UI tree dump: the machine-readable .uitree.json semantics sidecar and annotated Set-of-Mark image for tools & AI agents (roborazzi.dumpUiTree, uiTreeDumpOptions), including the verify-a-UI-fix-by-bounds workflow. |
| references/github_actions.md |
Setting up GitHub Actions CI for Roborazzi: workflows that store baseline screenshots, verify them, and compare snapshot results on pull requests. |
| references/preview_support.md |
Generating screenshot tests from @Preview composables with ComposablePreviewScanner, including setup and customization of preview tests. |
| references/compose_multiplatform.md |
Screenshot testing Compose Multiplatform targets (iOS, desktop/JVM), including feature support per platform. |
| references/ai_powered_image_assertion.md |
Asserting screenshot content with AI models (OpenAI, Gemini) via roborazzi-ai modules. |
| references/gradle_properties_options.md |
Configuring roborazzi.* Gradle properties: task behavior, output directory, file-name strategy, comparison report settings. |
| references/idea_plugin.md |
Using the Roborazzi IntelliJ IDEA / Android Studio plugin to view screenshots in the IDE. |
| references/faq.md |
Troubleshooting: common errors, CI setup questions, Robolectric configuration issues, and other frequently asked questions. |
The files under references/ mirror the official Roborazzi documentation at the time this skill
was published. The latest version is always available at
the documentation site.
1---2name: roborazzi3description: Use when working with Roborazzi screenshot tests on Android/JVM — setting up the Roborazzi Gradle plugin, running record/compare/verify tasks, writing tests with captureRoboImage or RoborazziRule, Compose Preview screenshot testing (ComposablePreviewScanner), Compose Multiplatform (iOS/desktop) screenshots, AI-powered image assertions, roborazzi.* Gradle properties, or troubleshooting Roborazzi/Robolectric screenshot test failures.4---56# Roborazzi78Roborazzi is a screenshot testing library for Android that runs on the JVM using9[Robolectric Native Graphics](https://github.com/robolectric/robolectric/releases/tag/robolectric-4.10),10so screenshot tests run as JVM unit tests without a device or emulator. It works with plain11Android views, Jetpack Compose (including Compose Previews), and Compose Multiplatform.1213The typical workflow: record baseline images with `./gradlew recordRoborazziDebug`, then compare or14verify against them with `compareRoborazziDebug` / `verifyRoborazziDebug` (task names vary by15variant; see the build setup reference).1617## Reference index1819Read the reference that matches the task at hand:2021| File | Read when |22|---|---|23| [references/top.md](references/top.md) | You need an overview of what Roborazzi is and why to use it over device tests or Paparazzi. |24| [references/try_it_out.md](references/try_it_out.md) | You want a minimal quick start or a sample project to try Roborazzi. |25| [references/build_setup.md](references/build_setup.md) | Setting up the Gradle plugin and dependencies, or running/understanding the `record`/`compare`/`verify` Gradle tasks and their outputs. |26| [references/how_to_use.md](references/how_to_use.md) | Writing tests: `captureRoboImage` for views/Compose/Espresso, `RoborazziRule` and its options, output paths and file naming, RoborazziOptions (thresholds, image comparators, dump mode). |27| [references/gif_and_video.md](references/gif_and_video.md) | Capturing GIFs and videos of test interactions: `captureRoboGif`, `recordRoboVideo` / `recordScreenRoboVideo`, `RoboVideoOptions`, GIF vs APNG output. |28| [references/ui_tree_dump.md](references/ui_tree_dump.md) | UI tree dump: the machine-readable `.uitree.json` semantics sidecar and annotated Set-of-Mark image for tools & AI agents (`roborazzi.dumpUiTree`, `uiTreeDumpOptions`), including the verify-a-UI-fix-by-bounds workflow. |29| [references/github_actions.md](references/github_actions.md) | Setting up GitHub Actions CI for Roborazzi: workflows that store baseline screenshots, verify them, and compare snapshot results on pull requests. |30| [references/preview_support.md](references/preview_support.md) | Generating screenshot tests from `@Preview` composables with ComposablePreviewScanner, including setup and customization of preview tests. |31| [references/compose_multiplatform.md](references/compose_multiplatform.md) | Screenshot testing Compose Multiplatform targets (iOS, desktop/JVM), including feature support per platform. |32| [references/ai_powered_image_assertion.md](references/ai_powered_image_assertion.md) | Asserting screenshot content with AI models (OpenAI, Gemini) via roborazzi-ai modules. |33| [references/gradle_properties_options.md](references/gradle_properties_options.md) | Configuring `roborazzi.*` Gradle properties: task behavior, output directory, file-name strategy, comparison report settings. |34| [references/idea_plugin.md](references/idea_plugin.md) | Using the Roborazzi IntelliJ IDEA / Android Studio plugin to view screenshots in the IDE. |35| [references/faq.md](references/faq.md) | Troubleshooting: common errors, CI setup questions, Robolectric configuration issues, and other frequently asked questions. |3637The files under `references/` mirror the official Roborazzi documentation at the time this skill38was published. The latest version is always available at39[the documentation site](https://takahirom.github.io/roborazzi/).