Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Nodejs module for interacting with TestSwarm
Latest commit b0a1622 @Krinkle Krinkle travis: Remove node 0.8, add node 0.10
Since Travis is failing right now:

> No compatible version found: minimatch@'^0.3.0'"

.. because the version of npm that shipped with 0.8 doesn't support "^".
Failed to load latest commit information.
lib authUsername has been renamed to authID
.jshintrc Grunt 0.4 and various clean up.
.npmignore init
.travis.yml travis: Remove node 0.8, add node 0.10
Gruntfile.js Grunt 0.4 and various clean up.
LICENSE-MIT Update license to new year and readme to point at my own username for… readme: Update badges
package.json Release v1.1.0
sample-test.js Grunt 0.4 and various clean up.

Build Status NPM version


Nodejs module for interacting with TestSwarm

Getting Started

Install the module with:

npm install --save-dev testswarm
var testswarm = require( "./lib/testswarm" ),
    testUrl = "http://localhost/jquery-core/test/",
    runs = {};

["attributes", "callbacks"].forEach(function (suite) {
    runs[suite] = testUrl + "?module=" + suite;

    url: "http://localhost/testswarm/"
.addReporter( testswarm.reporters.cli )
    id: "example",
    token: "yourauthtoken"
        name: "node-testswarm test job",
        runs: runs,
        browserSets: [ "example" ],
    }, function( err, passed ) {
        if ( err ) {
            throw err;
        process.exit( passed ? 0 : 1 );

For local testing, copy sample-test.js to test.js and modify to match your local TestSwarm setup.


createClient({ url })

  • Object config
    • String url - Url to root of TestSwarm install.

Client#addReporter( reporter )

  • Object reporter - usually testswarm.reporters.cli, unless you want to use a custom reporter

Client#auth({ id, token })

  • Object auth
    • String id - Username of TestSwarm account.
    • String token - Authentication token of account.

Client#addjob( options, callback )

  • Object options
    • String name - name of this job
    • Number runMax - [optional] how often failed tests should rerun
    • Object runs - Run urls by run name.
    • Array|String browserSets - which sets to test against
    • Number pollInterval - [optional] In milliseconds, default 5 seconds.
    • Number timeout - [optional] In milliseconds, default 15 minutes.
  • Function( Object err, Boolean passed, Object results ) callback


Copyright (c) 2014 Jörn Zaefferer Licensed under the MIT license.

Something went wrong with that request. Please try again.