volume_mute

Test-First Development — The Core Idea

publish date2026/06/04 11:00:2.287953 UTC

volume_mute

The diagram below shows how test-first development works.

Write testbefore the codeWrite codeto pass the testRun all tests— all must passNew build accepted only if all tests execute successfully

What is the key innovation of test-first development?

Correct Answer

Tests are written before the code — this means you can run the test as the code is being written and discover problems during development

Explanation

Test-first development is one of XP's most important innovations. Instead of writing code and then writing tests for it, you write the tests before you write the code. This means you can run the test as the code is being written and discover problems during development.

Reference

Software Engineering, Ian Sommerville, 9th edition


Quizzes you can take where this question appears