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
POST COMMENT

Comments

There are no comments yet.

Authors

page 1

page 2

page 3

page 4

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...
09/20/2021

Neural Unit Test Suggestions

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

Harvesting Production GraphQL Queries to Detect Schema Faults

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

Fault Detection for Timed FSM with Timeouts by Constraint Solving

Recently, an efficient constraint solving-based approach has been develo...
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...
09/11/2017

Fairness Testing: Testing Software for Discrimination

This paper defines software fairness and discrimination and develops a t...
05/03/2021

MLCheck- Property-Driven Testing of Machine Learning Models

In recent years, we observe an increasing amount of software with machin...
This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.