Running Unit Tests on NodeJS with Jenkins

How might I setup Jenkins to start my Node.JS Testing Server, run Unit Test probably JSTestDriver/Jasmine, and then top Node.JS?

I can start Node.JS using Execute Shell, but it "hangs" the build (expected since Node runs as a daemon)

I've written an article that explains how I've managed to run my unit tests with Mocha and ant.

The basic idea is:

  • Set your environment variables so that jenkins can control them
  • Use mocha's xunit reporter to generate a result report
  • Use Jenkins' Publish JUnit test result report option to read the result report.

You can read the full article here.

JSTestDriver outputs it's results in a xUnit compliant xml format. Which the Hudson 'xUnit' plugin can then interpret.

We are planning to integrate jsTestDriver into Jenkins. To test our javaScript code in a selection of supported browsers.

Sorry but I can't help you with node.js