question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Code lens / gutters with OpenCppCoverage (Windows)

See original GitHub issue

Is your feature request related to a problem? Please describe. It is hard to get which part of the code are checked against which tests (and where do they fail). I believe Test Explorer has code lens and gutters for coverage for each test, but Catch2/GTest Adapter cannot generate data for it, because it does not give information about lines that run for given tests.

Describe the solution you’d like Actually there is a FOSS tool (unfortunately Windows only) that can feed that information; OpenCppCoverage takes PDB and verify, for each executable run, which lines were actually executed and which were not. It generates cov.xml (format recognizable by Coverage Lens in VSCode).

It would be great if Catch2/GTest Adapter could use that data to populate lens and gutters at least on Windows.

Describe alternatives you’ve considered There is no similiar tool for Linux / OS X I am aware of. There is no other plugin for GTest for VSCode as well.

Additional context If effort would not be acceptable on Your side for any reason, I can implement this in fork, then propose PR. I would ask only for some basic directions. Still, it would be great, if You can add this feature directly - you know your code much better than myself.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Shelimcommented, Mar 24, 2019

I had, thank you - my typescript is a bit rusty (well - maybe more than a bit) 😃

test

I will publish that into VS extensions repo soon 😃

0reactions
matepekcommented, Mar 22, 2019

Have fun 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Catch2 and Google Test Explorer (with code lens)
Extension for Visual Studio Code - Run your Catch2 and Google Test tests ... IMPORTANT: This only works on Windows with OpenCppCoverage and ......
Read more >
Code coverage tools for C++... : r/cpp - Reddit
I would like to take some code coverage tool for C++, and was searching what ... I'm aware of kcov on Linux and...
Read more >
SonarQube not showing code coverage for ...
SonarQube not showing code coverage for OpenCppCoverage with export_type= ... developer edition and sonar-scanner-4.7.0.2747-windows ...
Read more >
C++ Unit Test Coverage Report with Jenkins - Hanz
OpenCppCoverage is an open-source code coverage tool for C++ under Windows. The main usage is for unit testing coverage, but you can also...
Read more >
C++17 Code Coverage Extension for Visual Studio 2022 (Not ...
Does anyone know of C++17 unit test plug-ins availables for the latest version of Visual Studio 2022? I know Microsoft have shipped a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found