mlsanityData to 7 Oct 2026

TestForge: Feedback-Driven, Agentic Test Suite Generation

arXiv 2503.14713 ↗First posted 18 Mar 2025cs.SEcited by 8

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

  1. 2024SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering6 May
  2. 2024Executable Code Actions Elicit Better LLM Agents1 Feb

Other references · 26

  1. 2024The Llama 3 Herd of Modelscited by 14,192
  2. 2021Evaluating Large Language Models Trained on Codecited by 8,053
  3. 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,193
  4. 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 876
  5. 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 732
  6. 2022InCoder: A Generative Model for Code Infilling and Synthesiscited by 492
  7. 2020CodeBLEU: a Method for Automatic Evaluation of Code Synthesiscited by 468
  8. 2022Efficient Training of Language Models to Fill in the Middlecited by 248
  9. 2023An Empirical Evaluation of Using Large Language Models for Automated Unit Test Generationcited by 193
  10. 2023CodeGen2: Lessons for Training LLMs on Programming and Natural Languagescited by 124
  11. 2020Unit Test Case Generation with Transformers and Focal Contextcited by 118
  12. 2024Beyond Functional Correctness: Exploring Hallucinations in LLM-Generated Codecited by 106
14 more
  1. 2023ChatUniTest: A Framework for LLM-Based Test Generationcited by 94
  2. 2021TOGA: A Neural Method for Test Oracle Generationcited by 57
  3. 2023Effective Test Generation Using Pre-trained Large Language Models and Mutation Testingcited by 51
  4. 2022Pynguin: Automated Unit Test Generation for Pythoncited by 49
  5. 2024TestGenEval: A Real World Unit Test Generation and Test Completion Benchmarkcited by 49
  6. 2024From Code to Correctness: Closing the Last Mile of Code Generation with Hierarchical Debuggingcited by 46
  7. 2020On Learning Meaningful Assert Statements for Unit Test Casescited by 42
  8. 2024HITS: High-coverage LLM-based Unit Test Generation via Method Slicingcited by 37
  9. 2016A Survey of Symbolic Execution Techniquescited by 36
  10. 2024CoverUp: Effective High Coverage Test Generation for Pythoncited by 36
  11. 2024On the Evaluation of Large Language Models in Unit Test Generationcited by 33
  12. 2023Learning Deep Semantics for Test Completioncited by 31
  13. 2024TOGLL: Correct and Strong Test Oracle Generation with LLMscited by 23
  14. 2020ReAssert: Deep Learning for Assert Generationcited by 6

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2025: 1; 2026: 7.

8 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2026Complex Agents, Shallow Tests: Demystifying and Enhancing Test Adequacy of Agent Harness in the Wild
  2. 2026SWE-Mutation: Can LLMs Generate Reliable Test Suites in Software Engineering?
  3. 2025TENET: One Step Toward Test-Driven Development for Repository-Level Code Generation
  4. 2026Agent-Based Test Assertion Generation via Diverse Perspective Aggregation
  5. 2024SWT-Bench: Testing and Validating Real-World Bug-Fixes with Code Agents
  6. 2025AugmenTest: Enhancing Tests with LLM-Driven Oracles
  7. 2026Consistency Meets Verification: Enhancing Test Generation Quality in Large Language Models Without Ground-Truth Solutions
  8. 2026Automated structural testing of LLM-based agents: methods, framework, and case studies