QUnit Phantom JS Runner with JUnit Report Generation

Our team recently upgraded to Grunt 0.4.0 and Phantom JS 1.9.0 and faced reliability issues with the new Grunt-QUnit plugin.  We decided to find an alternative way to run our tests.

We ran across Phantom JS QUnit Runner (https://code.google.com/p/phantomjs-qunit-runner/), but our QUnit tests are html files and not just javascript files.

Visu Patlolla found QUnit’s Phantom JS add-on worked very well with our new set up.  However, it did not generate a JUnit report.  See https://github.com/jquery/qunit/tree/master/addons/phantomjs

In order to meet our requirements, I moved the JUnit report generation feature from Phantom JS QUnit Runner to QUnit’s Phantom JS add-on.  I forked the QUnit repo https://github.com/leedavidr/qunit/tree/master/addons/phantomjs with these changes.  This version hardcodes the location of the JUnit reports, but it can easily be modified to take in a system property or parameter.


One thought on “QUnit Phantom JS Runner with JUnit Report Generation”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s