Skip to content

Coverage tracers

Waleri Enns edited this page May 5, 2014 · 18 revisions

Gcov / gcovr

  1. Make sure to compile and link with the --coverage flag. Disable optimizations and switch on debugging.
  2. Execute your application / your tests. This will generate .gcda-files.
  3. Collect the coverage information and generate the report using gcovr:
gcovr -x -r . > report.xml

Bullseye

Create the XML coverage report with:

covxml -f UTCoverage.cov -o bullseyecoverage-result-0.xml

To merge two coverage files (e.g. to obtain the overall coverage):

covmerge -c ITCoverage.cov UTCoverage.cov -f ALLCOVERAGE.cov

Microsofts Code Coverage

TODO @guwirth

Clone this wiki locally