OpenCppCoveragePlugin icon indicating copy to clipboard operation
OpenCppCoveragePlugin copied to clipboard

Feature request: Show results from cov-file without test again

Open fgrz opened this issue 5 years ago • 5 comments

It would be nice if you can import a coverage-file and show the results without running a test again.

My current workaround for this is to import the coverage file and then run a coveragetest over cmd.exe (or any other exe outside from my project).

The idea is that you can test the coverage on another computer (e.g. automatic unittests on build server) and have an easy (user friendly) way to show the covered lines in Visual Studio.

fgrz avatar Feb 10 '20 09:02 fgrz

Hello,

Your suggestion makes sense as OpenCppCoverage command line offers this feature. I will try to add it in the next release.

OpenCppCoverage

OpenCppCoverage avatar Feb 16 '20 21:02 OpenCppCoverage

Hello,

Your suggestion makes sense as OpenCppCoverage command line offers this feature. I will try to add it in the next release.

OpenCppCoverage

OpenCppCoverage avatar Feb 16 '20 21:02 OpenCppCoverage

Hi, It probably would make sense to add this option to the "Coverage"-View. But: two things:

  • Is there a way to open the the "Coverage"-View without running a test? I did not find one. Background: In my opinion it would make sense to import the coverage-file there. image
  • Perhaps add an option to clear the results (remove the coloring of the lines). I ussualy use a workaround to add a line and remove it again, but I have to do this for every file. Background: If I just want to see the code, the contrast of the letters to the "normal" background is better.

Regards, fgrz

fgrz avatar Feb 17 '20 09:02 fgrz

Hi, It probably would make sense to add this option to the "Coverage"-View. But: two things:

  • Is there a way to open the the "Coverage"-View without running a test? I did not find one. Background: In my opinion it would make sense to import the coverage-file there. image
  • Perhaps add an option to clear the results (remove the coloring of the lines). I ussualy use a workaround to add a line and remove it again, but I have to do this for every file. Background: If I just want to see the code, the contrast of the letters to the "normal" background is better.

Regards, fgrz

fgrz avatar Feb 17 '20 09:02 fgrz

Hi,

Is there a way to open the the "Coverage"-View without running a test? I did not find one. Background: In my opinion it would make sense to import the coverage-file there.

Thanks for your feedback. The coverage window is created when displaying the first coverage.

Perhaps add an option to clear the results (remove the coloring of the lines). I ussualy use a workaround to add a line and remove it again, but I have to do this for every file. Background: If I just want to see the code, the contrast of the letters to the "normal" background is better.

In your screenshot, there is a check box Display coverage to enable / disable the coloring of the lines.

OpenCppCoverage

OpenCppCoverage avatar Feb 23 '20 21:02 OpenCppCoverage

Hi,

Is there a way to open the the "Coverage"-View without running a test? I did not find one. Background: In my opinion it would make sense to import the coverage-file there.

Thanks for your feedback. The coverage window is created when displaying the first coverage.

Perhaps add an option to clear the results (remove the coloring of the lines). I ussualy use a workaround to add a line and remove it again, but I have to do this for every file. Background: If I just want to see the code, the contrast of the letters to the "normal" background is better.

In your screenshot, there is a check box Display coverage to enable / disable the coloring of the lines.

OpenCppCoverage

OpenCppCoverage avatar Feb 23 '20 21:02 OpenCppCoverage

Combine those two things: When I have done a test-run and then closed the "Coverage"-View, I must run another coverage-test to see the "checkbox" again? :)

Regards, fgrz

fgrz avatar Feb 24 '20 07:02 fgrz

Combine those two things: When I have done a test-run and then closed the "Coverage"-View, I must run another coverage-test to see the "checkbox" again? :)

Regards, fgrz

fgrz avatar Feb 24 '20 07:02 fgrz

Hello,

I thought the coverage Window was available from the Visual Studio menu View/Other Windows.

This commit adds the Coverage Window inside Visual Studio menu View/Other Windows.

OpenCppCoverage

OpenCppCoverage avatar Mar 09 '20 21:03 OpenCppCoverage

Hello,

I thought the coverage Window was available from the Visual Studio menu View/Other Windows.

This commit adds the Coverage Window inside Visual Studio menu View/Other Windows.

OpenCppCoverage

OpenCppCoverage avatar Mar 09 '20 21:03 OpenCppCoverage