arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2605.19265cs.SE
收藏

MuMuTestUp: 基于变异的多智能体测试用例更新

MuMuTestUp: Mutation-based Multi-Agent Test Case Update

Harbin Institute of Technology(哈尔滨工业大学);The Chinese University of Hong Kong(香港中文大学);Xidian University(西安电子科技大学);Singapore Management University(新加坡管理大学)

Dawei Tian, Jiakun Liu, Yun Peng, Yichen Zhang, Jianlei Chi, Jun Sun, Xiaohong Su

AI总结:

针对持续集成/持续交付实践中测试用例过时导致的问题,本文提出MuMuTestUp多智能体框架,通过变异分析、覆盖率分析和语义检索三个智能体提升测试用例的准确性与覆盖率,同时构建PRBENCH数据集进行评估。

摘要:

现代软件系统在CI/CD实践中迅速发展,测试对于质量至关重要。然而,大量代码变更常使现有测试用例过时,导致流水线中断、生产力下降和质量 compromised。最近的自动测试更新方法利用LLM通过执行反馈和精确匹配上下文检索来优化测试用例,但存在三个限制:(1)忽视测试断言充分性,削弱故障检测;(2)依赖粗粒度行覆盖率而非特定未覆盖行/分支;(3)使用精确匹配检索,无法处理LLM幻觉查询。为解决这些问题,我们提出MuMuTestUp,一个基于变异的多智能体框架,包含三个专门智能体:变异分析(通过存活突变体强化断言)、覆盖率分析(生成针对未覆盖行/分支的修复指令)和语义检索(通过语义相似性搜索处理幻觉)。我们还构建了PRBENCH,一个包含来自10个开源Java项目的571个拉取请求级数据集(已验证用于跨提交更新场景)。评估使用了最先进的基线模型,包括开源(Deepseek-V3.2)和闭源(GPT-4.1)LLM。

英文摘要:

Modern software systems evolve rapidly under CI/CD practices, where tests are critical for quality. However, substantial code changes often render existing test cases obsolete, causing pipeline disruptions, reduced productivity, and compromised quality. Recent automatic test update approaches leverage LLMs to refine test cases via execution feedback and exact-matching context retrieval, prioritizing executability and line coverage but suffering three limitations: (1) neglecting test assertion adequacy, weakening fault detection; (2) relying on coarse line coverage instead of specific uncovered lines/branches; (3) using exact-matching retrieval, which fails for LLM hallucinated queries. To address these, we propose MuMuTestUp, a mutation-guided multi-agent framework with three specialized agents: Mutation Analysis (strengthens assertions via surviving mutants), Coverage Analysis (generates targeted repair instructions for uncovered lines/branches), and Semantic Retrieval (handles hallucinations via semantic-similarity search). We also construct PRBENCH, a 571-sample pull-request-level dataset from 10 open-source Java projects (validated for cross-commit update scenarios). Evaluations against state-of-the-art baselines use both open-source (Deepseek-V3.2) and closed-source (GPT-4.1) LLMs.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