gcovr

C
C tier on Test Coverage ToolsScore 6.6 · #9 of 26
Android app
Not listed
Free plan
No
Runs on
Linux, Mac, Windows
gcovr.com
The gcovr homepage

Summary

gcovr is a free command-line tool for managing GNU gcov data and producing summarized code coverage results. A typical workflow is to compile with GCC coverage flags, run a test suite and invoke gcovr for a tabular report. It generates text, HTML, CSV, JSON and Markdown, as well as formats such as Cobertura XML, JaCoCo XML, LCOV, Coveralls JSON and SonarQube. HTML reports can include overview and annotated-source views, with nested, self-contained, themed and customizable-template options. Cobertura output can be imported into Jenkins and Hudson through coverage plugins; gcovr also generates compatible SonarQube and JaCoCo reports. Its branch coverage reflects GCC's low-level control-flow arcs, which may include compiler-generated branches and make 100% branch coverage impossible for most programs. A separate decision-coverage option parses source code for that metric. gcovr is distributed as a Python package and supports Python 3.10 or newer, along with Linux, Windows and macOS. Development testing covers GCC and Clang, and the project is licensed under BSD 3-Clause.

Who it is for

gcovr suits C and C++ developers who use GCC coverage data and need reports for local workflows or CI tools. It may also fit teams that want output in formats such as Cobertura, JaCoCo or SonarQube.

What is good

  • Generates a wide range of coverage report formats.
  • HTML output supports annotated-source views.
  • Cobertura reports can feed Jenkins and Hudson plugins.
  • Supports Linux, Windows and macOS.
  • BSD 3-Clause license permits reuse under its conditions.

What to know first

  • Requires Python 3.10 or newer.
  • Branch coverage may include compiler-generated branches.
  • 100% branch coverage is impossible for most programs.

Everything Xiaomi review

gcovr: the full review

gcovr provides many report formats from gcov data and can fit several CI reporting workflows. Its GCC-arc basis means branch coverage results need to be read with care.

Overview

For C and C++ teams already building with GCC coverage flags, gcovr provides a compact command-line step between running tests and reviewing coverage. Its broad report output is useful in automated pipelines; the important caveat is that its branch numbers reflect GCC’s low-level control-flow arcs, not only source-level decisions.

Users compile with coverage flags, run their test suite, then invoke gcovr to collect and summarize the results. It is a coverage reporting tool, not a test runner, and it is positioned as a command-line alternative to lcov. The BSD 3-Clause license permits use and redistribution of source and binary forms subject to its conditions.

Key features

Report-format choice is gcovr’s strongest practical advantage. It produces text, HTML, CSV, JSON and Markdown, as well as Clover XML, Cobertura XML, Coveralls JSON, JaCoCo XML, LCOV and SonarQube-compatible output. That lets teams generate a local summary and files for downstream tools from the same coverage workflow.

HTML output supports overview and annotated-source views, nested reports, self-contained files, themes and customizable templates. Configuration files, exclusion markers and reproducible timestamps help teams make report generation more consistent. Filters can narrow coverage-data searches and filter symlinks, which is useful when a project’s data tree is larger or more complicated than the code a team wants to measure.

Coverage gates are supported, but branch coverage needs careful interpretation: gcovr reports GCC’s -fprofile-arcs control-flow graph arcs, which can include compiler-generated branches. As a result, 100% branch coverage is impossible for most programs. The --decisions option parses source to provide a decision-coverage metric, a useful distinction when arc counts are not a good proxy for source-level decisions.

For CI, Cobertura XML can be imported into Jenkins and Hudson through coverage plugins. SonarQube-compatible XML can carry line, branch, condition or decision metrics; JaCoCo XML includes line, branch and method counters. These formats make gcovr useful as a report producer in existing pipelines, rather than a replacement for their dashboards.

Pricing

gcovr is free, with no paid plan described. It is distributed as a Python package installable with pip; development versions can be installed from GitHub. The current release supports Python 3.10 and newer, so older Python environments are a practical compatibility constraint.

Platforms

gcovr supports Linux, Windows and macOS. Its documented runtime context is Python 3.10 or newer alongside GCC or Clang; development testing covers both compilers. Pull requests are automatically tested on Windows and Linux, and project code coverage is collected.

Who it's for

gcovr suits C and C++ developers who need coverage summaries or want to feed report files into Jenkins, Hudson, SonarQube or other workflows that consume its supported formats. Its command-line approach and configuration options favor teams comfortable adding a reporting step to a build-and-test process. Readers seeking a graphical standalone coverage environment or coverage collection independent of GCC-style data should look elsewhere.

Help is directed through GitHub tickets, Stack Overflow and Gitter. The project lists Lukas Atkinson and Michael Förderer as maintainers.

Pros and cons

  • Pro: A wide selection of report formats lets one tool serve terminal summaries, HTML review and multiple CI or analysis integrations.
  • Pro: HTML views, templates, filters and exclusion markers provide useful control over how reports are presented and which data they include.
  • Con: Branch results can count compiler-generated arcs, making raw percentages less intuitive and a 100% target unattainable for most programs.
  • Con: The workflow depends on GCC coverage data and Python 3.10 or newer, so it is not a general-purpose fit for every language or runtime.

