FAKE - F# Make - A DSL for build tasks and more FAKE
6.1.3

Lookig for older versions of the documentation, pre FAKE v6? See 

v5.fake.build

XUnit2 Module

Contains tasks to run xUnit v2 unit tests.

Types

Type Description

CollectionConcurrencyMode

The collection concurrency mode used by the xUnit2 runner.

ParallelMode

The parallelization mode of the xUnit2 runner.

XUnit2Params

The xUnit2 parameter type.

Functions and values

Function or value Description

XUnit2Defaults

Full Usage: XUnit2Defaults

Returns: XUnit2Params

The xUnit2 default parameters.

Returns: XUnit2Params

buildArgs parameters assemblies

Full Usage: buildArgs parameters assemblies

Parameters:
    parameters : XUnit2Params - XUnit parameters
    assemblies : seq<string> - List of assemblies to run tests in

Returns: string

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

parameters : XUnit2Params

XUnit parameters

assemblies : seq<string>

List of assemblies to run tests in

Returns: string

run setParams assemblies

Full Usage: run setParams assemblies

Parameters:
    setParams : XUnit2Params -> XUnit2Params - Function used to manipulate the default XUnit2Params value.
    assemblies : seq<string> - Sequence of one or more assemblies containing xUnit unit tests.

Runs xUnit v2 unit tests in the given assemblies via the given xUnit2 runner. Will fail if the runner terminates with non-zero exit code. The xUnit2 runner terminates with a non-zero exit code if any of the tests in the given assembly fail.

setParams : XUnit2Params -> XUnit2Params

Function used to manipulate the default XUnit2Params value.

assemblies : seq<string>

Sequence of one or more assemblies containing xUnit unit tests.

Example


 open Fake.DotNet.Testing
     open Fake.IO.Globbing.Operators
     Target.create "Test" (fun _ ->
         !! (testDir @@ "xUnit.Test.*.dll")
         |> XUnit2.run (fun p -> { p with HtmlOutputPath = Some (testDir @@ "xunit.html") })
     )