TestART: Improving LLM-based Unit Testing via Co-evolution of Automated Generation and Repair Iteration
Not on the map. Why?
Abstract (arXiv)
Unit testing is crucial for detecting bugs in individual program units but consumes time and effort. Recently, large language models (LLMs) have demonstrated remarkable capabilities in generating unit test cases. However, several problems limit their ability to generate high-quality unit test cases: (1) compilation and runtime errors caused by the hallucination of LLMs; (2) lack of testing and coverage feedback information restricting the increase of code coverage;(3) the repetitive suppression problem causing invalid LLM-based repair and generation attempts. To address these limitations, we propose TestART, a novel unit test generation method. TestART improves LLM-based unit testing via co-evolution of automated generation and repair iteration, representing a significant advancement in automated unit test generation. TestART leverages the template-based repair strategy to effectively fix bugs in LLM-generated test cases for the first time. Meanwhile, TestART extracts coverage information from successful test cases and uses it as coverage-guided testing feedback. It also incorporates positive prompt injection to prevent repetition suppression, thereby enhancing the sufficiency of the final test case. This synergy between generation and repair elevates the correctness and sufficiency of the produced test cases significantly beyond previous methods. In comparative experiments, TestART demonstrates an 18% improvement in pass rate and a 20% enhancement in coverage across three types of datasets compared to baseline models. Additionally, it achieves better coverage rates than EvoSuite with only half the number of test cases. These results demonstrate TestART's superior ability to produce high-quality unit test cases by harnessing the power of LLMs while overcoming their inherent flaws.
Key facts. Cited by 20 papers in the map (data through 7 Oct 2026). First posted on arXiv 6 Aug 2024.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2024: 2; 2025: 11; 2026: 7.
20 papers.
Sort:
By area:
- 2025Co-Evolving LLM Coder and Unit Tester via Reinforcement Learningcited by 51
- 2026Code as Agent Harnesscited by 40
- 2025CoCoEvo: Co-Evolution of Programs and Test Cases to Enhance Code Generationcited by 14
- 2025From Code Foundation Models to Agents and Applications: A Comprehensive Survey and Practical Guide to Code Intelligencecited by 13
- 2025A Contemporary Survey of Large Language Model Assisted Program Analysiscited by 10
- 2024Multi-Programming Language Sandbox for LLMscited by 9
- 2025Hallucination to Consensus: Multi-Agent LLMs for End-to-End JUnit Test Generationcited by 8
- 2025Benchmarking LLMs for Unit Test Generation from Real-World Functionscited by 8
- 2024RIRO: Reshaping Inputs, Refining Outputs Unlocking the Potential of Large Language Models in Data-Scarce Contextscited by 6
- 2025Improving Deep Assertion Generation via Fine-Tuning Retrieval-Augmented Pre-trained Language Modelscited by 4
- 2025Nexus: Execution-Grounded Multi-Agent Test Oracle Synthesiscited by 4
- 2025Improving Retrieval-Augmented Deep Assertion Generation via Joint Trainingcited by 2
8 more
- 2025EvoGPT: Leveraging LLM-Driven Seed Diversity to Improve Search-Based Test Suite Generationcited by 2
- 2026ReProAgent: Tool-Augmented Multi-Stage Agentic Generation of Bug Reproduction Tests from Issue Reportscited by 1
- 2025DUET: Agentic Design Understanding via Experimentation and Testingcited by 0
- 2026TAM-Eval: Evaluating LLMs for Automated Unit Test Maintenancecited by 0
- 2026ATTest: Agent-Driven Tensor Testing for Deep Learning Library Modulescited by 0
- 2026SPARC: Scenario Planning and Reasoning for Automated C Unit Test Generationcited by 0
- 2026Mining Workflow Graphs for Black-Box Boundary Testing of Conversational LLM Agentscited by 0
- 2026Multi-Agent LLM Collaboration for Unit Test Generation via Human-Testing-Inspired Workflowscited by 0
- 2026ReProAgent: Tool-Augmented Multi-Stage Agentic Generation of Bug Reproduction Tests from Issue Reports10 Jul 2026
- 2026Multi-Agent LLM Collaboration for Unit Test Generation via Human-Testing-Inspired Workflows10 Jul 2026
- 2026Mining Workflow Graphs for Black-Box Boundary Testing of Conversational LLM Agents8 Jul 2026
- 2026Code as Agent Harness18 May 2026
- 2026SPARC: Scenario Planning and Reasoning for Automated C Unit Test Generation18 Feb 2026
- 2026ATTest: Agent-Driven Tensor Testing for Deep Learning Library Modules15 Feb 2026
- 2026TAM-Eval: Evaluating LLMs for Automated Unit Test Maintenance26 Jan 2026
- 2025DUET: Agentic Design Understanding via Experimentation and Testing6 Dec 2025
- 2025From Code Foundation Models to Agents and Applications: A Comprehensive Survey and Practical Guide to Code Intelligence23 Nov 2025
- 2025Nexus: Execution-Grounded Multi-Agent Test Oracle Synthesis30 Oct 2025
- 2025Benchmarking LLMs for Unit Test Generation from Real-World Functions1 Aug 2025
- 2025Co-Evolving LLM Coder and Unit Tester via Reinforcement Learning3 Jun 2025
8 more
- 2025Hallucination to Consensus: Multi-Agent LLMs for End-to-End JUnit Test Generation3 Jun 2025
- 2025EvoGPT: Leveraging LLM-Driven Seed Diversity to Improve Search-Based Test Suite Generation18 May 2025
- 2025Improving Deep Assertion Generation via Fine-Tuning Retrieval-Augmented Pre-trained Language Models22 Feb 2025
- 2025CoCoEvo: Co-Evolution of Programs and Test Cases to Enhance Code Generation15 Feb 2025
- 2025Improving Retrieval-Augmented Deep Assertion Generation via Joint Training15 Feb 2025
- 2025A Contemporary Survey of Large Language Model Assisted Program Analysis5 Feb 2025
- 2024RIRO: Reshaping Inputs, Refining Outputs Unlocking the Potential of Large Language Models in Data-Scarce Contexts15 Dec 2024
- 2024Multi-Programming Language Sandbox for LLMs30 Oct 2024
- 2026Code as Agent Harnesscited by 40
- 2025From Code Foundation Models to Agents and Applications: A Comprehensive Survey and Practical Guide to Code Intelligencecited by 13
- 2025Hallucination to Consensus: Multi-Agent LLMs for End-to-End JUnit Test Generationcited by 8
- 2025Nexus: Execution-Grounded Multi-Agent Test Oracle Synthesiscited by 4
- 2026ReProAgent: Tool-Augmented Multi-Stage Agentic Generation of Bug Reproduction Tests from Issue Reportscited by 1
- 2025DUET: Agentic Design Understanding via Experimentation and Testingcited by 0
- 2026ATTest: Agent-Driven Tensor Testing for Deep Learning Library Modulescited by 0
- 2026Mining Workflow Graphs for Black-Box Boundary Testing of Conversational LLM Agentscited by 0
- 2026Multi-Agent LLM Collaboration for Unit Test Generation via Human-Testing-Inspired Workflowscited by 0
- 2026ReProAgent: Tool-Augmented Multi-Stage Agentic Generation of Bug Reproduction Tests from Issue Reports10 Jul 2026
- 2026Multi-Agent LLM Collaboration for Unit Test Generation via Human-Testing-Inspired Workflows10 Jul 2026
- 2026Mining Workflow Graphs for Black-Box Boundary Testing of Conversational LLM Agents8 Jul 2026
- 2026Code as Agent Harness18 May 2026
- 2026ATTest: Agent-Driven Tensor Testing for Deep Learning Library Modules15 Feb 2026
- 2025DUET: Agentic Design Understanding via Experimentation and Testing6 Dec 2025
- 2025From Code Foundation Models to Agents and Applications: A Comprehensive Survey and Practical Guide to Code Intelligence23 Nov 2025
- 2025Nexus: Execution-Grounded Multi-Agent Test Oracle Synthesis30 Oct 2025
- 2025Hallucination to Consensus: Multi-Agent LLMs for End-to-End JUnit Test Generation3 Jun 2025
- 2025Co-Evolving LLM Coder and Unit Tester via Reinforcement Learningcited by 51
- 2025CoCoEvo: Co-Evolution of Programs and Test Cases to Enhance Code Generationcited by 14
- 2025A Contemporary Survey of Large Language Model Assisted Program Analysiscited by 10
- 2024Multi-Programming Language Sandbox for LLMscited by 9
- 2025Benchmarking LLMs for Unit Test Generation from Real-World Functionscited by 8
- 2024RIRO: Reshaping Inputs, Refining Outputs Unlocking the Potential of Large Language Models in Data-Scarce Contextscited by 6
- 2025EvoGPT: Leveraging LLM-Driven Seed Diversity to Improve Search-Based Test Suite Generationcited by 2
- 2026TAM-Eval: Evaluating LLMs for Automated Unit Test Maintenancecited by 0
- 2026TAM-Eval: Evaluating LLMs for Automated Unit Test Maintenance26 Jan 2026
- 2025Benchmarking LLMs for Unit Test Generation from Real-World Functions1 Aug 2025
- 2025Co-Evolving LLM Coder and Unit Tester via Reinforcement Learning3 Jun 2025
- 2025EvoGPT: Leveraging LLM-Driven Seed Diversity to Improve Search-Based Test Suite Generation18 May 2025
- 2025CoCoEvo: Co-Evolution of Programs and Test Cases to Enhance Code Generation15 Feb 2025
- 2025A Contemporary Survey of Large Language Model Assisted Program Analysis5 Feb 2025
- 2024RIRO: Reshaping Inputs, Refining Outputs Unlocking the Potential of Large Language Models in Data-Scarce Contexts15 Dec 2024
- 2024Multi-Programming Language Sandbox for LLMs30 Oct 2024