Awesome
testmate
A humble cross node/browser/saucelabs test runner
Write tests once, run them in
- Node
- local Browsers using Selenium
- remote Browsers / Plattforms using saucelabs.
testmate
is very opiniated. It runs tests using
- mocha
- chai
- browserify for browser testing.
Example
Let's assume this is your test/test-mylib.js
var myLib = require('./my-lib');
describe('myLib', function () {
it('should pass', function () {
expect(myLib('foo')).to.be('bar');
});
});
Then you can run it with different clients
# run in node (default)
testmate --client=node test/test-mylib.js
# run in local browser
testmate --client=selenium:firefox test/test-mylib.js
# run in any browser/plattform/version using saucelabs
SAUCE_USERNAME="user" SAUCE_ACCESS_KEY="key" testmate client="saucelabs:internet explorer:10:Windows 8" test/test-mylib.js
# instead of passing --client, you can also set the TEST_CLIENT env variable
Projects testing with testmate
add yours, send a pull request <3
Credits
The idea and lots of its code is taken from PouchDB's test setup.
License
MIT