Lune

ASE2024Top-tier venue

DeepREST: Automated Test Case Generation for REST APIs Exploiting Deep Reinforcement Learning

Davide Corradini, Zeno Montolli, Michele Pasqua, Mariano Ceccato

Abstract

Automatically crafting test scenarios for REST APIs helps deliver more reliable and trustworthy web-oriented systems. However, current black-box testing approaches rely heavily on the information available in the API's formal documentation, i.e., the OpenAPI Specification (OAS for short). While useful, the OAS mostly covers syntactic aspects of the API (e.g., producer-consumer relations between operations, input value properties, and additional constraints in natural language), and it lacks a deeper understanding of the API business logic. Missing semantics include implicit ordering (logic dependency) between operations and implicit input-value constraints. These limitations hinder the ability of black-box testing tools to generate truly effective test cases automatically. This paper introduces DeepREST, a novel black-box approach for automatically testing REST APIs. It leverages deep reinforcement learning to uncover implicit API constraints, that is, constraints hidden from API documentation. Curiosity-driven learning guides an agent in the exploration of the API and learns an effective order to test its operations. This helps identify which operations to test first to take the API in a testable state and avoid failing API interactions later. At the same time, experience gained on successful API interactions is leveraged to drive accurate input data generation (i.e., what parameters to use and how to pick their values). Additionally, DeepREST alternates exploration with exploitation by mutating successful API interactions to improve test coverage and collect further experience. Our empirical validation suggests that the proposed approach is very effective in achieving high test coverage and fault detection and superior to a state-of-the-art baseline.

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.

7 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 Enhancing REST API Testing with NLP Techniques
  • 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
  • Enhancing REST API Testing with NLP Techniques cites Combinatorial Testing of RESTful APIs
  • Enhancing REST API Testing with NLP Techniques cites Morest: Model-based RESTful API Testing with Execution Feedback
  • 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
  • A Multi-Agent Approach for REST API Testing with Semantic Graphs and LLM-Driven Inputs cites Reinforcement learning based curiosity-driven testing of Android applications
  • A Multi-Agent Approach for REST API Testing with Semantic Graphs and LLM-Driven Inputs cites Combinatorial Testing of RESTful APIs
  • A Multi-Agent Approach for REST API Testing with Semantic Graphs and LLM-Driven Inputs cites Enhancing REST API Testing with NLP Techniques
  • A Multi-Agent Approach for REST API Testing with Semantic Graphs and LLM-Driven Inputs cites Automatic Web Testing Using Curiosity-Driven Reinforcement Learning
  • A Multi-Agent Approach for REST API Testing with Semantic Graphs and LLM-Driven Inputs cites Morest: Model-based RESTful API Testing with Execution Feedback
  • A Multi-Agent Approach for REST API Testing with Semantic Graphs and LLM-Driven Inputs cites LlamaRestTest: Effective REST API Testing with Small Language Models
  • LlamaRestTest: Effective REST API Testing with Small Language Models cites A Multi-Agent Approach for REST API Testing with Semantic Graphs and LLM-Driven Inputs
  • SoK: The Pitfalls of Deep Reinforcement Learning for Cybersecurity cites APIRL: Deep Reinforcement Learning for REST API Fuzzing
  • 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 Enhancing REST API Testing with NLP Techniques
  • LlamaRestTest: Effective REST API Testing with Small Language Models cites Morest: Model-based RESTful API Testing with Execution Feedback
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers7

  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. LlamaRestTest: Effective REST API Testing with Small Language ModelsMyeongsoo Kim, Saurabh Sinha, Alessandro OrsoFSE 2025 · 9 citations
  3. SoK: The Pitfalls of Deep Reinforcement Learning for CybersecurityShae McFadden, Myles Foley, Elizabeth Bates, Ilias Tsingenopoulos et al.USENIX Security 2026 · 7 citations
  4. APIRL: Deep Reinforcement Learning for REST API FuzzingMyles Foley, Sergio MaffeisAAAI 2025 · 6 citations
  5. 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

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. Morest: Model-based RESTful API Testing with Execution FeedbackYi Liu, Yuekang Li, Gelei Deng, Yang Liu et al.ICSE 2022 · 52 citations
  4. Combinatorial Testing of RESTful APIsHuayao Wu, Lixin Xu, Xintao Niu, Changhai NieICSE 2022 · 47 citations
  5. Enhancing REST API Testing with NLP TechniquesMyeongsoo Kim, Davide Corradini, Saurabh Sinha, Alessandro Orso et al.ISSTA 2023 · 34 citations

Related papers

  1. Effective REST APIs Testing with Error Message AnalysisLixin Xu, Huayao Wu, Zhenyu Pan, Tongtong Xu et al.ISSTA 2025 · 1 citation
  2. Adaptive REST API Testing with Reinforcement LearningMyeongsoo Kim, Saurabh Sinha, Alessandro OrsoASE 2023 · 29 citations
  3. Automated Black-Box Testing of Mass Assignment Vulnerabilities in RESTful APIsDavide Corradini, Michele Pasqua, Mariano CeccatoICSE 2023 · 12 citations
  4. RESTGuardian: Automated Black-Box Fuzzing for RESTful API via Efficient Dependency Inference and Deep Vulnerability DetectionYifan Guo, Na Wang, Yunjia Wang, Zhenyu Chen et al.CCS 2026
  5. 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
Dusk over the sea between two cliffs drawn in fine vertical lines