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.