Test-Driven Development

From Business Agility Library
Jump to: navigation, search
Test-Driven Development flowchart

Developed in 2003 by Kent Beck[1], Test-Driven Development (TDD) is primarily a software engineering process that forces programmers to write small, incremental verification tests prior to writing each function of the software. Each set of verification tests defines the outcome of a single feature or improvement. This ‘test first’ approach encourages simple design, concise development, and confidence in the product.

There are six steps to the TDD process:

  1. Write new tests.
  2. Run all tests, verifying that the new tests fail.
  3. Write the software function.
  4. Run all tests, verifying that the new tests pass. If the tests fail, or you discover any new issues, return to step three.
  5. Refactor the code by improving the quality of work, without changing the functionality.

TDD does not directly translate outside of a technical environment, where tests can be automated and strictly defined. However, you can apply the core concepts, and define the acceptance, quality control and quality assurance criteria prior to any work commencing, to the same benefit.


References[edit | edit source]

  1. Test-Driven Development by Example, Beck (2003).