Parameterized screenshot container for percy.io
3.3K
Automate website screenshot uploads to Percy.io for visual regression testing with this parameterized Docker container. Designed to work locally or in remote clusters. Enable Slack notifications to get pinged when a site changes.
Set environment variables and run:
docker run -d \
-e PERCY_TOKEN=xxx \
-e PERCY_TARGET_URL=https://google.com \
-e CRON_TIME=daily \
--name percysnap
docker logs -f percysnap
Create .env from the sample, then run with Docker Compose:
docker pull emcniece/percysnap:latest
cp .env.sample .env
# ... edit .env
docker-compose up
CRON_TIME env for job schedulingCRON_TIME can be set to "daily" for a random timenpm install
node index.js
The new-project.js script uses Puppeteer to automate the bulk creation of projects. Dumps a list of project names and PERCY_TOKENs.
Populate the email, password, and org variables in .env and execute. Requires a Percy account that has the email/password login method enabled.
node new-project.js project1 project2 ...
# { 'project1': 'xxx', 'project2': 'yyy' }
PERCY_WAIT on comma to allow multiple ready conditionsprojects: [{"percy_token": "xxx", "percy_target_url": "xxx", "percy_wait": "1000"}]PERCY_TOKEN1... PERCY_TOKEN(N)PERCY_TARGET_URL1... PERCY_TARGET_URL(N)PERCY_WAIT1... PERCY_WAIT(N)Content type
Image
Digest
Size
306 MB
Last updated
almost 7 years ago
docker pull emcniece/percysnap