Test-driven development (TDD) is a product development practice in which developers develop tests before they develop the product itself. The purpose of TDD is to drive the design of the product by clearly defining, in the form of pass/fail tests, the criteria by which to judge whether the product satisfies the requirements.
(Developers also employ TDD in developing the internals of the product, including "unit testing" of individual methods and classes in software products, but my focus in this entry is at the system or user acceptance level.)
Developing tests first has several benefits:
(Developers also employ TDD in developing the internals of the product, including "unit testing" of individual methods and classes in software products, but my focus in this entry is at the system or user acceptance level.)
Developing tests first has several benefits:
- It serves as a requirements review. One of the best ways of ensuring that requirements are understandable and testable is to create tests for them.
- It forces product designers and developers to understand precisely what goals they are trying to achieve. In translating requirements into executable tests, the developer expresses them in measurable and concrete terms that she readily understands.
- It ensures on-going adherence to requirements insofar as developers run the tests regularly.
Comments