Testing RichWidgets Build Status

A JavaScript project containing standalone javascript widgets based on Bootstrap, jQuery UI and other third-party widgets, styled with LESS.


In the rapid evolving world of Web standards, libraries, and browsers testing is of paramount importance. We need to make sure our widgets continue to function as we upgrade the various libraries that make up our project.

RichWidgets uses jasmine and jasmine-jquery, using karma as our test runner. Widget tests must go beyond simple setup/takedown of the widgets, and must also test all widget options and user interactions. In this way we will be able to keep our widgets both current and stable.

Installing Karma

The Karma tool can be easily installed with NPM as:

npm install -g karma

Running Test Suite

Run all tests on particular browsers:

karma start karma.conf.js --browsers=PhantomJS,Chrome,Firefox

Developing Tests

Run test suite continuously reacting on file changes:*

karma start karma.conf.js --single-run=false --auto-watch=true --browsers=Chrome

Running selected tests:

Debugging tests:

Test Configuration

Tests are configured in two files:

Running Tests on SauceLabs:

In order to run tests on browsers you don't normally have access to, or for purposes of continous integration, we leverage Karma - SauceLabs runner.

In order to set it up locally, you have to setup environmental variables:

export SAUCE_USERNAME=your_username
export SAUCE_ACCESS_KEY=your_generated_access_key

Then you can start one of browsers:

karma start --single-run=false --auto-watch=true --browsers=SL_Firefox_latest

Consult customLaunchers section in karma.conf.js for all the configured browsers.