ASE2024
Using LLM for Mining and Testing Constraints in API Testing
Hieu Huynh, Quoc-Tri Le, Tien N. Nguyen, Vu Nguyen
2 citations
Abstract
Testing Representational State Transfer (REST) APIs is crucial for ensuring the reliability and performance of APIs, which are essential to modern web services. This testing process helps identify and resolve issues related to data exchange and integration with other systems. Among the various API testing techniques, black-box testing relies on the OpenAPI Specification (OAS) to generate test cases and data. However, current API test automation methods are primarily focused on status code [10] and schema validation [1] . Status code validation involves ensuring that each HTTP request returns a response with a status code, a three-digit integer that indicates the outcome of the request. Schema validation verifies the correctness of the response data by comparing it to the schema. This includes checking that all required properties are present and that data types of these properties align with the schema specified. While status code and schema validation are effective in ensuring correct data representation and status verification, they may miss issues related to the logical correctness and validity of the response data. For instance, if an API request asks for a flight before January 1, 2025, but the response provides a flight after that