OpenCppCoverage / OpenCppCoveragePlugin

Official Visual Studio Plugin for OpenCppCoverage
GNU General Public License v3.0
67 stars 28 forks source link

It would be nice to be able to run multiple test programs and get the union of the coverage. #40

Open BengtGustafsson opened 4 years ago

BengtGustafsson commented 4 years ago

We have about 25 separate unit test programs. To get coverage we have to run them all. This gets really cumbersome with or without the VS plugin. I would like another column in the setup (under tools maybe) where you can check which projects are unit tests and then merge the results of running all of them automatically.

We use ctetst to run all exes that are flagged in the cmakelists files as test programs. It would be super to be able to run coverage on the RUN_TESTS project to get coverage over runs of all tests. This basically requires running ctest as the executable with the "cover child processes" enabled. The problem is that ctest normally runs when you "build" the RUN_TESTS target, not when you "run" it, so some extra work is required to make this work.

I made a makeshift solution where an extra project contains a small exe that just does system() on all our unit tests which works but of course needs extra attention whenever we add another program etc. runinng this with "cover child processes" enabled work fine.

rawatlax commented 3 years ago

you can do that , export the results in HTML and as well as in .cov (binary files) . Now you can feed the previous run binary file at the start of next run to the tool and it will merge previous and this run data. Also there is a command to merge two .cov reports