TestForge: Feedback-Driven, Agentic Test Suite Generation
On the map: LLM agents and tool use → Software engineering coding agents
Abstract (arXiv)
Automated test generation holds great promise for alleviating the burdens of manual test creation. However, existing search-based techniques compromise on test readability, while LLM-based approaches are prohibitively expensive in practice. We present TestForge, an agentic unit testing framework designed to cost-effectively generate high-quality test suites for real-world code. Our key insight is to reframe LLM-based test generation as an iterative process. TestForge thus begins with tests generated via zero-shot prompting, and then continuously refines those tests based on feedback from test executions and coverage reports. We evaluate TestForge on TestGenEval, a real world unit test generation benchmark sourced from 11 large scale open source repositories; we show that TestForge achieves a pass@1 rate of 84.3%, 44.4% line coverage and 33.8% mutation score on average, outperforming prior classical approaches and a one-iteration LLM-based baseline. TestForge produces more natural and understandable tests compared to state-of-the-art search-based techniques, and offers substantial cost savings over LLM-based techniques (at 0.63 per file). Finally, we release a version of TestGenEval integrated with the OpenHands platform, a popular open-source framework featuring a diverse set of software engineering agents and agentic benchmarks, for future extension and development.
Key facts. Cited by 8 papers in the map (data through 7 Oct 2026). Placed in Software engineering coding agents, one of 16 directions in LLM agents and tool use. Builds on 28 of its 54 references that are in the map. First posted on arXiv 18 Mar 2025.
Builds on
28 of 54 references.
Closest ancestors · 2
Same direction, newest first
- 2024SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering6 May
- 2024Executable Code Actions Elicit Better LLM Agents1 Feb
Other references · 26
- 2024The Llama 3 Herd of Modelscited by 14,192
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,193
- 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 876
- 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 732
- 2022InCoder: A Generative Model for Code Infilling and Synthesiscited by 492
- 2020CodeBLEU: a Method for Automatic Evaluation of Code Synthesiscited by 468
- 2022Efficient Training of Language Models to Fill in the Middlecited by 248
- 2023An Empirical Evaluation of Using Large Language Models for Automated Unit Test Generationcited by 193
- 2023CodeGen2: Lessons for Training LLMs on Programming and Natural Languagescited by 124
- 2020Unit Test Case Generation with Transformers and Focal Contextcited by 118
- 2024Beyond Functional Correctness: Exploring Hallucinations in LLM-Generated Codecited by 106
14 more
- 2023ChatUniTest: A Framework for LLM-Based Test Generationcited by 94
- 2021TOGA: A Neural Method for Test Oracle Generationcited by 57
- 2023Effective Test Generation Using Pre-trained Large Language Models and Mutation Testingcited by 51
- 2022Pynguin: Automated Unit Test Generation for Pythoncited by 49
- 2024TestGenEval: A Real World Unit Test Generation and Test Completion Benchmarkcited by 49
- 2024From Code to Correctness: Closing the Last Mile of Code Generation with Hierarchical Debuggingcited by 46
- 2020On Learning Meaningful Assert Statements for Unit Test Casescited by 42
- 2024HITS: High-coverage LLM-based Unit Test Generation via Method Slicingcited by 37
- 2016A Survey of Symbolic Execution Techniquescited by 36
- 2024CoverUp: Effective High Coverage Test Generation for Pythoncited by 36
- 2024On the Evaluation of Large Language Models in Unit Test Generationcited by 33
- 2023Learning Deep Semantics for Test Completioncited by 31
- 2024TOGLL: Correct and Strong Test Oracle Generation with LLMscited by 23
- 2020ReAssert: Deep Learning for Assert Generationcited by 6
Built on by
Citing papers per year: 2025: 1; 2026: 7.
8 papers.
- 2025Hallucination to Consensus: Multi-Agent LLMs for End-to-End JUnit Test Generationcited by 8
- 2026Test vs Mutant: Adversarial LLM Agents for Robust Unit Test Generationcited by 6
- 2026Execution-State-Aware LLM Reasoning for Automated Proof-of-Vulnerability Generationcited by 3
- 2026Planning to Explore: Curiosity-Driven Planning for LLM Test Generationcited by 1
- 2026SWE-Spot: Building Small Repo-Experts with Repository-Centric Learningcited by 0
- 2026Evaluating and Mitigating the Misguidance Effect of Buggy Code in LLM-Generated Unit Testscited by 0
- 2026Grounding AI Agents in Contracts: An Empirical Evaluation of Spec-Driven Test Generationcited by 0
- 2026VibeCheck: Assessing the Quality of LLM-Generated Unit Tests: A Multi-agent Empirical Study across Heterogeneous Repositoriescited by 0
- 2026VibeCheck: Assessing the Quality of LLM-Generated Unit Tests: A Multi-agent Empirical Study across Heterogeneous Repositories5 Sep 2026
- 2026Grounding AI Agents in Contracts: An Empirical Evaluation of Spec-Driven Test Generation17 Aug 2026
- 2026Evaluating and Mitigating the Misguidance Effect of Buggy Code in LLM-Generated Unit Tests24 Jul 2026
- 2026Planning to Explore: Curiosity-Driven Planning for LLM Test Generation6 Apr 2026
- 2026Execution-State-Aware LLM Reasoning for Automated Proof-of-Vulnerability Generation14 Feb 2026
- 2026Test vs Mutant: Adversarial LLM Agents for Robust Unit Test Generation8 Feb 2026
- 2026SWE-Spot: Building Small Repo-Experts with Repository-Centric Learning29 Jan 2026
- 2025Hallucination to Consensus: Multi-Agent LLMs for End-to-End JUnit Test Generation3 Jun 2025
Similar, not cited
Close in wording, no citation either way
- 2026Complex Agents, Shallow Tests: Demystifying and Enhancing Test Adequacy of Agent Harness in the Wild
- 2026SWE-Mutation: Can LLMs Generate Reliable Test Suites in Software Engineering?
- 2025TENET: One Step Toward Test-Driven Development for Repository-Level Code Generation
- 2026Agent-Based Test Assertion Generation via Diverse Perspective Aggregation
- 2024SWT-Bench: Testing and Validating Real-World Bug-Fixes with Code Agents
- 2025AugmenTest: Enhancing Tests with LLM-Driven Oracles
- 2026Consistency Meets Verification: Enhancing Test Generation Quality in Large Language Models Without Ground-Truth Solutions
- 2026Automated structural testing of LLM-based agents: methods, framework, and case studies