<nunit>

(Deprecated)

Runs tests using the NUnit V1.0 framework.

See the NUnit home page for more information.

The haltonfailure or haltonerror attributes are only used to stop more than one test suite to stop running. If any test suite fails a build error will be thrown. Set failonerror to false to ignore test errors and continue build.

Parameters

Attribute Type Description Required
haltonerror bool Stops running tests when a test causes an error. The default is false. False
haltonfailure bool Stops running tests if a test fails (errors are considered failures as well). The default is false. False
timeout int Cancel the individual tests if they do not finish in the specified time (measured in milliseconds). Ignored if fork is disabled. False
failonerror bool Determines if task failure stops the build, or is just reported. The default is true. False
if bool If true then the task will be executed; otherwise, skipped. The default is true. False
unless bool Opposite of if. If false then the task will be executed; otherwise, skipped. The default is false. False
verbose bool Determines whether the task should report detailed build log messages. The default is false. False

Nested Elements:

<test>

Tests to run.

Represents a test element of an <nunit> task.

Parameters

AttributeTypeDescriptionRequired
assemblystring Assembly to load the test from. True
classstring Class name of the test. True
appconfigstring The application configuration file to use for the NUnit test domain. False
forkbool Run the tests in a separate AppDomain. False
haltonerrorbool Stop the build process if an error occurs during the test run. False
haltonfailurebool Stop the build process if a test fails (errors are considered failures as well). False
outfilestring Base name of the test result. The full filename is determined by this attribute and the extension of formatter. False
todirstring Directory to write the reports to. False

</test>

<formatter>

Formatters to output results of unit tests.

Represents the FormatterElement of the NUnit task.

Parameters

AttributeTypeDescriptionRequired
typeFormatterType Type of formatter. True
extensionstring Extension to append to the output filename. False
outputdirdirectory Specifies the directory where the output file should be written to, if usefile is true. If not specified, the output file will be written to the directory where the test module is located. False
usefilebool Determines whether output should be persisted to a file. The default is false. False

</formatter>

Examples

Requirements

Assembly: NAnt.NUnit1Tasks (0.91.4312.0)