Coder Social home page Coder Social logo

bengooding / opencppcoverageplugin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ben2917/opencppcoverageplugin

0.0 0.0 0.0 426 KB

Official Visual Studio Plugin for OpenCppCoverage

License: GNU General Public License v3.0

C++ 0.48% C 0.12% C# 99.22% Batchfile 0.18%

opencppcoverageplugin's Introduction

OpenCppCoveragePlugin for VisualStudio2022

This is a fork of Official Visual Studio Plugin for OpenCppCoverage. This works for me. But tests are broken.

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.

Usage

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.

Development

Compilation

You have 2 Visual Studio solution files but Visual Studio 2022 is always required. Please also make sure you have Visual Studio 2022 version 17.3.X.

CppCoveragePlugin.sln

This is the default solution file and it requires only Visual Studio 2022.

CppCoveragePluginVS2013.sln

This is a Visual Studio 2017 solution file but it also requires:

This solution should be used only to generate a plugin compatible with Visual Studio 2013, 2015 and 2017.

OpenCppCoverage

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).

You also should copy msvcp140.dll and vcruntime140.dll from
C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE to \your\solution\directory\VSPackage\OpenCppCoverage-x64 and \your\solution\directory\VSPackage\OpenCppCoverage-x86.

You also should copy Newtonsoft.Json.dll from C:\Users\YourName\.nuget\packages\newtonsoft.json\13.0.1\lib\net45 to \your\solution\directory\VSPackage\.

Run the plugin

  • Set VSPackage as StartUp Project.
  • In VSPackage Properties, tab Debug:
    • Select Start external program and set value to C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\devenv.exe (Update this path if you installed Visual Studio to another location).
    • Add /RootSuffix Exp as Command line arguments.

If you have an issue when running the plugin, you can try to reset Visual Studio Experimental instance:

"C:\Program Files\Microsoft Visual Studio\2022\Communityy\VSSDK\VisualStudioIntegration\Tools\Bin\CreateExpInstance.exe" /Reset /VSInstance=17.0 /RootSuffix=Exp

Run unit tests

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.

On Visual Studio 2022 VSPackage_IntegrationTests is broken because VSIDETestAdapter is deprecated and already erased.

For VSPackage_UnitTests you need to do with UnitTests.runsettings.

If a test failed, you can try to run it again. You can also reset Visual Studio Experimental instance.

opencppcoverageplugin's People

Contributors

opencppcoverage avatar h1day avatar alexkhotian avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.