Closed cheahTJ closed 6 months ago
if (x > 2 && x < 44) {
// path a
} else {
// path b
}
Given the above example, to achieve 100% branch coverage you just need to ensure your test cases hit path a
and path b
.
However to hit 100% condition coverage, you need to ensure that x > 2
gets evaluated to true
and false
, and x < 44
gets evaluated to true
and false
.
Good answer @dillontkh
Thank you !! @dillontkh
What is the main distinctive difference between these 2?