
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 software 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 software testing 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 paradigm has two main composition patterns: the different MBT tools used to automate the testing process, Choreography and Orchestration [5]. Their difference is the ii) the service diversity and their descriptions, iii) the frequent presence of a component responsible for managing the inter- need for system tests, iv) requirement changes, and v) the action of the other components of the system. Orchestrations unpredictable evolution and availability of services, make the rely on the “orchestrator”, which is usually controlled by testing process not efficient and troublesome to be maintained the SOA composition owner, and it is responsible for the [10]. coordination of the service providers (proprietary and third- In this paper, we advocate that the introduction of Model- party) that contribute to the system objectives. Choreographies Driven Engineering (MDE, [11]) techniques of model trans- This work has received funding from the European Union’s Horizon 2020 formation and artifact generation can be applied to overcome research and innovation program under the Marie Sklodowska-Curie grant the first and second identified challenges regarding SOA agreement No 823788 “ADVANCE”. This work has received funding from testing. Such approach facilitates the creation and execution the Sao˜ Paulo Research Foundation (FAPESP) with grant #2017/21773-9. This study was financed in part by the Coordenac¸ao˜ de Aperfeic¸oamento de of test suites for SOA applications, even when multiple testing Pessoal de N´ıvel Superior - Brasil (CAPES) - Finance Code 001. tools or different SOA descriptions and service languages are considered. This paper’s main contribution is to discuss the possible applications of MDE for the improvement of the runtime MBT process on SOA applications, taking into consideration the current software development paradigm. The paper also presents two metamodels, three transformations to guarantee interoperability with different orchestration languages and test- ing tools, and a running implementation based in an existing framework [12]. The proposed approach was evaluated on a case study with orchestrations expressed in two different languages, which evaluated the model transformations and if the reference metamodel is capable of bridging different SOA descriptions and MBT techniques. This paper is structured as follows. Section II introduces the basics. Section III explains the research questions and the methodology to devise the proposed solution. Sections IV and V contain the technical details of the proposed solution, presenting the metamodel and the transformations to generate artifacts from it. Section VI discusses the experimental results. Section VII discusses related works. Finally, Section VIII Fig. 1. Conceptualization levels in MDE. concludes the paper, including a discussion of our future works. B. Model-Based Testing II. FUNDAMENTALS Model-based testing (MBT) relies on models that reflect the behavior of the system under test (SUT) and of the A. Model-Driven Engineering environment, to automate the test-case generation processes. Model-Driven Engineering (MDE, [13]) relies on model It is a variant of black-box testing; therefore, the test cases abstractions, which represent information about a specific are generated without knowledge of the SUT source code. The domain. The MDE paradigm is explained by dividing it by tests target the SUT interface, asserting outputs accordingly to conceptualization levels and organizing it in implementation given inputs. Generated test cases are then utilized to evaluate levels. Conceptualization levels are organized in application- the SUT [15]. level (M1), application-domain (M2), and meta-level (M3). We The typical MBT process consists in i) generation of illustrate the division and organization of the MDE paradigm abstract test cases from the SUT behavior model, ii) imple- through Figure 1, which is also useful to explain the transfor- mentation of concrete test cases from the abstract ones, and mation methodology that we will use in the rest of the paper. iii) execution of the test cases on the SUT. Customizing this The figure presents an example of a model transformation process depends on the testers’ requirements, such as the need process between system X and system Y, divided into con- to test individual features of the SUT (partial system models), ceptualizations levels from bottom-up, and application from stress one specific SUT behavior (test case selection criteria), left to right [14]. or perform test case generation before or during test execution. Relevant core concepts are the concepts of model, meta- This last aspect discriminates between offline or online model- model, and meta-metamodel. A model is an abstraction of based testing [32]. a system, and it may represent an existing system or just a In this paper, since we are addressing the issues of testing possible design (e.g., the UML description of a software). dynamic SOA applications at runtime, online MBT has an A metamodel is also a model, and it defines structures and advantage over offline MBT. Online MBT can cope with rules to which models based on it should conform (e.g., most of SOA’s short deployment cycles and the unpredictable the UML metamodel [13]). A meta-metamodel defines the evolution/behavior of its components without storing pre- modeling-language that is used to describe metamodels [14] generated test cases. (e.g., the Meta-Object Facility [13], which is used to define the UML metamodel, among others). As exhibited in Figure 1, C. The SAMBA Framework the M1 layer focuses on model definitions,
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages10 Page
-
File Size-