Findings from a multi-method study on test-driven development

Abstract Context Test-driven development (TDD) is an iterative software development practice where unit tests are defined before production code. A number of quantitative empirical investigations have been conducted about this practice. The results are contrasting and inconclusive. In addition, previous studies fail to analyze the values, beliefs, and assumptions that inform and shape TDD. Objective We present a study designed, and conducted to understand the values, beliefs, and assumptions about TDD. Participants were novice and professional software developers. Method We conducted an ethnographically-informed study with 14 novice software developers, i.e., graduate students in Computer Science at the University of Basilicata, and six professional software developers (with one to 10 years work experience). The participants worked on the implementation of a new feature for an existing software written in Java. We immersed ourselves in the context of our study. We collected qualitative information by means of audio recordings, contemporaneous field notes, and other kinds of artifacts. We collected quantitative data from the integrated development environment to support or refute the ethnography results. Results The main insights of our study can be summarized as follows: (i)  refactoring (one of the phases of TDD) is not performed as often as the process requires and it is considered less important than other phases, (ii)  the most important phase is implementation, (iii)  unit tests are almost never up-to-date, and (iv) participants first build in their mind a sort of model of the source code to be implemented and only then write test cases. The analysis of the quantitative data supported the following qualitative findings: (i), (iii) , and (iv) . Conclusions Developers write quick-and-dirty production code to pass the tests, do not update their tests often, and ignore refactoring.

[1]  Paul Beynon-Davies,et al.  Information systems prototyping in practice , 1999, J. Inf. Technol..

[2]  Dietmar Pfahl,et al.  Reporting Experiments in Software Engineering , 2008, Guide to Advanced Empirical Software Engineering.

[3]  S. Sim Evaluating the Evidence : Lessons from Ethnography , 1999 .

