← ClaudeAtlas

android-screenshot-testinglisted

Screenshot and visual regression testing for Android/Compose - Roborazzi setup, golden image workflow, record vs verify modes, CI integration, dark mode and RTL variants, and Compose preview screenshot tests. Use this skill whenever adding visual regression coverage, setting up Roborazzi, managing golden images in CI, testing dark mode or font-scale variants, or deciding between screenshot, unit, and manual tests. Trigger on phrases like "screenshot test", "Roborazzi", "Paparazzi", "golden image", "visual regression", "snapshot test", "preview test", "record mode", "visual diff", or "screenshot CI".
lenorebreakneck630/claude-zero-to-hero-android-KMP · ★ 1 · Testing & QA · score 64
Install: claude install-skill lenorebreakneck630/claude-zero-to-hero-android-KMP
# Android Screenshot Testing (Roborazzi) ## Overview Screenshot tests catch visual regressions that unit tests and instrumentation tests miss — layout shifts, wrong colors, clipped text, broken dark mode. Roborazzi is preferred over Paparazzi for Compose projects because it runs on Robolectric (no JVM rendering quirks), supports Compose natively, and is actively maintained alongside the Compose ecosystem. **When to screenshot-test vs other test types:** | Test type | When to use | |---|---| | Screenshot test | Stable, rendered UI components; dark mode/RTL variants; design-system atoms; complex layouts | | Unit test | ViewModel logic, state transformations, domain rules | | Compose UI test (`ComposeTestRule`) | Interaction flows, click handlers, navigation | | Manual test | First-time animations, haptics, platform-specific edge cases | Screenshot tests are not a replacement for unit or UI tests — they are a third, complementary layer. --- ## Dependency Setup ```toml # gradle/libs.versions.toml [versions] roborazzi = "1.20.0" robolectric = "4.13" [libraries] roborazzi = { module = "io.github.takahirom.roborazzi:roborazzi", version.ref = "roborazzi" } roborazzi-compose = { module = "io.github.takahirom.roborazzi:roborazzi-compose", version.ref = "roborazzi" } roborazzi-junit-rule = { module = "io.github.takahirom.roborazzi:roborazzi-junit-rule", version.ref = "roborazzi" } robolectric = { module = "org.robolectric:robolectric", version.ref = "robolectric" } [plugins] r