一句话:提出首个依赖嵌入的多智能体 REST API 测试工具 AutoRestTest,结合 MARL、语义依赖图与 LLM 生成输入,提升覆盖率与故障检测能力。
现代 Web 服务广泛依赖 REST API,充分测试至关重要。OpenAPI 等文档语言催生了许多黑盒测试工具,但它们往往孤立处理 API、参数与取值等要素,覆盖率与故障检测效果受限。本文提出 AutoRestTest,首个依赖嵌入的多智能体黑盒 REST API 测试工具,融合多智能体强化学习(MARL)、语义属性依赖图(SPDG)与大语言模型(LLM):API、依赖、参数、取值四类智能体协同优化 API 探索,LLM 生成领域相关取值,SPDG 借助 API 操作间的相似度得分简化依赖搜索空间,MARL 动态优化智能体行为。在 12 个真实 REST 服务上,该工具在代码覆盖率、操作覆盖率与故障检测上均优于四个主流黑盒工具(含 RESTGPT 辅助者),并且是唯一触发 Spotify 服务内部服务器错误的工具;消融实验表明 SPDG、LLM 与智能体学习机制各自均有贡献。
As modern web services increasingly rely on REST APIs, their thorough testing has become crucial. Furthermore, the advent of REST API documentation languages, such as the OpenAPI Specification, has led to the emergence of many black-box REST API testing tools. However, these tools often focus on individual test elements in isolation (e.g., APIs, parameters, values), resulting in lower coverage and less effectiveness in fault detection. To address these limitations, we present AutoRestTest, the first black-box tool to adopt a dependency-embedded multi-agent approach for REST API testing that integrates 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 agents-collaborate to optimize API exploration. LLMs handle domain-specific value generation, the SPDG model simplifies the search space for dependencies using a similarity score between API operations, and MARL dynamically optimizes the agents' behavior. Our evaluation of AutoRestTest on 12 real-world REST services shows that it outperforms the four leading black-box REST API testing tools, including those assisted by RESTGPT (which generates realistic test inputs using LLMs), in terms of code coverage, operation coverage, and fault detection. Notably, AutoRestTest is the only tool able to trigger an internal server error in the Spotify service. Our ablation study illustrates that each component of AutoRestTest-the SPDG, the LLM, and the agent-learning mechanism-contributes to its overall effectiveness.
DOI 原文 ·
@inproceedings{paperbot8779,
title = {A Multi-Agent Approach for REST API Testing with Semantic Graphs and LLM-Driven Inputs},
author = {Myeongsoo Kim and Tyler Stennett and Saurabh Sinha and Alessandro Orso},
booktitle = {ICSE},
year = {2025},
doi = {10.1109/icse55347.2025.00179}
}