xcov
xcov copied to clipboard
Average coverage result calculated by lines
Right now, if our project have multiple modules, the coverage results will be the average of all modules without counting the real lines. Example : Module A 50%, Module B 70%, the average will be 60% regardless of how big Module A compared to Module B is. While the actual coverage may be different if Module A contains more code lines than module B.
So, how can we get average coverage result that calculated by lines?
:+1:
👍
👍🏼
+1000
The overall coverage number should be based on line count and not a simple mean of the module-specific coverage numbers. The way it's being calculated now simply does not reflect reality and it's hard for me to ask iOS developers to make code coverage increase goals based on that number.
As a real extreme example, I have a project where we just added new frameworks where the coverage is 0. Because...there's no code to cover. So in our overall coverage report, the 0's dropped our overall number by ~35%...which is of course not real because the overall lines covered / total lines
calculation didn't change at all, because the new frameworks are empty.
- 1000 as well.
The issue is I might want to merge reports from different .json reports, and derive an overall coveredLines / totalLines
value.
Ultimately the lack of this feature makes xcov unusable for me. Perhaps if it could generate the same json reports (with a flag) as xccov does, there would be some interoperability possible, the ability to merge reports, etc.