Test Automation / Quiz
Visual Regression Testing
Snapshots, flakiness, dynamic content, and thresholds, catching the pixels that unit tests can't see.
- Difficulty
- Medium
- Format
- Quiz
- Points
- 150
- Estimate
- 8 min
// MISSION BRIEF
Your Mission
Functional tests pass while the layout is visibly broken. Visual regression testing catches what assertions miss, but naive snapshot testing is a flakiness factory. Know how to do it right.
// FIRST CONTACT
Battle teaser
Visual snapshot tests flake constantly on a page showing the current date/time. The fix:
- ADelete the test
- BRe-run until it passes
- CIncrease the pixel-diff threshold to 50%
- DMask/freeze dynamic regions (mock the clock, hide volatile elements) before snapshotting
Answers, scoring, hints, and the full battle stay sealed.
// SKILL TAGS
automationvisual-regressionsnapshotsflakiness