Understanding LLM-Driven Test Oracle Generation

Adam Bodicoat, Gunel Jahangirova, Valerio Terragni
1/9/2026
cs.SEcs.AIcs.LG

No confident code implementation found for this paper. 1 possible match can be shown below.

Abstract

Automated unit test generation aims to improve software quality while reducing the time and effort required for creating tests manually. However, existing techniques primarily generate regression oracles that predicate on the implemented behavior of the class under test. They do not address the oracle problem: the challenge of distinguishing correct from incorrect program behavior. With the rise of Foundation Models (FMs), particularly Large Language Models (LLMs), there is a new opportunity to generate test oracles that reflect intended behavior. This positions LLMs as enablers of Promptware, where software creation and testing are driven by natural-language prompts. This paper presents an empirical study on the effectiveness of LLMs in generating test oracles that expose software failures. We investigate how different prompting strategies and levels of contextual input impact the quality of LLM-generated oracles. Our findings offer insights into the strengths and limitations of LLM-based oracle generation in the FM era, improving our understanding of their capabilities and fostering future research in this area.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 1 weaker match is hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Cite this paper

@article{bodicoat2026understanding,
  title  = {Understanding LLM-Driven Test Oracle Generation},
  author = {Adam Bodicoat and Gunel Jahangirova and Valerio Terragni},
  year   = {2026},
  eprint = {2601.05542},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2601.05542v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2601.05542.svg)](https://codeofpaper.com/paper/2601.05542)

Discussion