This is part of the Fake.DotNet.Testing.NUnit module.

Common

Contains types and utility functions relaited to running NUnit unit tests.

Nested types and modules

TypeDescription
NUnitDomainModel

The /domain option controls of the creation of AppDomains for running tests. See NUnit-Console Command Line Options

NUnitErrorLevel

Option which allows to specify if a NUnit error should break the build.

NUnitParams

The NUnit Console Parameters type. FAKE will use NUnitDefaults for values not provided.

For reference, see: NUnit-Console Command Line Options

NUnitProcessModel

Process model for nunit to use, see Project Editor

Functions and values

Function or valueDescription
buildArgs parameters assemblies
Signature: parameters:NUnitParams -> assemblies:seq<string> -> string

Builds the command line arguments from the given parameter record and the given assemblies.

NUnitDefaults
Signature: NUnitParams

The NUnitParams default parameters.

Defaults

  • IncludeCategory - ""
  • ExcludeCategory - ""
  • ToolPath - The nunit-console.exe path if it exists in a subdirectory of the current directory.
  • ToolName - "nunit-console.exe"
  • DontTestInNewThread- false
  • StopOnError - false
  • SkipNonTestAssemblies - false
  • OutputFile - "TestResult.xml"
  • Out - ""
  • ErrorOutputFile - ""
  • WorkingDir - ""
  • Framework - ""
  • ProcessModel - DefaultProcessModel
  • ShowLabels - true
  • XsltTransformFile - ""
  • TimeOut - 5 minutes
  • DisableShadowCopy - false
  • Domain - DefaultDomainModel
  • ErrorLevel - Error
  • Fixture - ""

Active patterns

Active patternDescription
( |OK|TestsFailed|FatalError| )(...)
Signature: errorCode:int -> Choice<unit,unit,string>

NUnit console returns negative error codes for errors and sum of failed, ignored and exceptional tests otherwise. Zero means that all tests passed.