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

NUnit3

Contains tasks to run NUnit unit tests.

Sample

1: 
2: 
3: 
4: 
5: 
6: 
   Target.create "Test" (fun _ ->
       !! (testDir + "/NUnit.Test.*.dll")
         |> NUnit3.run (fun p ->
             {p with
                   ShadowCopy = false })
   )

Nested types and modules

TypeDescription
LabelsLevel

The --labels option in NUnit3 console runner. Specify whether to write test case names to the output.

NUnit3DomainModel

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

NUnit3ErrorLevel

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

NUnit3Params

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

For reference, see: NUnit3 command line options

NUnit3ProcessModel

Process model for NUnit 3 to use.

NUnit3Runtime

The --framework option in running NUnit 3. There are three kinds - VXY, which means either .NET framework or Mono, NetXY (use .NET framework with given version) and MonoXY (Mono framework with given version). You can use Net or Mono to let NUnit select the version. You can pass any value using Other.

NUnit3TraceLevel

The --trace option in NUnit3 console runner. Specifies the internal nunit runner log level.

Functions and values

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

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

NUnit3Defaults
Signature: NUnit3Params

The NUnit3Params default parameters.

  • ToolPath - The nunit-console.exe path if it exists in tools/Nunit/.
  • Testlist - ""
  • Where - ""
  • Config - ""
  • ProcessModel - DefaultProcessModel
  • Agents - None
  • Domain - DefaultDomainModel
  • Framework - ""
  • Force32bit - false
  • DisposeRunners - false
  • Timeout - 2147483647 milliseconds
  • Seed - -1 (negative seed is ignored by NUnit and is not sent to it)
  • Workers - None
  • StopOnError - false
  • WorkingDir - ""
  • OutputDir - ""
  • ErrorDir - ""
  • ResultSpecs - "TestResult.xml"
  • ShadowCopy - false
  • TeamCity - false
  • ErrorLevel - Error
  • TraceLevel - Default (By default NUnit3 sets this to off internally)
  • SkipNonTestAssemblies - false
  • Params - ""
  • EnvironmentVariables - [] ## Defaults
run setParams assemblies
Signature: setParams:(NUnit3Params -> NUnit3Params) -> assemblies:seq<string> -> unit