Starter kit for automated browser testing of external sites using puppeteer with Mocha and Chai.
Add your tests, install dependencies and run tests
yarn install
npm test
Docker example for your site https://mysite:8080
, mounting tests ./spec
and screenshot directory
docker run --rm -e APP_URL=https://mysite:8080\
-v ./spec:/app/tests\
-v ./screenshots:/app/screenshots\
awesomeinc/puppeteer-mocha:latest
Or the same with docker-compose
docker-compose run --rm test
- charlieduong94/mocha-puppeteer:
Much more advanced than this repo. Seems to be directed towards self-testing node/exprees sites with lasso and markojs. If this suits you we definitely recommend
mocha-puppeteer
. However, we wanted to simply express browser tests using mocha for any external site (e.g. a rails app). Since we could not find an option to test external sites or to test other apps than express/markojs-based, we rolled our own.