GitHub 上 Rust 项目中已修复的 Flaky Tests 初步研究
A Preliminary Study of Fixed Flaky Tests in Rust Projects on GitHub
AI总结:
本文初步研究 GitHub 上 Rust 项目中已修复的 flaky tests,通过分析 53 个测试发现异步等待和并发问题是主要根本原因,为理解 Rust 测试 flakiness 的成因与修复策略提供依据。
摘要:
先前的研究已广泛探讨了多个领域中的 flaky tests,例如 Web 应用、移动应用以及使用 Java、JavaScript、Python、Ruby 等多种编程语言的其他开源项目。然而,针对 Rust 中的 flaky tests 关注甚少——Rust 是一种新兴且流行的语言,以其相对于 C/C++ 的安全特性而闻名。Rust 包含一些有趣的特性,使得检测某些 flaky tests 变得更加容易,例如,Rust 标准库会随机化哈希表中元素的顺序,从而有效暴露与实现相关的 flakiness。然而,Rust 仍然存在若干可能导致 flaky tests 的非确定性来源。我们介绍了在 GitHub 上研究 Rust 项目中 flaky tests 的进行中工作。通过搜索已关闭的 GitHub issues 和 pull requests,我们重点关注那些已被修复而不仅仅是被报告的 flaky tests,因为修复可以提供关于根本原因、表现特征和修复策略的宝贵信息。到目前为止,我们已检查了 53 个测试。我们的初步发现表明,主要的根本原因包括异步等待(33.9%)、并发问题(24.5%)、逻辑错误(9.4%)以及网络相关问题(9.4%)。
英文摘要:
Prior research has extensively studied flaky tests in various domains, such as web applications, mobile applications, and other open-source projects in a range of multiple programing languages, including Java, Javascript, Python, Ruby, and more. However, little attention has been given to flaky tests in Rust -- an emerging popular language known for its safety features relative to C/C++. Rust incorporates interesting features that make it easy to detect some flaky tests, e.g., the Rust standard randomizes the order of elements in hash tables, effectively exposing implementation-dependent flakiness. However, Rust still has several sources of nondeterminism that can lead to flaky tests. We present our work-in-progress on studying flaky tests in Rust projects on GitHub. Searching through the closed Github issues and pull requests. We focus on flaky tests that are fixed, not just reported, as the fixes can offer valuable information on root causes, manifestation characteristics, and strategies of fixes. By far, we have inspected 53 tests. Our initial findings indicate that the predominant root causes include asynchronous wait (33.9%), concurrency issues (24.5%), logic errors (9.4%). and network-related problems (9.4%).
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。