Combine the output of NUnit and NAnt in a build report

I just started using CruiseControl.NET, and it's hard for me to understand why merging NAnt and NUnit output does not work. I set mine ccnet.configwith typical values ​​found in google:

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

NAnt and ccnet work halfway: if I intentionally inserted a code error, then ccnet will say that the assembly failed. The same thing happens if I intentionally put a failed test: ccnet will say that the build failed.

The problem is that the page ViewBuildReport.aspxdoes not display any output from NAnt or NUnit.

Obviously, I have to miss something, but I do not know what. Any ideas?

+5
source share
3 answers

Albert I accidentally found out the answer after a while. This seems to be the behavior of ccnet out of the box. Therefore, by default, it does not display compilation results in the web panel.

You need to find the file \ CruiseControl.NET \ webdashboard \ dashboard.config, and in the buildReportBuildPlugin section add compile.xsl. This will look when adding:

<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 very poor, and I discovered this by accident while searching for something else. I was unhappy that I spent so much time when a little documentation or an example on the ccnet website would solve this in a matter of minutes.

+6
source

Is this block in your publishers section?

Here is which of my publishers looks like:

    <publishers>
        <merge>
            <files>
                <file>*-results.xml</file>
            </files>
        </merge>
        <xmllogger />
    </publishers>
+1
source

, , .

nant nunit ccnet? , :

ccnet nant task, nant build msbuild nunit2 .

ccnet, nant nunit, . ccnet , ? , , , , :

ccnet.config:

<tasks>
<nant>
<baseDirectory>D:\ccnet\builds\checkout\path</baseDirectory>
<buildFile>go.build</buildFile>
<targetList>
<target>test</target>
</targetList>
</nant>
</tasks>

<publishers>
<merge>
<files>
<file>D:\ccnet\builds\artifacts\path1\nant-results.xml</file>
<file>D:\ccnet\builds\checkout\path\name.dll-results.xml</file>
</files>
</merge>
<xmllogger /> 
</publishers>

go.build:

<target name="build" depends="clean">
<msbuild project="name.sln">
</msbuild>
</target>

<target name="test" depends="build">
<nunit2>
<formatter type="Xml" usefile="false" />
<test assemblyname="Tests\path\name.dll" />
</nunit2>
</target>

, , xml nant, nnit. , ? ...

: ccnet ( usefile = "false" ccnet ). .

I also tried a manual approach, set usefile = "true", and then combined the nant-results.xml and name.dll-results.xml files (without wildcards, just using the exact path to the file, which I have triple checked.)

It just doesn't make any sense.

0
source

All Articles