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
- A Multi-Agent Approach for REST API Testing with Semantic Graphs and LLM-Driven Inputs [46.65963514391019]
We present AutoRestTest, the first black-box framework to adopt a dependency-embedded multi-agent approach for REST API testing.
We integrate Multi-Agent Reinforcement Learning (MARL) with a Semantic Property Dependency Graph (SPDG) and Large Language Models (LLMs)
Our approach treats REST API testing as a separable problem, where four agents -- API, dependency, parameter, and value -- collaborate to optimize API exploration.
arXiv Detail & Related papers (2024-11-11T16:20:27Z) - DeepREST: Automated Test Case Generation for REST APIs Exploiting Deep Reinforcement Learning [5.756036843502232]
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.
Our empirical validation suggests that the proposed approach is very effective in achieving high test coverage and fault detection.
arXiv Detail & Related papers (2024-08-16T08:03:55Z) - FANTAstic SEquences and Where to Find Them: Faithful and Efficient API Call Generation through State-tracked Constrained Decoding and Reranking [57.53742155914176]
API call generation is the cornerstone of large language models' tool-using ability.
Existing supervised and in-context learning approaches suffer from high training costs, poor data efficiency, and generated API calls that can be unfaithful to the API documentation and the user's request.
We propose an output-side optimization approach called FANTASE to address these limitations.
arXiv Detail & Related papers (2024-07-18T23:44:02Z) - 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) - COTS: Connected OpenAPI Test Synthesis for RESTful Applications [0.0]
We introduce a (i) domain-specific language for OpenAPI specifications and (ii) a tool to support our methodology.
Our tool, dubbed COTS, generates (randomised) model-based test executions and reports software defects.
arXiv Detail & Related papers (2024-04-30T15:12:31Z) - 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) - SOLIS -- The MLOps journey from data acquisition to actionable insights [62.997667081978825]
In this paper we present a unified deployment pipeline and freedom-to-operate approach that supports all requirements while using basic cross-platform tensor framework and script language engines.
This approach however does not supply the needed procedures and pipelines for the actual deployment of machine learning capabilities in real production grade systems.
arXiv Detail & Related papers (2021-12-22T14:45:37Z) - AutoSTR: Efficient Backbone Search for Scene Text Recognition [80.7290173000068]
Scene text recognition (STR) is very challenging due to the diversity of text instances and the complexity of scenes.
We propose automated STR (AutoSTR) to search data-dependent backbones to boost text recognition performance.
Experiments demonstrate that, by searching data-dependent backbones, AutoSTR can outperform the state-of-the-art approaches on standard benchmarks.
arXiv Detail & Related papers (2020-03-14T06:51:04Z)
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.