Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CruiseControl.NET view NUnit xml test result when Nant build file executes NUnit

I have a Nant build file which executes NUnit after compiling the dll's. I am executing the NAnt build file with a task in CruiseControl. So NAnt is running the tests not CruiseControl.

How do I configure it so that the CruiseControl web dashboard can be used to view the NUnit output ?


This fixed it:

<publishers>
    <merge>
        <files>
                 <file>build\*.test-result.xml</file>
        </files>
    </merge>
    <xmllogger />
 </publishers>
like image 683
hollystyles Avatar asked Oct 02 '08 12:10

hollystyles


2 Answers

You want to use the merge capabilities of CruiseControl to grab your NUnit XML output. This is the situation my company has going, and it seems to work fairly well. Here is a config snippet (This goes in the <publishers> element in CCNet.config):

 <merge>
     <files>
         <file><path to XML output>\*.xml</file>
     </files>
 </merge>

Hope this works for you.

like image 56
ckramer Avatar answered Oct 28 '22 14:10

ckramer


FWIW I had the same problem (CC.Net fires off Nant which does the compile and NUnit work) and my NUnit output was not appearing on CC.Net either. I already had the <merge> task inside my <publisher> task (and before the <xmllogger> task) and still nothing.

The one thing that I did not have, b/c I didn't explicitly need it, was a <workingDirectory> node in my <project>. As soon as I added that my NUnit output appeared immediately. Looks as if there's a dependency there for whatever reason. Hope this helps some of you.

like image 25
ScottD Avatar answered Oct 28 '22 13:10

ScottD