Skip to content

Instantly share code, notes, and snippets.

@mhagrelius
Created September 26, 2019 01:13
Show Gist options
  • Save mhagrelius/165b46ef77cf3a6fcc4c071681fcac56 to your computer and use it in GitHub Desktop.
Save mhagrelius/165b46ef77cf3a6fcc4c071681fcac56 to your computer and use it in GitHub Desktop.
Script for collecting code coverage
#!/bin/bash
dotnet test ./Example.Test/Example.Test.csproj /p:CollectCoverage=true /p:CoverletOutputFormat=lcov /p:CoverletOutput=./lcov.info /p:Exclude="[xunit*]*%2c[*]*.generated.cs%2c[Example.Test]*"
@mhagrelius
Copy link
Author

Make sure you have Coverlet.MSBuild added to the test project and that the libraries you are trying to get coverage on have the appropriate debug information being generated (e.g.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment