Using Metamodels to Improve Model-Based Testing of Service Orchestrations

Lucas Leal Leonardo Montecchi Andrea Ceccarelli Eliane Martins University of Campinas University of Campinas University of Florence University of Campinas Campinas, Brazil Campinas, Brazil Florence, Italy Campinas, Brazil [email protected] [email protected] andrea.ceccarelli@unifi.it [email protected]

Abstract—Online model-based testing is one of the most are protocols (or contracts) among service providers that suitable techniques to assess the proper behavior of service contribute to the system’s goals [5]. This paper focuses on orchestrations. However, the diverse panorama in terms of service orchestrations, although concepts are extensible to modeling languages and test case generation tools is a limita- tion to widespread adoption. We advocate that the application other forms of SOA compositions. of Model-Driven Engineering principles as meta-modeling and In orchestrations, services are integrated blindly to their role model transformation can cope with this problem, improving the in the compositions, which makes their replacement easier. interoperability of artifacts in the test case generation process, However, orchestrations depend on the proper behavior of thus bringing benefits in case of agile development processes, its constituent services: behavior changes and unexpected where system and technology evolution is frequent. In this paper, we present our contribution to this idea, introducing evolution in services may jeopardize the whole composition i) a reference metamodel, which stores the business process operation. These factors, combined with the dynamic binding behavior and the information to generate input models for test- of components, which postpones the composition’s behavior ing tools, and ii) transformations from orchestration languages evaluation, forces the validation process to be performed at towards testing tools. The proposed approach is implemented the integration and runtime phases [6]. in a testing framework and evaluated on a case study where multiple orchestrations are expressed in two languages. Also, the The popularization of continuous integration and testing paper presents how test cases are appropriately generated and caused by the adoption of agile development pro- successfully executed, starting from an orchestration model as a cesses and DevOps practices helped reducing the time be- consequence of successful transformations. tween system releases [7]. The trend is that Index Terms—Model-Driven Engineering, SOA, Meta- now occurs parallel to software development and integration. modeling, Model-Based Testing. However, the use of test scripts and automated test suites does I.INTRODUCTION not solve all the problems regarding system validation. There is a need for methods to perform efficient full life cycle testing The Service-Oriented Architecture (SOA, [1]) paradigm and validation of the end-to-end business process, integrating was designed to permit loose coupling interactions among capabilities, and different system components [8] [9]. independent computational entities, called services, which are In order to overcome some of the challenges regarding usually controlled by different owners and hosted in different the validation process, the software industry invested in test locations [2]. Like microservices, SOA and its derivatives are automation techniques, and especially we consider in this the chosen solution to implement many of the systems that paper Model-Based Testing (MBT, [10]). Runtime Model- society depends on. These services support applications on based testing can ensure that the services, interfaces, messages, the internet of things (IoT), cyber-physical systems (CPS), and and business processes are behaving as expected [6]. Never- Systems of Systems (SoS) [3], [4]. theless, when considering services and SOA applications, i) The SOA