I'm not sure what exactly your nant task looks like but from what I
recall of other tasks and setting up the same thing using the nunit
tasks, I think your exmple is doing what it should.

halt-on-failure: stop at first test failure, i.e. when testing 3
assemblies, if the second has a failure stop testing and fail the task

failonerror: if this is false, ignore task failure

So in your example you get a test failure in FizzBuzzTests.dll, it isn't
halting on error, but it still fails the task... FWIW this is going off
the example you give, without the docs or nant for me to double check
actual behaviour.


On Mon, 2008-02-04 at 13:24 -0800, fred.f.chopin wrote:
> I hope that this post saves someone in the future from the aggrevation
> that I have experienced on this.  The nant tast for mbunit execution
> works great, however using their example script from the documentation
> here: 
> http://docs.mbunit.com/help/html/MbUnitInAnAgileEnvironment/MbUnitAndNant.htm
> does not work correctly for halting the build on failed tests.  Here
> is the example task xml that DOES NOT WORK:
> 
> <project default="tests">
>    <target name="tests">
>       <mbunit
>          report-types="Html"
>          report-filename-format="myreport{0}{1}"
>          report-output-directory="."
>          halt-on-failure="false">
>          <assemblies>
>             <include name="FizzBuzzTests.dll" />
>          </assemblies>
>       </mbunit>
>    </target>
> In this xml snippet, I am trying to make it continue the build if the
> unit tests fail, however setting the attribute "Halt-on-failure" does
> nothing as it is ignored completely for some reason.  After inspecting
> the source code for this plugin, I have determined that the correct
> syntax should use "failonerror" instead and is as follows:
> 
> <project default="tests">
>    <target name="tests">
>       <mbunit
>          report-types="Html"
>          report-filename-format="myreport{0}{1}"
>          report-output-directory="."
>          failonerror="false">
>          <assemblies>
>             <include name="FizzBuzzTests.dll" />
>          </assemblies>
>       </mbunit>
>    </target>
> 
> This attribute defaults to "true" but using this example will make it
> work as expected.  I hope that someone searching on this issue (like I
> did) finds this informative and that someone will update the
> documentation to make this correct.
> > 


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"MbUnit.User" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/MbUnitUser?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to