Discover how to set up visual regression testing with Playwright and Docker for a seamless, scalable testing process. In this video, we’ll walk you through how to use Playwright for visual comparisons, ensuring your app looks exactly as expected across updates. Docker helps keep tests consistent and environment-independent, perfect for any CI/CD pipeline! Watch to learn how these tools work together to catch UI issues early and keep your app’s appearance flawless!
Visual regression: https://playwright.dev/docs/test-snapshots
Docker: https://playwright.dev/docs/docker
MacOS/Linux:
docker run -w /tmp --ipc=host --mount="type=bind,src=$(pwd),dst=/tmp" --entrypoint="/tmp/node_modules/.bin/playwright" mcr.microsoft.com/playwright:v1.48.1 test
Windows:
docker run -w /tmp --ipc=host --entrypoint="/tmp/node_modules/.bin/playwright" --mount "type=bind,src=${PWD},dst=/tmp" --rm mcr.microsoft.com/playwright:v1.48.1 test
CHAPTERS:
00:00 Intro
00:37 Playwright install
01:46 Write visual comparison test
04:43 Run visual comparison test
05:16 Run tests in Docker image
07:55 Conclusions