This project is read-only.

Coverage with VSTest

Oct 20, 2015 at 2:58 PM

We'd like to use this tool with VSTest.
However, running OpenCppCoverage -- "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow\VSTest.Console.exe" MyUnitTest.dll generates an HTML page with 0% coverage.

Does someone know how to make this work? I'm asking here because I didn't find any example of using OpenCppCoverage with MSTest or VSTest.

Thanks in advance,
Oct 22, 2015 at 12:47 PM

Is MyUnitTest.dll a native only C++ library?
If yes, I will investigate to understand what is going on.

Hope that help,

Oct 26, 2015 at 7:09 PM

Yes indeed. MyUnitTest.dll is a native only C++ library.
Running VSTest.Console.exe MyUnitTest.dll executes the tests successfully.

Thanks for your help,
Oct 29, 2015 at 8:50 PM

I reproduced your problem on a small unit tests project and adding flag --cover_children solve the issue in my case.

Please let me know if you still have a problem,

Marked as answer by JulienTheron on 11/2/2015 at 6:12 AM
Oct 29, 2015 at 9:53 PM
That did it! Thanks :)