Deep Learning-Based Prediction of Test Input Validity for RESTful APIs
Automated test case generation for RESTful web APIs is a thriving research topic due to their key role in software integration. Most approaches in this domain follow a black-box approach, where test cases are randomly derived from the API specification. These techniques show promising results, but they neglect constraints among input parameters (so-called inter-parameter dependencies), as these cannot be formally described in current API specification languages. As a result, when testing real-world services, most random test cases tend to be invalid since they violate some of the inter-parameter dependencies of the service, making human intervention indispensable. In this paper, we propose a deep learning-based approach for automatically predicting the validity of an API request (i.e., test input) before calling the actual API. The model is trained with the API requests and responses collected during the generation and execution of previous test cases. Preliminary results with five real-world RESTful APIs and 16K automatically generated test cases show that test inputs validity can be predicted with an accuracy ranging from 86% to 100% in APIs like Yelp, GitHub, and YouTube. These are encouraging results that show the potential of artificial intelligence to improve current test case generation techniques.
Tue 1 JunDisplayed time zone: Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna change
10:00 - 12:00 | Session 1deeptest2021 at DeepTest Room Chair(s): Gunel Jahangirova USI Lugano, Switzerland, Andrea Stocco Università della Svizzera italiana (USI) | ||
10:00 60mKeynote | Problem Solving Combining Data Science and Web Knowledge deeptest2021 Amir Ronen SparkBeyond | ||
11:00 20mFull-paper | A Review and Refinement of Surprise Adequacy deeptest2021 Michael Weiss Università della Svizzera Italiana (USI), Rwiddhi Chakraborty USI Lugano, Switzerland, Paolo Tonella USI Lugano, Switzerland Pre-print | ||
11:20 10mFull-paper | Deep Learning-Based Prediction of Test Input Validity for RESTful APIs deeptest2021 Agatino Giuliano Mirabella Universidad de Sevilla, Alberto Martin-Lopez Universidad de Sevilla, Sergio Segura Universidad de Sevilla, Luis Valencia-Cabrera Universidad de Sevilla, Antonio Ruiz-Cortés University of Seville | ||
11:30 20mLive Q&A | Open Discussion & Q/A deeptest2021 |
Go directly to this room on Clowdr