Does Test-Driven Development Really Improve Software Design Quality?

  • Authors:
  • David Janzen;Hossein Saiedian

  • Affiliations:
  • California Polytechnic State University, San Luis Obispo;University of Kansas

  • Venue:
  • IEEE Software
  • Year:
  • 2008

Quantified Score

Hi-index 0.00

Visualization

Abstract

Test-driven development (TDD) is first and foremost a design practice. The question is, "How good are the resulting designs?" Advocates claim that TDD produces code that is simpler, more cohesive, and less coupled than code developed in a more traditional test-last way. Sounds good, but is it true? We collected evidence to substantiate or question the claims regarding TDD's influence on software. We focused on internal software quality that is, design and code characteristics such as code complexity, size, coupling, and cohesion. We conducted three quasicontrolled experiments and one case study in a Fortune 500 company and another two quasicontrolled experiments with university students in undergraduate and graduate software engineering courses. We evaluated 24 student and professional programmers working on 21 software projects ranging in size from a few hundred to over 30,000 lines of code. The results indicate that TDD programmers tend to write software modules that are smaller, less complex, and more highly tested than modules produced by their test-last counterparts. However, the results didn't support claims for lower coupling and increased cohesion with TDD.