This project is read-only.

Coverage missing for "middle dll" using VSTest.

May 30, 2016 at 6:16 PM
Edited May 30, 2016 at 6:22 PM

We have tow solutions in visual studio. Both of them are unit-tested using VSTest.

The first solution builds a Agent.dll and a TEST_Agent_Lib.dll (test dll -> agent dll) and we can successfully get the code coverage for the Agent.dll as follow:

OpenCppCoverage --sources "*Agent" --excluded_sources "*T
EST_Agent_Lib" --quiet --cover_children -- "%VS140_TEST_EXE%" TEST_Agent_Lib.dll

The other solution builds a Plugin.dll and a Test_Plugin_Lib.dll. The Plugin.dll uses objects from the Agent.dll (test dll -> plugin dll -> agent dll), this is the main difference with the previous solution. Then we run OpenCppCoverage as follow:

OpenCppCoverage --sources "*Plugin" --excluded_sources "*T
EST_Plugin_Lib" --quiet --cover_children -- "%VS140_TEST_EXE%" TEST_Plugin_Lib.dll

But we don't get any report for the Plugin.dll code paths. We can see coverage for the TEST_Pplugin_Lib.dll and the Agent.dll if we run OpenCppCoverage without any source filter but Plugin.dll paths are still missing.

Any ideas?, Do are missing something?
Jun 3, 2016 at 12:58 PM

I do not see anything obvious. Perhaps the filters are wrong. Can you try to run without --sources and --excluded_sources?

You can also replace --quiet by --verbose and check if you can find the expected file in the output.
If it does not help, can you send me the verbose output? (Create an issue to attached the file).

Let me know if it solves your problem,

Marked as answer by OpenCppCoverage on 8/20/2016 at 8:10 AM