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

DotCover Module

Contains a task which can be used to run DotCover on .NET assemblies.

Types

Type Description

MergeParams

The DotCover merge command parameters

Params

The dotCover parameter type for running coverage

ReportParams

The DotCover report command parameters

ReportType

The coverage report type

Functions and values

Function or value Description

DotCover.merge setParams

Full Usage: DotCover.merge setParams

Parameters:

Runs the dotCover merge command. This combines dotCover snapshots into a single snapshot, enabling you to merge test coverage from multiple test running frameworks

setParams : MergeParams -> MergeParams

Function used to overwrite the dotCover merge default parameters.

Example


 DotCover.merge (fun p -> { p with
         Source = [artifactsDir @@ "NUnitDotCoverSnapshot.dcvr"
         artifactsDir @@ "MSpecDotCoverSnapshot.dcvr"]
         Output = artifactsDir @@ "dotCoverSnapshot.dcvr" })

DotCover.report setParams

Full Usage: DotCover.report setParams

Parameters:

Runs the dotCover report command. This generates a report from a dotCover snapshot

setParams : ReportParams -> ReportParams

Function used to overwrite the dotCover report default parameters.

Example


 DotCover.report (fun p -> { p with
         Source = artifactsDir @@ "dotCoverSnapshot.dcvr"
         Output = artifactsDir @@ "dotCoverReport.xml"
         ReportType = ReportType.Xml })

DotCover.run setParams

Full Usage: DotCover.run setParams

Parameters:
    setParams : Params -> Params - Function used to overwrite the dotCover default parameters.

Runs the dotCover cover command, using a target executable (such as NUnit or MSpec) and generates a snapshot file.

setParams : Params -> Params

Function used to overwrite the dotCover default parameters.

Example


 DotCover.run (fun p -> { p with
         TargetExecutable = "path to NUnit or MSpec"
         WorkingDir ".
         Output = artifactsDir @@ "dotCoverSnapshot.dcvr" })

DotCover.runMSTest setDotCoverParams setMSTestParams assemblies

Full Usage: DotCover.runMSTest setDotCoverParams setMSTestParams assemblies

Parameters:
    setDotCoverParams : Params -> Params - Function used to overwrite the dotCover report default parameters.
    setMSTestParams : MSTestParams -> MSTestParams - Function used to overwrite the MSTest default parameters.
    assemblies : seq<string> - The set of assemblies to run command on

Runs the dotCover cover command against the MSTest test runner.

setDotCoverParams : Params -> Params

Function used to overwrite the dotCover report default parameters.

setMSTestParams : MSTestParams -> MSTestParams

Function used to overwrite the MSTest default parameters.

assemblies : seq<string>

The set of assemblies to run command on

Example


 !! (buildDir @@ buildMode @@ "/*.Unit.Tests.dll")
         |> DotCover.runMSTest
             (fun  -> dotCoverOptions )
             (fun MSTestOptions -> MSTestOptions)

DotCover.runMSpec setDotCoverParams setMSpecParams assemblies

Full Usage: DotCover.runMSpec setDotCoverParams setMSpecParams assemblies

Parameters:
    setDotCoverParams : Params -> Params - Function used to overwrite the dotCover report default parameters.
    setMSpecParams : MSpecParams -> MSpecParams - Function used to overwrite the MSpec default parameters.
    assemblies : seq<string> - The set of assemblies to run command on

Runs the dotCover cover command against the MSpec test runner.

setDotCoverParams : Params -> Params

Function used to overwrite the dotCover report default parameters.

setMSpecParams : MSpecParams -> MSpecParams

Function used to overwrite the MSpec default parameters.

assemblies : seq<string>

The set of assemblies to run command on

Example


 !! (buildDir @@ buildMode @@ "/*.Unit.Tests.dll")
         |> DotCover.runMSpec
             (fun dotCoverOptions -> { dotCoverOptions with
                     Output = artifactsDir @@ "MSpecDotCoverSnapshot.dcvr" })
             (fun mSpecOptions -> { mSpecOptions with
                     Silent = true })

DotCover.runNUnit setDotCoverParams setNUnitParams assemblies

Full Usage: DotCover.runNUnit setDotCoverParams setNUnitParams assemblies

Parameters:
    setDotCoverParams : Params -> Params - Function used to overwrite the dotCover report default parameters.
    setNUnitParams : NUnitParams -> NUnitParams - Function used to overwrite the NUnit default parameters.
    assemblies : seq<string> - The set of assemblies to run command on

Runs the dotCover cover command against the NUnit test runner.

setDotCoverParams : Params -> Params

Function used to overwrite the dotCover report default parameters.

setNUnitParams : NUnitParams -> NUnitParams

Function used to overwrite the NUnit default parameters.

assemblies : seq<string>

The set of assemblies to run command on

Example


 !! (buildDir @@ buildMode @@ "/*.Unit.Tests.dll")
         |> DotCover.runNUnit
             (fun dotCoverOptions -> { dotCoverOptions with
                     Output = artifactsDir @@ "NUnitDotCoverSnapshot.dcvr" })
             (fun nUnitOptions -> { nUnitOptions with
                     DisableShadowCopy = true })

DotCover.runNUnit3 setDotCoverParams setNUnitParams assemblies

Full Usage: DotCover.runNUnit3 setDotCoverParams setNUnitParams assemblies

Parameters:
    setDotCoverParams : Params -> Params - Function used to overwrite the dotCover report default parameters.
    setNUnitParams : NUnit3Params -> NUnit3Params - Function used to overwrite the NUnit default parameters.
    assemblies : seq<string> - The set of assemblies to run command on

Runs the dotCover cover command against the NUnit test runner.

setDotCoverParams : Params -> Params

Function used to overwrite the dotCover report default parameters.

setNUnitParams : NUnit3Params -> NUnit3Params

Function used to overwrite the NUnit default parameters.

assemblies : seq<string>

The set of assemblies to run command on

Example


 !! (buildDir @@ buildMode @@ "/*.Unit.Tests.dll")
         |> DotCover.runNUnit3
             (fun dotCoverOptions -> { dotCoverOptions with
                     Output = artifactsDir @@ "NUnit3DotCoverSnapshot.dcvr" })
             (fun nUnit3Options -> { nUnit3Options with
                     DisableShadowCopy = true })

DotCover.runXUnit2 setDotCoverParams setXUnit2Params assemblies

Full Usage: DotCover.runXUnit2 setDotCoverParams setXUnit2Params assemblies

Parameters:
    setDotCoverParams : Params -> Params - Function used to overwrite the dotCover report default parameters.
    setXUnit2Params : XUnit2Params -> XUnit2Params - Function used to overwrite the XUnit2 default parameters.
    assemblies : seq<string> - The set of assemblies to run command on

Runs the dotCover cover command against the XUnit2 test runner.

setDotCoverParams : Params -> Params

Function used to overwrite the dotCover report default parameters.

setXUnit2Params : XUnit2Params -> XUnit2Params

Function used to overwrite the XUnit2 default parameters.

assemblies : seq<string>

The set of assemblies to run command on

Example


 !! (buildDir @@ buildMode @@ "/*.Unit.Tests.dll")
         |> DotCover.runXUnit2
             (fun  -> dotCoverOptions )
             (fun nUnitOptions -> nUnitOptions)