Compatibility Modeling and Testing of REST API based on REST Chart

Compatibility of REST API has become an acute issue in many large scale distributed software systems where many REST APIs evolve rabidly with new services and service updates. To address this problem in a generic fashion independent of the REST API implementations, this paper presents an approach based on REST Chart, a Petri-Net based XML language and modelling framework to describe and track down the variations among REST APIs. In addition, an efficient algorithm is developed that can perform the fast model checking to determine the compatibility between two REST APIs from their REST Chart representations. Unlike conventional monolithic client architecture based backward compatibility testing approaches, REST Chart compatibility modelling is defined formally in terms of a client operational model that decomposes the client side service infrastructure into two reusable functional modules: a client oracle that selects hyperlinks to follow for a given goal, and a client agent that carries out the interaction as instructed by the oracle. A prototype system has been implemented and the preliminary experimental results show that the approach is feasible and promising.