On this page

Research and application of RESTful API interface testing technology based on simulation environment construction

By: Fuju Sun 1
1 School of Information Technology and Intelligent Manufacturing, Shanghai Xingjian College, Shanghai, 200072, China

Abstract

The popularization of microservice architecture and cloud computing has driven RESTful API interfaces to become the core vehicle for service interaction. In this paper, we propose a test case generation algorithm PSST based on solution space tree to improve the quality of RESTful API interfaces. Combining OpenAPI specification and combinatorial testing theory, we construct a hierarchical nested API architecture by analyzing the path, parameter and response mapping relationship of the interface definition file. The PSST algorithm for generating combinatorial test cases based on the solution space tree is introduced, and the case generation process is optimized based on the greedy algorithm. The results show that the reward value of PSST algorithm is 9.524. 100% state coverage and key module coverage are realized when 22 and 50 test cases are generated. The test program runs with no more than 40% CPU and memory usage and fast IO read/write growth. The RESTful API interface after the use case generation test is able to satisfy the access requirements of 750 users at the same time.