首页> 外文期刊>Empirical Software Engineering >The smell of fear: on the relation between test smells and flaky tests
【24h】

The smell of fear: on the relation between test smells and flaky tests

机译:恐惧的气味:关于测试气味和片状测试之间的关系

获取原文
获取原文并翻译 | 示例
       

摘要

Regression testing is the activity performed by developers to check whether new modifications have not introduced bugs. A crucial requirement to make regression testing effective is that test cases are deterministic. Unfortunately, this is not always the case as some tests might suffer from so-called flakiness, i.e., tests that exhibit both a passing and a failing outcome with the same code. Flaky tests are widely recognized as a serious issue, since they hide real bugs and increase software inspection costs. While previous research has focused on understanding the root causes of test flakiness and devising techniques that automatically fix them, in this paper we explore an orthogonal perspective: the relation between flaky tests and test smells, i.e., suboptimal development choices applied when developing tests. Relying on (1) an analysis of the state-of-the-art and (2) interviews with industrial developers, we first identify five flakiness-inducing test smell types, namely Resource Optimism, Indirect Testing, Test Run War, Fire and Forget, and Conditional Test Logic, and automate their detection. Then, we perform a large-scale empirical study on 19,532 JUnit test methods of 18 software systems, discovering that the five considered test smells causally co-occur with flaky tests in 75% of the cases. Furthermore, we evaluate the effect of refactoring, showing that it is not only able to remove design flaws, but also fixes all 75% flaky tests causally co-occurring with test smells.
机译:回归测试是开发人员执行的一项活动,用于检查新的修改是否未引入错误。使回归测试有效的关键要求是测试用例是确定性的。不幸的是,情况并非总是如此,因为某些测试可能会遭受所谓的脆弱性,即使用相同代码同时显示通过和失败结果的测试。易变性测试被认为是一个严重的问题,因为它们隐藏了真正的错误并增加了软件检查的成本。尽管先前的研究着重于了解测试片状感的根本原因并设计出可自动修复它们的技术,但在本文中,我们探索了一个正交的观点:片状测试与测试气味之间的关系,即在开发测试时采用了次优的开发选择。依靠(1)对最新技术的分析和(2)与工业开发商的访谈,我们首先确定五种导致异味的测试气味类型,即资源乐观,间接测试,试运行战争,失火和忘却和条件测试逻辑,并自动进行检测。然后,我们对18个软件系统的19,532个JUnit测试方法进行了大规模的实证研究,发现在75%的情况下,五个考虑的测试气味与易碎测试共同存在。此外,我们评估了重构的效果,表明重构不仅能够消除设计缺陷,而且还可以修复因测试气味共同引起的所有75%片状测试。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号