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

3

9

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>
Gametangium answered 2/10, 2008 at 12:27 Comment(0)
M
6

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.

Maxama answered 2/10, 2008 at 12:41 Comment(3)
I see in server log it merges the file, but still I see no tests run if I select NUnit Details link in webdashboard.Gametangium
Important to place <xmllogger /> after the <merge> element within the <publishers> element in ccnet.config.Gametangium
Excellent point....I would like to see the CCNet config files become a little more forgiving of these things...or at least provide better feedback when things don't go right.Maxama
S
2

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.

Surovy answered 10/2, 2010 at 15:32 Comment(1)
Good find, flush out those dependencies!Gametangium
H
0

Make sure that in the the dashboard.config file you have a valid xsl file in the section we run nunit with ncover and use this xsl\NCoverExplorer.xsl I think that the xsl file we took from the ncover install somewhere.

also make sure that this line is correct:

Then make sure in the ccnet.config file that under the section you have the xml output from the nunit test listed.

Also make sure you put the xsl file in the xsl folder under webdashboard.

Haroldharolda answered 2/10, 2008 at 12:42 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.