1
votes

I am new to Cruise Control. I'm running a project where I use an MSBuild file to build my project. I'm using the NUNit task in the MSBuild Community Tasks project to run all of my unit tests and output an xml file with the test results with this command:

 <NUnit Assemblies="@(OutputFiles)" WorkingDirectory="$(UnitTestResultsLocation)"
      OutputXmlFile="$(UnitTestResultsLocation)\$(ProjectNameSpace).UnitTests.xml"
        ToolPath="$(NUnitToolPath)"
       ContinueOnError="true" />

This works great. Now I'm trying to get those results to show in the Cruise Control web dashboard by doing a file merge with this command:

  <publishers>
    <merge>
      <file>C:\CC\Project1\Code\UnitTestResults\Project1TestResults.UnitTests.xml</file>
    </merge>
  </publishers>

When I do this, the build still completes, but I get an exception in the Cruise Control console, which also show in the log:

2009-09-03 13:44:57,310 [Project1:DEBUG] Exception: System.Xml.XmlException: Name cannot begin with the '.' character, hexadecimal value 0x2E. Line 837, position 36.

Am I going about this wrong? How can I get my NUnit test results into the Cruise Control dashboard?

2
Is your syntax correct for the merge section? I believe it ought to be <merge><files><file>; See: confluence.public.thoughtworks.org/display/CCNET/…Gavin Miller
What is the output of Line 837, position 36 in Project1TestResults.UnitTests.xml?Gavin Miller
@LSFR Consulting That's the first thing I checked - but it's only 385 lines long.Mark Struzinski
@LSFR - I tries wrapping the <file> element in <files></files>, same resultMark Struzinski

2 Answers

1
votes

Try

    <merge>
        <files>
            <string>C:\CC\Project1\Code\UnitTestResults\Project1TestResults.UnitTests.xml</string>
        </files>
    </merge>
0
votes

The following works for me, though I'm using NAnt to trigger NUnit, not MSBuild:

    <publishers>
        <merge>
            <files>
                <file>C:\Projects\SomeApp\CI\TestResult.xml</file>
            </files>
        </merge>
        <xmllogger />
    </publishers>