Search GimmeJob

Type at least 2 characters. Enter also searches by meaning.
QA interview question
Test design techniquesMiddleCommonTheory

Why can full statement coverage still leave important logic untested?

Answer

Executing every statement does not guarantee that every decision outcome or condition combination was exercised. Branch coverage is stronger for decisions, but no structural percentage proves behavioural correctness or sufficient risk coverage.

Strong answer includes

  • statement versus branch
  • coverage is evidence not proof
  • connects to behaviour and risk

Practical example

A function has 'if (isPremium) applyDiscount(); processOrder();' — a test that only calls it with isPremium=true hits 100% statement coverage but never exercises the false branch, so a bug where non-premium users get charged incorrectly slips through despite the metric looking perfect.

#white-box#branch-coverage#metrics

Sources

ISTQB CTFL syllabus v4.0.1ISTQB · Testing vocabulary, principles, lifecycle and test-design concepts