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
-~----------~----~----~----~------~----~------~--~---