Does Test-Driven Development Improve the Program Code? Alarming Results from a Comparative Case Study

  • Maria Siniaalto
  • Pekka Abrahamsson
Part of the Lecture Notes in Computer Science book series (LNCS, volume 5082)

Abstract

It is suggested that test-driven development (TDD) is one of the most fundamental practices in agile software development, which produces loosely coupled and highly cohesive code. However, how the TDD impacts on the structure of the program code have not been widely studied. This paper presents the results from a comparative case study of five small scale software development projects where the effect of TDD on program design was studied using both traditional and package level metrics. The empirical results reveal that an unwanted side effect can be that some parts of the code may deteriorate. In addition, the differences in the program code, between TDD and the iterative test-last development, were not as clear as expected. This raises the question as to whether the possible benefits of TDD are greater than the possible downsides. Moreover, it additionally questions whether the same benefits could be achieved just by emphasizing unit-level testing activities.

Keywords

Test-Driven Development Test-first Programming Test-first Development Agile Software Development Software Quality 

Copyright information

© IFIP International Federation for Information Processing 2008

Authors and Affiliations

  • Maria Siniaalto
    • 1
  • Pekka Abrahamsson
    • 2
  1. 1.F-Secure OyjOuluFinland
  2. 2.VTT Technical Research Centre of FinlandOuluFinland

Personalised recommendations