|
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
codecov.io:
https://github.com/jeking3/boost-ci/blob/master/ci/travis/codecov.sh
The trick is to feed --rc lcov_branch_coverage=1 to the correct commands to
generate and preserve the branch information.
Thanks,
- Jim
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk