gcovr

Gcovr provides a utility for managing the use of the GNUgcov utilityand generating summarized code coverage results. This command isinspired by the Pythoncoverage.py package, which provides a similarutility for Python.

Thegcovr command can produce different kinds of coverage reports:

CLI Option

User Guide

Description

default,--txt

Text Output

compact human-readable summaries

--html

HTML Output

overview of all files

--html-details

HTML Output

annotated source files

--html-template-dir

HTML Output

use custom set of Jinja2 templates

--csv

CSV Output

CSV report summarizing the coverage of each file

--json

JSON Output

JSON report with source file structure and coverage

--json-summary

JSON Output

JSON summary coverage report

--clover

Clover XML Output

machine readable XML reports inClover format

--cobertura

Cobertura XML Output

machine readable XML reports inCobertura format

--coveralls

Coveralls JSON Output

machine readable JSON report inCoveralls format

--jacoco

JaCoCo XML Output

machine readable XML reports inJaCoCo format

--lcov

LCOV info Output

machine readable report inLCOV info format

--sonarqube

SonarQube XML Output

machine readable XML reports inSonarQube format

Thus, gcovr can be viewedas a command-line alternative to thelcov utility, which runs gcovand generates an HTML-formatted report.The development of gcovr was motivated by the need fortext summaries and XML reports.

This documentation (https://gcovr.com/)describes gcovr 8.3.

Contents: