Proposal of an Automated Testing Method for GraphQL APIs Using Reinforcement Learning
Kenzaburo Saito, Yasuyuki Tahara, Akihiko Ohsuga, Yuichi Sei
2025
Abstract
GraphQL is a new query language for APIs that has a different structure from the commonly used REST API, making it difficult to apply conventional automated testing methods. This necessitates new approaches. This study proposes GQL-QL, an automated testing method for GraphQL APIs using reinforcement learning. The proposed method uses Q-learning to explore the test space. It generates requests by selecting API fields and arguments based on the schema and updates Q-values according to the response. By repeating this process and learning from it, efficient black-box testing is achieved. Experiments were conducted on publicly available APIs to evaluate the effectiveness of the proposed method using schema coverage and error response rate as metrics. The results showed that the proposed method outperformed existing methods on both metrics.
DownloadPaper Citation
in Harvard Style
Saito K., Tahara Y., Ohsuga A. and Sei Y. (2025). Proposal of an Automated Testing Method for GraphQL APIs Using Reinforcement Learning. In Proceedings of the 17th International Conference on Agents and Artificial Intelligence - Volume 3: ICAART; ISBN 978-989-758-737-5, SciTePress, pages 1101-1107. DOI: 10.5220/0013263100003890
in Bibtex Style
@conference{icaart25,
author={Kenzaburo Saito and Yasuyuki Tahara and Akihiko Ohsuga and Yuichi Sei},
title={Proposal of an Automated Testing Method for GraphQL APIs Using Reinforcement Learning},
booktitle={Proceedings of the 17th International Conference on Agents and Artificial Intelligence - Volume 3: ICAART},
year={2025},
pages={1101-1107},
publisher={SciTePress},
organization={INSTICC},
doi={10.5220/0013263100003890},
isbn={978-989-758-737-5},
}
in EndNote Style
TY - CONF
JO - Proceedings of the 17th International Conference on Agents and Artificial Intelligence - Volume 3: ICAART
TI - Proposal of an Automated Testing Method for GraphQL APIs Using Reinforcement Learning
SN - 978-989-758-737-5
AU - Saito K.
AU - Tahara Y.
AU - Ohsuga A.
AU - Sei Y.
PY - 2025
SP - 1101
EP - 1107
DO - 10.5220/0013263100003890
PB - SciTePress