Strategies for avoiding text fixture smells during software evolution

Michaela Greiler, A. Zaidman, A. Deursen, M. Storey
{"title":"Strategies for avoiding text fixture smells during software evolution","authors":"Michaela Greiler, A. Zaidman, A. Deursen, M. Storey","doi":"10.1109/MSR.2013.6624053","DOIUrl":null,"url":null,"abstract":"An important challenge in creating automated tests is how to design test fixtures, i.e., the setup code that initializes the system under test before actual automated testing can start. Test designers have to choose between different approaches for the setup, trading off maintenance overhead with slow test execution. Over time, test code quality can erode and test smells can develop, such as the occurrence of overly general fixtures, obscure inline code and dead fields. In this paper, we investigate how fixture-related test smells evolve over time by analyzing several thousand revisions of five open source systems. Our findings indicate that setup management strategies strongly influence the types of test fixture smells that emerge in code, and that several types of fixture smells often emerge at the same time. Based on this information, we recommend important guidelines for setup strategies, and suggest how tool support can be improved to help in both avoiding the emergence of such smells as well as how to refactor code when test smells do appear.","PeriodicalId":325271,"journal":{"name":"2013 10th Working Conference on Mining Software Repositories (MSR)","volume":"32 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2013-05-18","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"45","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2013 10th Working Conference on Mining Software Repositories (MSR)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/MSR.2013.6624053","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 45

Abstract

An important challenge in creating automated tests is how to design test fixtures, i.e., the setup code that initializes the system under test before actual automated testing can start. Test designers have to choose between different approaches for the setup, trading off maintenance overhead with slow test execution. Over time, test code quality can erode and test smells can develop, such as the occurrence of overly general fixtures, obscure inline code and dead fields. In this paper, we investigate how fixture-related test smells evolve over time by analyzing several thousand revisions of five open source systems. Our findings indicate that setup management strategies strongly influence the types of test fixture smells that emerge in code, and that several types of fixture smells often emerge at the same time. Based on this information, we recommend important guidelines for setup strategies, and suggest how tool support can be improved to help in both avoiding the emergence of such smells as well as how to refactor code when test smells do appear.
在软件进化过程中避免文本fixture气味的策略
创建自动化测试的一个重要挑战是如何设计测试装置,即在实际的自动化测试开始之前初始化被测系统的设置代码。测试设计人员必须在不同的设置方法之间进行选择,在维护开销和缓慢的测试执行之间进行权衡。随着时间的推移,测试代码的质量可能会下降,并且会产生测试气味,例如出现过于通用的fixture、模糊的内联代码和死域。在本文中,我们通过分析五个开源系统的几千个版本,研究了与fixture相关的测试气味是如何随着时间的推移而演变的。我们的发现表明,设置管理策略强烈地影响代码中出现的测试fixture气味的类型,并且几种类型的fixture气味经常同时出现。基于这些信息,我们为设置策略推荐了重要的指导方针,并建议如何改进工具支持,以帮助避免此类气味的出现,以及如何在出现测试气味时重构代码。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约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学术官方微信