Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Merge NUnit and NAnt output in build report

I've just started using CruiseControl.NET and I'm having trouble understanding why the merging of NAnt and NUnit outputs are not working. I've setup my ccnet.config with typical values as found on google:

<merge>
  <files>
    <file>D:\ccnet\path1\nant-results.xml</file>
    <file>D:\ccnet\path2\TestResult.xml</file>
  </files>
</merge>
<xmllogger /> 

NAnt and ccnet are half working: if I deliberately put in a code error, then ccnet will say the build has failed. The same happens if I deliberately put in a failing test: ccnet will say build failed.

The problem is that the ViewBuildReport.aspx page does not show any of the output from NAnt or NUnit.

Obviously I must be missing something, but I don't know what. Any ideas?

like image 205
JK. Avatar asked Jan 06 '10 09:01

JK.


1 Answers

Albert - I found the answer by accident some time after asking. It seems that this is ccnet's behavior out of the box. So by default it does not show the compile results in the web dashboard.

You need to locate the file \CruiseControl.NET\webdashboard\dashboard.config and in the buildReportBuildPlugin section, add compile.xsl. It will look like this when added:

<buildPlugins>
  <buildReportBuildPlugin>
    <xslFileNames>
      <xslFile>xsl\header.xsl</xslFile>
      <xslFile>xsl\unittests.xsl</xslFile>
      <xslFile>xsl\modifications.xsl</xslFile>
      <xslFile>xsl\NCoverSummary.xsl</xslFile>

      <xslFile>xsl\compile.xsl</xslFile>

    </xslFileNames>
  </buildReportBuildPlugin>
  <buildLogBuildPlugin />
  <xslReportBuildPlugin description="NCover Report" actionName="NCoverBuildReport" xslFileName="xsl\NCover.xsl"></xslReportBuildPlugin>
</buildPlugins>

The documentation was extremely bad, and I only found this by accident when looking for something else. I was not happy that I wasted so much time when a little documentation or an example on the ccnet site would have solved this in minutes.

like image 63
JK. Avatar answered Sep 22 '22 06:09

JK.