Litcius/Paper detail

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

202126 citationsDOIOpen Access PDF

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.

Topics & Concepts

White boxWhite-box testingBlack boxExploitTest suiteComputer scienceCode coverageFuzz testingSoftwareSoftware engineeringSoftware developmentTest caseOperating systemComputer securityArtificial intelligenceSoftware constructionMachine learningRegression analysisSoftware Testing and Debugging TechniquesSoftware Engineering ResearchSoftware Reliability and Analysis Research
Black-Box and White-Box Test Case Generation for RESTful APIs: Enemies or Allies? | Litcius