- The JUnitXmlReporter from Jasmine Reporters
- Envjs (embedded with the Jasmine Reporters download)
HudsonJenkins (continuous integration server) on a Linux slave
- let Hudson execute a (Java) shell command
- let Java run Envjs
The Java command:
(The libs and the bootstrap file came with Envjs in the Jasmine Reporters download.)
The test.js content:
window.location = 'SpecRunner.html';
(I.e., opening the JasmineBDD spec runner.)
Simple Unit Testing Only
So far, this only works for simple unit testing for me. F.ex., it won’t play nice with prototype (which is really integration testing, but still).
It’s probably got something to do with Envjs’ limitations compared to a full web browser.
It’s not headless – requires running JSTD server and browsers, but it will handle prototype et al.
Headless testing as described above is not only for simple unit testing – jQuery works fine, too. There’s advantages to running a JsTestDriver server, especially catching browser quirks, but for much of the BDD/ TDD effect (testable code, design, executable requirements, etc) you can run headless testing continuously in Hudson without any “external help”…