Adaptive REST API Testing with Reinforcement Learning
- URL: http://arxiv.org/abs/2309.04583v1
- Date: Fri, 8 Sep 2023 20:27:05 GMT
- Title: Adaptive REST API Testing with Reinforcement Learning
- Authors: Myeongsoo Kim, Saurabh Sinha, Alessandro Orso
- Abstract summary: Current testing tools lack efficient exploration mechanisms, treating all operations and parameters equally.
Current tools struggle when response schemas are absent in the specification or exhibit variants.
We present an adaptive REST API testing technique incorporates reinforcement learning to prioritize operations during exploration.
- Score: 54.68542517176757
- License: http://creativecommons.org/licenses/by/4.0/
- 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.
Related papers
- Utilizing API Response for Test Refinement [2.8002188463519944]
This paper proposes a dynamic test refinement approach that leverages the response message.
Using an intelligent agent, the approach adds constraints to the API specification that are further used to generate a test scenario.
The proposed approach led to a decrease in the number of 4xx responses, taking a step closer to generating more realistic test cases.
arXiv Detail & Related papers (2025-01-30T05:26:32Z) - AutoRestTest: A Tool for Automated REST API Testing Using LLMs and MARL [46.65963514391019]
AutoRestTest is a novel tool for testing REST APIs.
It integrates the Semantic Operation Dependency Graph (SODG) with Multi-Agent Reinforcement Learning (MARL) and large language models (LLMs)
It provides continuous telemetry on successful operation count, unique server errors detected, and time elapsed.
arXiv Detail & Related papers (2025-01-15T05:54:33Z) - LlamaRestTest: Effective REST API Testing with Small Language Models [50.058600784556816]
We present LlamaRestTest, a novel approach that employs two custom LLMs to generate realistic test inputs.
LlamaRestTest surpasses state-of-the-art tools in code coverage and error detection, even with RESTGPT-enhanced specifications.
arXiv Detail & Related papers (2025-01-15T05:51:20Z) - ALoRE: Efficient Visual Adaptation via Aggregating Low Rank Experts [71.91042186338163]
ALoRE is a novel PETL method that reuses the hypercomplex parameterized space constructed by Kronecker product to Aggregate Low Rank Experts.
Thanks to the artful design, ALoRE maintains negligible extra parameters and can be effortlessly merged into the frozen backbone.
arXiv Detail & Related papers (2024-12-11T12:31:30Z) - A Multi-Agent Approach for REST API Testing with Semantic Graphs and LLM-Driven Inputs [46.65963514391019]
We present AutoRestTest, the first black-box tool to adopt a dependency-embedded multi-agent approach for REST API testing.
Our approach treats REST API testing as a separable problem, where four agents collaborate to optimize API exploration.
Our evaluation of AutoRestTest on 12 real-world REST services shows that it outperforms the four leading black-box REST API testing tools.
arXiv Detail & Related papers (2024-11-11T16:20:27Z) - KAT: Dependency-aware Automated API Testing with Large Language Models [1.7264233311359707]
KAT (Katalon API Testing) is a novel AI-driven approach that autonomously generates test cases to validate APIs.
Our evaluation of KAT using 12 real-world services shows that it can improve validation coverage, detect more undocumented status codes, and reduce false positives in these services.
arXiv Detail & Related papers (2024-07-14T14:48:18Z) - Leveraging Large Language Models to Improve REST API Testing [51.284096009803406]
RESTGPT takes as input an API specification, extracts machine-interpretable rules, and generates example parameter values from natural-language descriptions in the specification.
Our evaluations indicate that RESTGPT outperforms existing techniques in both rule extraction and value generation.
arXiv Detail & Related papers (2023-12-01T19:53:23Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.