TDD Research

Here’s a very nice case study conducted at Microsoft on two projects:

http://research.microsoft.com/manuvir/papers/isese-fp17288-Bhat.pdf

Here are two tables showing the difference when using TDD

Table 1: Project A Outcome Measures

Metric Description Value
Actual defects/KLOC (using TDD) X
Defects/KLOC of comparable team in org but not using TDD 2.6X

Increase in time taken to code the feature because of TDD (%) [Management estimates]

25-30%

Table 2 Project B Outcome Measures

Metric Description Value
Actual defects/KLOC (using TDD) Y
Defects/KLOC of comparable team in org but not using TDD 4.2Y

Increase in time taken to code the feature because of TDD (%) [PM/DevLEAD/MGR estimates]

15%

I think that the numbers speak for themselves.