Skip to content

Commit

Permalink
(DefaultBuild) Adding OpenCover for NUnit
Browse files Browse the repository at this point in the history
  • Loading branch information
gep13 committed Sep 12, 2016
1 parent 1e11357 commit a133ca9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
17 changes: 13 additions & 4 deletions gep13.DefaultBuild/Content/testing.cake
Expand Up @@ -18,10 +18,19 @@ Task("Test-NUnit")
{
EnsureDirectoryExists(parameters.Paths.Directories.NUnitTestResults);
// TODO: Need to add OpenCover here
NUnit3(GetFiles(parameters.Paths.Directories.PublishedNUnitTests + "/**/*.Tests.dll"), new NUnit3Settings {
NoResults = true
});
OpenCover(tool => {
tool.NUnit3(GetFiles(parameters.Paths.Directories.PublishedNUnitTests + "/**/*.Tests.dll"), new NUnit3Settings {
NoResults = true
});
},
parameters.Paths.Files.TestCoverageOutputFilePath,
new OpenCoverSettings { ReturnTargetCodeOffset = 0 }
.WithFilter(testCoverageFilter)
.ExcludeByAttribute(testCoverageExcludeByAttribute)
.ExcludeByFile(testCoverageExcludeByFile));
// TODO: Need to think about how to bring this out in a generic way for all Test Frameworks
ReportGenerator(parameters.Paths.Files.TestCoverageOutputFilePath, parameters.Paths.Directories.TestCoverage);
});

Task("Test-xUnit")
Expand Down
2 changes: 1 addition & 1 deletion gep13.DefaultBuild/gep13.DefaultBuild.nuspec
Expand Up @@ -2,7 +2,7 @@
<package>
<metadata>
<id>gep13.DefaultBuild</id>
<version>0.1.31</version>
<version>0.1.32</version>
<authors>gep13</authors>
<owners>gep13</owners>
<description>Re-usable build script for Cake that can be used for numerous projects.</description>
Expand Down

0 comments on commit a133ca9

Please sign in to comment.