Does Refactoring of Test Smells Induce Fixing Flaky Tests?

Does Refactoring of Test Smells Induce Fixing Flaky Tests?
复制标题

测试气味的重构是否会导致修复片状测试?

DOI:
--
复制
发表时间:
2017
期刊:
IEEE International Conference on Software Maintenance and Evolution
影响因子:
--
通讯作者:
A. Zaidman
A. Zaidman
中科院分区:
--
文献类型:
--
作者:
Fabio Palomba;A. Zaidman

文献摘要

参考文献

被引文献

相似文献

回归测试是一项核心活动,它允许开发人员确保源代码更改不会引入错误。一个重要的先决条件是测试用例是确定的。然而,情况并非总是如此,因为有些测试会出现所谓的不稳定。不可靠的测试会带来严重的后果,因为它们会隐藏真正的bug并增加软件检查成本。现有的研究主要集中在了解测试掉片的根本原因和设计自动修复掉片测试的技术;研究的一个关键领域是并发性。在本文中,我们研究了片状测试与先前定义的三种测试气味之间的关系,即资源乐观主义,间接测试和测试运行战争。我们已经建立了一个涉及18个软件系统的19,532个JUnit测试方法的研究。我们调查的一个关键结果是,54%的易碎的测试包含可能导致易碎的测试代码气味。此外,我们发现重构测试气味不仅消除了设计缺陷,而且还修复了所有54%的不稳定测试与测试气味的因果关系。
Regression testing is a core activity that allows developers to ensure that source code changes do not introduce bugs. An important prerequisite then is that test cases are deterministic. However, this is not always the case as some tests suffer from socalled flakiness. Flaky tests have serious consequences, as they can hide real bugs and increase software inspection costs. Existing research has focused on understanding the root causes of test flakiness and devising techniques to automatically fix flaky tests; a key area of investigation being concurrency. In this paper, we investigate the relationship between flaky tests and three previously defined test smells, namely Resource Optimism, Indirect Testing and Test Run War.We have set up a study involving 19,532 JUnit test methods belonging to 18 software systems. A key result of our investigation is that 54% of tests that are flaky contain a test code smell that can cause the flakiness. Moreover, we found that refactoring the test smells not only removed the design flaws, but also fixed all 54% of flaky tests causally co-occurring with test smells.
Covrig:用于分析实际软件中的代码、测试和覆盖率演变的框架
DOI: 10.1145/2610384.2610419
发表时间: 2014
期刊: --
影响因子: --
作者:
Marinescu P
通讯作者: Marinescu P