Lune

ASE2023Top-tier venue

Adaptive REST API Testing with Reinforcement Learning

Myeongsoo Kim, Saurabh Sinha, Alessandro Orso

Abstract

Modern web services increasingly rely on REST APIs. Effectively testing these APIs is challenging due to the vast search space to be explored, which involves selecting API operations for sequence creation, choosing parameters for each operation from a potentially large set of parameters, and sampling values from the virtually infinite parameter input space. Current testing tools lack efficient exploration mechanisms, treating all operations and parameters equally (i.e., not considering their importance or complexity) and lacking prioritization strategies. Furthermore, these tools struggle when response schemas are absent in the specification or exhibit variants. To address these limitations, we present an adaptive REST API testing technique that incorporates reinforcement learning to prioritize operations and parameters during exploration. Our approach dynamically analyzes request and response data to inform dependent parameters and adopts a sampling-based strategy for efficient processing of dynamic API feedback. We evaluated our technique on ten RESTful services, comparing it against state-of-the-art REST testing tools with respect to code coverage achieved, requests generated, operations covered, and service failures triggered. Additionally, we performed an ablation study on prioritization, dynamic feedback analysis, and sampling to assess their individual effects. Our findings demonstrate that our approach outperforms existing REST API testing tools in terms of effectiveness, efficiency, and fault-finding ability.

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.

11 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

  • APIRL: Deep Reinforcement Learning for REST API Fuzzing cites Automatic Web Testing Using Curiosity-Driven Reinforcement Learning
  • APIRL: Deep Reinforcement Learning for REST API Fuzzing cites Morest: Model-based RESTful API Testing with Execution Feedback
  • APIRL: Deep Reinforcement Learning for REST API Fuzzing cites Automated test generation for REST APIs: no time to rest yet
  • APIRL: Deep Reinforcement Learning for REST API Fuzzing cites DeepREST: Automated Test Case Generation for REST APIs Exploiting Deep Reinforcement Learning
  • Automatic Web Testing Using Curiosity-Driven Reinforcement Learning cites Reinforcement learning based curiosity-driven testing of Android applications
  • Morest: Model-based RESTful API Testing with Execution Feedback cites Automatic Web Testing Using Curiosity-Driven Reinforcement Learning
  • Smart-LLaMA-DPO: Reinforced Large Language Model for Explainable Smart Contract Vulnerability Detection cites DeepREST: Automated Test Case Generation for REST APIs Exploiting Deep Reinforcement Learning
  • Automated test generation for REST APIs: no time to rest yet cites Combinatorial Testing of RESTful APIs
  • Automated test generation for REST APIs: no time to rest yet cites Morest: Model-based RESTful API Testing with Execution Feedback
  • DeepREST: Automated Test Case Generation for REST APIs Exploiting Deep Reinforcement Learning cites Reinforcement learning based curiosity-driven testing of Android applications
  • DeepREST: Automated Test Case Generation for REST APIs Exploiting Deep Reinforcement Learning cites Combinatorial Testing of RESTful APIs
  • DeepREST: Automated Test Case Generation for REST APIs Exploiting Deep Reinforcement Learning cites Automatic Web Testing Using Curiosity-Driven Reinforcement Learning
  • DeepREST: Automated Test Case Generation for REST APIs Exploiting Deep Reinforcement Learning cites Morest: Model-based RESTful API Testing with Execution Feedback
  • Generating REST API Specifications through Static Analysis cites Automated test generation for REST APIs: no time to rest yet
  • LlamaRestTest: Effective REST API Testing with Small Language Models cites Combinatorial Testing of RESTful APIs
  • LlamaRestTest: Effective REST API Testing with Small Language Models cites Morest: Model-based RESTful API Testing with Execution Feedback
  • LlamaRestTest: Effective REST API Testing with Small Language Models cites Automated test generation for REST APIs: no time to rest yet
  • LlamaRestTest: Effective REST API Testing with Small Language Models cites DeepREST: Automated Test Case Generation for REST APIs Exploiting Deep Reinforcement Learning
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers11

  1. Smart-LLaMA-DPO: Reinforced Large Language Model for Explainable Smart Contract Vulnerability DetectionLei Yu, Zhirong Huang, Hang Yuan, Shiqi Cheng et al.ISSTA 2025 · 13 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. Generating REST API Specifications through Static AnalysisRuikai Huang, Manish Motwani, Idel Martinez, Alessandro OrsoICSE 2024 · 11 citations
  4. LlamaRestTest: Effective REST API Testing with Small Language ModelsMyeongsoo Kim, Saurabh Sinha, Alessandro OrsoFSE 2025 · 9 citations
  5. APIRL: Deep Reinforcement Learning for REST API FuzzingMyles Foley, Sergio MaffeisAAAI 2025 · 6 citations

Builds on6

  1. Reinforcement learning based curiosity-driven testing of Android applicationsMinxue Pan, An Huang, Guoxin Wang, Tian Zhang et al.ISSTA 2020 · 166 citations
  2. Automatic Web Testing Using Curiosity-Driven Reinforcement LearningYan Zheng, Yi Liu, Xiaofei Xie, Yepang Liu et al.ICSE 2021 · 75 citations
  3. Automated test generation for REST APIs: no time to rest yetMyeongsoo Kim, Qi Xin, Saurabh Sinha, Alessandro OrsoISSTA 2022 · 67 citations
  4. Morest: Model-based RESTful API Testing with Execution FeedbackYi Liu, Yuekang Li, Gelei Deng, Yang Liu et al.ICSE 2022 · 52 citations
  5. Combinatorial Testing of RESTful APIsHuayao Wu, Lixin Xu, Xintao Niu, Changhai NieICSE 2022 · 47 citations

Related papers

  1. 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
  2. Effective REST APIs Testing with Error Message AnalysisLixin Xu, Huayao Wu, Zhenyu Pan, Tongtong Xu et al.ISSTA 2025 · 1 citation
  3. Online testing of RESTful APIs: promises and challengesAlberto Martin-Lopez, Sergio Segura, Antonio Ruiz-CortésFSE 2022 · 34 citations
  4. Learning-to-rank vs ranking-to-learn: strategies for regression testing in continuous integrationAntonia Bertolino, Antonio Guerriero, Breno Miranda, Roberto Pietrantuono et al.ICSE 2020 · 81 citations
  5. Carving UI Tests to Generate API Tests and API SpecificationRahulkrishna Yandrapally, Saurabh Sinha, Rachel Tzoref-Brill, Ali MesbahICSE 2023 · 21 citations
Dusk over the sea between two cliffs drawn in fine vertical lines