Created
April 22, 2014 20:53
-
-
Save jamescrowley/11193916 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Target "TestCoverage" (fun _ -> | |
let filters = "-:*.Tests;" # exclude test assemblies from coverage stats | |
# run NUnit tests via dotCover | |
!! testAssemblies | |
|> DotCoverNUnit (fun p -> { p with | |
Output = artifactsDir @@ "NUnitDotCover.snapshot" | |
Filters = filters }) nunitOptions | |
# run the MSpec tests via dotCover | |
!! testAssemblies | |
|> DotCoverMSpec (fun p -> { p with | |
Output = artifactsDir @@ "MSpecDotCover.snapshot" | |
Filters = filters }) mSpecOptions | |
# merge the code coverage files | |
DotCoverMerge (fun p -> { p with | |
Source = [artifactsDir @@ "NUnitDotCover.snapshot";artifactsDir @@ "MSpecDotCover.snapshot"] | |
Output = artifactsDir @@ "DotCover.snapshot" }) | |
# generate a HTML report | |
# you could also generate other report types here (such as NDepend) | |
DotCoverReport (fun p -> { p with | |
Source = artifactsDir @@ "DotCover.snapshot" | |
Output = artifactsDir @@ "DotCover.htm" | |
ReportType = DotCoverReportType.Html }) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment