Dear ONAP team,

Daniel from my team did a little bit of research on the story behind Code
Coverage VS Line Coverage in Sonar. Please check out his explanation and
let me know if the teams would like to do any future adjustments. Of
course, always TSC pre-approved ;)

Thanks!
Jess

[image: takamori]Daniel Takamori
<https://jira.linuxfoundation.org/secure/ViewProfile.jspa?name=takamori> added
a comment - 4 hours ago

Line coverage is a straight forward metric defined by (Lines covered by
tests)/(Executable lines of code) as a %.

Code coverage is a bit more comprehensive measure
<https://docs.sonarqube.org/display/SONAR/Metric+definitions#Metricdefinitions-Tests>
 [see attached screenshot or link for exact formula], which also includes
how well your tests cover conditionals.

The 'line coverage' metric is straight forward and good to know, but the
conditional coverage might give a more accurate assessment of the code
pathways (due to measuring conditionals), and thus a better metric for more
complex code.

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#4825): https://lists.onap.org/g/onap-tsc/message/4825
Mute This Topic: https://lists.onap.org/mt/31034996/21656
Group Owner: onap-tsc+ow...@lists.onap.org
Unsubscribe: https://lists.onap.org/g/onap-tsc/leave/2743226/1412191262/xyzzy  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to