Neural-Based Test Oracle Generation: A Large-scale Evaluation and Lessons Learned

07/29/2023
by   Soneya Binta Hossain, et al.
0

Defining test oracles is crucial and central to test development, but manual construction of oracles is expensive. While recent neural-based automated test oracle generation techniques have shown promise, their real-world effectiveness remains a compelling question requiring further exploration and understanding. This paper investigates the effectiveness of TOGA, a recently developed neural-based method for automatic test oracle generation by Dinella et al. TOGA utilizes EvoSuite-generated test inputs and generates both exception and assertion oracles. In a Defects4j study, TOGA outperformed specification, search, and neural-based techniques, detecting 57 bugs, including 30 unique bugs not detected by other methods. To gain a deeper understanding of its applicability in real-world settings, we conducted a series of external, extended, and conceptual replication studies of TOGA. In a large-scale study involving 25 real-world Java systems, 223.5K test cases, and 51K injected faults, we evaluate TOGA's ability to improve fault-detection effectiveness relative to the state-of-the-practice and the state-of-the-art. We find that TOGA misclassifies the type of oracle needed 24 of the time and that when it classifies correctly around 62 not confident enough to generate any assertion oracle. When it does generate an assertion oracle, more than 47 positive assertions only increase fault detection by 0.3 work. These findings expose limitations of the state-of-the-art neural-based oracle generation technique, provide valuable insights for improvement, and offer lessons for evaluating future automated oracle generation methods.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
04/18/2020

Improving The Effectiveness of Automatically Generated Test Suites Using Metamorphic Testing

Automated test generation has helped to reduce the cost of software test...
research
09/20/2021

Neural Unit Test Suggestions

Testing is widely recognized as an important stage of the software devel...
research
05/26/2023

Towards More Realistic Evaluation for Neural Test Oracle Generation

Effective unit tests can help guard and improve software quality but req...
research
12/14/2020

Automatic Property-based Testing of GraphQL APIs

In recent years, GraphQL has become a popular way to expose web APIs. Wi...
research
11/04/2018

Automatic Repair of Real Bugs in Java: A Large-Scale Experiment on the Defects4J Dataset

Defects4J is a large, peer-reviewed, structured dataset of real-world Ja...
research
12/21/2017

ARJA: Automated Repair of Java Programs via Multi-Objective Genetic Programming

Recent empirical studies show that the performance of GenProg is not sat...
research
07/28/2023

Towards Automatic Generation of Amplified Regression Test Oracles

Regression testing is crucial in ensuring that pure code refactoring doe...

Please sign up or login with your details

Forgot password? Click here to reset