<nunit>Runs tests using the NUnit framework.
The haltonfailure or haltonerror are only used to stop more than one test suite from running. If any test suite fails, a build error will be thrown. Use failonerror="false" to ignore test errors and continue build.
Attribute | Description | Required |
---|---|---|
haltonerror | Stops running tests when a test causes an error. Default is "false." | False |
haltonfailure | Stops running tests if a test fails (errors are considered failures as well). Default is "false." | False |
timeout | Cancel the individual tests if they do not finish in the specified time (measured in milliseconds). Ignored if fork is disabled. | False |
failonerror | Determines whether task failure stops the build or is just reported. Default is "true." | False |
verbose | Task reports detailed build log messages. Default is "false." | False |
if | If true then the task will be executed; otherwise skipped. Default is "true." | False |
unless | Opposite of if. If false then the task will be executed; otherwise skipped. Default is "false." | False |
Example
<nunit basedir="build" verbose="false" haltonerror="true"
haltonfailure="true">
<formatter type="Xml"/>
<formatter type="Plain"/>
<test name="MyProject.Tests.AllTests" assembly="MyProject.Tests.dll"outfile="results"/>
</nunit>