{"title":"Ant Bee Colony for Automated black-box testing of RESTful API","authors":"S. Ahmed, A. Hamdy","doi":"10.37394/232025.2022.4.10","DOIUrl":null,"url":null,"abstract":"Recently, RESTful APIs are widely utilized in a variety of web applications; developers utilize Restful APIs as a blacked-out component in micro-services. Black box testing for Restful APIs is essential as neither of the API’s source code nor its compiled binary is always available for public access. A handful number of research studies were conducted for the automatic generation of test suite for RESTful APIs based on black box testing. However, to our knowledge, none of them considered the test coverage criteria or the test suite optimization. This paper proposed adapting the Artificial Bee Colony (ABC) swarm intelligence algorithm for the automatic generation of test suites for Restful APIs based on Open API Specification (OAS); whilst also maximizing the API test coverage (path, operation, parameter, input value and status code). Experiments were conducted on six APIs that differ from each other in the number of routes, operation types, input values, and how well the API is documented. The experiments showed that the ABC algorithm can generate test suites that achieve high coverage criteria.","PeriodicalId":52482,"journal":{"name":"世界地震工程","volume":"9 1","pages":""},"PeriodicalIF":0.0000,"publicationDate":"2022-12-31","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"世界地震工程","FirstCategoryId":"1087","ListUrlMain":"https://doi.org/10.37394/232025.2022.4.10","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q4","JCRName":"Earth and Planetary Sciences","Score":null,"Total":0}
引用次数: 0
Abstract
Recently, RESTful APIs are widely utilized in a variety of web applications; developers utilize Restful APIs as a blacked-out component in micro-services. Black box testing for Restful APIs is essential as neither of the API’s source code nor its compiled binary is always available for public access. A handful number of research studies were conducted for the automatic generation of test suite for RESTful APIs based on black box testing. However, to our knowledge, none of them considered the test coverage criteria or the test suite optimization. This paper proposed adapting the Artificial Bee Colony (ABC) swarm intelligence algorithm for the automatic generation of test suites for Restful APIs based on Open API Specification (OAS); whilst also maximizing the API test coverage (path, operation, parameter, input value and status code). Experiments were conducted on six APIs that differ from each other in the number of routes, operation types, input values, and how well the API is documented. The experiments showed that the ABC algorithm can generate test suites that achieve high coverage criteria.