Boost logo

Boost :

Subject: [boost] Reporting accurate code coverage
From: James E. King III (jking_at_[hidden])
Date: 2018-07-11 11:34:54

 General Code Coverage Tip (for everyone):

Measure your coverage using branches, not lines. Branch coverage tells you
how well error cases are tested and therefore a far better measure of
quality than line-based. I have seen over 90% line coverage but the
branch coverage is more like 60% to 70% on average over the boost
CMT-managed repositories.

Here's the shell script I use on travis to generate the data and feed it to

The trick is to feed --rc lcov_branch_coverage=1 to the correct commands to
generate and preserve the branch information.


- Jim

Boost list run by bdawes at, gregod at, cpdaniel at, john at