{"title":"蚁群用于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":null,"pages":null},"PeriodicalIF":0.0000,"publicationDate":"2022-12-31","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"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\":null,\"pages\":null},\"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}","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
摘要
最近,RESTful api被广泛应用于各种web应用程序中;开发人员利用Restful api作为微服务中的“黑掉”组件。Restful API的黑盒测试是必不可少的,因为API的源代码和编译后的二进制代码都不总是可供公众访问。针对基于黑盒测试的RESTful api测试套件的自动生成,进行了大量的研究。然而,据我们所知,他们都没有考虑测试覆盖标准或测试套件优化。本文提出了基于开放API规范(Open API Specification, OAS),将人工蜂群智能算法应用于Restful API测试套件的自动生成;同时最大化API测试覆盖率(路径、操作、参数、输入值和状态码)。实验在六个API上进行,这些API在路由数量、操作类型、输入值以及API的文档记录方面各不相同。实验表明,ABC算法可以生成达到高覆盖率标准的测试套件。
Ant Bee Colony for Automated black-box testing of RESTful API
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.