Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Scripts to setup JsTestDriver and PhantomJS as a headless javascript test environment.
JavaScript Shell
branch: master
Failed to load latest commit information.
examples add jasmine example with jquery as an external resource
.gitignore working download of jstd jars
LICENSE
README.md verified phantomjs 1.9 works with examples, add to README
phantomjs-jstd.js
runtests.sh updated scripts to use jstd v1.3.5
server.sh updated scripts to use jstd v1.3.5

README.md

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.

Setup

  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 runtests.sh 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 .

Example:

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

Errata

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

Something went wrong with that request. Please try again.