项目作者: awesome-inc

项目描述 :
Starter kit for automated browser testing of external sites using mocha and puppeteer.
高级语言: JavaScript
项目地址: git://github.com/awesome-inc/puppeteer-mocha.git
创建时间: 2017-09-30T10:01:28Z
项目社区:https://github.com/awesome-inc/puppeteer-mocha

开源协议:MIT License

下载


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

  1. yarn install
  2. npm test

Docker example for your site https://mysite:8080, mounting tests ./spec and screenshot directory

  1. docker run --rm -e APP_URL=https://mysite:8080\
  2. -v ./spec:/app/tests\
  3. -v ./screenshots:/app/screenshots\
  4. awesomeinc/puppeteer-mocha:latest

Or the same with docker-compose

  1. docker-compose run --rm test

References

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