gcovr
gcovr is a free command-line tool for managing GNU gcov data and producing summarized code coverage results.
What gcovr is
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.
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.
Watch out
- Requires Python 3.10 or newer.
- Branch coverage may include compiler-generated branches.
- 100% branch coverage is impossible for most programs.
Who it suits
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.
Verdict
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.
The facts
Each one read from gcovr's own pages, with the date it was checked.
What it does
- CI integration
- Cobertura XML output is suitable for import into Jenkins and Hudson through coverage plugins.checked 30 Sep 2026
- Command-line tool
- gcovr is described as a command-line alternative to lcov.checked 1 Oct 2026
- Compilers
- Development testing covers GCC and Clang.checked 30 Sep 2026
- Configuration
- The user guide includes configuration files, exclusion markers and reproducible timestamp features.checked 1 Oct 2026
- Coverage reports
- It can produce text, HTML, CSV, JSON, Markdown, Clover XML, Cobertura XML, Coveralls JSON, JaCoCo XML, LCOV, and SonarQube reports.checked 30 Sep 2026
- Coverage types
- Its branch coverage reports are based on GCC's -fprofile-arcs control-flow graph data.checked 1 Oct 2026
- Decision coverage
- The --decisions option parses source code to extract a decision-coverage metric.checked 1 Oct 2026
- Filters
- gcovr supports filters for speeding up coverage-data searches and filtering symlinks.checked 1 Oct 2026
- HTML reports
- HTML output can provide an overview of all files, annotated source files and custom Jinja2 templates.checked 1 Oct 2026
- Installation
- gcovr is distributed as a Python package installable with pip, with development versions installable from GitHub.checked 1 Oct 2026
- Integrations
- Cobertura XML can be used with Jenkins, and gcovr also produces Coveralls and SonarQube formats.checked 1 Oct 2026
- JaCoCo integration
- gcovr can generate JaCoCo XML output containing line, branch, and method counters.checked 30 Sep 2026
- License
- gcovr is available under the BSD 3-Clause License.checked 1 Oct 2026
- Maintainers
- The documentation lists Lukas Atkinson and Michael Förderer as maintainers.checked 1 Oct 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.checked 30 Sep 2026
- Operating systems
- The project supports Linux, Windows, and macOS.checked 30 Sep 2026
- Purpose
- gcovr manages GNU gcov and generates summarized code coverage results.checked 1 Oct 2026
- Python requirement
- The current release supports Python 3.10 and newer.checked 30 Sep 2026
- Quality assurance
- Pull requests are automatically tested on Windows and Linux, and code coverage is collected.checked 1 Oct 2026
- Report formats
- It generates text, HTML, CSV, JSON, Markdown, Clover, Cobertura, Coveralls, JaCoCo, LCOV and SonarQube reports.checked 1 Oct 2026
- Runtime requirements
- The current documentation supports Python 3.10 and newer, GCC or Clang, and Linux, Windows and macOS.checked 1 Oct 2026
- SonarQube integration
- gcovr can generate SonarQube-compatible XML coverage reports with line, branch, condition, or decision metrics.checked 30 Sep 2026
- Support
- The project directs users to GitHub issue tickets, Stack Overflow and a Gitter chat room for help.checked 1 Oct 2026
- Workflow
- Users compile with GCC coverage flags, run their test suite, and invoke gcovr to generate a tabular report.checked 30 Sep 2026
The full review of gcovr
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.
Alternatives to gcovr
- 1

Codecov
Free planOpen sourceWebAPIExtensionLinux8.0From $5 a month - 2
Avidemux
Free planOpen sourceWebLinuxmacOSWindows7.3Free plan - 3
Coverage.py
Free planOpen sourceAPILinuxmacOSSelf-hosted7.3Free plan - 4

Coveralls
Free planWebAPILinuxSelf-hosted6.8From $10 a month - 5
ReportGenerator
Free planLinuxmacOSWindows6.8$79 one-time - 6
gcov
Free planLinuxmacOSWindows6.5Free plan
