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.


翻译:图形QL 是设计网络 API 的新范例 。 尽管它越来越受欢迎, 很少有技术来验证 图形QL API 的实施 。 我们展示了一种基于 GraphQL 查询的新测试方法, 在用户与生产应用程序互动时, 以图形QL 查询记录下来。 我们的核心动机是, 生产查询能够捕捉应用程序的真实用途, 并已知会引发开发者无法测试的行为 。 对于每个登录查询, 都会产生一个测试, 以确认图形QL 回应对 schema 的正确性 。 我们用一个名为 AutoGraph QL 的工具执行我们的方法, 并评估两个真实世界的案例研究, 这些案例研究在其域和技术堆中是多种多样的: 在Python 称作 Saleler 的 Python 中实施了一个开放源的电子商务应用程序, 以及一个工业案例研究, 是一个基于 PHPHP 的金融网站, 名为 Frontap 。 AutGraphQL 成功生成了两个应用程序的测试案例。 。 。 测试覆盖了 Salemor schema 的26.9 %,, 包括未由原测试套件所操作所操作的部分, 还有48.

0
下载
关闭预览

相关内容

Linux导论,Introduction to Linux,96页ppt
专知会员服务
75+阅读 · 2020年7月26日
Keras François Chollet 《Deep Learning with Python 》, 386页pdf
专知会员服务
144+阅读 · 2019年10月12日
强化学习最新教程,17页pdf
专知会员服务
167+阅读 · 2019年10月11日
机器学习入门的经验与建议
专知会员服务
90+阅读 · 2019年10月10日
【SIGGRAPH2019】TensorFlow 2.0深度学习计算机图形学应用
专知会员服务
39+阅读 · 2019年10月9日
分布式并行架构Ray介绍
CreateAMind
9+阅读 · 2019年8月9日
CCF C类 | DSAA 2019 诚邀稿件
Call4Papers
6+阅读 · 2019年5月13日
fastlane 入门使用
CocoaChina
4+阅读 · 2019年4月23日
CCF A类 | 顶级会议RTSS 2019诚邀稿件
Call4Papers
10+阅读 · 2019年4月17日
Call for Participation: Shared Tasks in NLPCC 2019
中国计算机学会
5+阅读 · 2019年3月22日
人工智能 | SCI期刊专刊信息3条
Call4Papers
5+阅读 · 2019年1月10日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
16+阅读 · 2018年12月24日
carla 学习笔记
CreateAMind
9+阅读 · 2018年2月7日
分布式TensorFlow入门指南
机器学习研究会
4+阅读 · 2017年11月28日
Adversarial Variational Bayes: Unifying VAE and GAN 代码
CreateAMind
7+阅读 · 2017年10月4日
Arxiv
0+阅读 · 2022年2月22日
Arxiv
5+阅读 · 2021年6月3日
Arxiv
13+阅读 · 2021年3月3日
Few-shot Scene-adaptive Anomaly Detection
Arxiv
8+阅读 · 2020年7月15日
VIP会员
相关资讯
分布式并行架构Ray介绍
CreateAMind
9+阅读 · 2019年8月9日
CCF C类 | DSAA 2019 诚邀稿件
Call4Papers
6+阅读 · 2019年5月13日
fastlane 入门使用
CocoaChina
4+阅读 · 2019年4月23日
CCF A类 | 顶级会议RTSS 2019诚邀稿件
Call4Papers
10+阅读 · 2019年4月17日
Call for Participation: Shared Tasks in NLPCC 2019
中国计算机学会
5+阅读 · 2019年3月22日
人工智能 | SCI期刊专刊信息3条
Call4Papers
5+阅读 · 2019年1月10日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
16+阅读 · 2018年12月24日
carla 学习笔记
CreateAMind
9+阅读 · 2018年2月7日
分布式TensorFlow入门指南
机器学习研究会
4+阅读 · 2017年11月28日
Adversarial Variational Bayes: Unifying VAE and GAN 代码
CreateAMind
7+阅读 · 2017年10月4日
相关论文
Top
微信扫码咨询专知VIP会员