Adaptive REST API Testing with Reinforcement Learning
摘要
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.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 11 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- 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
- APIRL: Deep Reinforcement Learning for REST API Fuzzing 引用了 Automated test generation for REST APIs: no time to rest yet
- APIRL: Deep Reinforcement Learning for REST API Fuzzing 引用了 DeepREST: Automated Test Case Generation for REST APIs Exploiting Deep Reinforcement Learning
- 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
- Smart-LLaMA-DPO: Reinforced Large Language Model for Explainable Smart Contract Vulnerability Detection 引用了 DeepREST: Automated Test Case Generation for REST APIs Exploiting Deep Reinforcement Learning
- Automated test generation for REST APIs: no time to rest yet 引用了 Combinatorial Testing of RESTful APIs
- Automated test generation for REST APIs: no time to rest yet 引用了 Morest: Model-based RESTful API Testing with Execution Feedback
- DeepREST: Automated Test Case Generation for REST APIs Exploiting Deep Reinforcement Learning 引用了 Reinforcement learning based curiosity-driven testing of Android applications
- DeepREST: Automated Test Case Generation for REST APIs Exploiting Deep Reinforcement Learning 引用了 Combinatorial Testing of RESTful APIs
- DeepREST: Automated Test Case Generation for REST APIs Exploiting Deep Reinforcement Learning 引用了 Automatic Web Testing Using Curiosity-Driven Reinforcement Learning
- DeepREST: Automated Test Case Generation for REST APIs Exploiting Deep Reinforcement Learning 引用了 Morest: Model-based RESTful API Testing with Execution Feedback
- Generating REST API Specifications through Static Analysis 引用了 Automated test generation for REST APIs: no time to rest yet
- LlamaRestTest: Effective REST API Testing with Small Language Models 引用了 Combinatorial Testing of RESTful APIs
- LlamaRestTest: Effective REST API Testing with Small Language Models 引用了 Morest: Model-based RESTful API Testing with Execution Feedback
- LlamaRestTest: Effective REST API Testing with Small Language Models 引用了 Automated test generation for REST APIs: no time to rest yet
- LlamaRestTest: Effective REST API Testing with Small Language Models 引用了 DeepREST: Automated Test Case Generation for REST APIs Exploiting Deep Reinforcement Learning
引用它的顶会 Paper11
- Smart-LLaMA-DPO: Reinforced Large Language Model for Explainable Smart Contract Vulnerability DetectionLei Yu, Zhirong Huang, Hang Yuan, Shiqi Cheng 等ISSTA 2025 · 13 次引用
- DeepREST: Automated Test Case Generation for REST APIs Exploiting Deep Reinforcement LearningDavide Corradini, Zeno Montolli, Michele Pasqua, Mariano CeccatoASE 2024 · 13 次引用
- Generating REST API Specifications through Static AnalysisRuikai Huang, Manish Motwani, Idel Martinez, Alessandro OrsoICSE 2024 · 11 次引用
- LlamaRestTest: Effective REST API Testing with Small Language ModelsMyeongsoo Kim, Saurabh Sinha, Alessandro OrsoFSE 2025 · 9 次引用
- APIRL: Deep Reinforcement Learning for REST API FuzzingMyles Foley, Sergio MaffeisAAAI 2025 · 6 次引用
它引用的 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 次引用
- Automated test generation for REST APIs: no time to rest yetMyeongsoo Kim, Qi Xin, Saurabh Sinha, Alessandro OrsoISSTA 2022 · 67 次引用
- 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 次引用
相关 Paper
- A Multi-Agent Approach for REST API Testing with Semantic Graphs and LLM-Driven InputsMyeongsoo Kim, Tyler Stennett, Saurabh Sinha, Alessandro OrsoICSE 2025 · 4 次引用
- Effective REST APIs Testing with Error Message AnalysisLixin Xu, Huayao Wu, Zhenyu Pan, Tongtong Xu 等ISSTA 2025 · 1 次引用
- Online testing of RESTful APIs: promises and challengesAlberto Martin-Lopez, Sergio Segura, Antonio Ruiz-CortésFSE 2022 · 34 次引用
- Learning-to-rank vs ranking-to-learn: strategies for regression testing in continuous integrationAntonia Bertolino, Antonio Guerriero, Breno Miranda, Roberto Pietrantuono 等ICSE 2020 · 81 次引用
- Carving UI Tests to Generate API Tests and API SpecificationRahulkrishna Yandrapally, Saurabh Sinha, Rachel Tzoref-Brill, Ali MesbahICSE 2023 · 21 次引用
