volume_mute

Test-First Development β€” Core Benefit

publish date:Β 2026/06/04 20:56:22.122442 UTC

volume_mute

What is the key benefit of writing tests before writing code in test-first development?

Correct Answer

Writing the test first implicitly defines both an interface and a specification of behaviour for the functionality being developed β€” problems of requirements and interface misunderstandings are reduced, and test-lag is avoided

Explanation

Writing tests first implicitly defines both an interface and a specification of behaviour for the functionality being developed β€” problems of requirements and interface misunderstandings are reduced. It also avoids test-lag, where the developer works faster than the tester, implementation gets further ahead of testing, and there is a tendency to skip tests.

Reference

Software Engineering, Ian Sommerville, 9th edition


Quizzes you can take where this question appears