Skip to content
This repository was archived by the owner on Nov 23, 2018. It is now read-only.

Setting up the Qunit task for use with Jenkins

roblarsen edited this page Jan 29, 2013 · 3 revisions

Based on the work done in #60 we have this:

  1. Install phantomjs (http://phantomjs.org/) in your build/tools
  2. Install the Phantom QUnit Runner script (https://gist.github.com/1588423) in you build tools folder
  3. update the properties in project.properties
# the path to your phantomjs binary. It should live in ${dir.build.tools}
tool.phantomJS = phantomjs-1.8.1-windows/phantomjs.exe
# the name of your qunit.js file for PhantomJS
tool.qunit.js = qunit-runner.js
# the location of your test scripts
dir.tests           = tests
  1. Add the qunit task to whichever flavor of build you commonly run, for example, to add it to the default do:
    <target name="-build.production"
          depends="-intro,
                   -usemin,
                   -js.all.minify,
                   -js.main.concat,
                   -js.scripts.concat,
                   -css,
                   -htmlclean,
                   -imagespng,
                   -imagesjpg,
                   -copy,
                   -jsdoc3,
                   -qunit"/>
  1. Configure Jenkins to use our newly enhanced task (this example would just be ant build since it's the default.)
  2. Point Jenkins to the JUnit-style output XML file