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

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

v5.fake.build

Generating Testing Reports using FAKE

The ReportGenerator tool converts XML reports generated by OpenCover, PartCover, dotCover, Visual Studio, NCover or Cobertura into human readable reports in various formats.

The reports do not only show the coverage quota, but also include the source code and visualize which lines have been covered.

ReportGenerator supports merging several reports into one. It is also possible to pass one XML file containing several reports to ReportGenerator (e.g. a build log file).

To see the available ReportGenerator APIs in FAKE, please see the API-Reference for the ReportGenerator module.

Minimal working example

"#r paket:
nuget Fake.Core.Target
nuget Fake.Testing.ReportGenerator"

open Fake.Core
open Fake.Core.TargetOperators
open Fake.Testing

Target.create "Generate Reports" (fun _ ->
   !! "**/opencover.xml"
   |> Seq.toList
   |> ReportGenerator.generateReports (fun p -> { p with TargetDir = "c:/reports/" })
 )


Target.runOrDefault "Generate Reports"