genhtml
HTML coverage report generator from lcov trace files
TLDR
Generate HTML report
$ genhtml [coverage.info] -o [html_output]
Add title$ genhtml --title "[Coverage Report]" [coverage.info] -o [html_output]
Show branch coverage$ genhtml --branch-coverage [coverage.info] -o [html_output]
Prefix path$ genhtml --prefix [/src] [coverage.info] -o [html_output]
SYNOPSIS
genhtml [options] tracefile...
DESCRIPTION
genhtml creates HTML coverage reports from lcov trace files. It generates navigable reports showing line, function, and branch coverage with source highlighting.The tool processes coverage data to produce visual reports for reviewing test coverage. Multiple trace files can be combined into a single report.genhtml is the visualization component of the lcov coverage toolkit.
PARAMETERS
TRACEFILE
lcov coverage data file.-o DIR, --output-directory DIR
Output directory.--title TEXT
Report title.--branch-coverage
Include branch coverage.--prefix PATH
Remove source prefix.--legend
Include coverage legend.--help
Display help information.
INSTALL
sudo dnf install lcov
sudo pacman -S lcov
sudo apk add lcov
sudo zypper install lcov
brew install lcov
nix profile install nixpkgs#lcov
CAVEATS
Requires lcov trace files. Large codebases produce large reports. Browser needed for viewing.
HISTORY
genhtml is part of lcov, the Linux Test Project coverage tool. It provides HTML visualization for coverage data collected by lcov from gcov.