Skip to content
SPECIFICTION
Get listed

gcov vs Microsoft Code Coverage

gcov

gcc.gnu.org

Microsoft Code Coverage

github.com

Side by side

FiguregcovMicrosoft Code Coverage
Price fromFreeFree
Free planYesYes
Free trial——
Open source——
WindowsYesYes
macOSYesYes
LinuxYesYes
Plans published11
Spec score · Test Coverage Tools8.5 (#5)7.5 (#18)
Intended usersThe documentation describes software developers using coverage results with test suites to find where additional tests are needed.The documented workflows cover .NET test projects and other .NET applications that users want to measure for code coverage.
Purposegcov is a test coverage program used with GCC to find untested parts of programs and guide code optimization.Measures what proportion of a project's code is exercised by coded tests such as unit tests.
SupportThe GCC project directs users to its manuals and the gcc-help mailing list for usage questions.The repository invites users to report issues related to the Microsoft.CodeCoverage and dotnet-coverage NuGet packages and Visual Studio code coverage functionality.

Plans

gcov

  • gcovFree

gcov pricing →

Microsoft Code Coverage

  • Microsoft Code CoverageFree

Microsoft Code Coverage pricing →

In their own words

gcov

gcov is a free test coverage tool used with GCC to show how program code runs during testing. It reports which source lines execute and how often, producing per-line counts in `.gcov` files. Reports can include line, function, branch, condition, prime-path, and basic-block coverage. Options can report branch frequencies, show whether conditions independently affect a Boolean expression’s result, or filter reports to functions matching regular expressions. Output is available as `.gcov` text or gzip-compressed JSON; JSON generation does not require source code. The GCC documentation also describes using gcov with gprof to assess computing time, while warning that optimization can combine source lines and reduce hotspot detail. Before coverage reporting, programs must be compiled with GCC’s `--coverage` option. gcov works only with GCC-compiled code and is not compatible with other profiling or test coverage mechanisms. It runs on Linux, macOS, and Windows, supports the listed languages from C and C++ to Ada, D, and Go, and is self-hosted.

Visit gcc.gnu.org

Microsoft Code Coverage

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.

Visit github.com