MIT License
This repository is an example for my talk Automating your QA with Visual Regression Testing at WordCamp Europe 2019. The slides for the talk can be found here.
BackstopJS is used for the visual regression testing. The app itself is built with Node JS, commander.js
, and Inquirer.js
.
You will need:
Create a new repository from this template and then either using Git clone or download the .zip
file of your copy.
After setting up the repository locally (see above) you will need to:
npm install
to download dependenciesnpm run start
src/sitesToTest.js
nonProductionBaseUrl
is your non-production environment (local, staging, etc.) URLproductionBaseUrl
is your production site URLpathsToTest
, which is the array of URIs to test for each sitesrc/backstopConfig.js
to adjust viewports, delay, hidden selectors, etc.npm run build
.
src
npm run start
.
Troubleshooting If you are having issues with the script hanging or BackstopJS taking a long time there may be headless Chrome instances that didn't close properly.
Try pkill -f "(chrome)?(--headless)"
on Mac/Linux or Get-CimInstance Win32_Process -Filter "Name = 'chrome.exe' AND CommandLine LIKE '%--headless%'" | %{Stop-Process $_.ProcessId}
in Windows PowerShell.