White-Box and Black-Box Fuzzing for GraphQL APIs

09/13/2022
by   Asma Belhadi, et al.
0

The Graph Query Language (GraphQL) is a powerful language for APIs manipulation in web services. It has been recently introduced as an alternative solution for addressing the limitations of RESTful APIs. This paper introduces an automated solution for GraphQL APIs testing. We present a full framework for automated APIs testing, from the schema extraction to test case generation. In addition, we consider two kinds of testing: white-box and black-box testing. The white-box testing is performed when the source code of the GraphQL API is available. Our approach is based on evolutionary search. Test cases are evolved to intelligently explore the solution space while maximizing code coverage and fault-finding criteria. The black-box testing does not require access to the source code of the GraphQL API. It is therefore of more general applicability, albeit it has worse performance. In this context, we use a random search to generate GraphQL data. The proposed framework is implemented and integrated into the open-source EvoMaster tool. With enabled white-box heuristics, i.e., white-box mode, experiments on 7 open-source GraphQL APIs show statistically significant improvement of the evolutionary approach compared to the baseline random search. In addition, experiments on 31 online GraphQL APIs reveal the ability of the black-box mode to detect real faults.

READ FULL TEXT

page 14

page 15

page 16

page 17

research
01/06/2019

RESTful API Automated Test Case Generation

Nowadays, web services play a major role in the development of enterpris...
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 ...
research
10/06/2019

Automated Isolation for White-box Test Generation

Context. White-box test generation is a technique used for automatically...
research
11/26/2022

An Efficient Black-Box Support of Advanced Coverage Criteria for Klee

Dynamic symbolic execution (DSE) is a powerful test generation approach ...
research
10/28/2022

ATM: Black-box Test Case Minimization based on Test Code Similarity and Evolutionary Search

Executing large test suites is time and resource consuming, sometimes im...
research
05/10/2022

White-box Testing of NLP models with Mask Neuron Coverage

Recent literature has seen growing interest in using black-box strategie...
research
08/26/2020

Hybrid Deep Neural Networks to Infer State Models of Black-Box Systems

Inferring behavior model of a running software system is quite useful fo...

Please sign up or login with your details

Forgot password? Click here to reset