Automatic Property-based Testing of GraphQL APIs

by   Stefan Karlsson, et al.

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.



There are no comments yet.


page 1

page 2

page 3

page 4


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

RESTful APIs are an increasingly common way to expose software systems f...

Neural Unit Test Suggestions

Testing is widely recognized as an important stage of the software devel...

Harvesting Production GraphQL Queries to Detect Schema Faults

GraphQL is a new paradigm to design web APIs. Despite its growing popula...

Fault Detection for Timed FSM with Timeouts by Constraint Solving

Recently, an efficient constraint solving-based approach has been develo...

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

Automatic testing of mobile applications has been a well-researched area...

Fairness Testing: Testing Software for Discrimination

This paper defines software fairness and discrimination and develops a t...

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.