Starter kit for automated browser testing of external sites using mocha and puppeteer.
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
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.