I am trying to configure Cruise Control with Nunit for reporting purpose. But I am unable to do this task. Any one can please help me how to configure the ccnet.config file for its configuration and also some easy and step by step tutorial for its explanation.
+3
A:
Do you use a build script for MSBuild or NAnt ?
I do it like this:
- I have a build script (msbuild), in where I have a task which runs my NUnit-unit tests This task looks like this in my buildscript (simplyfied):
<Target Name="rununittests">
<NUnit Assemblies="$(outputdir)\MyTests.dll"
OutputXmlFile = "$(artifactdir)\MyTests.Results.xml"/>
</Target>
- In my cruise-control project, I call this task:
<msbuild>
<executable>c:\....\msbuild.exe</executable>
<projectFile>c:\...\mybuildscript</projectFile>
<targets>rununittests</targets>
<logger>c:\...\rodemeyer.msbuildtoccnet.dll</logger>
</msbuild>
The RodeMeyer logger is a logger that I've found somewhere on the CC.NET webpage.
At the end of my CC.NET project configuration, I make sure that the output XML is merged :
<publishers> <merge> <files> <file>...\*.results.xml</file> </files> </merge> <xmllogger/> </publishers>
Frederik Gheysels
2009-01-26 09:47:18