9.3 Test-driven development

Test-driven development (TDD) is an approach to program development that is based on the general idea that you should write an executable test or tests for code that you are writing before you write the code. TDD was introduced by early users of the Extreme Programming agile method, but it can be used with any incremental development approach. Figure 9.8 is a model of the test-driven development process.

A cycle diagram represents the test-driven development.

Figure 9.8

Test-driven development

Assume that you have identified some increment of functionality to be implemented. The stages of the test-driven development process are shown ...

Get Engineering Software Products: An Introduction to Modern Software Engineering now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.