论文精选

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

MuMuTestUp: Mutation-based Multi-Agent Test Case Update

精选理由

测试维护是 CI/CD 的痛点,MuMuTestUp 用变异测试和多智能体协作解决了断言弱和覆盖不全的问题,做自动化测试或持续集成的团队值得关注。

AI 摘要

MuMuTestUp 是一个基于变异测试的多智能体框架,用于自动更新因代码变更而过时的测试用例。它通过三个专门智能体(变异分析、覆盖分析、语义检索)分别强化断言、定位未覆盖行/分支、处理幻觉问题,解决了现有方法忽略断言充分性、依赖粗粒度行覆盖、无法处理 LLM 幻觉查询的三大局限。研究还构建了包含 571 个样本的 PRBENCH 数据集,在开源和闭源 LLM 上均优于现有基线。该工作对持续集成/持续部署(CI/CD)环境下的测试维护有重要价值。

原文 · arXiv: DeepSeek

MuMuTestUp: Mutation-based Multi-Agent Test Case Update

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.