TOGA: A Neural Method for Test Oracle Generation
Not on the map. Why?
Abstract (arXiv)
Testing is widely recognized as an important stage of the software development lifecycle. Effective software testing can provide benefits such as bug finding, preventing regressions, and documentation. In terms of documentation, unit tests express a unit's intended functionality, as conceived by the developer. A test oracle, typically expressed as an condition, documents the intended behavior of a unit under a given test prefix. Synthesizing a functional test oracle is a challenging problem, as it must capture the intended functionality rather than the implemented functionality. In this paper, we propose TOGA (a neural method for Test Oracle GenerAtion), a unified transformer-based neural approach to infer both exceptional and assertion test oracles based on the context of the focal method. Our approach can handle units with ambiguous or missing documentation, and even units with a missing implementation. We evaluate our approach on both oracle inference accuracy and functional bug-finding. Our technique improves accuracy by 33% over existing oracle inference approaches, achieving 96% overall accuracy on a held out test dataset. Furthermore, we show that when integrated with a automated test generation tool (EvoSuite), our approach finds 57 real world bugs in large-scale Java programs, including 30 bugs that are not found by any other automated testing method in our evaluation.
Key facts. Cited by 57 papers in the map (data through 7 Oct 2026). First posted on arXiv 20 Sep 2021.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2022: 3; 2023: 12; 2024: 12; 2025: 13; 2026: 17.
57 papers.
Sort:
By area:
- 2023An Empirical Evaluation of Using Large Language Models for Automated Unit Test Generationcited by 193
- 2024Code-Aware Prompting: A study of Coverage Guided Test Generation in Regression Setting using LLMcited by 63
- 2024Exploring and Unleashing the Power of Large Language Models in Automated Code Translationcited by 57
- 2023Can Large Language Models Transform Natural Language Intent into Formal Method Postconditions?cited by 53
- 2022Interactive Code Generation via Test-Driven User-Intent Formalizationcited by 50
- 2023ALGO: Synthesizing Algorithmic Programs with LLM-Generated Oracle Verifierscited by 41
- 2023Learning Deep Semantics for Test Completioncited by 31
- 2022Repairing Bugs in Python Assignments Using Large Language Modelscited by 28
- 2023CAT-LM: Training Language Models on Aligned Code And Testscited by 28
- 2023Reinforcement Learning from Automatic Feedback for High-Quality Unit Test Generationcited by 21
- 2026SWE-Marathon: Can Agents Autonomously Complete Ultra-Long-Horizon Software Work?cited by 19
- 2024Evaluating LLM-driven User-Intent Formalization for Verification-Aware Languagescited by 16
38 more
- 2025CoCoEvo: Co-Evolution of Programs and Test Cases to Enhance Code Generationcited by 14
- 2023Unit Test Generation using Generative AI : A Comparative Performance Analysis of Autogeneration Toolscited by 13
- 2023The Program Testing Ability of Large Language Models for Codecited by 11
- 2025TestForge: Feedback-Driven, Agentic Test Suite Generationcited by 8
- 2025Hallucination to Consensus: Multi-Agent LLMs for End-to-End JUnit Test Generationcited by 8
- 2026Intent Formalization: A Grand Challenge for Reliable Coding in the Age of AI Agentscited by 8
- 2023Domain Adaptation for Code Model-based Unit Test Case Generationcited by 7
- 2023Assessing Evaluation Metrics for Neural Test Oracle Generationcited by 7
- 2025On the Effectiveness of Large Language Models in Writing Alloy Formulascited by 7
- 2023Automating the Correctness Assessment of AI-generated Code for Security Contextscited by 6
- 2024Generating executable oracles to check conformance of client code to requirements of JDK Javadocs using LLMscited by 6
- 2025RAGVA: Engineering Retrieval Augmented Generation-based Virtual Assistants in Practicecited by 6
- 2023Revisiting and Improving Retrieval-Augmented Deep Assertion Generationcited by 5
- 2024UniTSyn: A Large-Scale Dataset Capable of Enhancing the Prowess of Large Language Models for Program Testingcited by 5
- 2025Beyond Postconditions: Can Large Language Models infer Formal Contracts for Automatic Software Verification?cited by 5
- 2024exLong: Generating Exceptional Behavior Tests with Large Language Modelscited by 4
- 2024Learning Program Behavioral Models from Synthesized Input-Output Pairscited by 4
- 2024ASSERTIFY: Utilizing Large Language Models to Generate Assertions for Production Codecited by 4
- 2025Improving Deep Assertion Generation via Fine-Tuning Retrieval-Augmented Pre-trained Language Modelscited by 4
- 2025Nexus: Execution-Grounded Multi-Agent Test Oracle Synthesiscited by 4
- 2024FuzzAug: Data Augmentation by Coverage-guided Fuzzing for Neural Test Generationcited by 3
- 2024Generative transformations and patterns in LLM-native approaches for software verification and falsificationcited by 2
- 2025Improving Retrieval-Augmented Deep Assertion Generation via Joint Trainingcited by 2
- 2025Large Language Models for Software Testing: A Research Roadmapcited by 2
- 2025OBsmith: LLM-Powered JavaScript Obfuscator Testingcited by 2
- 2026Understanding LLM-Driven Test Oracle Generationcited by 2
- 2026SpecMind: Cognitively Inspired, Interactive Multi-Turn Framework for Postcondition Inferencecited by 2
- 2022The Integration of Machine Learning into Automated Test Generation: A Systematic Mapping Studycited by 1
- 2024Morescient GAI for Software Engineering (Extended Version)cited by 1
- 2025Static Program Analysis Guided LLM Based Unit Test Generationcited by 1
- 2025Navigating the Labyrinth: Path-Sensitive Unit Test Generation with Large Language Modelscited by 1
- 2026Compiling Large Multi-Modal Requirement Documents into Runnable Software Systems: From an Agentic Test-Driven Perspectivecited by 1
- 2026Self-Improving Code Generation via Semantic Entropy and Behavioral Consensuscited by 1
- 2026MANGO: Automated Multi-Agent Test Oracle Generation for Vision-Language-Action Modelscited by 1
- 2026Teaching Code LLMs to Reason with Intermediate Formal Specificationscited by 1
- 2026Learning Globally Reusable Skills for Coding Agentscited by 1
- 2024Reinforcement Learning from Automatic Feedback for High-Quality Unit Test Generationcited by 0
- 2026ATTest: Agent-Driven Tensor Testing for Deep Learning Library Modulescited by 0
50 most cited of 57 All 57 (JSON)
- 2026AdaRepair-Mem: Adaptive Experience Orchestration for Repository-Level Program Repair17 Sep 2026
- 2026VibeCheck: Assessing the Quality of LLM-Generated Unit Tests: A Multi-agent Empirical Study across Heterogeneous Repositories5 Sep 2026
- 2026Learning Globally Reusable Skills for Coding Agents6 Aug 2026
- 2026Agent-Based Test Assertion Generation via Diverse Perspective Aggregation6 Aug 2026
- 2026Evaluating and Mitigating the Misguidance Effect of Buggy Code in LLM-Generated Unit Tests24 Jul 2026
- 2026Fail-Aware and Explainable Test Oracle Prediction13 Jul 2026
- 2026Multi-Large Language Model Orchestrated Severity Assessment of Clinical Records (MOSAIC)6 Jul 2026
- 2026Teaching Code LLMs to Reason with Intermediate Formal Specifications5 Jul 2026
- 2026MANGO: Automated Multi-Agent Test Oracle Generation for Vision-Language-Action Models23 Jun 2026
- 2026SWE-Marathon: Can Agents Autonomously Complete Ultra-Long-Horizon Software Work?5 Jun 2026
- 2026Inferring Code Correctness from Specification28 May 2026
- 2026Self-Improving Code Generation via Semantic Entropy and Behavioral Consensus31 Mar 2026
38 more
- 2026Intent Formalization: A Grand Challenge for Reliable Coding in the Age of AI Agents17 Mar 2026
- 2026SpecMind: Cognitively Inspired, Interactive Multi-Turn Framework for Postcondition Inference24 Feb 2026
- 2026ATTest: Agent-Driven Tensor Testing for Deep Learning Library Modules15 Feb 2026
- 2026Compiling Large Multi-Modal Requirement Documents into Runnable Software Systems: From an Agentic Test-Driven Perspective14 Feb 2026
- 2026Understanding LLM-Driven Test Oracle Generation9 Jan 2026
- 2025Nexus: Execution-Grounded Multi-Agent Test Oracle Synthesis30 Oct 2025
- 2025Beyond Postconditions: Can Large Language Models infer Formal Contracts for Automatic Software Verification?14 Oct 2025
- 2025OBsmith: LLM-Powered JavaScript Obfuscator Testing11 Oct 2025
- 2025Large Language Models for Software Testing: A Research Roadmap29 Sep 2025
- 2025Navigating the Labyrinth: Path-Sensitive Unit Test Generation with Large Language Models28 Sep 2025
- 2025Hallucination to Consensus: Multi-Agent LLMs for End-to-End JUnit Test Generation3 Jun 2025
- 2025TestForge: Feedback-Driven, Agentic Test Suite Generation18 Mar 2025
- 2025Static Program Analysis Guided LLM Based Unit Test Generation7 Mar 2025
- 2025Improving Deep Assertion Generation via Fine-Tuning Retrieval-Augmented Pre-trained Language Models22 Feb 2025
- 2025On the Effectiveness of Large Language Models in Writing Alloy Formulas21 Feb 2025
- 2025RAGVA: Engineering Retrieval Augmented Generation-based Virtual Assistants in Practice20 Feb 2025
- 2025CoCoEvo: Co-Evolution of Programs and Test Cases to Enhance Code Generation15 Feb 2025
- 2025Improving Retrieval-Augmented Deep Assertion Generation via Joint Training15 Feb 2025
- 2024Reinforcement Learning from Automatic Feedback for High-Quality Unit Test Generation18 Dec 2024
- 2024ASSERTIFY: Utilizing Large Language Models to Generate Assertions for Production Code25 Nov 2024
- 2024Generating executable oracles to check conformance of client code to requirements of JDK Javadocs using LLMs4 Nov 2024
- 2024Learning Program Behavioral Models from Synthesized Input-Output Pairs11 Jul 2024
- 2024Evaluating LLM-driven User-Intent Formalization for Verification-Aware Languages14 Jun 2024
- 2024FuzzAug: Data Augmentation by Coverage-guided Fuzzing for Neural Test Generation12 Jun 2024
- 2024Morescient GAI for Software Engineering (Extended Version)7 Jun 2024
- 2024exLong: Generating Exceptional Behavior Tests with Large Language Models23 May 2024
- 2024Exploring and Unleashing the Power of Large Language Models in Automated Code Translation23 Apr 2024
- 2024Generative transformations and patterns in LLM-native approaches for software verification and falsification14 Apr 2024
- 2024UniTSyn: A Large-Scale Dataset Capable of Enhancing the Prowess of Large Language Models for Program Testing4 Feb 2024
- 2024Code-Aware Prompting: A study of Coverage Guided Test Generation in Regression Setting using LLM31 Jan 2024
- 2023Unit Test Generation using Generative AI : A Comparative Performance Analysis of Autogeneration Tools17 Dec 2023
- 2023Automating the Correctness Assessment of AI-generated Code for Security Contexts28 Oct 2023
- 2023Assessing Evaluation Metrics for Neural Test Oracle Generation11 Oct 2023
- 2023The Program Testing Ability of Large Language Models for Code9 Oct 2023
- 2023Reinforcement Learning from Automatic Feedback for High-Quality Unit Test Generation3 Oct 2023
- 2023Can Large Language Models Transform Natural Language Intent into Formal Method Postconditions?3 Oct 2023
- 2023CAT-LM: Training Language Models on Aligned Code And Tests2 Oct 2023
- 2023Revisiting and Improving Retrieval-Augmented Deep Assertion Generation19 Sep 2023
50 newest of 57 All 57 (JSON)
- 2025TestForge: Feedback-Driven, Agentic Test Suite Generationcited by 8
- 2025Hallucination to Consensus: Multi-Agent LLMs for End-to-End JUnit Test Generationcited by 8
- 2026Intent Formalization: A Grand Challenge for Reliable Coding in the Age of AI Agentscited by 8
- 2025Nexus: Execution-Grounded Multi-Agent Test Oracle Synthesiscited by 4
- 2026Compiling Large Multi-Modal Requirement Documents into Runnable Software Systems: From an Agentic Test-Driven Perspectivecited by 1
- 2026Learning Globally Reusable Skills for Coding Agentscited by 1
- 2026ATTest: Agent-Driven Tensor Testing for Deep Learning Library Modulescited by 0
- 2026Agent-Based Test Assertion Generation via Diverse Perspective Aggregationcited by 0
- 2026VibeCheck: Assessing the Quality of LLM-Generated Unit Tests: A Multi-agent Empirical Study across Heterogeneous Repositoriescited by 0
- 2026VibeCheck: Assessing the Quality of LLM-Generated Unit Tests: A Multi-agent Empirical Study across Heterogeneous Repositories5 Sep 2026
- 2026Learning Globally Reusable Skills for Coding Agents6 Aug 2026
- 2026Agent-Based Test Assertion Generation via Diverse Perspective Aggregation6 Aug 2026
- 2026Intent Formalization: A Grand Challenge for Reliable Coding in the Age of AI Agents17 Mar 2026
- 2026ATTest: Agent-Driven Tensor Testing for Deep Learning Library Modules15 Feb 2026
- 2026Compiling Large Multi-Modal Requirement Documents into Runnable Software Systems: From an Agentic Test-Driven Perspective14 Feb 2026
- 2025Nexus: Execution-Grounded Multi-Agent Test Oracle Synthesis30 Oct 2025
- 2025Hallucination to Consensus: Multi-Agent LLMs for End-to-End JUnit Test Generation3 Jun 2025
- 2025TestForge: Feedback-Driven, Agentic Test Suite Generation18 Mar 2025
- 2025RAGVA: Engineering Retrieval Augmented Generation-based Virtual Assistants in Practicecited by 6
- 2023Revisiting and Improving Retrieval-Augmented Deep Assertion Generationcited by 5
- 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
- 2025Improving Deep Assertion Generation via Fine-Tuning Retrieval-Augmented Pre-trained Language Models22 Feb 2025
- 2025RAGVA: Engineering Retrieval Augmented Generation-based Virtual Assistants in Practice20 Feb 2025
- 2025Improving Retrieval-Augmented Deep Assertion Generation via Joint Training15 Feb 2025
- 2023Revisiting and Improving Retrieval-Augmented Deep Assertion Generation19 Sep 2023
- 2023An Empirical Evaluation of Using Large Language Models for Automated Unit Test Generationcited by 193
- 2024Code-Aware Prompting: A study of Coverage Guided Test Generation in Regression Setting using LLMcited by 63
- 2024Exploring and Unleashing the Power of Large Language Models in Automated Code Translationcited by 57
- 2023Can Large Language Models Transform Natural Language Intent into Formal Method Postconditions?cited by 53
- 2022Interactive Code Generation via Test-Driven User-Intent Formalizationcited by 50
- 2023ALGO: Synthesizing Algorithmic Programs with LLM-Generated Oracle Verifierscited by 41
- 2023Learning Deep Semantics for Test Completioncited by 31
- 2022Repairing Bugs in Python Assignments Using Large Language Modelscited by 28
- 2023CAT-LM: Training Language Models on Aligned Code And Testscited by 28
- 2026SWE-Marathon: Can Agents Autonomously Complete Ultra-Long-Horizon Software Work?cited by 19
- 2024Evaluating LLM-driven User-Intent Formalization for Verification-Aware Languagescited by 16
- 2025CoCoEvo: Co-Evolution of Programs and Test Cases to Enhance Code Generationcited by 14
12 most cited of 39 All 39 (JSON)
- 2026AdaRepair-Mem: Adaptive Experience Orchestration for Repository-Level Program Repair17 Sep 2026
- 2026Evaluating and Mitigating the Misguidance Effect of Buggy Code in LLM-Generated Unit Tests24 Jul 2026
- 2026Fail-Aware and Explainable Test Oracle Prediction13 Jul 2026
- 2026Multi-Large Language Model Orchestrated Severity Assessment of Clinical Records (MOSAIC)6 Jul 2026
- 2026SWE-Marathon: Can Agents Autonomously Complete Ultra-Long-Horizon Software Work?5 Jun 2026
- 2026Inferring Code Correctness from Specification28 May 2026
- 2026SpecMind: Cognitively Inspired, Interactive Multi-Turn Framework for Postcondition Inference24 Feb 2026
- 2026Understanding LLM-Driven Test Oracle Generation9 Jan 2026
- 2025Beyond Postconditions: Can Large Language Models infer Formal Contracts for Automatic Software Verification?14 Oct 2025
- 2025OBsmith: LLM-Powered JavaScript Obfuscator Testing11 Oct 2025
- 2025Large Language Models for Software Testing: A Research Roadmap29 Sep 2025
- 2025Navigating the Labyrinth: Path-Sensitive Unit Test Generation with Large Language Models28 Sep 2025
12 newest of 39 All 39 (JSON)