Black-Box and White-Box Test Case Generation for RESTful APIs: Enemies or Allies?

Alberto Martin-Lopez, Andrea Arcuri, Sergio Segura, Antonio Ruiz-Cortés
{"title":"Black-Box and White-Box Test Case Generation for RESTful APIs: Enemies or Allies?","authors":"Alberto Martin-Lopez, Andrea Arcuri, Sergio Segura, Antonio Ruiz-Cortés","doi":"10.1109/ISSRE52982.2021.00034","DOIUrl":null,"url":null,"abstract":"Automated test case generation for RESTful APIs is a thriving research topic due to their critical role in software integration. Testing approaches can be divided into black-box and white-box. Black-box approaches exploit the API specification for the generation of test cases, while white-box approaches can also leverage the source code. Both strategies have shown great promise, but they have not been fully compared yet, hindering the selection of the right tool for the job. In this paper, we report on our experience comparing black-box and white-box test case generation for RESTful APIs using the state-of-the-art tools RESTest (black-box) and EvoMaster (white-box). Also, we propose integrating both approaches by using black-box test cases as the seed for white-box search-based test case generation. Evaluation results on four RESTful APIs involving over 40 million API calls show that there is no one-size-fits-all strategy. More importantly, the combination of black-box and white- box yielded the best results in most case studies in terms of code coverage and fault finding, paving the way for better tools integrating the best of both perspectives. As a result of our work, we provide lessons learned and open challenges for guiding the use and further development of current tool support.","PeriodicalId":162410,"journal":{"name":"2021 IEEE 32nd International Symposium on Software Reliability Engineering (ISSRE)","volume":"27 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2021-10-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"15","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2021 IEEE 32nd International Symposium on Software Reliability Engineering (ISSRE)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/ISSRE52982.2021.00034","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 15

Abstract

Automated test case generation for RESTful APIs is a thriving research topic due to their critical role in software integration. Testing approaches can be divided into black-box and white-box. Black-box approaches exploit the API specification for the generation of test cases, while white-box approaches can also leverage the source code. Both strategies have shown great promise, but they have not been fully compared yet, hindering the selection of the right tool for the job. In this paper, we report on our experience comparing black-box and white-box test case generation for RESTful APIs using the state-of-the-art tools RESTest (black-box) and EvoMaster (white-box). Also, we propose integrating both approaches by using black-box test cases as the seed for white-box search-based test case generation. Evaluation results on four RESTful APIs involving over 40 million API calls show that there is no one-size-fits-all strategy. More importantly, the combination of black-box and white- box yielded the best results in most case studies in terms of code coverage and fault finding, paving the way for better tools integrating the best of both perspectives. As a result of our work, we provide lessons learned and open challenges for guiding the use and further development of current tool support.
RESTful api的黑盒和白盒测试用例生成:敌人还是盟友?
RESTful api的自动化测试用例生成是一个蓬勃发展的研究课题,因为它们在软件集成中的关键作用。测试方法可以分为黑盒和白盒。黑盒方法利用API规范生成测试用例,而白盒方法也可以利用源代码。这两种策略都显示出了巨大的希望,但它们还没有得到充分的比较,这阻碍了为这项工作选择正确的工具。在本文中,我们报告了我们使用最先进的工具RESTest(黑盒)和EvoMaster(白盒)为RESTful api生成黑盒和白盒测试用例的经验。同样,我们建议通过使用黑盒测试用例作为基于白盒搜索的测试用例生成的种子来集成这两种方法。对涉及超过4000万个API调用的四个RESTful API的评估结果表明,没有放之四海而皆准的策略。更重要的是,在大多数案例研究中,黑盒和白盒的结合在代码覆盖和故障查找方面产生了最好的结果,为更好的工具集成这两种视角的最佳效果铺平了道路。作为我们工作的结果,我们为指导当前工具支持的使用和进一步开发提供了经验教训和开放的挑战。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信