buttonmen-dev/buttonmen — pull request #448 by cgolubi1 (2014-01-20 04:26:12+00:00)
Title: add all configuration to allow jenkins to run QUnit via PhantomJS and JSCover

This is the puppet configuration to add QUnit to the default build.xml for jenkins. How it works:
* the build launches an instance of JSCover, a javascript tool which instruments JS code in order to enumerate code coverage, and as a handy side effect serves the code on a localhost webserver so we can test it
* the build launches an instance of lighttpd containing only the current version of dummy_responder.php - this is needed because JSCover can't serve PHP, and the unit tests need dummy_responder.php
* the build invokes a script written for phantomjs, a CLI javascript webkit, to actually run the unit tests and fail the build if any tests fail
* I also have the build log list each test as it runs, because there are a couple of heisenbugs still floating around in QUnit (tests which fail very occasionally and i'm sure it must depend on run order), so i'm hoping jenkins can help track those down

Caveats:
* at the moment, none of this actually happens --- the live jenkins server doesn't yet have the software dependencies to run all this, so i told build.xml not to run this JS suite, because i wanted the jenkins test of this pull which i am committing right now to succeed. Once it's approved, i'll push it out to the live jenkins, and then readd the test on my branch.
* i haven't yet figured out how to get JSCover's report integrated with Jenkins. Right now, you can browse to a page and look at the report, but Jenkins doesn't give data about whether coverage is better or worse than last build or whatever. I don't think this is critical.