Code Coverage -- Calculate total coverage for multiple projects


(Debbie Buswell) #1

Hello,
I am a new user of SonarQube and am interested in calculating the total code coverage over all projects. We are using the code coverage percent found under Measures, Coverage, Overall under developer 7.5. What base numbers can I use from each project to calculate a grand total percentage?

As a side note, I am working on the same type of metric for bugs and vulnerabilities as well.

Thank you in advance for your help.
Debbie


(G Ann Campbell) #2

Hi Debbie,

First, I’m compelled to mention Enterprise Edition($) which includes the Portfolios feature to do these calculations for you.

If you want to do it the hard way for a while to really appreciate what Enterprise Edition brings you (:rofl:) then I guess you’d take the overall coverage % for each project, times the project’s LOC, add those together & divide by the sum of all projects’ LOC.

 
Ann


(Debbie Buswell) #3

Ann,
Thank you for the insight.
It is great that the overall coverage, etc at the enterprise level.
Debbie