Adaptive REST API Testing with Reinforcement Learning

09/08/2023
by   Myeongsoo Kim, et al.
0

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.

READ FULL TEXT

page 1

page 7

research
06/26/2018

REST-ler: Automatic Intelligent REST API Fuzzing

Cloud services have recently exploded with the advent of powerful cloud-...
research
05/24/2023

Carving UI Tests to Generate API Tests and API Specification

Modern web applications make extensive use of API calls to update the UI...
research
03/05/2023

MINER: A Hybrid Data-Driven Approach for REST API Fuzzing

In recent years, REST API fuzzing has emerged to explore errors on a clo...
research
09/08/2023

Testing Real-World Healthcare IoT Application: Experiences and Lessons Learned

Healthcare Internet of Things (IoT) applications require rigorous testin...
research
03/06/2022

foREST: A Tree-based Approach for Fuzzing RESTful APIs

Representational state transfer (REST) is a widely employed architecture...
research
09/14/2021

Improving Test Case Generation for REST APIs Through Hierarchical Clustering

With the ever-increasing use of web APIs in modern-day applications, it ...
research
07/30/2021

Which RESTful API Design Rules Are Important and How Do They Improve Software Quality? A Delphi Study with Industry Experts

Several studies analyzed existing Web APIs against the constraints of RE...

Please sign up or login with your details

Forgot password? Click here to reset