Skip to main content
QUICK REVIEW

[Paper Review] Software Testing with Large Language Models: Survey, Landscape, and Vision

Junjie Wang, Yuchao Huang|arXiv (Cornell University)|Jul 14, 2023
Software Testing and Debugging TechniquesComputer Science27 citations
TL;DR

A comprehensive survey analyzing 102 studies on using large language models (LLMs) for software testing, detailing tasks, LLM usage, prompts, challenges, and future directions.

ABSTRACT

Pre-trained large language models (LLMs) have recently emerged as a breakthrough technology in natural language processing and artificial intelligence, with the ability to handle large-scale datasets and exhibit remarkable performance across a wide range of tasks. Meanwhile, software testing is a crucial undertaking that serves as a cornerstone for ensuring the quality and reliability of software products. As the scope and complexity of software systems continue to grow, the need for more effective software testing techniques becomes increasingly urgent, making it an area ripe for innovative approaches such as the use of LLMs. This paper provides a comprehensive review of the utilization of LLMs in software testing. It analyzes 102 relevant studies that have used LLMs for software testing, from both the software testing and LLMs perspectives. The paper presents a detailed discussion of the software testing tasks for which LLMs are commonly used, among which test case preparation and program repair are the most representative. It also analyzes the commonly used LLMs, the types of prompt engineering that are employed, as well as the accompanied techniques with these LLMs. It also summarizes the key challenges and potential opportunities in this direction. This work can serve as a roadmap for future research in this area, highlighting potential avenues for exploration, and identifying gaps in our current understanding of the use of LLMs in software testing.

Motivation & Objective

  • Map the landscape of LLM applications in software testing across the testing lifecycle.
  • Characterize the software testing tasks most commonly addressed by LLMs (e.g., test case preparation, debugging, bug repair).
  • Analyze the LLM technologies, prompting strategies, and accompanying techniques used in these studies.
  • Identify key challenges and opportunities to guide future research and practice.

Proposed method

  • Automatic and manual literature search across ACM/IEEE/arXiv/DBLP and top SE/AI venues from 2019–2023, extended to Oct 2023.
  • Inclusion/exclusion criteria to filter papers specifically applying LLMs to software testing tasks.
  • Quality assessment with a scoring rubric (minimum eight points) to ensure rigor.
  • Backward snowballing to augment literature coverage.
  • Classification of studies from software testing perspective (tasks, coverage) and LLM perspective (models, prompts, techniques).
  • Synthesis of trends, limitations, and roadmap for future work.

Experimental results

Research questions

  • RQ1What software testing tasks are commonly addressed by LLMs (e.g., test case preparation, program repair, test oracle generation, system input generation)?
  • RQ2Which LLMs, prompt types, input modalities, and accompanying techniques are used across studies?
  • RQ3What are the prevailing evaluation methods and reported performance trends for LLM-enabled testing?
  • RQ4What gaps, challenges, and opportunities remain in applying LLMs to software testing, and how might they be addressed?

Key findings

  • LLMs are most frequently applied to test case preparation, program debugging, and bug repair.
  • Approximately one-third of studies use pre-training or fine-tuning of LLMs, while the rest rely on prompt engineering.
  • Zero-shot and few-shot prompting are the most common strategies; chain-of-thought and self-consistency are less utilized.
  • Traditional testing techniques (e.g., differential testing, mutation testing) are often combined with LLMs to enhance test generation.
  • There are notable gaps in applying LLMs to early testing life-cycle stages and to non-functional testing, suggesting future research directions.
  • The survey provides a roadmap highlighting publication trends, typical venues, and gaps to accelerate adoption and practice.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.