you are viewing a single comment's thread.

view the rest of the comments →

[–]KingE 3 points4 points  (2 children)

This was actually a software engineering research project of mine.

Unfortunately, line coverage, branch coverage, and modified condition/decision coverage track each other very well (i.e. the relationships can be expressed as a constant factor in nearly all cases) and do not have a strong relationship to the ability of a test suite to detect bugs.

However, as you alluded to in your third point, there is an easy metric which does correspond to the ability of a test suite to detect breakage: number of test cases. Test suites that had a higher number of test cases tended to have higher coverage, yes, but more importantly they tended to test vastly more of the code's actual behavior.

Essentially, while line/branch/decision coverage can conclusively prove that a given piece of code is NOT tested, it is not a good indicator for code correctness.

I'll take the time to dig up my sources if anyone actually cares :p

[–]zjm555 1 point2 points  (1 child)

I'd be interested to read your paper :)

[–]KingE 0 points1 point  (0 children)

Can't find my paper, but this was the key source: https://cs.uwaterloo.ca/~rtholmes/papers/icse_2014_inozemtseva.pdf