Alternatives

For a broader comparison, see the Test Coverage Tools category. Choose Coveralls instead when its hosted coverage service and stated free access for open-source and public repositories better fit the workflow. OpenClover is another free option, with no usage limits stated for its free plan.

ReportGenerator offers a free basic plan and a 10-day full-access trial; its listed Individual plan is priced at 79. SimpleCov is the free, MIT-licensed option specifically for Ruby coverage. Coverage.py is a free open-source choice for Python coverage, with an enterprise subscription available through Tidelift.

For modern .NET SDK-style projects, Coverlet is free and specifically supports that project type. gofmt is a free command-line executable included with Go installations. Codecov is a freemium option with a Developer plan that allows one user for open-source projects or unlimited users for private projects, alongside 250 private-repository uploads and unlimited public repositories.

Verdict

Choose gcovr if you maintain C or C++ projects using GCC coverage data and want one free command-line tool to create reports for people and CI systems. Its format range and configuration options make it adaptable, but teams that depend on straightforward source-level branch percentages should account for GCC arc semantics—or choose a tool aligned with their preferred coverage model.

Compared on test coverage tools

Free plan
Yesgcovr.com
Coverage types
line, branch, decision, function, condition, callgcovr.com
Supported languages
C, C++gcovr.com
Report formats
text, HTML, CSV, JSON, Markdown, Clover XML, Cobertura XML, Coveralls JSON, JaCoCo XML, LCOV, SonarQube XMLgcovr.com
Coverage gates
Yesgcovr.com

Facts

Purpose
gcovr manages GNU gcov and generates summarized code coverage results.gcovr.com · 30 Sept 2026
Coverage reports
It can produce text, HTML, CSV, JSON, Markdown, Clover XML, Cobertura XML, Coveralls JSON, JaCoCo XML, LCOV, and SonarQube reports.gcovr.com · 30 Sept 2026
HTML reports
HTML output supports overview, annotated-source, nested, self-contained, themed, and customizable-template reports.gcovr.com · 30 Sept 2026
Workflow
Users compile with GCC coverage flags, run their test suite, and invoke gcovr to generate a tabular report.gcovr.com · 30 Sept 2026
Python requirement
The current release supports Python 3.10 and newer.gcovr.com · 30 Sept 2026
Operating systems
The project supports Linux, Windows, and macOS.gcovr.com · 30 Sept 2026
Compilers
Development testing covers GCC and Clang.gcovr.com · 30 Sept 2026
CI integration
Cobertura XML output is suitable for import into Jenkins and Hudson through coverage plugins.gcovr.com · 30 Sept 2026
SonarQube integration
gcovr can generate SonarQube-compatible XML coverage reports with line, branch, condition, or decision metrics.gcovr.com · 30 Sept 2026
JaCoCo integration
gcovr can generate JaCoCo XML output containing line, branch, and method counters.gcovr.com · 30 Sept 2026
Support
The documentation directs users to GitHub tickets, Stack Overflow, and Gitter for help.gcovr.com · 30 Sept 2026
License
gcovr is released under the BSD 3-Clause License, which permits redistribution and use in source and binary forms subject to its conditions.gcovr.com · 30 Sept 2026
Maintainers
The project lists Lukas Atkinson and Michael Förderer as maintainers.gcovr.com · 30 Sept 2026
Notable limitation
gcovr's branch coverage is based on GCC's low-level control-flow graph arcs, so reports can include compiler-generated branches and 100% branch coverage is impossible for most programs.gcovr.com · 30 Sept 2026
Command-line tool
gcovr is described as a command-line alternative to lcov.gcovr.com · 1 Oct 2026
Decision coverage
The --decisions option parses source code to extract a decision-coverage metric.gcovr.com · 1 Oct 2026
Filters
gcovr supports filters for speeding up coverage-data searches and filtering symlinks.gcovr.com · 1 Oct 2026
Configuration
The user guide includes configuration files, exclusion markers and reproducible timestamp features.gcovr.com · 1 Oct 2026
Integrations
Cobertura XML can be used with Jenkins, and gcovr also produces Coveralls and SonarQube formats.gcovr.com · 1 Oct 2026
Installation
gcovr is distributed as a Python package installable with pip, with development versions installable from GitHub.gcovr.com · 1 Oct 2026
Runtime requirements
The current documentation supports Python 3.10 and newer, GCC or Clang, and Linux, Windows and macOS.gcovr.com · 1 Oct 2026
Quality assurance
Pull requests are automatically tested on Windows and Linux, and code coverage is collected.gcovr.com · 1 Oct 2026

Best gcovr alternatives

See all 12

Where it ranks on Everything Xiaomi

Is gcovr yours?

Claim it for free: prove the domain, then correct facts, plans and screenshots. An editor reviews every change.

Sources