tom
tom

Reputation: 485

Is it possible to have 100% branch coverage without 100% statement coverage?

I am trying to think of examples where 100% branch coverage is reached but statement coverage is less than 100%.

So far I can't think of any way possible for this to happen. Is there something obvious I am missing or am I over thinking this simple problem?

Upvotes: 1

Views: 5623

Answers (2)

92fueler
92fueler

Reputation: 21

It's impossible. 100% branch coverage subsumes 100% statement coverage.

Upvotes: 0

Monika
Monika

Reputation: 116

It's not possible.
Consult ISTQB Foundation Level Syllabus page 42 Section 4.4.2 clearly states that decision (branch) coverage is stronger than statement coverage; 100% decision coverage implies 100% statement coverage, but not other way around.

Upvotes: 2

Related Questions