Evaluating the Effectiveness of Regression Test Suites for Extract Method Validation

Levi Gomes, Cassio Cordeiro, Everton L. G. Alves
{"title":"Evaluating the Effectiveness of Regression Test Suites for Extract Method Validation","authors":"Levi Gomes, Cassio Cordeiro, Everton L. G. Alves","doi":"10.1145/3559744.3559745","DOIUrl":null,"url":null,"abstract":"Refactoring edits aim to improve structural aspects of a system without changing its external behavior. However, while trying to perform a safe edit, a developer might introduce refactoring faults. To avoid refactoring faults, developers often use test suites to validate refactoring edits. However, depending on the quality of a test suite, its verdict may be misleading. In this work, we first present an empirical study that investigates the effectiveness of test suites (manually created and generated) for validating Extract Method refactoring faults. We found that manual suites detected 61,9% the injected faults, while generated suites detected only 46,7% (Randoop) and 55,8% (Evosuite). Then, we propose a new approach for evaluating the quality of a test suite for detecting refactoring faults. This approach is implemented by our prototype tool that focuses on two types of Extract Method faults. We demonstrate its applicability in a second empirical study that measured the quality of test suites from three different open-source projects.","PeriodicalId":187140,"journal":{"name":"Proceedings of the 7th Brazilian Symposium on Systematic and Automated Software Testing","volume":"4 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2022-10-03","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 7th Brazilian Symposium on Systematic and Automated Software Testing","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3559744.3559745","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

Abstract

Refactoring edits aim to improve structural aspects of a system without changing its external behavior. However, while trying to perform a safe edit, a developer might introduce refactoring faults. To avoid refactoring faults, developers often use test suites to validate refactoring edits. However, depending on the quality of a test suite, its verdict may be misleading. In this work, we first present an empirical study that investigates the effectiveness of test suites (manually created and generated) for validating Extract Method refactoring faults. We found that manual suites detected 61,9% the injected faults, while generated suites detected only 46,7% (Randoop) and 55,8% (Evosuite). Then, we propose a new approach for evaluating the quality of a test suite for detecting refactoring faults. This approach is implemented by our prototype tool that focuses on two types of Extract Method faults. We demonstrate its applicability in a second empirical study that measured the quality of test suites from three different open-source projects.
评估回归测试套件对提取方法验证的有效性
重构编辑的目的是在不改变系统外部行为的情况下改进系统的结构方面。然而,在尝试执行安全编辑时,开发人员可能会引入重构错误。为了避免重构错误,开发人员经常使用测试套件来验证重构编辑。然而,取决于测试套件的质量,它的结论可能是误导的。在这项工作中,我们首先提出了一项实证研究,该研究调查了用于验证Extract Method重构错误的测试套件(手动创建和生成)的有效性。我们发现手动套件检测到注入故障的60.9%,而生成套件仅检测到46.7% (Randoop)和55.8% (Evosuite)。然后,我们提出了一种新的方法来评估测试套件的质量,以检测重构错误。这个方法是由我们的原型工具实现的,它关注两种类型的Extract Method错误。我们在第二个实证研究中证明了它的适用性,该研究测量了来自三个不同开源项目的测试套件的质量。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信