Automatic Property-based Testing of GraphQL APIs

12/14/2020
by   Stefan Karlsson, et al.
0

In recent years, GraphQL has become a popular way to expose web APIs. With its raise of adoption in industry, the quality of GraphQL APIs must be also assessed, as with any part of a software system, and preferably in an automated manner. However, there is currently a lack of methods to automatically generate tests to exercise GraphQL APIs. In this paper, we propose a method for automatically producing GraphQL queries to test GraphQL APIs. This is achieved using a property-based approach to create a generator for queries based on the GraphQL schema of the system under test. Our evaluation on a real world software system shows that this approach is both effective, in terms of finding real bugs, and efficient, as a complete schema can be covered in seconds. In addition, we evaluate the fault finding capability of the method when seeding known faults. 73 with regards to domain specific behavior, a common oracle challenge in automatic test generation.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
12/20/2019

QuickREST: Property-based Test Generation of OpenAPI-Described RESTful APIs

RESTful APIs are an increasingly common way to expose software systems f...
research
07/29/2023

Neural-Based Test Oracle Generation: A Large-scale Evaluation and Lessons Learned

Defining test oracles is crucial and central to test development, but ma...
research
09/20/2021

Neural Unit Test Suggestions

Testing is widely recognized as an important stage of the software devel...
research
12/15/2021

Harvesting Production GraphQL Queries to Detect Schema Faults

GraphQL is a new paradigm to design web APIs. Despite its growing popula...
research
11/27/2018

Fault Detection for Timed FSM with Timeouts by Constraint Solving

Recently, an efficient constraint solving-based approach has been develo...
research
08/20/2020

Model-based Automated Testing of Mobile Applications: An Industrial Case Study

Automatic testing of mobile applications has been a well-researched area...
research
05/03/2021

MLCheck- Property-Driven Testing of Machine Learning Models

In recent years, we observe an increasing amount of software with machin...

Please sign up or login with your details

Forgot password? Click here to reset