Cargando…

Automated Specification-Based Testing of REST APIs

Nowadays, REpresentational State Transfer Application Programming Interfaces (REST APIs) are widely used in web applications, hence a plethora of test cases are developed to validate the APIs calls. We propose a solution that automates the generation of test cases for REST APIs based on their specif...

Descripción completa

Detalles Bibliográficos
Autores principales: Baniaș, Ovidiu, Florea, Diana, Gyalai, Robert, Curiac, Daniel-Ioan
Formato: Online Artículo Texto
Lenguaje:English
Publicado: MDPI 2021
Materias:
Acceso en línea:https://www.ncbi.nlm.nih.gov/pmc/articles/PMC8400446/
https://www.ncbi.nlm.nih.gov/pubmed/34450820
http://dx.doi.org/10.3390/s21165375
_version_ 1783745316796760064
author Baniaș, Ovidiu
Florea, Diana
Gyalai, Robert
Curiac, Daniel-Ioan
author_facet Baniaș, Ovidiu
Florea, Diana
Gyalai, Robert
Curiac, Daniel-Ioan
author_sort Baniaș, Ovidiu
collection PubMed
description Nowadays, REpresentational State Transfer Application Programming Interfaces (REST APIs) are widely used in web applications, hence a plethora of test cases are developed to validate the APIs calls. We propose a solution that automates the generation of test cases for REST APIs based on their specifications. In our approach, apart from the automatic generation of test cases, we provide an option for the user to influence the test case generation process. By adding user interaction, we aim to augment the automatic generation of APIs test cases with human testing expertise and specific context. We use the latest version of OpenAPI 3.x and a wide range of coverage metrics to analyze the functionality and performance of the generated test cases, and non-functional metrics to analyze the performance of the APIs. The experiments proved the effectiveness and practicability of our method.
format Online
Article
Text
id pubmed-8400446
institution National Center for Biotechnology Information
language English
publishDate 2021
publisher MDPI
record_format MEDLINE/PubMed
spelling pubmed-84004462021-08-29 Automated Specification-Based Testing of REST APIs Baniaș, Ovidiu Florea, Diana Gyalai, Robert Curiac, Daniel-Ioan Sensors (Basel) Article Nowadays, REpresentational State Transfer Application Programming Interfaces (REST APIs) are widely used in web applications, hence a plethora of test cases are developed to validate the APIs calls. We propose a solution that automates the generation of test cases for REST APIs based on their specifications. In our approach, apart from the automatic generation of test cases, we provide an option for the user to influence the test case generation process. By adding user interaction, we aim to augment the automatic generation of APIs test cases with human testing expertise and specific context. We use the latest version of OpenAPI 3.x and a wide range of coverage metrics to analyze the functionality and performance of the generated test cases, and non-functional metrics to analyze the performance of the APIs. The experiments proved the effectiveness and practicability of our method. MDPI 2021-08-09 /pmc/articles/PMC8400446/ /pubmed/34450820 http://dx.doi.org/10.3390/s21165375 Text en © 2021 by the authors. https://creativecommons.org/licenses/by/4.0/Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
spellingShingle Article
Baniaș, Ovidiu
Florea, Diana
Gyalai, Robert
Curiac, Daniel-Ioan
Automated Specification-Based Testing of REST APIs
title Automated Specification-Based Testing of REST APIs
title_full Automated Specification-Based Testing of REST APIs
title_fullStr Automated Specification-Based Testing of REST APIs
title_full_unstemmed Automated Specification-Based Testing of REST APIs
title_short Automated Specification-Based Testing of REST APIs
title_sort automated specification-based testing of rest apis
topic Article
url https://www.ncbi.nlm.nih.gov/pmc/articles/PMC8400446/
https://www.ncbi.nlm.nih.gov/pubmed/34450820
http://dx.doi.org/10.3390/s21165375
work_keys_str_mv AT baniasovidiu automatedspecificationbasedtestingofrestapis
AT floreadiana automatedspecificationbasedtestingofrestapis
AT gyalairobert automatedspecificationbasedtestingofrestapis
AT curiacdanielioan automatedspecificationbasedtestingofrestapis