p10tyr / PrestoCoverage

Visual Studio Extension for simple coverage visuals
Apache License 2.0
45 stars 6 forks source link

PrestoCoverage

Visual Studio Extension

ExtensionVersion Installs Rating

Nuget Dependancy - Coverlet.Core (Fork)

Coverlet Core NuGet Downloads NuGet Downloads

The free and fast Visual Studio 2017 15.8+ code coverage tool built around Coverlet, the best .NET Core coverage tool!

Coverage after tests completed

v114-demo

Using Coverlet file

2018-10-03_14-55-38

Multiple coverage results merging

2018-10-09_21-54-14

Installation

https://marketplace.visualstudio.com/items?itemName=PiotrKula.prestocoverage

  1. Visual Studio 15.8+ is required. Versions below this will not work.
  2. Install the PrestoCoverage extension
  3. Run coverlet and save all results to c:\coverlet\ (Check tips at the bottom)
  4. PrestoCoverage will load any files that follow the convention of *coverage.json
  5. Visual Studio UI will refresh as files get added, deleted, renamed or updated.
  6. Coverage files can be for any project/solution and supports multiple instances of Visual Studio

FEATURES ADDED SO FAR

TODO

Some other info

Tips

In the c:\coverlet directory I created a PowerShell Script which I use dotnet test to run tests then the next line is coverlet (assuming you have it installed globally) . I use coverlets --output argument to place the results into this directory with a specific name. Like this I can run multiple tests, with multiple results files and the extension will place the coverage boxes for the appropriate file. So each time I delete the files and rerun the tests my VS should show updated coverage now. Plus coverlet gives you some coverage percentages while running so that is a good metric to try and boost each time.

dotnet test C:\Code\domain\Domain.Tests.Integration\Domain.Tests.Integration.csproj
coverlet  C:\Code\domain\Domain.Tests.Integration\bin\Debug\Domain.Tests.Integration.dll --target "dotnet" --targetargs "test C:\Code\domain\Domain.Tests.Integration --no-build" --output "C:\coverlet\domain-integration-coverage" --format json

pause

Disclaimer