[4]  David B. Martin,et al.  'Good' Organisational Reasons for 'Bad' Software Testing: An Ethnographic Study of Testing in a Small Software Company , 2007, 29th International Conference on Software Engineering (ICSE'07).

[5]  Lech Madeyski Preliminary Analysis of the Effects of Pair Programming and Test-Driven Development on the External Code Quality , 2005, Software Engineering: Evolution and Emerging Technologies.

[6]  Andrew P. Black,et al.  How We Refactor, and How We Know It , 2012, IEEE Trans. Software Eng..

[7]  Giuseppe Scanniello,et al.  Dealing with identifiers and comments in source code comprehension and maintenance: results from an ethnographically-informed study with students and professionals , 2014, EASE '14.

[8]  Kai Petersen,et al.  Considering rigor and relevance when evaluating test driven development: A systematic review , 2014, Inf. Softw. Technol..

[9]  Giuseppe Scanniello,et al.  Dealing with Faults in Source Code: Abbreviated vs. Full-Word Identifier Names , 2013, 2013 IEEE International Conference on Software Maintenance.

[10]  Ian Sommerville,et al.  Testing in the Wild: The Social and Organisational Dimensions of Real World Practice , 2009, Computer Supported Cooperative Work (CSCW).

[11]  Natalia Juristo Juzgado,et al.  A Dissection of the Test-Driven Development Process: Does It Really Matter to Test-First or to Test-Last? , 2016, IEEE Transactions on Software Engineering.

[12]  Serge Demeyer,et al.  Studying the Effect of Refactorings: A Complexity Metrics Perspective , 2010, 2010 Seventh International Conference on the Quality of Information and Communications Technology.

[13]  Rainer Koschke,et al.  How do professional developers comprehend software? , 2012, 2012 34th International Conference on Software Engineering (ICSE).

[14]  Forrest Shull,et al.  How Effective Is Test-Driven Development? , 2011, Making Software.

[15]  Kent L. Beck,et al.  Test-driven Development - by example , 2002, The Addison-Wesley signature series.

[16]  Claes Wohlin,et al.  Using Students as Subjects—A Comparative Study of Students and Professionals in Lead-Time Impact Assessment , 2000, Empirical Software Engineering.

[17]  Helen Sharp,et al.  Software Engineering: Community and Culture , 2000, IEEE Softw..

[18]  Burak Turhan,et al.  On the role of tests in test-driven development: a differentiated and partial replication , 2013, Empirical Software Engineering.

[19]  Miroslav Novak,et al.  A Practical Guide to eXtreme Programming , 2002 .

[20]  Natalia Juristo Juzgado,et al.  Towards an operationalization of test-driven development skills: An industrial empirical study , 2015, Inf. Softw. Technol..

[21]  Shari Lawrence Pfleeger,et al.  Preliminary Guidelines for Empirical Research in Software Engineering , 2002, IEEE Trans. Software Eng..

[22]  Natalia Juristo Juzgado,et al.  Replications of software engineering experiments , 2013, Empirical Software Engineering.

[23]  Dan Shapiro,et al.  The limits of ethnography: combining social sciences for CSCW , 1994, CSCW '94.

[24]  T. Vidmar,et al.  Towards empirical evaluation of test-driven development in a university environment , 2003, The IEEE Region 8 EUROCON 2003. Computer as a Tool..

[25]  Martyn Hammersley,et al.  Ethnography : Principles in Practice , 1983 .

[26]  Andrew Begel,et al.  Usage and Perceptions of Agile Software Development in an Industrial Context: An Exploratory Study , 2007, First International Symposium on Empirical Software Engineering and Measurement (ESEM 2007).

[27]  Casper Lassenius,et al.  ScrumBut, But Does it Matter? A Mixed-Method Study of the Planning Process of a Multi-team Scrum Organization , 2013, 2013 ACM / IEEE International Symposium on Empirical Software Engineering and Measurement.

[28]  Carolyn B. Seaman,et al.  Qualitative Methods in Empirical Studies of Software Engineering , 1999, IEEE Trans. Software Eng..

[29]  Brad A. Myers,et al.  An Exploratory Study of How Developers Seek, Relate, and Collect Relevant Information during Software Maintenance Tasks , 2006, IEEE Transactions on Software Engineering.

[30]  Elliot Soloway,et al.  Mental models and software maintenance , 1986, J. Syst. Softw..

[31]  Natalia Juristo Juzgado,et al.  Are Students Representatives of Professionals in Software Engineering Experiments? , 2015, 2015 IEEE/ACM 37th IEEE International Conference on Software Engineering.

[32]  Paul Beynon-Davies,et al.  Ethnography and information systems development: Ethnography of, for and within is development , 1997, Inf. Softw. Technol..

[33]  Hakan Erdogmus,et al.  Operational definition and automated inference of test-driven development with Zorro , 2010, Automated Software Engineering.

[34]  Helen Sharp,et al.  The type of evidence produced by empirical software engineers , 2005, ACM SIGSOFT Softw. Eng. Notes.

[35]  Atul Gupta,et al.  An Experimental Evaluation of the Effectiveness and Efficiency of the Test Driven Development , 2007, First International Symposium on Empirical Software Engineering and Measurement (ESEM 2007).

[36]  Onur Demirörs,et al.  Conceptual Differences Among Functional Size Measurement Methods , 2007, ESEM 2007.

[37]  Helen Sharp,et al.  Ethnographically-informed empirical studies of software practice , 2007, Inf. Softw. Technol..

[38]  Helen Sharp,et al.  Using ethnographic methods in software engineering research , 2010, 2010 ACM/IEEE 32nd International Conference on Software Engineering.

[39]  Vojislav B. Misic,et al.  The Effects of Test-Driven Development on External Quality and Productivity: A Meta-Analysis , 2013, IEEE Transactions on Software Engineering.

[40]  Daniela Cruzes,et al.  Challenges of applying ethnography to study software practices , 2012, Proceedings of the 2012 ACM-IEEE International Symposium on Empirical Software Engineering and Measurement.

[41]  Matthias M. Müller,et al.  The effect of experience on the test-driven development process , 2007, Empirical Software Engineering.

[42]  Pekka Abrahamsson,et al.  Long-Term Effects of Test-Driven Development A Case Study , 2009, XP.

[43]  P. Abrahamsson,et al.  A Comparative Case Study on the Impact of Test-Driven Development on Program Design and Test Coverage , 2007, ESEM 2007.

[44]  Michael C. Feathers Working Effectively with Legacy Code , 2004, XP/Agile Universe.

[45]  Dave Astels,et al.  Test Driven Development: A Practical Guide , 2003 .

[46]  Wes Sharrock,et al.  Project work: The organisation of collaborative design and development in software engineering , 1996, Computer Supported Cooperative Work (CSCW).

[47]  Roberto Latorre,et al.  Effects of Developer Experience on Learning and Applying Unit Test-Driven Development , 2014, IEEE Transactions on Software Engineering.

[48]  Marcelo Soares Pimenta,et al.  Besouro: A framework for exploring compliance rules in automatic TDD behavior assessment , 2015, Inf. Softw. Technol..

[49]  Kent L. Beck,et al.  Extreme programming explained - embrace change , 1990 .

[50]  Helen Sharp,et al.  An Ethnographic Study of XP Practice , 2004, Empirical Software Engineering.

[51]  Burak Turhan,et al.  Conformance factor in test-driven development: initial results from an enhanced replication , 2014, EASE '14.

[52]  Tom Rodden,et al.  Ethnography considered harmful , 2009, CHI.

[53]  Boby George,et al.  A structured experiment of test-driven development , 2004, Inf. Softw. Technol..

[54]  Orit Hazzan,et al.  The Agile Manifesto , 2014 .

[55]  Forrest Shull,et al.  What Do We Know about Test-Driven Development? , 2010, IEEE Software.

[56]  Natalia Juristo Juzgado,et al.  Results from an Ethnographically-informed Study in the Context of Test Driven Development , 2016, PeerJ Prepr..

[57]  Helen Sharp,et al.  The Role of Ethnographic Studies in Empirical Software Engineering , 2016, IEEE Transactions on Software Engineering.

[58]  Nicholas Nelson,et al.  TDDViz: Using Software Changes to Understand Conformance to Test Driven Development , 2016, XP.

[59]  David Garlan,et al.  Documenting software architectures: views and beyond , 2002, 25th International Conference on Software Engineering, 2003. Proceedings..

[60]  O. Fenton,et al.  When , 2020, Back to the Light.

[61]  Georgios Gousios,et al.  When, how, and why developers (do not) test in their IDEs , 2015, ESEC/SIGSOFT FSE.

[62]  Natalia Juristo Juzgado,et al.  Students' and professionals' perceptions of test-driven development: a focus group study , 2016, SAC.

[63]  Jeffrey C. Carver,et al.  Issues in using students in empirical studies in software engineering education , 2003, Proceedings. 5th International Workshop on Enterprise Networking and Computing in Healthcare Industry (IEEE Cat. No.03EX717).

[64]  Claes Wohlin,et al.  Experimentation in Software Engineering , 2012, Springer Berlin Heidelberg.

[65]  Janice Singer,et al.  An examination of software engineering work practices , 2010, CASCON.

[66]  Walter F. Tichy,et al.  Case study: extreme programming in a university environment , 2001, Proceedings of the 23rd International Conference on Software Engineering. ICSE 2001.

[68]  Daniel Sundmark,et al.  Factors Limiting Industrial Adoption of Test Driven Development: A Systematic Review , 2011, 2011 Fourth IEEE International Conference on Software Testing, Verification and Validation.

[69]  James Miller,et al.  A prototype empirical evaluation of test driven development , 2004, 10th International Symposium on Software Metrics, 2004. Proceedings..

[70]  P. L. Li,et al.  Estimating the Quality of Widely Used Software Products Using Software Reliability Growth Modeling: Case Study of an IBM Federated Database Project , 2007, ESEM 2007.