This page last changed on Nov 07, 2004 by mroberts.

Integrating NUnit into your build in the CruiseControl.NET Server

The typical way to integrate the CruiseControl.NET Server with NUnit is to run NUnit as part of your Build Process. If you're using NAnt, you'll either be using an <exec> task or <nunit> task to do this (we recommend using <exec> - its more stable across changing versions of NUnit.) Make sure to use xml output.

A line out of CruiseControl.NET's own build file is below, as an example:

<exec program="${nunit-console.exe}" workingdir="${build.dir}\core" commandline="${core.dll} /xml:../${core.dll}-results.xml /nologo"/>

However, if you're not using a scripted build, you can also use the NUnit Task. We recommend not to use this task and to instead use a scripted build, since it means developers are using a build process closer to the integration process, but its up to you.

Once you've got NUnit running, use a File Merge Task to include the NUnit results into your build results file - you'll need to make sure you're including all the NUnit xml files.

Finally, make sure you're using an Xml Log Publisher.

Integrating NUnit results into the Build Report

CruiseControl.NET by default attempts to style the NUnit output into useful results in the reporting applications. If the results aren't showing up look at the help on the File Merge Task page.
Document generated by Confluence on Jun 26, 2005 17:23