Lune

ISSTA2023Top-tier venue

AGORA: Automated Generation of Test Oracles for REST APIs

Juan C. Alonso, Sergio Segura, Antonio Ruiz-Cortés

Abstract

Test case generation tools for REST APIs have grown in number and complexity in recent years. However, their advanced capabilities for automated input generation contrast with the simplicity of their test oracles, which limit the types of failures they can detect to crashes, regressions, and violations of the API speci cation or design best practices. In this paper, we present AGORA, an approach for the automated generation of test oracles for REST APIs through the detection of invariants-properties of the output that should always hold. In practice, AGORA aims to learn the expected behavior of an API by analyzing previous API requests and their corresponding responses. For this, we extended the Daikon tool for dynamic detection of likely invariants, including the de nition of new types of invariants and the implementation of an instrumenter called Beet. Beet converts any OpenAPI speci cation and a collection of API requests and responses to a format processable by Daikon. As a result, AGORA currently supports the detection of up to 105 di erent types of invariants in REST APIs. AGORA achieved a total precision of 81.2% when tested on a dataset of 11 operations from 7 industrial APIs. More importantly, the test oracles generated by AGORA detected 6 out of every 10 errors systematically seeded in the outputs of the APIs under test. Additionally, AGORA revealed 11 bugs in APIs with millions of users: Amadeus, GitHub, Marvel, OMDb and YouTube. Our reports have guided developers in improving their APIs, including bug xes and documentation updates in GitHub. Since it operates in black-box mode, AGORA can be seamlessly integrated into existing API testing tools.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

4 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • TOGA: A Neural Method for Test Oracle Generation cites On learning meaningful assert statements for unit test cases
  • RBCTest: Leveraging LLMs to Mine and Verify Oracles of API Response Bodies for RESTful API Testing cites SATORI: Static Test Oracle Generation for REST APIs
  • RBCTest: Leveraging LLMs to Mine and Verify Oracles of API Response Bodies for RESTful API Testing cites Automated test generation for REST APIs: no time to rest yet
  • SATORI: Static Test Oracle Generation for REST APIs cites Differential regression testing for REST APIs
  • SATORI: Static Test Oracle Generation for REST APIs cites Automated test generation for REST APIs: no time to rest yet
  • SATORI: Static Test Oracle Generation for REST APIs cites Intelligent REST API data fuzzing
  • Automated test generation for REST APIs: no time to rest yet cites Differential regression testing for REST APIs
  • Automated test generation for REST APIs: no time to rest yet cites Intelligent REST API data fuzzing
  • RESTOR: Automated Test Oracle Generation for RESTful APIs via Reinforcement Learning cites TOGA: A Neural Method for Test Oracle Generation
  • RESTOR: Automated Test Oracle Generation for RESTful APIs via Reinforcement Learning cites On learning meaningful assert statements for unit test cases
  • RESTOR: Automated Test Oracle Generation for RESTful APIs via Reinforcement Learning cites SATORI: Static Test Oracle Generation for REST APIs
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers4

  1. SATORI: Static Test Oracle Generation for REST APIsJuan C. Alonso, Alberto Martin-Lopez, Sergio Segura, Gabriele Bavota et al.ASE 2025 · 2 citations
  2. State Field Coverage: A Metric for Oracle QualityFacundo Molina, Nazareno Aguirre, Alessandra GorlaASE 2025 · 1 citation
  3. RBCTest: Leveraging LLMs to Mine and Verify Oracles of API Response Bodies for RESTful API TestingHieu Huynh, Quoc-Tri Le, Tu Nguyen, Viet Nguyen et al.ICSE 2026
  4. RESTOR: Automated Test Oracle Generation for RESTful APIs via Reinforcement LearningXun Zhou, Zhen Dong, Mingyu Ren, Qiang Li et al.ISSTA 2026

Builds on22

  1. On learning meaningful assert statements for unit test casesCody Watson, Michele Tufano, Kevin Moran, Gabriele Bavota et al.ICSE 2020 · 96 citations
  2. TOGA: A Neural Method for Test Oracle GenerationElizabeth Dinella, Gabriel Ryan, Todd Mytkowicz, Shuvendu K. LahiriICSE 2022 · 92 citations
  3. Automated test generation for REST APIs: no time to rest yetMyeongsoo Kim, Qi Xin, Saurabh Sinha, Alessandro OrsoISSTA 2022 · 67 citations
  4. Intelligent REST API data fuzzingPatrice Godefroid, Bo-Yuan Huang, Marina PolishchukFSE 2020 · 57 citations
  5. Differential regression testing for REST APIsPatrice Godefroid, Daniel Lehmann, Marina PolishchukISSTA 2020 · 52 citations

Related papers

  1. Online testing of RESTful APIs: promises and challengesAlberto Martin-Lopez, Sergio Segura, Antonio Ruiz-CortésFSE 2022 · 34 citations
  2. DeepREST: Automated Test Case Generation for REST APIs Exploiting Deep Reinforcement LearningDavide Corradini, Zeno Montolli, Michele Pasqua, Mariano CeccatoASE 2024 · 13 citations
  3. A Multi-Agent Approach for REST API Testing with Semantic Graphs and LLM-Driven InputsMyeongsoo Kim, Tyler Stennett, Saurabh Sinha, Alessandro OrsoICSE 2025 · 4 citations
  4. Defects4REST: A Benchmark of Real-World Defects to Enable Controlled Testing and Debugging Studies for REST APIsRahil Mehta, Pushpak Katkhede, Manish MotwaniICSE 2026 · 1 citation
  5. Morest: Model-based RESTful API Testing with Execution FeedbackYi Liu, Yuekang Li, Gelei Deng, Yang Liu et al.ICSE 2022 · 52 citations
Dusk over the sea between two cliffs drawn in fine vertical lines