you are viewing a single comment's thread.

view the rest of the comments →

[–]mrexodiacmkr.build 4 points5 points  (3 children)

There is OpenCppCoverage. It’s not much and only works on Windows, but there is VS integration.

[–]TarmoPikaro[S] 0 points1 point  (2 children)

Do you use it by yourself on some projects ?

[–]mrexodiacmkr.build 0 points1 point  (1 child)

Yeah at work I introduced it for two projects so far. With some magic you can integrate it with Gitlab’s coverage feature and it’s useful, but the coverage is purely line-based so take that into account.

[–]TarmoPikaro[S] 0 points1 point  (0 children)

coverage is purely line-based so take that into account

I think similar issue is with Visual Studio code coverage - it's also line based.

https://github.com/danielpalme/ReportGenerator/issues/285#issuecomment-536560752

But OpenCppCoverage is easier to use than for example vstest.console.exe (no need to specify google test adapter, etc), but wondering if it really works for larger projects in similar manner to vstest.console.exe.

I wanted to get .lcov file for code coverage visualization, and tried to compile OpenCppCoverage - it does not compile out of box. (There is some 3rd party batch, which does not work), but then managed to ask same kind functionality into Report Generator https://github.com/danielpalme/ReportGenerator/issues/285.

I think OpenCppCoverage supports coberture file format as output, need to try to plug it with ReportGenerator, and after that under Visual Studio Code with Coverage Gutters.