Rest API Functional Tester
Abstract
Software developers routinely publish REST APIs to make their applications accessible to clients, and numerous testing techniques and tools have been developed to automatically explore API endpoints, aiming to increase coverage and detect bugs. However, these techniques often generate test cases that are unsuitable for creating functional test suites. This paper addresses the challenge of automatically generating realistic functional test cases for REST APIs, guided by interactions with practitioners and the methods they employ for functional testing. Our approach first groups API operations by the resources they manipulate, then employs a novel method for inferring producer-consumer relationships between operations, fine-grained subtyping of HTTP methods, and language-model-based sequencing to construct operation sequences aligned with functional scenarios. We evaluated the effectiveness of this technique and compared it to state-of-the-art REST API testing tools. Results demonstrate that the proposed technique produces test cases better suited for functional testing of REST APIs than existing tools.