paperbot · PL 论文追踪

全部论文 待读 收藏

P2 ATM: Black-box Test Case Minimization based on Test Code Similarity and Evolutionary Search

ATM:基于测试代码相似性与演化搜索的黑盒测试用例最小化
ICSE 2023 IEEE/ACM 45th International Conference on Software Engineering (ICSE)2023匹配度 1/10 · 该论文属于软件测试与调试领域的测试用例最小化工作,核心是AST相似度与遗传搜索,并未涉及用户关注的静态分析、LLM/Agent、浮点程序分析或贝叶斯程序分析等方向。引用 30 inbox
Rongqi Pan, Taher A. Ghaleb, Lionel Briand
crossref: 2026-09-12dblp: 2026-09-12arxiv: 2026-09-12

AI 速览

一句话:提出ATM,仅依赖测试代码AST与遗传搜索,在给定预算下实现高效黑盒测试用例最小化。

大型测试套件执行成本高且常含冗余,传统最小化多依赖覆盖率、模型或需求规格,这些信息并非总可获取,覆盖率分析还面临可扩展性问题。FAST-R仅用测试代码且高效,但在Java项目上故障检测偏低。本文提出ATM,将测试代码转为抽象语法树,采用四种树相似度度量,并用遗传算法在给定预算下进行演化搜索,实现黑盒测试用例最小化。在16个Java项目、661个故障版本、25%–75%三种预算上评估:运行50%用例时,ATM平均故障检测率0.82,高于FAST-R的0.61和随机方法的0.52,平均每个项目版本耗时1.1–4.3小时,其他预算结果一致。

问题
大型测试套件包含冗余用例且执行代价高,而多数最小化方法依赖覆盖率、模型或需求等难以获取的信息,覆盖率分析还存在可扩展性问题。
方法
ATM将测试代码转换为抽象语法树,使用四种树相似度度量,并结合遗传算法在给定测试预算下进行演化搜索,以黑盒方式最小化测试用例集。
评估
在16个Java项目、661个故障版本上,以25%至75%三种预算评估故障检测率与耗时,并与FAST-R和随机最小化对比。
原文摘要(Abstract)

Executing large test suites is time and resource consuming, sometimes impossible, and such test suites typically contain many redundant test cases. Hence, test case (suite) minimization is used to remove redundant test cases that are unlikely to detect new faults. However, most test case minimization techniques rely on code coverage (white-box), model-based features, or requirements specifications, which are not always (entirely) accessible by test engineers. Code coverage analysis also leads to scalability issues, especially when applied to large industrial systems. Recently, a set of novel techniques was proposed, called FAST-R, relying solely on test case code for test case minimization, which appeared to be much more efficient than white-box techniques. However, it achieved a comparable low fault detection capability for Java projects, thus making its application challenging in practice. In this paper, we propose ATM (AST-based Test case Minimizer), a similarity-based, search-based test case minimization technique, taking a specific budget as input, that also relies exclusively on the source code of test cases but attempts to achieve higher fault detection through finer-grained similarity analysis and a dedicated search algorithm. ATM transforms test case code into Abstract Syntax Trees (AST) and relies on four tree-based similarity measures to apply evolutionary search, specifically genetic algorithms, to minimize test cases. We evaluated the effectiveness and efficiency of ATM on a large dataset of 16 Java projects with 661 faulty versions using three budgets ranging from 25% to 75% of test suites. ATM achieved significantly higher fault detection rates (0.82 on average), compared to FAST-R (0.61 on average) and random minimization (0.52 on average), when running only 50% of the test cases, within practically acceptable time (1.1 - 4.3 hours, on average, per project version), given that minimization is only occasionally applied when many new test cases are created (major releases). Results achieved for other budgets were consistent.

链接与引用

DOI 原文 · arXiv · PDF(开放获取) · DBLP

BibTeX
@inproceedings{abs-2210-16269,
  title = {ATM: Black-box Test Case Minimization based on Test Code Similarity and Evolutionary Search},
  author = {Rongqi Pan and Taher A. Ghaleb and Lionel Briand},
  booktitle = {ICSE},
  year = {2023},
  doi = {10.1109/icse48619.2023.00146}
}