DeepREST: Automated Test Case Generation for REST APIs Exploiting Deep Reinforcement Learning
Davide Corradini, Zeno Montolli, Michele Pasqua, Mariano Ceccato
摘要
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.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 7 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- APIRL: Deep Reinforcement Learning for REST API Fuzzing 引用了 Enhancing REST API Testing with NLP Techniques
- APIRL: Deep Reinforcement Learning for REST API Fuzzing 引用了 Automatic Web Testing Using Curiosity-Driven Reinforcement Learning
- APIRL: Deep Reinforcement Learning for REST API Fuzzing 引用了 Morest: Model-based RESTful API Testing with Execution Feedback
- Enhancing REST API Testing with NLP Techniques 引用了 Combinatorial Testing of RESTful APIs
- Enhancing REST API Testing with NLP Techniques 引用了 Morest: Model-based RESTful API Testing with Execution Feedback
- Automatic Web Testing Using Curiosity-Driven Reinforcement Learning 引用了 Reinforcement learning based curiosity-driven testing of Android applications
- Morest: Model-based RESTful API Testing with Execution Feedback 引用了 Automatic Web Testing Using Curiosity-Driven Reinforcement Learning
- A Multi-Agent Approach for REST API Testing with Semantic Graphs and LLM-Driven Inputs 引用了 Reinforcement learning based curiosity-driven testing of Android applications
- A Multi-Agent Approach for REST API Testing with Semantic Graphs and LLM-Driven Inputs 引用了 Combinatorial Testing of RESTful APIs
- A Multi-Agent Approach for REST API Testing with Semantic Graphs and LLM-Driven Inputs 引用了 Enhancing REST API Testing with NLP Techniques
- A Multi-Agent Approach for REST API Testing with Semantic Graphs and LLM-Driven Inputs 引用了 Automatic Web Testing Using Curiosity-Driven Reinforcement Learning
- A Multi-Agent Approach for REST API Testing with Semantic Graphs and LLM-Driven Inputs 引用了 Morest: Model-based RESTful API Testing with Execution Feedback
- A Multi-Agent Approach for REST API Testing with Semantic Graphs and LLM-Driven Inputs 引用了 LlamaRestTest: Effective REST API Testing with Small Language Models
- LlamaRestTest: Effective REST API Testing with Small Language Models 引用了 A Multi-Agent Approach for REST API Testing with Semantic Graphs and LLM-Driven Inputs
- SoK: The Pitfalls of Deep Reinforcement Learning for Cybersecurity 引用了 APIRL: Deep Reinforcement Learning for REST API Fuzzing
- LlamaRestTest: Effective REST API Testing with Small Language Models 引用了 Combinatorial Testing of RESTful APIs
- LlamaRestTest: Effective REST API Testing with Small Language Models 引用了 Enhancing REST API Testing with NLP Techniques
- LlamaRestTest: Effective REST API Testing with Small Language Models 引用了 Morest: Model-based RESTful API Testing with Execution Feedback
引用它的顶会 Paper7
- Smart-LLaMA-DPO: Reinforced Large Language Model for Explainable Smart Contract Vulnerability DetectionLei Yu, Zhirong Huang, Hang Yuan, Shiqi Cheng 等ISSTA 2025 · 13 次引用
- LlamaRestTest: Effective REST API Testing with Small Language ModelsMyeongsoo Kim, Saurabh Sinha, Alessandro OrsoFSE 2025 · 9 次引用
- SoK: The Pitfalls of Deep Reinforcement Learning for CybersecurityShae McFadden, Myles Foley, Elizabeth Bates, Ilias Tsingenopoulos 等USENIX Security 2026 · 7 次引用
- APIRL: Deep Reinforcement Learning for REST API FuzzingMyles Foley, Sergio MaffeisAAAI 2025 · 6 次引用
- A Multi-Agent Approach for REST API Testing with Semantic Graphs and LLM-Driven InputsMyeongsoo Kim, Tyler Stennett, Saurabh Sinha, Alessandro OrsoICSE 2025 · 4 次引用
它引用的 Paper6
- Reinforcement learning based curiosity-driven testing of Android applicationsMinxue Pan, An Huang, Guoxin Wang, Tian Zhang 等ISSTA 2020 · 166 次引用
- Automatic Web Testing Using Curiosity-Driven Reinforcement LearningYan Zheng, Yi Liu, Xiaofei Xie, Yepang Liu 等ICSE 2021 · 75 次引用
- Morest: Model-based RESTful API Testing with Execution FeedbackYi Liu, Yuekang Li, Gelei Deng, Yang Liu 等ICSE 2022 · 52 次引用
- Combinatorial Testing of RESTful APIsHuayao Wu, Lixin Xu, Xintao Niu, Changhai NieICSE 2022 · 47 次引用
- Enhancing REST API Testing with NLP TechniquesMyeongsoo Kim, Davide Corradini, Saurabh Sinha, Alessandro Orso 等ISSTA 2023 · 34 次引用
相关 Paper
- Effective REST APIs Testing with Error Message AnalysisLixin Xu, Huayao Wu, Zhenyu Pan, Tongtong Xu 等ISSTA 2025 · 1 次引用
- Adaptive REST API Testing with Reinforcement LearningMyeongsoo Kim, Saurabh Sinha, Alessandro OrsoASE 2023 · 29 次引用
- Automated Black-Box Testing of Mass Assignment Vulnerabilities in RESTful APIsDavide Corradini, Michele Pasqua, Mariano CeccatoICSE 2023 · 12 次引用
- RESTGuardian: Automated Black-Box Fuzzing for RESTful API via Efficient Dependency Inference and Deep Vulnerability DetectionYifan Guo, Na Wang, Yunjia Wang, Zhenyu Chen 等CCS 2026
- RBCTest: Leveraging LLMs to Mine and Verify Oracles of API Response Bodies for RESTful API TestingHieu Huynh, Quoc-Tri Le, Tu Nguyen, Viet Nguyen 等ICSE 2026
