Test Driven Development

“Test-driven development” refers to a style of programming in which three activities are tightly interwoven: coding, testing (in the form of writing unit tests) and design (in the form of refactoring).

It can be succinctly described by the following set of rules:

  • write a “single” unit test describing an aspect of the program

  • run the test, which should fail because the program lacks that feature

  • write “just enough” code, the simplest possible, to make the test pass

  • “refactor” the code until it conforms to the simplicity criteria

  • repeat, “accumulating” unit tests over time

 

Agile Alliance Glossary