Official Visual Studio Plugin for OpenCppCoverage
OpenCppCoverage is an open source code coverage tool for C++ under Windows. You can find more information about this project here.
This repository contains only the Visual Studio plugin sources.
This project is no longer actively maintained.
I stopped active development and maintenance approximately seven years ago after moving away from C++ in my professional work. At first, I expected this to be temporary, but I am now formally retiring the project.
The existing source code and releases will remain available for historical use. However:
- no further releases, bug fixes, or compatibility updates are planned;
- issues and pull requests will not be reviewed;
- support questions may not receive a response;
- security fixes should not be expected;
- users should evaluate the software carefully before continuing to depend on it.
Forks and independent continuation of the project are welcome, subject to the existing licence.
There is currently no designated successor or recommended fork.
If you actively maintain a fork of this project and would like it to be considered for inclusion here, please contact me through OpenCppCoverage@gmail.com.
I intend to link from this page to the most active community-maintained fork I am aware of. The selected fork may change over time as development activity changes.
Any fork listed here is maintained independently. Its inclusion does not constitute a transfer of ownership, and I cannot provide support or guarantees for it.
Existing issues and pull requests have been closed as part of retiring the project.
Their closure does not necessarily mean that an issue was resolved, that a proposed change was rejected, or that the contribution lacked value. It only means that the original repository is no longer being maintained.
The history and discussion will remain available for reference.
The project remains available under the terms described in the LICENSE file.
Archiving the project does not change its licence. You may use, modify, fork, and redistribute the code according to those terms.
Thank you to everyone who used the project, reported issues, contributed code or documentation, reviewed changes, answered questions, or otherwise helped improve it.
Maintaining this project and working with its community was a valuable experience. I am grateful for all the time and effort contributed over the years.
To install and use this plugin, please see the Visual Studio Gallery page. You can also install the NuGet package OpenCppCoverage Plugin.
Documentation is available here.
For questions, you can create a discussion here. If you find a bug, you can create an issue here.
You have 2 Visual Studio solution files but Visual Studio 2017 is always required. Please also make sure you have Visual Studio 2017 version 15.8.X.
This is the default solution file and it requires only Visual Studio 2017.
This is a Visual Studio 2017 solution file but it also requires:
- Visual Studio 2013 Update 5.
- Microsoft Visual Studio 2013 SDK. If you have any trouble to install the SDK, this stack overflow question can help.
- Visual Studio 2015 Update 3 may be required.
This solution should be used only to generate a plugin compatible with Visual Studio 2013, 2015 and 2017.
You should install the latest version of OpenCppCoverage:
- OpenCppCoverageSetup-x64-X.X.X.exe: into VSPackage\OpenCppCoverage-x64
- OpenCppCoverageSetup-x86-X.X.X.exe: into VSPackage\OpenCppCoverage-x86
You can also copy past the binaries from an existing installation into these folders. Binaries inside VSPackage\OpenCppCoverage-x86 can be the same as VSPackage\OpenCppCoverage-x64 (The opposite is not true).
- Set VSPackage as StartUp Project.
- In VSPackage Properties, tab Debug:
- Select Start external program and set value to
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\devenv.exe(Update this path if you installed Visual Studio to another location). - Add
/RootSuffix Expas Command line arguments.
- Select Start external program and set value to
If you have an issue when running the plugin, you can try to reset Visual Studio Experimental instance:
"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VSSDK\VisualStudioIntegration\Tools\Bin\CreateExpInstance.exe" /Reset /VSInstance=15.0 /RootSuffix=Exp
You can run the tests with Test Explorer window. To run VSPackage_IntegrationTests you need to expand Solution items in Solution Explorer and set Active Load and Web Test Settings for IntegrationTests.testsettings. If you have a COM error when running tests, you can select IntegrationTests.testsettings file from Visual Studio menu: Test/Test Settings/Select Test Settings File. For VSPackage_UnitTests you need to do the same but with UnitTests.testsettings.
If a test failed, you can try to run it again. You can also reset Visual Studio Experimental instance.