Hitting a Gold Mine:How to Set the Gold Standard With Golden Tests
summary
Golden tests render Flutter widgets to PNGs and compare them as snapshots; the team uses golden_toolkit and optionally alchemist for setup, writes at least one per page plus unit-like tests for components, and generates variants for dark mode, tablet and RTL. CI breaks appear after macOS/Xcode upgrades because Apple Silicon vs Intel differences produce ~0.01% difference; solving it requires either unified CI image generation or a tolerant comparator — they fix failures by allowing per-channel pixel diffs of ±1 and a small global threshold, which stabilizes results.
AI-written summary · about
chapters (7)
- 0:00Introduction and speaker background
- 1:14What are golden tests
- 8:00Case study in banking app
- 12:56Testing widgets and pages
- 18:01CI issues with golden tests
- 26:08Non-obvious use cases
- 33:58Summary and key takeaways








