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.
Chapter PDF
Similar content being viewed by others
Keywords
References
Beck, K.: Extreme Programming Explained, 2nd edn. Embrace Change. Addison-Wesley, Boston (2004)
Astels, D.: Test-Driven Development: A Practical Guide. Prentice Hall, Upper Saddle River (2003)
Beck, K.: Aim, fire. IEEE Software 18(5), 87–89 (2001)
Beck, K.: Test-Driven Development By Example. Addison-Wesley, Boston (2003)
Boehm, B., Turner, R.: Balancing Agility and Discipline - A Guide for the Perplexed. Addison-Wesley, Reading (2004)
Stephens, M., Rosenberg, D.: Extreme Programming Refactored: The Case Against XP. Apress, Berkeley (2003)
Siniaalto, M., Abrahamsson, P.: A Comparative Case Study on the Impact of Test-Driven Development on Program Design and Test Coverage. In: First International Symposium on Empirical Software Engineering and Measurement (ESEM 2007), pp. 275–284. IEEE Press, New York (2007)
Chidamber, S.R., Kemerer, C.F.: A metrics Suite for Object Oriented Design. IEEE Trans.Software Eng. 20(6), 476–493 (1994)
McCabe, T.J.: A Complexity Measure. IEEE Trans.Software Eng. 2(4), 308–320 (1976)
Martin, R.C.: Agile Software Development: Principles, Patterns, and Practices. Pearson Education, Upper Saddle River (2003)
Janzen, D.S., Saiedian, H.: On the Influence of Test-Driven Development on Software Design. In: 19th Conference on Software Engineering Education and Training (CSEET 2006), pp. 141–148. IEEE Press, New York (2006)
Kaufmann, R., Janzen, D.: Implications of Test-Driven Development A Pilot Study. In: 18th Annual ACM Conference on Object-Oriented Programming, Systems, Languages and Applications (OOPSLA 2003), pp. 298–299. ACM, New York (2003)
Steinberg, D.H.: The effect of unit tests on entry points, coupling and cohesion in an introductory Java programming course. XP Universe (2001)
Müller, M.M.: The Effect of Test-Driven Development on Program Code. In: Abrahamsson, P., Marchesi, M., Succi, G. (eds.) XP 2006. LNCS, vol. 4044, pp. 94–103. Springer, Heidelberg (2006)
Basili, V.R., Melo, W.L.: A validation of Object-Oriented Design Metrics as Quality Indicators. IEEE Trans.Software Eng. 22(10), 751–761 (1996)
Henderson-Sellers, B.: Object-Oriented Metrics: Measures of Complexity. Prentice Hall, Upper Saddle River (1996)
Shepperd, M.: A critique of cyclomatic complexity as a softwaremetric. Software Engineering Journal (1988)
Salo, O., Abrahamsson, P.: Empirical Evaluation of Agile Software Development: The Controlled Case Study Approach. In: Bomarius, F., Iida, H. (eds.) PROFES 2004. LNCS, vol. 3009, pp. 408–423. Springer, Heidelberg (2004)
Ihme, T., Abrahamsson, P.: Agile Architecting: The Use of Architectural Patterns in Mobile Java Applications. International Journal of Agile Manufacturing 8(2), 97–112 (2005)
Höst, M., Regnell, B., Wohlin, C.: Using Students as Subjects—A Comparative Study of Students and Professionals in Lead-Time Impact Assessment. Empirical Software Engineering 5(3), 201–214 (2000)
Runeson, P.: Using students as Experiment Subjects - An Analysis of Graduate and Freshmen Student Data. In: Empirical Assessment in Software Engineering (EASE 2003) (2003)
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 2008 IFIP International Federation for Information Processing
About this paper
Cite this paper
Siniaalto, M., Abrahamsson, P. (2008). Does Test-Driven Development Improve the Program Code? Alarming Results from a Comparative Case Study. In: Meyer, B., Nawrocki, J.R., Walter, B. (eds) Balancing Agility and Formalism in Software Engineering. CEE-SET 2007. Lecture Notes in Computer Science, vol 5082. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-85279-7_12
Download citation
DOI: https://doi.org/10.1007/978-3-540-85279-7_12
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-85278-0
Online ISBN: 978-3-540-85279-7
eBook Packages: Computer ScienceComputer Science (R0)