We gratefully acknowledge support from
the Simons Foundation and member institutions.
Full-text links:

Download:

Current browse context:

cs.SE

Change to browse by:

cs

References & Citations

DBLP - CS Bibliography

Bookmark

(what is this?)
CiteULike logo BibSonomy logo Mendeley logo del.icio.us logo Digg logo Reddit logo

Computer Science > Software Engineering

Title: Harvesting Production GraphQL Queries to Detect Schema Faults

Abstract: 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% of the Saleor schema, including parts of the API not exercised by the original test suite, as well as 48.7% of the Frontapp schema, detecting 8 schema faults, thanks to production queries.
Subjects: Software Engineering (cs.SE)
Journal reference: Proceedings of the International Conference on Software Testing, Verification and Validation (ICST), 2022
DOI: 10.1109/ICST53961.2022.00014
Cite as: arXiv:2112.08267 [cs.SE]
  (or arXiv:2112.08267v2 [cs.SE] for this version)

Submission history

From: Deepika Tiwari [view email]
[v1] Wed, 15 Dec 2021 17:00:36 GMT (226kb,D)
[v2] Fri, 17 Dec 2021 19:54:54 GMT (183kb,D)

Link back to: arXiv, form interface, contact.