Playwright · Senior · Question 49 of 77
How do you make screenshot tests stable across machines?
- 1Allow up to 50% difference in every screenshot test
- 2Generate and compare baselines in the same Docker image
- 3Run screenshot tests only on the newest laptop
Show the answer
Correct answer: Generate and compare baselines in the same Docker image
Explanation
Fonts, GPU and OS rendering differ. A shared container with fixed fonts gives the same pixels everywhere.