Skip to content

SYSTEM Cited by 1 source

Paparazzi

Overview

Paparazzi is a Cash App / Square open-source library (github.com/cashapp/paparazzi) that renders Android Views and Composables to PNG screenshots on the JVM — no emulator, no device — as part of unit tests. Tests are deterministic, fast, and diff-able, which makes Paparazzi a standard choice for Android visual-regression testing.

Mechanism (at the coarse level)

Paparazzi bundles enough of the Android framework to execute a layout inflation + a render pass inside a JUnit test running on the JVM. A test captures a screenshot of a Composable or View at a chosen device profile (screen size, density, locale, theme) and writes the PNG to disk. On the next run, the new PNG is diffed against the committed golden; diffs fail the test.

Role in AI-assisted migration

The 2026-02-03 Instacart post places Paparazzi at the centre of Phase 3's engineer-verification checkpoint during Fragment → Compose migration:

  • Baseline: capture a Paparazzi screenshot of the existing Fragment/View-based feature before migration.
  • AI context: the baseline screenshot informs the AI's Compose implementation — it knows what the target output should look like.
  • Verification gate: after the AI writes the new Composable, run Paparazzi to capture the Compose- rendered screenshot; diff against the pre-migration baseline; engineers visually compare both PNGs and sign off on pixel parity.
  • Cleanup unlocks only after visual parity is confirmed.

This is the visual- parity screenshot gate pattern — AI output enters production only after human verification against a deterministic artefact generated by a tool whose deterministic-rendering property is well-understood.

Why it fits AI migrations specifically

  • Deterministic output — PNG-per-render, diffable.
  • JVM-only execution — fits CI without device farms.
  • Already in most Android codebases' test matrix — zero new infra required.
  • Pixel-perfect verification — matches the engineering intuition of "does the new UI look exactly like the old UI?" which is the only thing the AI-generated Compose needs to guarantee for a pure UI-framework migration (no behavioural change intended).

Seen in

  • sources/2026-02-03-instacart-migrating-to-jetpack-compose — canonical wiki instance. Instacart's Caper Android team uses Paparazzi as the visual-parity gate in Phase 3 of their Fragment → Compose migration. Engineer comparison of pre/post screenshots is what allows the team to trust AI-generated Compose code shipping to stability-critical smart-cart hardware without regression.
Last updated · 319 distilled / 1,201 read