Getting started
Cover++ is a code coverage tool for C/C++ applications on Windows.
Installation
Section titled “Installation”Grab the latest release from GitHub. You can use the installer or the portable archive.
For details, head over to the installation guide.
Run an app under coverage
Section titled “Run an app under coverage”To run my-app.exe while collecting coverage, use:
cover++ run my-app.exeIf you need to pass arguments to your app, you can append them to the invocation above.
This command:
- expects to find
my-app.pdbnext tomy-app.exe - runs
my-app.exeunder coverage - places the coverage report at
./report.coverpp
Cover++ stores coverage results in a compact binary format.
View a coverage report
Section titled “View a coverage report”To view the report you just generated, use:
cover++ viewThis will start a local web server and open your browser.
To stop the server, type q and Enter or use Ctrl+C.
By default, view (like all commands that operate on a report file)
looks for ./report.coverpp.
To view a different report, append the file path to the command.
You can find more details here.