一句话:在大规模真实失败数据上重评估并增强基于信息检索的测试用例优先级排序,提出混合技术,并揭示 flaky 测试影响。
测试用例优先级排序(TCP)旨在通过重排测试执行顺序更快检测回归缺陷。已有研究多使用种子故障或变异体评估,而非真实测试失败。本文对近期面向变更感知的信息检索(IR)TCP 技术开展更大规模、更贴近现实的实证研究,并在大型真实软件演化数据集上使用真实失败、成本感知与非成本感知指标及多种配置进行评估。作者还设计混合技术,融合 IR 特征、历史测试执行时间与测试失败频率。结果表明,面向变更感知的 IR 技术在该真实场景下优于最先进的基于覆盖率的 TCP 技术,混合技术进一步提升效果;同时发现 flaky 测试会显著影响基于真实失败的 TCP 评估。
Test-case prioritization (TCP) aims to detect regression bugs faster via reordering the tests run. While TCP has been studied for over 20 years, it was almost always evaluated using seeded faults/mutants as opposed to using real test failures. In this work, we study the recent change-aware information retrieval (IR) technique for TCP. Prior work has shown it performing better than traditional coverage-based TCP techniques, but it was only evaluated on a small-scale dataset with a cost-unaware metric based on seeded faults/mutants. We extend the prior work by conducting a much larger and more realistic evaluation as well as proposing enhancements that substantially improve the performance. In particular, we evaluate the original technique on a large-scale, real-world software-evolution dataset with real failures using both cost-aware and cost-unaware metrics under various configurations. Also, we design and evaluate hybrid techniques combining the IR features, historical test execution time, and test failure frequencies. Our results show that the change-aware IR technique outperforms stateof-the-art coverage-based techniques in this real-world setting, and our hybrid techniques improve even further upon the original IR technique. Moreover, we show that flaky tests have a substantial impact on evaluating the change-aware TCP techniques based on real test failures.