Hi Marc, there is no “formula” besides what is defined here: https://www.jacoco.org/jacoco/trunk/doc/counters.html <https://www.jacoco.org/jacoco/trunk/doc/counters.html>
JaCoCo reports just show these counters. I recently learned <https://github.com/jacoco/jacoco/issues/1340> that Sonar calculates a proprietary metric based on the counters, but this is not what we do in JaCoCo reports. Best regards, -marc > On 8. Jul 2022, at 20:25, Marc Pires <[email protected]> wrote: > > Hi everyone, where can I find the formula Jacoco uses to calculate the > Coverage. What I am looking for is the actual formula, not only the metrics > it uses. > > Looking at https://www.jacoco.org/jacoco/trunk/doc/counters.html could not > find the related information > > Comparing to how SonarQube calculates coverage we have. > > Coverage = (CT+CF+LC)/(2*B+EL) > > CT+CF = (Conditions to Cover - Uncovered Conditions) > LC = ( Lines to Cover - Uncovered Line) > 2*B = (Conditions to Cover already represents the product) > EL = ( Lines to Cover) > > Thanks > > -- > You received this message because you are subscribed to the Google Groups > "JaCoCo and EclEmma Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] > <mailto:[email protected]>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jacoco/c9c4bb80-68cb-4d01-a53f-2dcd2c824692n%40googlegroups.com > > <https://groups.google.com/d/msgid/jacoco/c9c4bb80-68cb-4d01-a53f-2dcd2c824692n%40googlegroups.com?utm_medium=email&utm_source=footer>. -- You received this message because you are subscribed to the Google Groups "JaCoCo and EclEmma Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/CB215CF2-061F-4D5C-8565-4F109444CCE4%40mountainminds.com.
