This project is read-only.

Coverage per test case

May 28 at 12:05 AM

I would like to know if there is any way to generate code coverage per test case.
If not directly, is there any workaround apart from running each test case at a time?
May 28 at 10:30 AM

OpenCppCoverage does not know anything about the test cases and so it is not possible to do what you want.
If you use gtest, you could write a small script that call YOUR_UNIT_TESTS.exe --gtest_list_tests to get the list of tests.
For each test case, run the following command:
OpenCppCoverage.exe --source YOUR_SOURCE_FILTER -- YOUR_UNIT_TESTS.exe --gtest_filter=YOUR_TEST_CASE
I hope this will help,

May 30 at 12:47 AM
Thanks a lot for your help. Definitely helped me!
Marked as answer by OpenCppCoverage on 6/4/2017 at 1:49 PM