SOA-Test Accelerator) Instituto Superior T´Ecnico– Universidade De Lisboa
Total Page:16
File Type:pdf, Size:1020Kb
Test Accelerator for Service Oriented Architectures (SOA-Test Accelerator) Instituto Superior T´ecnico{ Universidade de Lisboa Jo~aoFilipe Garrett Paix~aoFlor^encio [email protected] October 2015 Abstract This document describes the design and development of a tool, \SOA { Test Accelerator", created to automate intelligent test creation in service oriented architectures. The need for such a tool comes from the increasing difference between testing some independent services and testing their overall interaction. As the system architecture grows in number of services, manually creating test case scenarios becomes an heavy burden. SOA-TA's ultimate goal is to reduce the time spent on combining and orchestrating service calls to simulate a business process. The work presented here is based on five stages and their outcome depends on the exhaustiveness level chosen by the user. First, the automatic generation of test cases through process descriptions analysis, having business requirements in consideration. Second, the generation of the input set required to execute these test cases. Third, the production of specific service calls, by means of test scripts to be run on Apache JMeter. Fourth, the execution of these scripts and fifth, showing the results. SOA-TA will be useful for operations that rely on consecutive service calls, and need to ensure the overall system compliance with previously set requirements. Keywords:SOA testing,test case generation,test case execution,web services,service test- ing,coverage. 1 Introduction tegration of several individual software modules, in our case web services to be combined and tested as a We cannot solve our problems with the same thinking we used when we created them. group. In order for we to group all the components -Albert Einstein of a service based system we need to create test Nobody is perfect. Humans make mistakes all cases while focusing on the tasks those services will the time. While some of them are negligible, some preform. If the process of deriving test cases could are expensive or dangerous. We are used to as- be automated and provide requirements-based and sume that our work may have mistakes, even minor coverage-based test suites that satisfy the most ones, and it needs testing. Software testing in par- stringent standard dramatic time and cost savings ticular is now recognized as a key activity of large would be realized [12]. This is what we are aiming systems development. Companies have come to un- to do. derstand that, in order to achieve an higher qual- ity product, efforts on verification and validation, 1.1 Goals Motivation commonly known as V&V [1], save time and money. Service{Oriented Architectures (SOA) [2], as imple- In order to fill the gap between regular testing and mented by web services, present features that add modern service oriented architecture testing, arises much complexity to the testing burden. SOA, by the SOA-Test Accelerator. The main objective of its dynamic and always-on nature makes most test- our work was to create something that takes the re- ing techniques not directly applicable to it [8]. As sponsibility off the testers of coming up with intelli- Bartolini [10] states, \even if best practices are fol- gent and smart test paths or scenarios. Commercial lowed by the developer to test a service to ensure tools are mainly software applications where tests its quality, nothing guarantees that it will operate can be executed, and results can be seen and ex- smoothly as part of a dynamic distributed system tracted. In all of them, the tester has to specifically made of multiple orchestrated but autonomous ser- create the test cases, give the inputs, and come up vices." with a testing strategy suitable for the process. Our As service oriented systems are the pinnacle of goal was to create an on-line platform where the this loosely coupled kind of systems, we need to en- user could enter the BPMN [13] description of the sure more than just the functional integrity of its tasks to test and then our Test-Accelerator would units, we need to be sure all the components are do the rest. Which means creating the test cases well integrated. We are going to focus on the in- based on coverage standards, discover intelligently 1 the proper input data, run the tests, and ultimately testing. In unit testing the authors propose the re- provide the user an overview of the results. utilization of work already done in components test- The main improvement or innovation on SOA- ing and generate black box tests from the WSDL TA is the adaptation of concepts and ideas already document, and take advantage of commercial tools studied on graph analysis and satisfiability modulo potentials (like the ones mentioned on section 2.2) theories, and bringing them to improve automatic to generate test-cases. testing. Therefore the main goal was to create a Integration testing is also challenging mainly due system that would serve testers and their work, cre- to third party services dependencies and the pos- ating value for the company using it. sibility of services being missing in the moment of testing. The authors state that it has to be accepted that 2 Related Work for all but the simplest of services, it is very difficult to test exhaustively every input or output. Accord- Tying the work we have done with previous research ing to them, \Up to date there is no end-to-end is not an easy job due to the fact that we are join- automated system testing solution for SOA on the ing two different study areas, automatic test case market." [8] In Bartolini [10] is presented a solu- generation and service architectures testing plat- tion to go around a common trait existing test ap- forms. Hence, the following sections will be divided proaches share, which is they treat the web services in this two major categories, the academic (mostly as black boxes and focus on the external behaviour research work) and the commercial testing frame- ignoring internal structure, as our SOA-TA does. works. Their approach called Service Oriented Cover- age Testing (SOCT) relies on creating a governance framework testing at the orchestration level during 2.1 Academic validation. Using this method, it can monitor what Rayadurgam [12] worked on a method of automati- parts of actual source code are executed but it re- cally generate test-cases with model checkers, which quires services developers to instrument the code is a technique to exhaustively and automatically so as to enable target program entities execution check if a certain model meets a given specifica- monitoring. tion [14]. The authors suggest a formal framework This method of addressing SOA testing shows to describe both the system's model and its speci- good results, nevertheless the need to modify ser- fications, which is then used alongside the test cri- vices code to allow its instrumentation, cannot be teria to produce test-cases. The main algorithm disregarded. relies on generating a set of properties and then ask the model checker to verify them one by one. This method does not address the obstacle of state 2.2 Commercial Testing Frameworks space explosion. Also, creating a formal descrip- tion of simpler systems and models is a task that In this section we are going review some tools com- not everyone person could do, besides its neces- mercially available today claiming to address the sity might be obliterated when using a different ap- service based architectures testing. We are not aim- proach like ours, in which a simple process descrip- ing to provide an exhaustive list of every single soft- tion in BPMN is used. ware platform that has some testing capabilities, we have just selected a few of the biggest, most widely The approach chosen by Bai [15] relies on a used and most representative of the state-of-the-art. WSDL document analysis to figure out dependen- cies between operations. The service contract is parsed and test data is generated by examining 2.2.1 HP Unified Functional Testing (UFT) the message data types according to standard XML schema syntax. Input and output dependencies re- Hewlett-Packard has launched in 2012 a frame- veal which operations can be grouped in the same work which provides functional and regression test test case. Although they are indeed automatically automation for software applications and environ- generated and cover all the operations, this method ments [22] It has incorporated a previous web ser- tests each service independently and not all the ser- vices specific tool, HP Service test. It enables devel- vices use in a given process. Unless the whole sys- opers to test, from a single console, all three layers: tem at hand is a unique service, analysing its oper- the interface, the service and the database layer. ation set does not suit integration testing. As the other testing frameworks/tools presented in this section, it claims to automate testing. This 2.1.1 Testing SOA is, at some extent true since it uses a scripting lan- guage to make repetitive tasks automatic. However Ribarov et al [8] address testing in three major it only automates independent testing of services, functions, unit, integration and functional system not the whole architecture testing process. 2 2.3 Related Work Critical Analysis 2.3 Related Work Critical Analysis 2.2.2 Oracle Testing Accelerators for Web number of test scenarios and automatic providing Services with proper input. As stated in the beginning, the SOA-TA final stage is the script generation. This Oracle has launched in 2011 the 12c version of script would have to be executed in one of the test- its framework, Enterprise Manager, which includes ing tools mentioned in this section.