LogiAgent: Automated Logical Testing for REST Systems with LLM-Based Multi-Agents

Fuente: arXiv
Enregistré dans:
Détails bibliographiques
Auteurs principaux: Zhang, Ke, Zhang, Chenxi, Wang, Chong, Zhang, Chi, Wu, YaChen, Xing, Zhenchang, Liu, Yang, Li, Qingshan, Peng, Xin
Format: Preprint
Publié: 2025
Sujets:
Accès en ligne:
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866909542661488640
author Zhang, Ke
Zhang, Chenxi
Wang, Chong
Zhang, Chi
Wu, YaChen
Xing, Zhenchang
Liu, Yang
Li, Qingshan
Peng, Xin
author_facet Zhang, Ke
Zhang, Chenxi
Wang, Chong
Zhang, Chi
Wu, YaChen
Xing, Zhenchang
Liu, Yang
Li, Qingshan
Peng, Xin
contents Automated testing for REST APIs has become essential for ensuring the correctness and reliability of modern web services. While existing approaches primarily focus on detecting server crashes and error codes, they often overlook logical issues that arise due to evolving business logic and domain-specific requirements. To address this limitation, we propose LogiAgent, a novel approach for logical testing of REST systems. Built upon a large language model (LLM)-driven multi-agent framework, LogiAgent integrates a Test Scenario Generator, API Request Executor, and API Response Validator to collaboratively generate, execute, and validate API test scenarios. Unlike traditional testing methods that focus on status codes like 5xx, LogiAgent incorporates logical oracles that assess responses based on business logic, ensuring more comprehensive testing. The system is further enhanced by an Execution Memory component that stores historical API execution data for contextual consistency. We conduct extensive experiments across 12 real-world REST systems, demonstrating that LogiAgent effectively identifies 234 logical issues with an accuracy of 66.19%. Additionally, it basically excels in detecting server crashes and achieves superior test coverage compared to four state-of-the-art REST API testing tools. An ablation study confirms the significant contribution of LogiAgent's memory components to improving test coverage.
format Preprint
id arxiv_https___arxiv_org_abs_2503_15079
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle LogiAgent: Automated Logical Testing for REST Systems with LLM-Based Multi-Agents
Zhang, Ke
Zhang, Chenxi
Wang, Chong
Zhang, Chi
Wu, YaChen
Xing, Zhenchang
Liu, Yang
Li, Qingshan
Peng, Xin
Software Engineering
Automated testing for REST APIs has become essential for ensuring the correctness and reliability of modern web services. While existing approaches primarily focus on detecting server crashes and error codes, they often overlook logical issues that arise due to evolving business logic and domain-specific requirements. To address this limitation, we propose LogiAgent, a novel approach for logical testing of REST systems. Built upon a large language model (LLM)-driven multi-agent framework, LogiAgent integrates a Test Scenario Generator, API Request Executor, and API Response Validator to collaboratively generate, execute, and validate API test scenarios. Unlike traditional testing methods that focus on status codes like 5xx, LogiAgent incorporates logical oracles that assess responses based on business logic, ensuring more comprehensive testing. The system is further enhanced by an Execution Memory component that stores historical API execution data for contextual consistency. We conduct extensive experiments across 12 real-world REST systems, demonstrating that LogiAgent effectively identifies 234 logical issues with an accuracy of 66.19%. Additionally, it basically excels in detecting server crashes and achieves superior test coverage compared to four state-of-the-art REST API testing tools. An ablation study confirms the significant contribution of LogiAgent's memory components to improving test coverage.
title LogiAgent: Automated Logical Testing for REST Systems with LLM-Based Multi-Agents
topic Software Engineering
url https://arxiv.org/abs/2503.15079