Davide Corradini, Amedeo Zampieri, Michele Pasqua, and Mariano Ceccato

Resttestgen: An extensible framework for automated black-box testing of restful apis


Abstract

Over the past few years, more and more novel black- box testing approaches for RESTful APIs have been proposed. In order to assess their effectiveness, such testing strategies had to be implemented as a prototype tool and validated on empirical data. However, developing a testing tool is a time-consuming task, and reimplementing from scratch the same common basic features represents a waste of resources that causes a remarkable overhead in the "time to market" of research results.

In this paper, we present RestTestGen, an extensible frame- work for implementing new automated black-box testing strategies for RESTful APIs. The framework provides a collection of commonly used components, such as a robust OpenAPI specification parser, dictionaries, input value generators, mutation operators, oracles, and others. Many of the provided components are customizable and extensible, enabling researchers and practitioners to quickly prototype, deploy, and evaluate their novel ideas. Additionally, the framework facilitates the development of novel black-box testing strategies by guiding researchers, by means of abstract components that explicitly identify those parts of the framework requiring a concrete implementation.

As an adoption example, we show how we can implement nominal and error black-box testing strategies for RESTful APIs, by reusing primitives and features provided by the framework, and by concretely extending very few abstract components.

RestTestGen is open-source, actively maintained, and available on GitHub at https://github.com/SeUniVr/RestTestGen

PDF version of the paper.