Random Testing and Evolutionary Testing for Fuzzing GraphQL APIs

Author:

Belhadi Asma1ORCID,Zhang Man1ORCID,Arcuri Andrea2ORCID

Affiliation:

1. Kristiania University College, Norway

2. Kristiania University College and Oslo Metropolitan University, Norway

Abstract

The Graph Query Language (GraphQL) is a powerful language for application programming interface (API) manipulation in web services. It has been recently introduced as an alternative solution for addressing the limitations of RESTful APIs. This article introduces an automated solution for GraphQL API testing. We present a full framework for automated API testing, from the schema extraction to test case generation. In addition, we consider two kinds of testing: white-box and black-box testing. The white-box testing is performed when the source code of the GraphQL API is available. Our approach is based on evolutionary search. Test cases are evolved to intelligently explore the solution space while maximizing code coverage and fault-finding criteria. The black-box testing does not require access to the source code of the GraphQL API. It is therefore of more general applicability, albeit it has worse performance. In this context, we use a random search to generate GraphQL data. The proposed framework is implemented and integrated into the open source EvoMaster tool. With enabled white-box heuristics (i.e., white-box mode), experiments on 7 open source GraphQL APIs and three search algorithms show statistically significant improvement of the evolutionary approach compared to the baseline random search. In addition, experiments on 31 online GraphQL APIs reveal the ability of the black-box mode to detect real faults.

Funder

European Research Council

Publisher

Association for Computing Machinery (ACM)

Subject

Computer Networks and Communications

Reference86 articles.

1. GitHub. 2023. AFL. Retrieved August 15 2023 from https://github.com/google/AFL

2. GraphQL. n.d. apis.guru. Retrieved August 15 2023 from https://apis.guru/graphql-apis/

3. GitHub. 2023. Apollo GraphQL. Retrieved August 15 2023 from https://github.com/apollographql

4. GitHub. 2023. e-commerce. Retrieved August 15 2023 from https://github.com/react-shop/react-ecommerce

5. GitHub. 2023. EvoMaster. Retrieved August 15 2023 from https://github.com/EMResearch/EvoMaster

Cited by 3 articles. 订阅此论文施引文献 订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献

1. Advanced White-Box Heuristics for Search-Based Fuzzing of REST APIs;ACM Transactions on Software Engineering and Methodology;2024-06-27

2. WENDIGO: Deep Reinforcement Learning for Denial-of-Service Query Discovery in GraphQL;2024 IEEE Security and Privacy Workshops (SPW);2024-05-23

3. Taint Analysis for Graph APIs Focusing on Broken Access Control;Lecture Notes in Computer Science;2024

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3