KAT: Dependency-aware Automated API Testing with Large Language Models

Fuente: arXiv
Enregistré dans:
Détails bibliographiques
Auteurs principaux: Le, Tri, Tran, Thien, Cao, Duy, Le, Vy, Nguyen, Tien, Nguyen, Vu
Format: Preprint
Publié: 2024
Sujets:
Accès en ligne:
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866911955172720640
author Le, Tri
Tran, Thien
Cao, Duy
Le, Vy
Nguyen, Tien
Nguyen, Vu
author_facet Le, Tri
Tran, Thien
Cao, Duy
Le, Vy
Nguyen, Tien
Nguyen, Vu
contents API testing has increasing demands for software companies. Prior API testing tools were aware of certain types of dependencies that needed to be concise between operations and parameters. However, their approaches, which are mostly done manually or using heuristic-based algorithms, have limitations due to the complexity of these dependencies. In this paper, we present KAT (Katalon API Testing), a novel AI-driven approach that leverages the large language model GPT in conjunction with advanced prompting techniques to autonomously generate test cases to validate RESTful APIs. Our comprehensive strategy encompasses various processes to construct an operation dependency graph from an OpenAPI specification and to generate test scripts, constraint validation scripts, test cases, and test data. Our evaluation of KAT using 12 real-world RESTful services shows that it can improve test coverage, detect more undocumented status codes, and reduce false positives in these services in comparison with a state-of-the-art automated test generation tool. These results indicate the effectiveness of using the large language model for generating test scripts and data for API testing.
format Preprint
id arxiv_https___arxiv_org_abs_2407_10227
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle KAT: Dependency-aware Automated API Testing with Large Language Models
Le, Tri
Tran, Thien
Cao, Duy
Le, Vy
Nguyen, Tien
Nguyen, Vu
Software Engineering
API testing has increasing demands for software companies. Prior API testing tools were aware of certain types of dependencies that needed to be concise between operations and parameters. However, their approaches, which are mostly done manually or using heuristic-based algorithms, have limitations due to the complexity of these dependencies. In this paper, we present KAT (Katalon API Testing), a novel AI-driven approach that leverages the large language model GPT in conjunction with advanced prompting techniques to autonomously generate test cases to validate RESTful APIs. Our comprehensive strategy encompasses various processes to construct an operation dependency graph from an OpenAPI specification and to generate test scripts, constraint validation scripts, test cases, and test data. Our evaluation of KAT using 12 real-world RESTful services shows that it can improve test coverage, detect more undocumented status codes, and reduce false positives in these services in comparison with a state-of-the-art automated test generation tool. These results indicate the effectiveness of using the large language model for generating test scripts and data for API testing.
title KAT: Dependency-aware Automated API Testing with Large Language Models
topic Software Engineering
url https://arxiv.org/abs/2407.10227