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