volume_mute

TDD Limitation - Incomplete Test Coverage

publish date2026/06/19 10:09:33.536439 UTC

volume_mute

Although TDD leads to high code coverage, it does not guarantee complete test coverage. What is one reason why some code may not be adequately tested even in a TDD project?

Correct Answer

Some programmers write tests that make code pass without really testing the behavior thoroughly, or write tests that are too closely tied to the implementation

Explanation

TDD does not guarantee complete coverage because programmers sometimes take shortcuts - writing tests designed to make code pass rather than tests that genuinely expose potential defects. Tests may also be too closely tied to the implementation, making them fragile and unable to detect certain classes of errors.

Reference

Software Engineering, Ian Sommerville, 10th edition


Quizzes you can take where this question appears