Multi-Agent LLM Collaboration for Unit Test Generation via Human-Testing-Inspired Workflows
On the map: LLM agents and tool use → Software engineering coding agents
Abstract (arXiv)
Recently, the emergence of Large Language Models (LLMs) has spurred a surge of research into automated unit test generation, yielding impressive performance and reducing manual effort. However, existing LLM-based approaches still suffer from two major limitations: (1) they follow rigid, procedural workflows that underutilize the autonomous reasoning potential of LLMs, making it difficult to dynamically adapt testing strategies based on real-time feedback; and (2) they rely on rule-based context extraction that is not tailored to test generation, failing to capture fine-grained code dependencies and test-specific knowledge required for deriving test requirements. In this paper, we propose TestAgent, an LLM-based test generation approach that addresses the above limitations by emulating human testing practices via a multi-agent collaboration mechanism. Particularly, TestAgent designs three specialized agents, namely a requirement planner, a test generator, and a test reviewer, to simulate how developers understand, construct, and validate unit tests. To unleash the autonomous capabilities of LLMs, we equip TestAgent with a set of tool APIs that can be invoked dynamically in an on-demand and adaptive manner. To further support repository-level reasoning, TestAgent constructs a test-specialized knowledge graph via static analysis, which captures code entities and their dependencies across the project and persistently stores testing artifacts (e.g., test reports and failure analyses) produced during generation. Experimental results show that TestAgent achieves 97.46% execution rate, 92.34% line coverage, 90.24% branch coverage, and 83.69% mutation score on six Java projects, outperforming LLM-based baselines across all metrics and achieving substantially higher mutation scores than search-based tools.
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Placed in Software engineering coding agents, one of 16 directions in LLM agents and tool use. Builds on 30 of its 52 references that are in the map. First posted on arXiv 10 Jul 2026.
Builds on
30 of 52 references.
Closest ancestors · 6
Same direction, newest first
- 2024MASAI: Modular Architecture for Software-engineering AI Agents17 Jun
- 2024SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering6 May
- 2024RepairAgent: An Autonomous, LLM-Based Agent for Program Repair25 Mar
- 2024Executable Code Actions Elicit Better LLM Agents1 Feb
- 2024CodeAgent: Enhancing Code Generation with Tool-Integrated Agent Systems for Real-World Repo-level Coding Challenges14 Jan
- 2023RCAgent: Cloud Root Cause Analysis by Autonomous Agents with Tool-Augmented Large Language Models25 Oct
Other references · 24
- 2025Qwen3 Technical Reportcited by 8,195
- 2024GPT-4o System Cardcited by 4,467
- 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,193
- 2023Sparks of Artificial General Intelligence: Early experiments with GPT-4cited by 2,579
- 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 890
- 2023StarCoder: may the source be with you!cited by 790
- 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 600
- 2024AutoCodeRover: Autonomous Program Improvementcited by 272
- 2023Magicoder: Empowering Code Generation with OSS-Instructcited by 251
- 2020Unit Test Case Generation with Transformers and Focal Contextcited by 118
- 2023ChatUniTest: A Framework for LLM-Based Test Generationcited by 94
- 2024RepoGraph: Enhancing AI Software Engineering with Repository-level Code Graphcited by 88
12 more
- 2023Automatic Semantic Augmentation of Language Model Prompts (for Code Summarization)cited by 72
- 2024Code-Aware Prompting: A study of Coverage Guided Test Generation in Regression Setting using LLMcited by 63
- 2023A Survey on Large Language Models for Software Engineeringcited by 58
- 2024AgileCoder: Dynamic Collaborative Agents for Software Development based on Agile Methodologycited by 45
- 2024A Systematic Literature Review on Large Language Models for Automated Program Repaircited by 37
- 2024HITS: High-coverage LLM-based Unit Test Generation via Method Slicingcited by 37
- 2023A3Test: Assertion-Augmented Automated Test Case Generationcited by 33
- 2023GAMMA: Revisiting Template-based Automated Program Repair via Mask Predictioncited by 22
- 2024TestART: Improving LLM-based Unit Testing via Co-evolution of Automated Generation and Repair Iterationcited by 20
- 2022Methods2Test: A dataset of focal methods mapped to test casescited by 10
- 2023A Prompt Learning Framework for Source Code Summarizationcited by 9
- 2024CasModaTest: A Cascaded and Model-agnostic Self-directed Framework for Unit Test Generationcited by 4
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2023Towards Autonomous Testing Agents via Conversational Large Language Models
- 2024The Potential of LLMs in Automating Software Testing: From Generation to Reporting
- 2026Tangent: An Empirical Study of Testing Practices for LLM-Based Agent Applications
- 2025Challenges in Testing Large Language Model Based Software: A Faceted Taxonomy
- 2026LLM-Based Multi-Agent Systems for Code Generation: A Multi-Vocal Literature Review
- 2026Developing LLM-based Multi-Agent Systems in Software Engineering: A Mixed-Method Experience Report
- 2025A Survey on Code Generation with LLM-based Agents
- 2025Hallucination to Consensus: Multi-Agent LLMs for End-to-End JUnit Test Generation