Fine Code Coverage – Visual Studio Marketplace

Visualize unit test code coverage easily for free in Visual Studio Community Edition (and other editions too)

Coverage View
Source: Fine Code Coverage – Visual Studio Marketplace

Usage:

  1. Install
  2. Open the Fine Code Coverage window
  3. Run all unit tests
  4. See stats in Fine Code Coverage window
  5. Exclude the test project itself from coverage calculation:

    (Below excludes project that ends with .Test and all its types (*

Pattern: [assemblyname]type

Filter Expressions:

Wildcards
* => matches zero or more characters
		
Examples
[*]* => All types in all assemblies (nothing is instrumented)
[coverlet.*]Coverlet.Core.Coverage => The Coverage class in the Coverlet.Core namespace belonging to any assembly that matches coverlet.* (e.g coverlet.core)
[*]Coverlet.Core.Instrumentation.* => All types belonging to Coverlet.Core.Instrumentation namespace in any assembly
[coverlet.*.tests]* => All types in any assembly starting with coverlet. and ending with .tests

Both 'Exclude' and 'Include' options can be used together but 'Exclude' takes precedence.

Leave a Reply

Your email address will not be published. Required fields are marked *