paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Repairing order-dependent flaky tests via test generation

通过测试生成修复顺序依赖的 flaky 测试
ICSE Proceedings of the 44th International Conference on Software Engineering2022匹配度 2/10 · 该论文属于软件测试与程序修复方向,研究通过生成测试来修复顺序依赖的 flaky tests,与用户关注静态分析、LLM/Agent、浮点程序分析或贝叶斯程序分析的核心方向没有直接关联。虽然涉及测试生成与程序修复,但不属于 PL→AI 或 AI→PL 的交叉研究。引用 22 inbox
Chengpeng Li, Chenguang Zhu, Wenxi Wang, August Shi
crossref: 2026-09-12

AI 速览

一句话:提出通过生成测试(作为 cleaner)来修复因共享状态污染导致的顺序依赖 flaky 测试,无需测试套件已有 cleaner。

顺序依赖的 flaky 测试在相同代码版本上会因测试执行顺序不同而通过或失败,原因是先运行的测试污染了共享状态。已有工作通过搜索测试套件中已有的“cleaner”测试来重置共享状态,并将 cleaner 的代码作为修复补丁;但其前提是套件中已经存在合适的 cleaner。本文针对这一限制,提出通过测试生成来修复顺序依赖的 flaky 测试:在缺少现成 cleaner 时生成能重置污染状态、使目标测试在污染后仍能通过的测试代码作为补丁。摘要未给出具体实现与实验结论。

问题
顺序依赖的 flaky 测试因其他测试污染共享状态而结果不稳定;现有基于 cleaner 的修复方法依赖测试套件中已存在可用于重置状态的 cleaner。
方法
提出利用测试生成来构造或生成 cleaner(重置共享状态的测试代码),从而修复顺序依赖 flaky 测试,摆脱对已有 cleaner 的依赖。
评估
摘要中未给出评估方式或实验结果。
原文摘要(Abstract)

Flaky tests are tests that pass or fail nondeterministically on the same version of code. These tests can mislead developers concerning the quality of their code changes during regression testing. A common kind of flaky tests are order-dependent tests, whose pass/fail outcomes depend on the test order in which they are run. Such tests have different outcomes because other tests running before them pollute shared state. Prior work has proposed repairing order-dependent tests by searching for existing tests, known as "cleaners", that reset the shared state, allowing the order-dependent test to pass when run after a polluted shared state. The code within a cleaner represents a patch to repair the order-dependent test. However, this technique requires cleaners to already exist in the test suite.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot6948,
  title = {Repairing order-dependent flaky tests via test generation},
  author = {Chengpeng Li and Chenguang Zhu and Wenxi Wang and August Shi},
  booktitle = {ICSE},
  year = {2022},
  doi = {10.1145/3510003.3510173}
}