Automated Specification-Based Testing of REST APIs
- PMID: 34450820
- PMCID: PMC8400446
- DOI: 10.3390/s21165375
Automated Specification-Based Testing of REST APIs
Abstract
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.
Keywords: OpenAPI 3.x; REST API; automatic test case generation; software testing; specification-based testing.
Conflict of interest statement
The authors declare no conflict of interest.
Figures
References
-
- Neumann A., Laranjeiro N., Bernardino J. An Analysis of Public REST Web Service APIs. IEEE Trans. Serv. Comput. 2018;14:957–970. doi: 10.1109/TSC.2018.2847344. - DOI
-
- Toman S.H. Review of Web Service Technologies: REST over SOAP. J. Al-Qadisiyah Comput. Sci. Math. 2020;12:18–30.
-
- Bülthoff F., Maleshkova M. Lecture Notes in Computer Science, Proceedings of the Semantic Web: ESWC 2014 Satellite Events, Crete, Greece, 25–29 May 2014. Springer; Cham, Switzerland: 2014. RESTful or RESTless—Current State of Today’s Top Web APIs; pp. 64–74.
-
- Ed-douibi H., Izquierdo J.L.C., Cabot J. Automatic Generation of Test Cases for REST APIs: A Specification-Based Approach; Proceedings of the 2018 IEEE 22nd International Enterprise Distributed Object Computing Conference; Stockholm, Sweden. 16–19 October 2018; Barcelona, Spain: Universitat Oberta de Catalunya; 2018.
-
- Karlsson A. Ph.D. Thesis. Linköping University; Linköping, Switzerland: 2020. Automatic Test Generation of REST API.
MeSH terms
LinkOut - more resources
Full Text Sources
