DEV Community

loading...

Discussion on: Coverlet, unit tests coverage for .NET

Collapse
mteheran profile image
Miguel Teheran Author

Coverlet always shows the namespaces separated but you also will see a total table at the end. you have to put the test dlls (binaries) in the same folder and run "dotnet test /p:CollectCoverage=true" there.

Collapse
fabasoad profile image
Yevhen Fabizhevskyi

Thanks, it is what I need actually! Also, I have added a few more command line arguments. Here is the command that works for me perfectly (just in case if anyone needs it):

dotnet test ./MySolution.sln /p:CollectCoverage=true /p:MergeWith=$(pwd)/coverage/coverage.json /p:CoverletOutput=$(pwd)/coverage/ "/p:CoverletOutputFormat=\"json,opencover\""
Thread Thread
mteheran profile image
Miguel Teheran Author

Sweet! Thanks for sharing it

Forem Open with the Forem app