Automating qUnit tests for use in continuous integration (e.g. Jenkins-CI)
Hi all
A few weeks ago I started looking at getting qUnit tests to run in an automated testing environment (Jenkins CI) - it was a business requirement that wasn't going to go away.
This proved more than a little bit complicated - and seems to be something discussed on various blogs at great length - the only viable option being to use WebDriver to execute the tests and extract the results, hardly a clean solution.
Enter RhUnit - a (nearly complete) qUnit compatible implementation which runs in Rhino. This means any qUnit test script can be run in a headless javascript environment (Rhino) in Java, allowing it to be executed with jUnit for seamless Jenkins integration.
There are currently a few bits missing (asyncTest for example), but the core qUnit assertions and start()/stop() methods are implemented.
And it's in maven:
- <dependency>
- <groupId>uk.co.iankent</groupId>
- <artifactId>RhUnit</artifactId>
- <version>0.0.1</version>
- </dependency>
I'd appreciate any feedback, specifically any valid qUnit test cases which fail in the RhUnit environment, or any contributions to improve it via a github pull request.
Thanks
Ian Kent