England Flag France Flag China Flag German Flag
Bookmark and Share

Ask an Embedded Testing Expert

1-877-221-3069

Test-Driven Development


Test-driven development is a software development methodology closely associated with both the agile development framework and the set of practices known as Extreme Programming.

The test-driven development methodology centers around the creation of tests before programmers write each piece of code for a software project. As in the agile framework, test-driven development requires that a project be divided into small iterations, each of which produces a deliverable unit.

When utilizing the test-driven approach, developers working on a particular feature or component begin by creating an automated test that verifies the requirements for the code they are about to write. This test is based on the predetermined specifications and requirements for that feature or component.

Initially, the program will fail the test, since the feature has not yet been created. The developers then work to create code that will pass the test. Once successful, they can then work to "clean up" the code, ensuring along the way that the code continues to pass the test.

Test-driven development differs from other approaches to testing primarily in that it involves creating tests before the program code itself is written. This forces the developer to think about test cases based on the interface, and not based on the design of the code.

According to a paper published by Matthias Muller and Frank Padberg on the return on investment offered by test-driven development, the approach typically results in shorter overall code implementation time.