Testing · Senior · Question 45 of 75
What makes visual regression tests (toHaveScreenshot) flaky, and how do you reduce it?
- ✓Correct answer: Fonts, rendering differences between OSes, animations and dynamic data; run in one Docker image, disable animations, mask dynamic areas
- 2Screenshots are always deterministic
- 3Only by increasing the timeout
Explanation
Reference images depend on the platform, so generate and compare them in the same environment as CI.