ACM Transactions on Software Engineering and Methodology· 2026Q1
TestART: Improving LLM-based Unit Test ing via Co-evolution of A utomated Generation and R epair I t eration
- 1citations
- Q1SCImago
- 2026year
Short summary
TestART, a novel method, improves LLM-based unit testing by co-evolving automated generation and repair, achieving an 18% higher pass rate and 20% better coverage than baselines.
AI-generated from the title and abstract; the full text is not read.
Key points
- TestART co-evolves LLM test generation and repair to overcome limitations like compilation errors and lack of coverage feedback.
- It employs a template-based repair strategy to fix LLM-generated test cases.
- Coverage information from successful tests is used as guided feedback for generation.
- Positive prompt injection prevents repetitive suppression, enhancing test case sufficiency.
- TestART shows an 18% improvement in pass rate and 20% enhancement in coverage over baselines.
AI-generated from the title and abstract; the full text is not read.
Abstract
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; and (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. Through comparative experiments, TestART demonstrates an 18% improvement in pass rate and a 20% enhancement in coverage across three types of datasets compared to baselines. 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.
The authors' abstract, as published at the source. ACM Transactions on Software Engineering and Methodology, 2026 · DOI ↗
Continue with a free account
Ask the paper: 3 free questions a day about this paper; save it, get its citation, new summaries every day for your field. Takeaways are Premium.
Continue free on the webSign in with Google or Apple; no card needed. You come back to this paper.
On your phone:
Field: Software
SoftwareComputer Science