Skip to the content
Know your tech before you buy it. Makers: get listed from $49/mo

gcovr

gcovr.com

  • Free plan
  • Windows
  • macOS
  • Linux
7.6 Club score Visit gcovr.com

What gcovr is

gcovr is a free command-line tool for managing GNU gcov data and producing summarized code coverage results for C and C++. A typical workflow compiles with GCC coverage flags, runs a test suite and then invokes gcovr for a report. It can output text, HTML, CSV, JSON, Markdown, Clover XML, Cobertura XML, Coveralls JSON, JaCoCo XML, LCOV and SonarQube formats. HTML reports include overview, annotated-source, nested, self-contained, themed and customizable-template options. Cobertura output can be imported into Jenkins and Hudson through coverage plugins. SonarQube output supports line, branch, condition or decision metrics, while JaCoCo output contains line, branch and method counters. gcovr is distributed as a Python package and supports Python 3.10 or newer, with Linux, Windows and macOS support. Development testing covers GCC and Clang. Filters, configuration files, exclusion markers and reproducible timestamps are documented. Branch coverage follows GCC control-flow graph arcs, which can include compiler-generated branches and make 100% coverage impossible for most programs.

Who it suits

It suits developers and CI teams working with C or C++ who need command-line coverage reports. It is useful where Jenkins, SonarQube, JaCoCo or other listed report formats are required.

Good to know, and what to watch

  • Free Python package
  • Supports Linux, Windows and macOS
  • Generates many coverage report formats
  • Integrates with Jenkins and SonarQube
  • Supports coverage gates
  • Requires Python 3.10 or newer
  • Needs GCC or Clang coverage data
  • Branch coverage can include compiler-generated branches
  • 100% branch coverage is usually impossible

The verdict

gcovr provides broad report-format support for GCC and Clang coverage workflows across three operating systems. Its command-line design and integrations suit automated pipelines, but branch metrics have an explicit compiler-graph limitation.

What the maker publishes

CI integration
Cobertura XML output is suitable for import into Jenkins and Hudson through coverage plugins. source
Command-line tool
gcovr is described as a command-line alternative to lcov. source
Compilers
Development testing covers GCC and Clang. source
Configuration
The user guide includes configuration files, exclusion markers and reproducible timestamp features. source
Coverage reports
It can produce text, HTML, CSV, JSON, Markdown, Clover XML, Cobertura XML, Coveralls JSON, JaCoCo XML, LCOV, and SonarQube reports. source
Coverage types
Its branch coverage reports are based on GCC's -fprofile-arcs control-flow graph data. source
Decision coverage
The --decisions option parses source code to extract a decision-coverage metric. source
Filters
gcovr supports filters for speeding up coverage-data searches and filtering symlinks. source
HTML reports
HTML output supports overview, annotated-source, nested, self-contained, themed, and customizable-template reports. source
HTML reports
HTML output can provide an overview of all files, annotated source files and custom Jinja2 templates. source
Installation
gcovr is distributed as a Python package installable with pip, with development versions installable from GitHub. source
Integrations
Cobertura XML can be used with Jenkins, and gcovr also produces Coveralls and SonarQube formats. source
JaCoCo integration
gcovr can generate JaCoCo XML output containing line, branch, and method counters. source
License
gcovr is released under the BSD 3-Clause License, which permits redistribution and use in source and binary forms subject to its conditions. source
License
gcovr is available under the BSD 3-Clause License. source
Maintainers
The project lists Lukas Atkinson and Michael Förderer as maintainers. source
Maintainers
The documentation lists Lukas Atkinson and Michael Förderer as maintainers. source
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. source
Operating systems
The project supports Linux, Windows, and macOS. source
Purpose
gcovr manages GNU gcov and generates summarized code coverage results. source
Purpose
gcovr manages GNU gcov and generates summarized code coverage results. source
Python requirement
The current release supports Python 3.10 and newer. source
Quality assurance
Pull requests are automatically tested on Windows and Linux, and code coverage is collected. source
Report formats
It generates text, HTML, CSV, JSON, Markdown, Clover, Cobertura, Coveralls, JaCoCo, LCOV and SonarQube reports. source

Checked against the maker's pages on 1 Oct 2026.