Note: This is the migration API reference for FAKE 5. The new (modularized) API documentation can be found here. If the API is already migrated you can check here if exists in a module. More information regarding the migration can be found here

MSTest

Contains tasks to run MSTest unit tests.

Nested types and modules

TypeDescription
ErrorLevel

Option which allow to specify if a MSTest error should break the build.

MSTestParams

Parameter type to configure the MSTest.exe.

Functions and values

Function or valueDescription
buildArgs parameters assembly
Signature: parameters:MSTestParams -> assembly:string -> string

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

exec setParams assemblies
Signature: setParams:(MSTestParams -> MSTestParams) -> assemblies:seq<string> -> unit

Runs MSTest command line tool on a group of assemblies.

Parameters

  • setParams - Function used to manipulate the default MSTestParams value.
  • assemblies - Sequence of one or more assemblies containing Microsoft Visual Studio Unit Test Framework unit tests.

Sample usage

1: 
2: 
3: 
4: 
Target "Test" (fun _ ->
    !! (testDir + @"\*.Tests.dll") 
      |> MSTest (fun p -> { p with Category = "group1" })
)
MSTestDefaults
Signature: MSTestParams

MSTest default parameters.