8

We use Hudson (well, Jenkins now) for CI. I have just started a project based on Node.js, and am investigating Expresso and Gently (testing and mocking). I really like the fact that Expresso works with node-jscoverage to generate code coverage reports.

Has anybody started a project to display Expresso and node-jscoverage reports (or JScoveage) in Hudson? Failing that, is there some documantation on what kind of output Hudson is expecting, short of inventing an entire new plugin?

In summary, I'm looking for two types of output here. Test results (like junit) and coverage reports (like Cobertura).

abendigo
  • 954
  • 1
  • 8
  • 31
  • 1
    I've found similar questions [here](http://stackoverflow.com/questions/4922867/junit-xml-format-specification-that-hudson-supports), and [here](http://stackoverflow.com/questions/442556/spec-for-junit-xml-output). – abendigo Jun 11 '11 at 17:36
  • this is rough. I've spent the last few hours trying to integrate expresso with Jenkins ..... fail. Adding a bounty. – Dave Dopson Nov 10 '11 at 04:06

2 Answers2

1

Do Expresso and node-jscoverage produce xml output? If so,

Jenkins and cFix unit testing (C++)

Following the above, you could convert your xml output to formats that junit understand (for tests, using an XSLT), and convert your coverage xml output into cobertura format (again, using XSLT).

See this also: http://www.van-porten.de/2009/05/cunit-tests-in-hudson/

for a sample XSLT.

Community
  • 1
  • 1
Sagar
  • 9,456
  • 6
  • 54
  • 96
1

You could try the xUnit plugin. On their wiki page it says that it can handle txt and csv files using custom style sheets. In theory this should work for your test reports t least. I have never tried that though.

As for coverage I am not aware of any plugins that can deal with arbitrary coverage tools.

If the HTML reports the tools produce are usable you could use the HTML Publisher plugin to link those reports in your job, and make them accessible from Jenkins. Not as nice an integration as a test tool plugin can provide, but depending on your expectations it might be enough.

Otherwise you will probably be forced to write a custom plugins. You could also try a request on the Jenkins Mailing List, maybe someone is working on such a plugin already.

pushy
  • 9,535
  • 5
  • 26
  • 45
  • Yeah. I've looked at xUnit. Any idea how to write that stylesheet? I haven't found any good docs yet ... – Dave Dopson Nov 10 '11 at 19:03
  • 1
    There is an stylesheet linked on the Wiki page under http://github.com/versionone/webui-plugin, you might be able to work off that. – pushy Nov 11 '11 at 07:44
  • I'm voting this answer +1 for the ref to HTML Publisher..... that's a pretty cool piece of kit. I'm going to play with that a bit and see what it can do. – Dave Dopson Nov 13 '11 at 06:41