Harvesting Production GraphQL Queries to Detect Schema Faults

12/15/2021
by   Louise Zetterlund, et al.
0

GraphQL is a new paradigm to design web APIs. Despite its growing popularity, there are few techniques to verify the implementation of a GraphQL API. We present a new testing approach based on GraphQL queries that are logged while users interact with an application in production. Our core motivation is that production queries capture real usages of the application, and are known to trigger behavior that may not be tested by developers. For each logged query, a test is generated to assert the validity of the GraphQL response with respect to the schema. We implement our approach in a tool called AutoGraphQL, and evaluate it on two real-world case studies that are diverse in their domain and technology stack: an open-source e-commerce application implemented in Python called Saleor, and an industrial case study which is a PHP-based finance website called Frontapp. AutoGraphQL successfully generates test cases for the two applications. The generated tests cover 26.9 including parts of the API not exercised by the original test suite, as well as 48.7 queries.

READ FULL TEXT
research
12/02/2020

Production Monitoring to Improve Test Suites

Software testing ensures that a software system behaves as intended. In ...
research
08/02/2022

Mimicking Production Behavior with Generated Mocks

Mocking in the context of automated software tests allows testing progra...
research
12/14/2020

Automatic Property-based Testing of GraphQL APIs

In recent years, GraphQL has become a popular way to expose web APIs. Wi...
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
12/09/2022

Industrially Applicable System Regression Test Prioritization in Production Automation

When changes are performed on an automated production system (aPS), new ...
research
02/02/2020

Avocado: Open-Source Flexible Constrained Interaction Testing for Practical Application

This paper presents the outcome of a research collaboration between acad...
research
01/16/2020

Schema2QA: Answering Complex Queries on the Structured Web with a Neural Model

Virtual assistants today require every website to submit skills individu...

Please sign up or login with your details

Forgot password? Click here to reset