Test-Driven Development Goes to School

Author(s): C. Jones
Venue: Journal of Computing Sciences in Colleges
Date: October 2004


Industry has seen great success in test driven development (TDD). Commercial software defect rates can be reduced from 18%-50% from previous levels. These promises of high software quality have attracted the attention of educators to introduce test driven development into their curriculum. Little research has been done to synthesize the report findings on the application of TDD in a university environment.

Eight studies have been surveyed in this paper. Three were controlled experiments, comparing TDD to traditional program testing. Six of the eight used JUnit as their testing framework. One used assert macros, and another used a proprietary testing framework. The most dominant development language in TDD is Java, most likely because JUnit is the leading test harness and crucial for TDD practices. Early adopters of TDD tend to be Computer Science departments at Universities, which already use Java and JUnit. Yet it is important to remember that TDD is not cost-free and classroom outcomes vary.

Two of the three controlled experiments reported statistically significant increased in software quality. The last showed no significant differences. One study showed increased productivity measured by the number of non-commented lines of code written. Another showed no difference in productivity. Two studies found that TDD increases programmer confidence, and another study showed that TDD increased programmer understanding of code.

At this time, Jones can’t conclude that literature is on the side of TDD or not. There clearly shows a promise for students to get a better verifiable design through TDD, but it is hard to get the teaching formula correct to effectively teach TDD practices in the classroom.