The secret life of test smells - an empirical study on test smell evolution and maintenance

被引:0
作者
Dong Jae Kim
Tse-Hsun (Peter) Chen
Jinqiu Yang
机构
[1] Concordia University,Department of Computer Science and Engineering
来源
Empirical Software Engineering | 2021年 / 26卷
关键词
Test smell; Empirical study; Software quality;
D O I
暂无
中图分类号
学科分类号
摘要
In recent years, researchers and practitioners have been studying the impact of test smells on test maintenance. However, there is still limited empirical evidence on why developers remove test smells in software maintenance and the mechanism employed for addressing test smells. In this paper, we conduct an empirical study on 12 real-world open-source systems to study the evolution and maintenance of test smells, and how test smells are related to software quality. Our results show that: 1) Although the number of test smell instances increases, test smell density decreases as systems evolve. 2) However, our qualitative analysis on those removed test smells reveals that most test smell removal (83%) is a by-product of feature maintenance activities. 45% of the removed test smells relocate to other test cases due to refactoring, while developers deliberately address the only 17% of the test smell instances, consisting of largely Exception Catch/Throw and Sleepy Test. 3) Our statistical model shows that test smell metrics can provide additional explanatory power on post-release defects over traditional baseline metrics (an average of 8.25% increase in AUC). However, most types of test smells have a minimal effect on post-release defects. Our study provides insight into how developers resolve test smells and current test maintenance practices. Future studies on test smells may consider focusing on the specific types of test smells that may have a higher correlation with defect-proneness when helping developers with test code maintenance.
引用
收藏
相关论文
共 72 条
[1]  
Ali NB(2019)On the search for industry-relevant regression testing research Empir Softw Eng 24 2020-2055
[2]  
Engström E(2014)Test code quality and its relation to issue handling performance IEEE Trans Softw Eng 40 1100-1125
[3]  
Taromirad M(2015)Are test smells really harmful? an empirical study Empir Softw Eng 20 1052-1094
[4]  
Mousavi MR(2017)An empirical study on the effect of testing on code quality using topic models: a case study on software development systems IEEE Trans Reliab 66 806-824
[5]  
Minhas NM(2017)Topic-based software defect explanation J Syst Softw 129 79-106
[6]  
Helgesson D(2019)A comparison and evaluation of variants in the coupling between objects metric J Syst Softw 151 120-132
[7]  
Kunze S(2018)Smells in software test code: a survey of knowledge in industry and academia J Syst Softw 138 52-81
[8]  
Varshosaz M(2016)Studying just-in-time defect prediction using cross-project models Empir Softw Eng 21 2072-2106
[9]  
Athanasiou D(1992)The detection of fault-prone programs IEEE Trans Softw Eng 18 423-433
[10]  
Nugroho A(2019)Toward a smell-aware bug prediction model IEEE Trans Softw Eng 45 194-218