RESTful API Automated Test Case Generation

01/06/2019
by   Andrea Arcuri, et al.
0

Nowadays, web services play a major role in the development of enterprise applications. Many such applications are now developed using a service-oriented architecture (SOA), where microservices is one of its most popular kind. A RESTful web service will provide data via an API over the network using HTTP, possibly interacting with databases and other web services. Testing a RESTful API poses challenges, as inputs/outputs are sequences of HTTP requests/responses to a remote server. Many approaches in the literature do black-box testing, as the tested API is a remote service whose code is not available. In this paper, we consider testing from the point of view of the developers, which do have full access to the code that they are writing. Therefore, we propose a fully automated white-box testing approach, where test cases are automatically generated using an evolutionary algorithm. Tests are rewarded based on code coverage and fault finding metrics. We implemented our technique in a tool called EVOMASTER, which is open-source. Experiments on two open-source, yet non-trivial RESTful services and an industrial one, do show that our novel technique did automatically find 38 real bugs in those applications. However, obtained code coverage is lower than the one achieved by the manually written test suites already existing in those services. Research directions on how to further improve such approach are therefore discussed.

READ FULL TEXT

page 5

page 8

research
09/13/2022

White-Box and Black-Box Fuzzing for GraphQL APIs

The Graph Query Language (GraphQL) is a powerful language for APIs manip...
research
05/24/2023

Carving UI Tests to Generate API Tests and API Specification

Modern web applications make extensive use of API calls to update the UI...
research
10/21/2019

Generating Mock Skeletons for Lightweight Web-Service Testing

Modern application development allows applications to be composed using ...
research
12/20/2021

Deriving Semantics-Aware Fuzzers from Web API Schemas

Fuzzing – whether generating or mutating inputs – has found many bugs an...
research
10/06/2019

Automated Isolation for White-box Test Generation

Context. White-box test generation is a technique used for automatically...
research
05/19/2019

Model-based Automated Testing of JavaScript Web Applications via Longer Test Sequences

JavaScript has become one of the most widely used languages for Web deve...
research
09/15/2023

Advanced White-Box Heuristics for Search-Based Fuzzing of REST APIs

Due to its importance and widespread use in industry, automated testing ...

Please sign up or login with your details

Forgot password? Click here to reset