On the role of tests in test-driven development: a differentiated and partial replication

被引:0
作者
Davide Fucci
Burak Turhan
机构
[1] University of Oulu,Department of Information Processing Science
来源
Empirical Software Engineering | 2014年 / 19卷
关键词
Test-driven development; Software quality; Productivity; Software testing; Replication;
D O I
暂无
中图分类号
学科分类号
摘要
Background: Test-Driven Development (TDD) is claimed to have positive effects on external code quality and programmers’ productivity. The main driver for these possible improvements is the tests enforced by the test-first nature of TDD as previously investigated in a controlled experiment (i.e. the original study). Aim: Our goal is to examine the nature of the relationship between tests and external code quality as well as programmers’ productivity in order to verify/ refute the results of the original study. Method: We conducted a differentiated and partial replication of the original setting and the related analyses, with a focus on the role of tests. Specifically, while the original study compared test-first vs. test-last, our replication employed the test-first treatment only. The replication involved 30 students, working in pairs or as individuals, in the context of a graduate course, and resulted in 16 software artifacts developed. We performed linear regression to test the original study’s hypotheses, and analyses of covariance to test the additional hypotheses imposed by the changes in the replication settings. Results: We found significant correlation (Spearman coefficient = 0.66, with p-value = 0.004) between the number of tests and productivity, and a positive regression coefficient (p-value = 0.011). We found no significant correlation (Spearman coefficient = 0.41 with p-value = 0.11) between the number of tests and external code quality (regression coefficient p-value = 0.0513). For both cases we observed no statistically significant interaction caused by the subject units being individuals or pairs. Further, our results are consistent with the original study although there were changes in the timing constraints for finishing the task and the enforced development processes. Conclusions: This replication study confirms the results of the original study concerning the relationship between the number of tests vs. external code quality and programmer productivity. Moreover, this replication allows us to identify additional context variables, for which the original results still hold; namely the subject unit, timing constraint and isolation of test-first process. Based on our findings, we recommend practitioners to implement as many tests as possible in order to achieve higher baselines for quality and productivity.
引用
收藏
页码:277 / 302
页数:25
相关论文
共 23 条
[1]  
Bramel D(1981)Hawthorne, the myth of the docile worker, and class bias in psychology Am Psychol 36 867-67
[2]  
Friend R(2010)Outliers detection and treatment: a review Int J Psychol Res 3 58-237
[3]  
Cousineau D(2005)On the effectiveness of the test-first approach to programming IEEE Trans Softw Eng 31 226-342
[4]  
Chartier S(2004)A structured experiment of test-driven development Inform Softw Technol 46 337-615
[5]  
Erdogmus H(2007)The effect of experience on the test-driven development process Empir Softw Eng 12 593-573
[6]  
Morisio M(2011)Impact of test-driven development on productivity, code and tests: a controlled experiment Inf Softw Technol 53 557-856
[7]  
Marco T(2013)The effects of test-driven development on external quality and productivity: a meta-analysis IEEE Trans Softw Eng 39 836-231
[8]  
George B(1992)Analysis of covariance: an alternative to nutritional indices Entomol Exp Appl 62 221-19
[9]  
Williams L(2010)What do we know about test-driven development? IEEE Softw 27 16-undefined
[10]  
Müller M(undefined)undefined undefined undefined undefined-undefined