Large Language Models for Unit Testing: A Systematic Literature Review
Quanjun Zhang, Chunrong Fang, Siqi Gu, Ye Shang, Zhenyu Chen, Liang Xiao

TL;DR
This systematic literature review explores how Large Language Models are transforming unit testing in software engineering by categorizing tasks, discussing integration strategies, and highlighting future research directions.
Contribution
It provides the first comprehensive overview of LLM applications in unit testing, categorizing tasks, analyzing integration methods, and identifying open challenges and future opportunities.
Findings
LLMs significantly improve test generation and oracle creation.
Various strategies for adapting LLMs to unit testing are discussed.
Key challenges include model reliability and integration complexity.
Abstract
Unit testing is a fundamental practice in modern software engineering, with the aim of ensuring the correctness, maintainability, and reliability of individual software components. Very recently, with the advances in Large Language Models (LLMs), a rapidly growing body of research has leveraged LLMs to automate various unit testing tasks, demonstrating remarkable performance and significantly reducing manual effort. However, due to ongoing explorations in the LLM-based unit testing field, it is challenging for researchers to understand existing achievements, open challenges, and future opportunities. This paper presents the first systematic literature review on the application of LLMs in unit testing until March 2025. We analyze \numpaper{} relevant papers from the perspectives of both unit testing and LLMs. We first categorize existing unit testing tasks that benefit from LLMs, e.g.,…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsTopic Modeling · Natural Language Processing Techniques
