awesome-inc / puppeteer-mocha

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

About

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

License:MIT License


Languages

Language:JavaScript 94.8%Language:Dockerfile 5.2%