Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

code coverage with visual studio and gtest

Has anyone ever used gtest with visual studio? if so, how did you get code coverage reports? I'd like to configure my project to produce coverage data, but it seems like nobody else uses gtest/visual studio with gcov or any other code coverage.

like image 983
Jose Villalta Avatar asked Nov 18 '14 21:11

Jose Villalta


People also ask

Does Visual Studio code have code coverage?

Once we run the test method, While the unit test is passing, we need to check if our unit test covers the all code block for our method using the “Code Coverage”. Once the test execution successful, Visual Studio calculate the code coverage and display it within “Code Coverage Results” windows; as shown in below image.

How do I check code coverage in Visual Studio using resharper?

Ctrl+U D commands. You can use this command to run coverage analysis of unit tests from the editor, from the Solution Explorer, or from unit tests sessions.


1 Answers

I asked around the office, and someone suggested this tool: https://github.com/OpenCppCoverage/OpenCppCoverage

I will give it a try. I will come back and report the results.

like image 185
Jose Villalta Avatar answered Oct 18 '22 05:10

Jose Villalta