Skip to content
This repository has been archived by the owner on Aug 17, 2021. It is now read-only.

Starter kit for automated browser testing of external sites using mocha and puppeteer.

License

Notifications You must be signed in to change notification settings

awesome-inc/puppeteer-mocha

Repository files navigation

GitPitch

puppeteer-mocha

dockeri.co

Build status GitHub issues GitHub stars

Starter kit for automated browser testing of external sites using puppeteer with Mocha and Chai.

Usage

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

References

Related projects

  • 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.