Large Language Models for Unit Testing: A Systematic Literature Review

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Zhang, Quanjun, Fang, Chunrong, Gu, Siqi, Shang, Ye, Chen, Zhenyu, Xiao, Liang
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866918062812299264
author Zhang, Quanjun
Fang, Chunrong
Gu, Siqi
Shang, Ye
Chen, Zhenyu
Xiao, Liang
author_facet Zhang, Quanjun
Fang, Chunrong
Gu, Siqi
Shang, Ye
Chen, Zhenyu
Xiao, Liang
contents 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., test generation and oracle generation. We then discuss several critical aspects of integrating LLMs into unit testing research, including model usage, adaptation strategies, and hybrid approaches. We further summarize key challenges that remain unresolved and outline promising directions to guide future research in this area. Overall, our paper provides a systematic overview of the research landscape to the unit testing community, helping researchers gain a comprehensive understanding of achievements and promote future research. Our artifacts are publicly available at the GitHub repository: https://github.com/iSEngLab/AwesomeLLM4UT.
format Preprint
id arxiv_https___arxiv_org_abs_2506_15227
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Large Language Models for Unit Testing: A Systematic Literature Review
Zhang, Quanjun
Fang, Chunrong
Gu, Siqi
Shang, Ye
Chen, Zhenyu
Xiao, Liang
Software Engineering
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., test generation and oracle generation. We then discuss several critical aspects of integrating LLMs into unit testing research, including model usage, adaptation strategies, and hybrid approaches. We further summarize key challenges that remain unresolved and outline promising directions to guide future research in this area. Overall, our paper provides a systematic overview of the research landscape to the unit testing community, helping researchers gain a comprehensive understanding of achievements and promote future research. Our artifacts are publicly available at the GitHub repository: https://github.com/iSEngLab/AwesomeLLM4UT.
title Large Language Models for Unit Testing: A Systematic Literature Review
topic Software Engineering
url https://arxiv.org/abs/2506.15227