MuMuTestUp: Mutation-Based Multi-agent Test Case Update
Dawei Tian, Jiakun Liu, Yun Peng, Yichen Zhang, Jianlei Chi, Jun Sun, Xiaohong Su
摘要
Modern software systems evolve rapidly under continuous integration and deployment (CI/CD) practices, in which tests act as critical gatekeepers of software quality. However, when substantial code changes are introduced, existing test cases may become obsolete, leading to compilation failures, erroneous test behaviors, or inadequate regression coverage. Such issues can disrupt CI/CD pipelines, degrade development productivity, and ultimately undermine overall software quality. Many efforts are devoted to designing automatic test case update methods to address these issues. The most recent approaches rely on large language models (LLMs) to iteratively refine test cases using execution feedback from compilation errors or coverage reports, and on context retrieved via exact-matching approaches. They also prioritize test executability and line coverage to quickly build executable, correct test cases from the original broken test cases. Despite their correctness, current approaches face three limitations: (1) they focus on executabilty but overlook the adequacy of test assertions, which lowers the capability of test cases to detect faults; (2) they utilize only coarse line coverage singals instead of specific information about uncovered lines and branches; (3) they use exact-matching context retrieval approaches, which fails to provide accurate context given potential hallucinated queries from LLMs.
To address these challenges, we propose MuMuTestUp, a Mutation-guided, Multi-agent framework for automated test case updating. MuMuTestUp integrates three specialized agents: (1) a Mutation Analysis agent that leverages surviving mutants as indicators of weak or missing test assertions and generates individual repair instructions to strengthen or synthesize assertions for each surviving mutant, (2) a Coverage Analysis agent generates individual repair instructions for each uncovered line, uncovered branch rather than exposing raw coverage signals to the LLM, and (3) a Semantic Retrieval agent that uses semantic-similarity search to handle unavailable or hallucinated symbols. Additionally, we construct Prbench, a pull-request-level dataset of 571 samples from 10 open-source Java projects that considered cross-commit update scenarios, validated through three rounds of execution following prior studies to detect outdated tests. We evaluate MuMuTestUp against state-of-the-art baselines using both open-source and closed-source LLMs (Deepseek-V3.2 and GPT-4.1). With GPT-4.1, MuMuTestUp achieves a line coverage of 88.94%, branch coverage of 63.36%, and mutation score of 72.39%, outperforming the best baseline by 5.33%, 19.93%, and 16.66%, respectively.
问问这篇 Paper
智能体会读完全文。
Lune 把这篇 Paper 索引到了最后一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。
它引用的顶会 Paper7
- SWE-agent: Agent-Computer Interfaces Enable Automated Software EngineeringJohn Yang, Carlos E. Jimenez, Alexander Wettig, Kilian Lieret 等NeurIPS 2024 · 被引用 2,059 次
- Same Task, More Tokens: the Impact of Input Length on the Reasoning Performance of Large Language ModelsMosh Levy, Alon Jacoby, Yoav GoldbergACL 2024 · 被引用 77 次
- HITS: High-coverage LLM-based Unit Test Generation via Method SlicingZejun Wang, Kaibo Liu, Ge Li, Zhi JinASE 2024 · 被引用 29 次
- Identify and Update Test Cases When Production Code Changes: A Transformer-Based ApproachXing Hu, Zhuang Liu, Xin Xia, Zhongxin Liu 等ASE 2023 · 被引用 15 次
- Unit Test Update through LLM-Driven Context Collection and Error-Type-Aware RefinementYuanhe Zhang, Zhiquan Yang, Shengyi Pan, Zhongxin LiuASE 2025 · 被引用 3 次
相关 Paper
- Comprehend, Imitate, and then Update: Unleashing the Power of LLMs in Test Suite EvolutionTangzhi Xu, Jianhan Liu, Yuan Yao, Cong Li 等ASE 2025 · 被引用 1 次
- Beyond Coverage: Automatic Test Suite Augmentation for Enhanced Effectiveness using Large Language ModelsZeyu Lu, Peng Zhang, Yuge Nie, Yibiao Yang 等OOPSLA 2026 · 被引用 1 次
- CoverUp: Effective High Coverage Test Generation for PythonJuan Altmayer Pizzorno, Emery D. BergerFSE 2025 · 被引用 13 次
- REACCEPT: Automated Co-evolution of Production and Test Code Based on Dynamic Validation and Large Language ModelsJianlei Chi, Xiaotian Wang, Yuhan Huang, Lechen Yu 等ISSTA 2025 · 被引用 2 次
- Test vs Mutant: Adversarial LLM Agents for Robust Unit Test GenerationPengyu Chang, Yixiong Fang, Silin Chen, Yuling Shi 等ISSTA 2026
