Basic docker image for tools and testsuites using puppeteer, mocha and chai
Run tests on your website:
# assuming you are in the directory with your tests
docker run \
--rm \
--tmpfs=/tmp \
-e YARN_CACHE_FOLDER=/tmp/yarn \
-v "$(pwd)":/validator/tests/ \
-e URLS=https://your-project.com/url-1.html,https://your-project.com/url-1.html \
-t schliflo/puppeteer-mocha-chai-docker \
yarn test
docker-compose run \
--rm \
puppeteer-mocha-chai \
env URLS=https://your-project.com/url-1.html,https://your-project.com/url-1.html \
yarn test
Generate screenshots of your website:
# screenshots get saved to the current directory
docker run \
--rm \
--tmpfs=/tmp \
-e YARN_CACHE_FOLDER=/tmp/yarn \
-v "$(pwd)":/validator/screenshots/ \
-e URLS=https://your-project.com/url-1.html,https://your-project.com/url-1.html \
-t schliflo/puppeteer-mocha-chai-docker \
yarn screenshots
docker-compose run \
--rm \
puppeteer-mocha-chai \
env URLS=https://your-project.com/url-1.html,https://your-project.com/url-1.html \
yarn screenshots