This project is read-only.

Coverage with VSTest

Oct 20, 2015 at 2:58 PM
Hi,

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,
Julien.
Oct 22, 2015 at 12:47 PM
Hello,

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

Hope that help,

OpenCppCoverage
Oct 26, 2015 at 7:09 PM
Hi,

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

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

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,

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