arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2605.21677cs.SE
收藏

可重复的不稳定测试失败数据集

A Dataset of Reproducible Flaky-Test Failures

George Mason University(乔治梅森大学);Bangladesh Election Commission(孟加拉国选举委员会);University of Alabama(阿拉巴马大学);Ministry of Finance(财政部);The University of Texas at Austin(德克萨斯大学奥斯汀分校)

Suzzana Rafi, Mahbub-Ul-Hoque Sumon, Md Erfan, Maruf Morshed Khan, August Shi, Wing Lam

AI总结:

本文提出了一种可重复的不稳定测试失败数据集,提供了可重复的环境、脚本和执行日志,以帮助研究人员更好地理解和修复不稳定测试失败。

摘要:

不稳定测试在相同版本的代码上运行时,会非确定性地通过或失败。尽管已经提出了许多技术来检测、调试和修复不稳定测试,但由于其固有的非确定性,重现其失败仍然是一个主要挑战。许多不稳定测试数据集存在,但这些数据集通常由不相交的不稳定测试集合组成,每个数据集提供独特的信息,如不同类别的不稳定测试、不稳定测试的失败日志或开发人员报告的不稳定测试与自动化工具发现的不稳定测试。在本工作中,我们旨在创建一个可重复的不稳定测试数据集,从开发人员问题报告和一个流行的不稳定测试数据集进行整理。与之前的不稳定测试数据集相比,我们的数据集是第一个提供(1)可重复编译不稳定测试的环境,(2)重现失败的脚本,(3)自动应用不稳定测试修复并确保测试不再不稳定,以及(4)不稳定测试通过和失败的执行日志。我们介绍了ReproFlake,一个包含1115个可重复的不稳定测试的四个不稳定测试类别数据集。我们创建了指南,帮助其他人贡献到这个可重复的数据集,并展示了如何使用我们的数据集来理解重现不稳定测试失败的挑战(例如,研究人员在使用先前的不稳定测试数据集时可能面临的挑战),特征(例如,修复的位置及其与不稳定测试类别的相关性),以及研究人员在使用我们的数据集收集额外信息(例如代码覆盖率)时可能遇到的困难。我们的发现表明,错误信息有助于识别不稳定测试类别并指导修复,未解决的编译失败突显了在构建遗留项目中的挑战,了解典型的修复位置可以帮助优先考虑修复工作。

英文摘要:

Flaky tests pass and fail non-deterministically when run on the same version of code. Although many techniques have been proposed to detect, debug, and repair flaky tests, reproducing their failures remains a major challenge due to their inherent nondeterminism. Many flaky test datasets exist to help researchers study them, but these datasets are often composed of disjoint sets of flaky tests, where each dataset provides unique information, such as flaky tests of different categories, failure logs of flaky tests, or flaky tests reported by developers vs. flaky tests found by automated tools. In this work, we aim to create a reproducible dataset of flaky tests, curated from both developer issue reports and a popular dataset of flaky tests. Compared to prior flaky test datasets, our dataset is the first to provide (1) a reproducible environment to compile flaky tests, (2) scripts to reproduce failures, (3) scripts to automatically apply flaky test fixes and ensure that the tests are no longer flaky, and (4) execution logs of flaky test passing and failing. We present ReproFlake, a dataset of 1115 reproducible flaky tests across four flaky test categories. We create guidelines to help others contribute to this reproducible dataset, and demonstrate how to use our dataset to understand challenges in reproducing flaky test failures (e.g., challenges researchers may face when using prior flaky test datasets), the characteristics (e.g., location of the fix and its correlation with the flaky test category), and difficulties researchers may face in using our dataset to collect additional information (e.g., code coverage) about flaky tests. Our findings show that error information helps identify flaky test categories and guide repairs, that unresolved compilation failures highlight challenges in building legacy projects, and knowing typical fix locations can help prioritize repair efforts.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