1
votes

I have a standard CruiseControl.Net setup that pulls code from svn, builds, tests and produces the test results. I have a intermittent problem where the build reports success (green) but test results show 1 or 2 failures.

Running the task step manually, to run just the NUnit step, succeeds but output and test results show the test failing. I've tried ContinueOnFailure both true and false (it blows up on other options and indicates only true or false are valid values which I assume because of an older version).

Is the task supposed to error out (Errors != 0)? Or is the failure procured later perhaps in the merge test results step of ccnet.config?

Does ccnet depend on the NUnit task to fail to indicate a failed build?

Thank you.

1

1 Answers

0
votes

My understanding is that ("default") it will only generate the test-results.xml, and put them in the "uber.xml" file to display the results.

http://build.sharpdevelop.net/ccnet/doc/CCNET/Using%20CruiseControl.NET%20with%20NUnit.html

And that it is overrideable with the following:

<!-- Acceptance Test Assembly -->
<exec program="nunit-console.exe" failonerror="false" resultproperty="testresult.acceptancetestassembly">
    <arg value="AcceptanceTestAssembly.dll" />
    <arg value="/xml=AcceptanceTestAssembly-Results.xml" />
</exec>



<!-- Check the results and fail if necessary -->
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.unittestassembly)==0}" />
<fail message="Failures reported in acceptance tests." unless="${int::parse(testresult.acceptancetestassembly)==0}" />