Scripts to setup JsTestDriver and PhantomJS as a headless javascript test environment.
JavaScript Shell
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Phantom JS / JsTestDriver Automation

A simple set of scripts to help glue together JsTestDriver and Phantom JS for an automated, headless environment for javascript tests.


  1. Download v1.5 (or greater, v1.8 and v1.9 have been verified) of Phantom JS and make sure the phantomjs binary is on your PATH.

(For OS X: homebrew has a forumla for the static build: brew install phantomjs)

  1. Run ./server start to fire up the JsTestDriver server and Phantom JS.

(Run ./server stop to kill the daemonized JSTD server and PhantomJS processes.)

Running Tests

The script will run all js unit tests against JsTestDriver, using Phantom JS as the captured browser. Any additional args passed to this script will be passed on to JsTestDriver .


mkdir examples/helloworld/reports
./ start
./ --config examples/helloworld/jsTestDriver.conf --tests all --testOutput examples/helloworld/reports
./ stop


JsTestDriver will only output jUnit XML with the --testOutput arg if the path provided exists. It won't create the output directory for you.