Skip to content
SPECIFICTION
Get listed

Microsoft Code Coverage

github.com

Free plan WindowsmacOSLinux
Visit github.com
Spec score 7.5 #18 of 27 in Test Coverage Tools

What it is

Microsoft Code Coverage measures how much of a project’s code is exercised by coded tests, such as unit tests. Its documented workflows cover.NET test projects with `dotnet test` and other.NET applications with the `dotnet-coverage` tool. It analyzes managed CLR and unmanaged native code using static or dynamic instrumentation; native coverage is disabled by default in the MTP extension. With Microsoft.Testing.Platform.MSBuild, extensions are auto-registered with MSTest, NUnit, and xUnit runners. The MTP extension can produce coverage, XML, and Cobertura reports, with settings for output, inclusion and exclusion rules, and instrumentation. It runs on Windows, macOS, and multiple Linux distributions, though instrumentation support varies by OS, version, and architecture. Other operating systems are supported on a best-effort basis, and some combinations allow static instrumentation only. Dynamic instrumentation on macOS and Linux requires libxml2, and missing dependencies may leave a report empty. MTP also excludes test assemblies by default unless configured otherwise. The plan is free.

Spec sheet

Purpose
Measures what proportion of a project's code is exercised by coded tests such as unit tests.Read 4 Oct 2026 · learn.microsoft.com
Intended users
The documented workflows cover .NET test projects and other .NET applications that users want to measure for code coverage.Read 4 Oct 2026 · github.com
Security
The repository links to a security policy, but its README describes this repository as documentation and samples for closed-source coverage functionality.Read 4 Oct 2026 · github.com
Support
The repository invites users to report issues related to the Microsoft.CodeCoverage and dotnet-coverage NuGet packages and Visual Studio code coverage functionality.Read 4 Oct 2026 · github.com
Configuration
Coverage settings can control output, inclusion and exclusion rules, and instrumentation options using runsettings or dedicated coverage settings files.Read 4 Oct 2026 · github.com
Instrumentation
The tooling supports static and dynamic instrumentation.Read 4 Oct 2026 · learn.microsoft.com
Managed and native code
Coverage analysis supports managed CLR code and unmanaged native code; native coverage is disabled by default in the MTP extension.Read 4 Oct 2026 · learn.microsoft.com
Operating systems
The supported operating systems include Windows, macOS, and multiple Linux distributions, with instrumentation support varying by OS, version, and architecture.Read 4 Oct 2026 · github.com
Platform limits
Other operating systems are supported on a best-effort basis, and some OS and architecture combinations support static instrumentation only.Read 4 Oct 2026 · github.com
Report formats
The MTP coverage extension supports coverage, XML, and Cobertura output formats.Read 4 Oct 2026 · learn.microsoft.com
Runtime dependency
Dynamic instrumentation on macOS and Linux requires the libxml2 package; missing required dependencies may cause an empty coverage report.Read 4 Oct 2026 · github.com
Test assembly default
MTP excludes test assemblies from coverage by default unless configured otherwise.Read 4 Oct 2026 · learn.microsoft.com
Test frameworks
With Microsoft.Testing.Platform.MSBuild, coverage extensions are auto-registered when installed with MSTest, NUnit, and xUnit runners.Read 4 Oct 2026 · learn.microsoft.com
Usage
The repository documents collecting coverage for .NET tests with dotnet test and for other .NET applications with the dotnet-coverage tool.Read 4 Oct 2026 · github.com

Plans and prices

Microsoft Code Coverage Free Closed-source · free to use Read 4 Oct 2026 · learn.microsoft.com

Every Microsoft Code Coverage plan and price →

Strong points and limits

Strong points

  • Supports managed CLR and unmanaged native coverage
  • Static and dynamic instrumentation are available
  • MSTest, NUnit, and xUnit extensions auto-register
  • Outputs coverage, XML, and Cobertura reports
  • Available on Windows, macOS, and Linux

Limits

  • Native coverage is disabled by default in MTP
  • Dynamic instrumentation on macOS and Linux requires libxml2
  • Test assemblies are excluded by default
  • Some OS and architecture combinations allow static instrumentation only

Who it suits

It suits .NET developers who want to measure test coverage for test projects or other .NET applications. Teams using managed CLR or native code can configure instrumentation and report output to fit their workflow.

Verdict

Microsoft Code Coverage is free and supports multiple .NET test workflows, coverage types, and report formats. Check OS-specific instrumentation requirements and defaults before relying on a particular coverage setup.

Where Specifiction places it

Alternatives to Microsoft Code CoverageAll alternatives →