I've been using the NUnit2 task as part of an automated build procedure
to run the tests in multiple assemblies and report the results, as
follows:

<nunit2 haltonfailure="false" failonerror="true">
        <formatter type="Plain" />
        <test basedir="${Tests.dir}" haltonfailure="false">
                <assemblies>
                        <includes name="**\**Tests.dll" />
                </assemblies>
        </test>
</nunit2>       

According to the documentation, I believe the following should happen:

Nunit2.haltonfailure="false" means that all <test> elements will be
completed, even if tests fail.
Nunit2.failonerror="true" means that the build will fail if any of the
tests fail
Test.haltonfailure="false" means that all of the tests in the test
element will run, even if there are failures. 

What actually happens is that test.haltonfailure only takes effect
within a given test assembly, and the moment a test fails a
BuildException is raised, which prevents all of the other tests in the
other assemblies being run.  The functionality of nunit2.haltonfailure
is identical to test.haltonfailure, which is counter-intuitive.

I propose altering this functionality so that all tests in all
assemblies are run before the exception is raised.  This should be as
simple as setting a boolean if a test fails and then checking the
boolean at the end of the foreach loop.

Any thoughts on this?

Michael Luke



-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
nant-developers mailing list
nant-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-developers

Reply via email to