I have a problem configuring the code coverage report for my tests. My application is divided into modules, over 30 in total. I add them using SPM. I use Test Plan for test configuration, and in most cases, random modules are not shown on the Coverage tab. However, when I run the tests again, they often appear, but others disappear. I think I only once got a test that included a coverage report for all modules. Usually, 3-5 modules are missing.
To illustrate the problem, I will limit myself to 4 modules and show my configuration.
In the Test Plan, in the Tests section, I add all 4 tests.
TestPlan
I have a lot of external libraries and I don’t want them to be tested, so I select only the targets I want.
Coverage targets
I have the plan assigned in the schema.
schema
First test:
test1
Second test:
test2
Nothing was changed between the tests in the code and configuration. Only the project was cleaned.
I can work around this by adding test targets instead of module targets in the targets.
Test Target
and it works:
test3
Then the coverage is always reported for all modules, and nothing is missed. However, this is not an ideal solution because the coverage is also calculated for functions in the tests, which doesn’t make much sense.
Any tip will be appreciated.




