Test-driven development (TDD) is a concept from [Extreme Programming][xp] and a cornerstone of most agile development methodologies. TDD describes a very short development cycle, which is repeated many times over the development of a module:
- write a failing test case
- make the test case pass
- refactor
- repeat
The goal of TDD is to produce modules that are easy to use and understand and which are fully documented by a suite of unit tests.