paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Comprehend, Imitate, and then Update: Unleashing the Power of LLMs in Test Suite Evolution

理解、模仿、再更新:释放 LLM 在测试套件演化中的能力
ASE 2025 40th IEEE/ACM International Conference on Automated Software Engineering (ASE)2025匹配度 2/10 · 论文聚焦用 LLM 自动更新过时测试代码,属于测试维护与自动修复,而非用户核心关注的静态分析、形式化验证或浮点/贝叶斯程序分析。虽然同属 LLM+PL 交叉,但任务目标与用户研究画像中的核心方向不匹配。引用 0 inbox
Tangzhi Xu, Jianhan Liu, Yuan Yao, Cong Li, Feng Xu, Xiaoxing Ma
crossref: 2026-09-12

AI 速览

一句话:提出 COMMITUP,用 LLM 以“理解变更—检索相似示例模仿—执行更新”三步自动更新方法级过时测试代码。

软件测试保障了持续演化系统的可靠性,但现代快速迭代开发中测试套件常滞后于生产代码,产生大量过时测试。已有工作借助大语言模型自动更新过时测试代码并取得领先效果。本文提出 COMMITUP,一种模拟人类修复思路的方法级过时测试代码自动更新技术:首先理解生产代码的修改(comprehend),然后检索相似历史/示例进行模仿(imitate),最后执行测试代码更新(update)。作者在从真实 Java 项目整理的数据集上评估 COMMITUP,生成的更新分别达到 96.4%、94.4% 和 93.1% 的可编译、无运行时失败与全覆盖成功率,展示了优于基线的性能,为基于 LLM 的测试代码更新提供了新思路。数据集与代码已开源。

问题
在强调快速迭代的现代开发周期中,测试套件与生产代码的协同演化往往滞后,导致过时测试增多,而自动更新方法级过时测试代码仍具挑战。
方法
COMMITUP 模仿人类修复流程,借助 LLM 分三步进行:先理解代码修改,再检索相似示例予以模仿,最后执行测试代码更新。
评估
在从真实 Java 项目整理的数据集上进行评估,统计生成更新在可编译、无运行时失败和全覆盖三个指标上的成功率,分别为 96.4%、94.4% 和 93.1%。
原文摘要(Abstract)

Software testing plays a crucial role in software engineering, ensuring the reliability and correctness of evolving systems. Well-maintained test suites are essential for ensuring software quality. However, in modern development cycles that emphasize rapid feature iteration, the co-evolution of test suites often lags behind, leading to more appearance of obsolete tests. To this end, automated approaches for updating obsolete test code have been proposed, and recent approaches have achieved the state-of-the-art performance with the support of large language models (LLMs). This paper presents COMMITUP, a new approach that leverages LLMs to effectively automate method-level obsolete test code updates. COMMITUP mimics how humans solve the problem, first comprehending the code modifications, searching for similar examples to imitate, and finally performing the update. We evaluate COMMITUP on a curated dataset from real-world Java projects. The results demonstrate the superior performance of COMMITUP, achieving 96.4%, 94.4%, 93.1% success rates for generating compilable, runtime failure-free, and full coverage updates, respectively. We believe our study can provide new insight into LLM-based test code update. The dataset and code are available at https://github.com/SoftWiser-group/CommitUp.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot9360,
  title = {Comprehend, Imitate, and then Update: Unleashing the Power of LLMs in Test Suite Evolution},
  author = {Tangzhi Xu and Jianhan Liu and Yuan Yao and Cong Li and Feng Xu and Xiaoxing Ma},
  booktitle = {ASE},
  year = {2025},
  doi = {10.1109/ase63991.2025.00046}
}