We are running Sonarqube 5.6.3 and are consolidation application coverage via project analysis.
I see that there is a per module code coverage result and then a consolidated result for the project / App. I would like to understand how the total coverage result is calculated is it something like total lines of code covered or an average of all modules? What I need to validate is that low code amount modules with high or low coverage would skew the results.
I need to produce roll-up metrics for the CIO so this clarification is important.
At Application level, SonarQube is not computing an average of the Coverage % otherwise it would be easy to increase virtually the coverage of an Application by adding to it tiny fake projects having a high level of coverage.
SonarQube looks at the total number of “Lines to Cover” on the Application and compute the “Coverage %” based on that.
Let’s take an example to be concrete. I have an Application made of 3 Projects like this: