SESep 20, 2021

TOGA: A Neural Method for Test Oracle Generation

arXiv:2109.09262v2159 citations
Originality Highly original
AI Analysis

This addresses the challenge of generating accurate test oracles for software testing, which is crucial for bug finding and documentation in software development, representing a strong specific gain rather than a foundational advancement.

The paper tackles the problem of synthesizing functional test oracles for software units, proposing TOGA, a neural method that improves accuracy by 33% over existing approaches, achieving 96% overall accuracy, and finds 57 real-world bugs in Java programs, including 30 not found by other methods.

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.

Code Implementations1 repo
Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes