CheckOps home

Tools directory

G

CheckOps

gcovr

gcovr is a BSD-3-Clause Python tool that summarises GCC/gcov (and LLVM gcov-compatible) coverage for C and C++, producing text, HTML, Cobertura, JaCoCo, LCOV, SonarQube, Coveralls, JSON, CSV and Markdown reports.

Visit website

Latest public signals

Not refreshed yet. Refresh reads the public site and, when the entry has a GitHub repository, the latest release.

Visit Website

Introduction

gcovr provides a utility for managing the use of the GNU gcov tool and generating summarised code coverage results for C and C++. Its README says it is inspired by Python’s coverage.py. You compile with coverage flags (such as --coverage), run your tests, and gcovr collects the resulting data into readable reports, without having to run gcov file by file.

The gcovr command produces many report formats: plain text, HTML (single page, detailed per-file pages or nested directory views, with custom templates), Cobertura XML, JaCoCo XML, Clover, LCOV, SonarQube generic coverage, Coveralls JSON, gcovr’s own JSON and JSON summary, CSV and Markdown. It supports line, branch and decision coverage, filters and exclusions, merging of multiple runs, thresholds that fail builds (--fail-under-line, --fail-under-branch), and works with GCC and with Clang’s gcov-compatible output. Version 8.8 was released on 27 October 2026.

The source code is at gcovr/gcovr on GitHub under the BSD-3-Clause licence, with about 996 stars; the most recent commit was on 7 November 2026.

Features

  1. Many formats: HTML, Cobertura, JaCoCo, LCOV, SonarQube, Coveralls and more.
  2. Branch and decision coverage: Beyond simple line coverage.
  3. Thresholds: Fail builds below targets.
  4. Merge runs: Combine coverage from multiple test runs.

Pros

  1. Free to use: Open source under the BSD-3-Clause licence, so the core tool costs nothing to use.
  2. Actively maintained: The repository had commits as recent as 7 November 2026.

Cons

  1. Requires instrumented builds: You must compile with coverage flags.
  2. gcov compatibility: Results depend on compiler and gcov versions matching.
pip install gcovr
cmake -B build -DCMAKE_CXX_FLAGS="--coverage" && cmake --build build
ctest --test-dir build
gcovr -r . --html-details coverage.html --cobertura coverage.xml --fail-under-line 80

Resources:

Pricing

gcovr is free and open source under the BSD-3-Clause licence.

  1. C and C++ projects using GCC or Clang that need coverage reports.
  2. CI pipelines feeding SonarQube, Codecov or Coveralls.

Conclusion

gcovr is the most convenient way to turn gcov data into useful C and C++ coverage reports for humans and CI.

Alternatives

Other tools on CheckOps that cover similar ground. Open a page, or compare one with gcovr side by side.