OpenCppCoverage is an open source code coverage tool for C++ under Windows.
C++ Other
Clone or download
Permalink
Failed to load latest commit information.
.github Create issue_template.md Aug 10, 2017
Build/Dependencies Remove unused files Feb 25, 2018
CppCoverage Fix third party libraries compilation. May 29, 2018
CppCoverageTest Fix gmock property sheets. May 29, 2018
Exporter Fix third party libraries compilation. May 29, 2018
ExporterTest Fix gmock property sheets. May 29, 2018
FileFilter Fix third party libraries compilation. May 29, 2018
FileFilterTest Fix gmock property sheets. May 29, 2018
OpenCppCoverage Fix third party libraries compilation. May 29, 2018
OpenCppCoverageTest Fix gmock property sheets. May 29, 2018
PropertySheets Fix gmock property sheets. May 29, 2018
TestCoverageConsole Fix third party libraries compilation. May 29, 2018
TestCoverageOptimizedBuild Fix third party libraries compilation. May 29, 2018
TestCoverageSharedLib Fix third party libraries compilation. May 29, 2018
TestCppCli Add x64 support for TestCppCli. Feb 4, 2018
TestHelper Fix gmock property sheets. May 29, 2018
Tools Fix third party libraries compilation. May 29, 2018
ToolsTest Fix gmock property sheets. May 29, 2018
.gitignore Fix protobuff warning. Feb 4, 2018
BuildThirdPartyDependencies.bat Fix third party libraries compilation. May 29, 2018
CppCoverage.sln Add x64 support for TestCppCli. Feb 4, 2018
CreateRelease.bat Fix ctemplate for Windows 10 Aug 16, 2015
IntegrationTests.testsettings Update VSPackage tests to Visual studio 2015 Oct 21, 2015
LICENSE.txt Add LICENSE.txt. Sep 10, 2017
README.md Update README.md Aug 9, 2017
UnitTests.testsettings Update .gitignore and UnitTests.testsettings Nov 8, 2015

README.md

OpenCppCoverage

OpenCppCoverage is an open source code coverage tool for C++ under Windows.

The main usage is for unit testing coverage, but you can also use it to know the executed lines in a program for debugging purpose.

Features:

  • Visual Studio support: Support compiler with program database file (.pdb).
  • Non intrusive: Just run your program with OpenCppCoverage, no need to recompile your application.
  • HTML reporting
  • Line coverage.
  • Run as Visual Studio Plugin: See here for more information.
  • Jenkins support: See here for more information.
  • Support optimized build.
  • Exclude a line based on a regular expression.
  • Child processes coverage.
  • Coverage aggregation: Run several code coverages and merge them into a single report.

Requirements

  • Windows Vista or higher.
  • Microsoft Visual Studio 2008 or higher all editions including Express edition. It should also work with previous version of Visual Studio.

Download

OpenCppCoverage can be downloaded from here.

Usage

You can simply run the following command:

OpenCppCoverage.exe --sources MySourcePath -- YourProgram.exe arg1 arg2

For example, MySourcePath can be MyProject, if your sources are located in C:\Dev\MyProject.

See Getting Started for more information about the usage. You can also have a look at Command-line reference.