Towards More Realistic Evaluation for Neural Test Oracle Generation
Not on the map. Why?
Abstract (arXiv)
Effective unit tests can help guard and improve software quality but require a substantial amount of time and effort to write and maintain. A unit test consists of a test prefix and a test oracle. Synthesizing test oracles, especially functional oracles, is a well-known challenging problem. Recent studies proposed to leverage neural models to generate test oracles, i.e., neural test oracle generation (NTOG), and obtained promising results. However, after a systematic inspection, we find there are some inappropriate settings in existing evaluation methods for NTOG. These settings could mislead the understanding of existing NTOG approaches' performance. We summarize them as 1) generating test prefixes from bug-fixed program versions, 2) evaluating with an unrealistic metric, and 3) lacking a straightforward baseline. In this paper, we first investigate the impacts of these settings on evaluating and understanding the performance of NTOG approaches. We find that 1) unrealistically generating test prefixes from bug-fixed program versions inflates the number of bugs found by the state-of-the-art NTOG approach TOGA by 61.8%, 2) FPR (False Positive Rate) is not a realistic evaluation metric and the Precision of TOGA is only 0.38%, and 3) a straightforward baseline NoException, which simply expects no exception should be raised, can find 61% of the bugs found by TOGA with twice the Precision. Furthermore, we introduce an additional ranking step to existing evaluation methods and propose an evaluation metric named Found@K to better measure the cost-effectiveness of NTOG approaches. We propose a novel unsupervised ranking method to instantiate this ranking step, significantly improving the cost-effectiveness of TOGA. Eventually, we propose a more realistic evaluation method TEval+ for NTOG and summarize seven rules of thumb to boost NTOG approaches into their practical usages.
Key facts. Cited by 8 papers in the map (data through 7 Oct 2026). First posted on arXiv 26 May 2023.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2023: 2; 2024: 1; 2025: 3; 2026: 2.
8 papers.
- 2024LLM-Powered Test Case Generation for Detecting Bugs in Plausible Programscited by 14
- 2023Pitfalls in Language Models for Code Intelligence: A Taxonomy and Surveycited by 9
- 2023Assessing Evaluation Metrics for Neural Test Oracle Generationcited by 7
- 2025Improving Deep Assertion Generation via Fine-Tuning Retrieval-Augmented Pre-trained Language Modelscited by 4
- 2025Improving Retrieval-Augmented Deep Assertion Generation via Joint Trainingcited by 2
- 2025Large Language Models for Software Testing: A Research Roadmapcited by 2
- 2026Understanding LLM-Driven Test Oracle Generationcited by 2
- 2026Multi-Large Language Model Orchestrated Severity Assessment of Clinical Records (MOSAIC)cited by 0
- 2026Multi-Large Language Model Orchestrated Severity Assessment of Clinical Records (MOSAIC)6 Jul 2026
- 2026Understanding LLM-Driven Test Oracle Generation9 Jan 2026
- 2025Large Language Models for Software Testing: A Research Roadmap29 Sep 2025
- 2025Improving Deep Assertion Generation via Fine-Tuning Retrieval-Augmented Pre-trained Language Models22 Feb 2025
- 2025Improving Retrieval-Augmented Deep Assertion Generation via Joint Training15 Feb 2025
- 2024LLM-Powered Test Case Generation for Detecting Bugs in Plausible Programs16 Apr 2024
- 2023Pitfalls in Language Models for Code Intelligence: A Taxonomy and Survey27 Oct 2023
- 2023Assessing Evaluation Metrics for Neural Test Oracle Generation11 Oct 2023