Enhancing Resource-Based Test Case Generation for RESTful APIs with SQL Handling
Original version
Lecture Notes in Computer Science (LNCS). 2021, 12914 103-117. 10.1007/978-3-030-88106-1_8Abstract
Nowadays, many companies use RESTful web services to develop their enterprise applications. These web services typically interact with databases. In REST, resource handling is a fundamental concept, where resources are manipulated by exposing HTTP endpoints. Rd-MIO* is an evolutionary algorithm which is specialized in test generation for such kind of services, i.e., RESTful APIs, via manipulating resources in various ways using HTTP actions (e.g., GET and POST). In this paper, we further extended Rd-MIO* by employing SQL commands to manipulate the resources for test generation, directly into the databases. We implemented our novel technique as an extension of the EvoMaster tool. To evaluate our approach, we selected Rd-MIO* as a baseline technique and conducted an empirical study with five open source REST APIs. Results showed that our approach clearly outperforms the baseline over all of the five case studies.