Developed in 2003 by Kent Beck, 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:
- Write new tests.
- Run all tests, verifying that the new tests fail.
- Write the software function.
- Run all tests, verifying that the new tests pass. If the tests fail, or you discover any new issues, return to step three.
- 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]
- Test-Driven Development by Example, Beck (2003).