Repository for my intro blog posts to visual regression testing with Puppeteer and Resemble.js
- Part 1: Creating screenshots in batches with Puppeteer
- Part 2: Visual Regression Testing with Puppeteer and Resemble.js
(currently both are just available in german language)
- Clone this repository
npm install
node app.js
During the first run original screenshots get created with puppeteer. When reruning the script another round of screenshots get created and are compared with Resemble.js.
You can pass your own URL(s) like so node app.js http://example.com https://www.gnu.org/
This script can also be run in a containerized environment. This gives the guarantee that screenshots are created in consistent way with a stable Chrome Browser:
docker pull movd/puppeteer-resemble-testing:latest
docker run --rm -v "${PWD}/screenshots:/app/screenshots" movd/puppeteer-resemble-testing:latest http://example.com
Thanks to zenato for providing the docker-puppeteer Base environment image.