golden_lens 0.2.0 copy "golden_lens: ^0.2.0" to clipboard
golden_lens: ^0.2.0 copied to clipboard

Agent-grade golden tests for Flutter: attribute visual diffs to the exact widget and source line, score perceptual parity, and emit agent-readable reports.

Changelog #

0.2.0 #

  • Z-order-aware attribution: overlapping same-size widgets now attribute to the topmost (latest-painted) one.
  • HTML report adds numbered offender overlays on the "New" image, plus a highlighted Diff panel (changed regions tinted + offenders boxed) via the shared renderDiffPng.
  • Report JSON now includes candidate.devicePixelRatio.
  • README + pub.dev screenshots generated from a real pipeline run.

0.1.0 #

Initial release.

  • Attribution engine — maps a changed-pixel region to the innermost owning widget and resolves framework-internal render objects up to the user's own file:line:column (via Flutter's public widget-creation tracking).
  • Image pipeline — anti-alias-tolerant pixel diff, connected-component region clustering, and a summed-area-table SSIM perceptual parity score (global + per region). Zero dependencies beyond the Flutter SDK.
  • Drop-in comparatorinstallGoldenLens() wraps the active golden comparator so every matchesGoldenFile and alchemist golden gains attribution on failure, with no test changes. Never alters pass/fail.
  • Reports — a machine-readable agent JSON payload (schema v1.0) and a self-contained human HTML report.
1
likes
160
points
48
downloads
screenshot

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Agent-grade golden tests for Flutter: attribute visual diffs to the exact widget and source line, score perceptual parity, and emit agent-readable reports.

Repository (GitHub)
View/report issues

Topics

#testing #golden #visual-regression #ai

License

MIT (license)

Dependencies

flutter, flutter_test

More

Packages that depend on golden_lens