Skip to content

nathanboktae/mocha-cloud

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code
This branch is 3 commits ahead of matthewmueller:master.

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

mocha-cloud

Mocha testing in the cloud with SauceLabs. If you plan on running the tests from the terminal check out the terminal grid view.

Installation

npm server client:

$ npm install mocha-cloud

If you use component you may simply execute the following to get the client script:

$ component install --dev visionmedia/mocha-cloud

Otherwise use the ./build/build.js file, and pass mocha.run() to the cloud function allowing it to attach event handlers:

cloud(mocha.run());

Example

var Cloud = require('mocha-cloud');
var cloud = new Cloud('your project name', 'username', 'access key');
cloud.browser('iphone', '5.0', 'Mac 10.6');
cloud.browser('ipad', '6', 'Mac 10.8');
cloud.url('http://localhost:3000/test/');

cloud.on('init', function(browser){
  console.log('  init : %s %s', browser.browserName, browser.version);
});

cloud.on('start', function(browser){
  console.log('  start : %s %s', browser.browserName, browser.version);
});

cloud.on('end', function(browser, res){
  console.log('  end : %s %s : %d failures', browser.browserName, browser.version, res.failures);
});

cloud.start();

License

MIT

About

Mocha tests in the "cloud" with Saucelabs

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 97.4%
  • Makefile 2.6%