Impact of test-driven development on productivity, code and tests: A controlled experiment

被引:25
|
作者
Pancur, Matjaz [1 ]
Ciglaric, Mojca [1 ]
机构
[1] Univ Ljubljana, Fac Comp & Informat Sci, Ljubljana, Slovenia
关键词
Empirical software engineering; Controlled experiment; Test-driven development; Iterative test-last development; STATISTICAL POWER; DESIGN;
D O I
10.1016/j.infsof.2011.02.002
中图分类号
TP [自动化技术、计算机技术];
学科分类号
0812 ;
摘要
Context: Test-driven development is an approach to software development, where automated tests are written before production code in highly iterative cycles. Test-driven development attracts attention as well as followers in professional environment; however empirical evidence of its superiority regarding its effect on productivity, code and tests compared to test-last development is still fairly limited. Moreover, it is not clear if the supposed benefits come from writing tests before code or maybe from high iterativity/short development cycles. Objective: This paper describes a family of controlled experiments comparing test-driven development to micro iterative test-last development with emphasis on productivity, code properties (external quality and complexity) and tests (code coverage and fault-finding capabilities). Method: Subjects were randomly assigned to test-driven and test-last groups. Controlled experiments were conducted for two years, in an academic environment and in different developer contexts (pair programming and individual programming contexts). Number of successfully implemented stories, percentage of successful acceptance tests, McCabe's code complexity, code coverage and mutation score indicator were measured. Results: Experimental results and their selective meta-analysis show no statistically significant differences between test-driven development and iterative test-last development regarding productivity (chi(2)(6) = 4.799, p = 1.0, r = .107, 95% Cl (confidence interval): -.149 to .349), code complexity (chi(2)(6) = 8.094, p = .46, r = .048, 95% Cl: -.254 to .341), branch coverage (chi(2)(6) = 13.996, p = .059, r = .182, 95% Cl: -.081 to .421), percentage of acceptance tests passed (one experiment, Mann-Whitney U = 125.0, p = .98, r = .066) and mutation score indicator (chi(2)(4) = 3.807, p = .87, r = .128, 95% Cl: -.162 to .398). Conclusion: According to our findings, the benefits of test-driven development compared to iterative test-last development are small and thus in practice relatively unimportant, although effects are positive. There is an indication of test-driven development endorsing better branch coverage, but effect size is considered small. (C) 2011 Elsevier B.V. All rights reserved.
引用
收藏
页码:557 / 573
页数:17
相关论文
共 50 条
  • [1] An industry experiment on the effects of test-driven development on external quality and productivity
    Tosun, Ayse
    Dieste, Oscar
    Fucci, Davide
    Vegas, Sira
    Turhan, Burak
    Erdogmus, Hakan
    Santos, Adrian
    Oivo, Markku
    Toro, Kimmo
    Jarvinen, Janne
    Juristo, Natalia
    EMPIRICAL SOFTWARE ENGINEERING, 2017, 22 (06) : 2763 - 2805
  • [2] An industry experiment on the effects of test-driven development on external quality and productivity
    Ayse Tosun
    Oscar Dieste
    Davide Fucci
    Sira Vegas
    Burak Turhan
    Hakan Erdogmus
    Adrian Santos
    Markku Oivo
    Kimmo Toro
    Janne Jarvinen
    Natalia Juristo
    Empirical Software Engineering, 2017, 22 : 2763 - 2805
  • [3] The impact of test-driven development on software development productivity - An empirical study
    Madeyski, Lech
    Szala, Lukasz
    SOFTWARE PROCESS IMPROVEMENT, PROCEEDINGS, 2007, 4764 : 200 - +
  • [4] A structured experiment of test-driven development
    George, B
    Williams, L
    INFORMATION AND SOFTWARE TECHNOLOGY, 2004, 46 (05) : 337 - 342
  • [5] The effect of test-driven development on program code
    Mueller, Matthias M.
    EXTREME PROGRAMMING AND AGILE PROCESSES IN SOFTWARE ENGINEERING, PROCEEDINGS, 2006, 4044 : 94 - 103
  • [6] Productivity of test driven development: A controlled experiment with professionals
    Canfora, Gerardo
    Cimitile, Aniello
    Garcia, Felix
    Piattini, Mario
    Visaggio, Corrado Aaron
    PRODUCT-FOCUSED SOFTWARE PROCESS IMPROVEMENT, PROCEEDINGS, 2006, 4034 : 383 - 388
  • [7] On the Effectiveness of Unit Tests in Test-driven Development
    Tosun, Ayse
    Ahmed, Muzamil
    Turhan, Burak
    Juristo, Natalia
    PROCEEDINGS OF THE 2018 INTERNATIONAL CONFERENCE ON SOFTWARE AND SYSTEM PROCESS (ICSSP 2018), 2018, : 113 - 122
  • [8] A Controlled Experiment with Novice Developers on the Impact of Task Description Granularity on Software Quality in Test-Driven Development
    Karac, Itir
    Turhan, Burak
    Juristo, Natalia
    IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2021, 47 (07) : 1315 - 1330
  • [9] Investigating the Impact of Peer Code Review and Pair Programming on Test-Driven Development
    Swamidurai, Rajendran
    Dennis, Brad
    Kannan, Uma
    IEEE SOUTHEASTCON 2014, 2014,
  • [10] Investigating the Impact of Development Task on External Quality in Test-Driven Development: An Industry Experiment
    Tosun, Ayse
    Dieste, Oscar
    Vegas, Sira
    Pfahl, Dietmar
    Rungi, Kerli
    Juristo, Natalia
    IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2021, 47 (11) : 2438 - 2456