wd-tap-test

Run TAP tests in the browser from the console using WebDriver

npm install wd-tap-test
6 downloads in the last week
12 downloads in the last month

wd-tap-test(1)

NPM

Build Status Dependency Status

Run TAP tests in the browser from your console using WebDriver. It uses a Selenium Server to launch and automate the browsers. The test file must output TAP-compatible output when running in the browser with console.log.

Note that you must have a Selenium Server running.

Install

Use NPM to install:

npm install -g wd-tap-test

Options

wd-tap-test <options> [browsers...]
  • browsers: The names of the browsers to run the tests in (firefox, chrome, etc.). Each browser name will be passed to the Selenium Server in the browserName option when launching the browser. Defaults to firefox.
  • -w, --watch: Watch the current directory for changes and run tests when any file changes.
  • -b, --browserify: Browserify the source file before serving to the browser.
  • -s, --source: Specify the source file that contains the tests. Defaults to test.js.
  • --server: Specify the Selenium Server address to use.
  • -?, --help: Show the help message

Examples

Run the test.js file in Firefox:

wd-tap-test

Run the my-tests.js file in Firefox and Chrome:

wd-tap-test -s my-tests.js firefox chrome

Browserify and run the test.js file in Firefox:

wd-tap-test -b

Watch the current directory for changes and run the test.js file in Chrome whenever a file changes:

wd-tap-test -w chrome
npm loves you