First you may need to create a Sauce Labs account (Go here, there is a free plan.) and enter your credentials as in the following:
export SAUCE_USERNAME=<SAUCE_USERNAME>
export SAUCE_ACCESS_KEY=<SAUCE_ACCESS_KEY>
npm install -g mocha
In this tutorial directory (there should be a package.json
file) run:
npm install
- The browsers are configured in
desireds.js
- The mocha test suite is in
tutorial-specs.js
- The parallel runner is in
parallel-mochas.js
BROWSER='chrome' mocha --reporter spec *-specs.js
BROWSER='firefox' mocha --reporter spec *-specs.js
BROWSER='explorer' mocha --reporter spec *-specs.js
Go here to view the tests.
node parallel-mochas '--reporter spec *-specs.js' chrome firefox explorer
Go here to view the tests.