Tuesday, May 08, 2018

Cross Platform Test Code Coverage for .NET Core: Coverlet

I ran across a post on Medium, entitled, Setting up Coveralls with Coverlet for a .NET Core project. This brief and informative article details the setup and use of this new library from Toni Solarin-Sodara.  

As per the instructions, I issued the following from the prompt:
dotnet add package coverlet.msbuild
Here was the result:

Then, to update everything, I ran dotnet restor to update the dependencies:

The next step per the above article was to issue the dotnet test command to set the CollectCoverage property to true:
dotnet test /p:CollectCoverage=true
Here is the output:

As you can see from the output, I need to create more unit tests to increase coverage! In any event, to see the latest code up close, go to the unit tests github repository.

No comments: