Service-oriented architectures (SOAs) support



Similar documents
A SOFTWARE RELIABILITY MODEL FOR WEB SERVICES

Run-time Service Oriented Architecture (SOA) V 0.1

Introduction to Service Oriented Architectures (SOA)

Service-Oriented Architecture and its Implications for Software Life Cycle Activities

Regression Testing of Web Services Using Parsing and Test case Prioritization Approach

Introduction to Service-Oriented Architecture for Business Analysts

A standards-based approach to application integration

A Quick Introduction to SOA

NIST s Guide to Secure Web Services

A QoS-Aware Web Service Selection Based on Clustering

Getting started with API testing

Improvised Software Testing Tool

Tool for Automatic Testing of Web Services

Chapter 8 Software Testing

Service-Oriented Architecture: Analysis, the Keys to Success!

Data Mining Governance for Service Oriented Architecture

Web Service Implementation Methodology

Testing and verification in service-oriented architecture: a survey

Introduction to WebSphere Process Server and WebSphere Enterprise Service Bus

Service Virtualization: Managing Change in a Service-Oriented Architecture

Web Application Regression Testing: A Session Based Test Case Prioritization Approach

A Conceptual Technique for Modelling Security as a Service in Service Oriented Distributed Systems

Quality Management. Lecture 12 Software quality management

A Unified Messaging-Based Architectural Pattern for Building Scalable Enterprise Service Bus

Principles and Foundations of Web Services: An Holistic View (Technologies, Business Drivers, Models, Architectures and Standards)

Developing SOA solutions using IBM SOA Foundation

Software testing. Objectives

SPML (Service Provisioning Markup Language) and the Importance of it within the Security Infrastructure Framework for ebusiness

A Generic Database Web Service

Verification and Validation of Software Components and Component Based Software Systems

What You Need to Know About Transitioning to SOA

Automating Service Negotiation Process for Service Architecture on the cloud by using Semantic Methodology

Requirement Engineering in Service-Oriented Architecture

Software Engineering/Courses Description Introduction to Software Engineering Credit Hours: 3 Prerequisite: (Computer Programming 2).

Basic Testing Concepts and Terminology

ISTQB Certified Tester. Foundation Level. Sample Exam 1

Supply Chain Management Use Case Model

SCA-based Enterprise Service Bus WebSphere ESB

SOA GOVERNANCE MODEL

Service Oriented Architecture (SOA) Architecture, Governance, Standards and Technologies

Lightweight Data Integration using the WebComposition Data Grid Service

Emerging Technologies Shaping the Future of Data Warehouses & Business Intelligence

SOA for Healthcare: Promises and Pitfalls

Research on the Model of Enterprise Application Integration with Web Services

Analyses on functional capabilities of BizTalk Server, Oracle BPEL Process Manger and WebSphere Process Server for applications in Grid middleware

Federation Proxy for Cross Domain Identity Federation

A System for Interactive Authorization for Business Processes for Web Services

WHAT IS BPEL AND WHY IS IT SO IMPORTANT TO MY BUSINESS?

The Use of Service Oriented Architecture In Tax and Revenue

A Collaborative System Software Solution for Modeling Business Flows Based on Automated Semantic Web Service Composition

Regression Testing Based on Comparing Fault Detection by multi criteria before prioritization and after prioritization

Service Oriented Architecture

ACE GIS Project Overview: Adaptable and Composable E-commerce and Geographic Information Services

Optimised Realistic Test Input Generation

Combining SAWSDL, OWL DL and UDDI for Semantically Enhanced Web Service Discovery

Survey on software testing techniques in cloud computing

Service Oriented Architecture (SOA) Architecture, Governance, Standards and Technologies

Service-Oriented Computing and Service-Oriented Architecture

Enterprise Application Designs In Relation to ERP and SOA

Introduction to UDDI: Important Features and Functional Concepts

An Oracle White Paper Dec Oracle Access Management Security Token Service

Protecting Database Centric Web Services against SQL/XPath Injection Attacks

SOA and Cloud in practice - An Example Case Study

Testing Web Services Today and Tomorrow

Towards Modeling and Transformation of Security Requirements for Service-oriented Architectures

Module 10. Coding and Testing. Version 2 CSE IIT, Kharagpur

2 (18) - SOFTWARE ARCHITECTURE Service Oriented Architecture - Sven Arne Andreasson - Computer Science and Engineering.

Enterprise Federation through Web Services based Contracts Architecture

Federated Service Oriented Architecture for Effects-Based Operations

Business Rule Standards -- Interoperability and Portability

Quality Model for Web Services

Tomáš Müller IT Architekt 21/04/2010 ČVUT FEL: SOA & Enterprise Service Bus IBM Corporation

SOA Myth or Reality??

Myths About Service-Oriented Architecture Demystifying SOA. producers can coexist, and still have no dependence on each other.

A Service Modeling Approach with Business-Level Reusability and Extensibility

Introduction to Automated Testing

A Supply Chain Management Framework Based on SOA

Transcription:

C o v e r f e a t u r e On Testing and Evaluating Service-Oriented Software WT Tsai, Xinyu Zhou, and Yinong Chen, Arizona State University Xiaoying Bai, Tsinghua University, China As service-oriented architecture matures and more Web services become available, developers must test an ever-increasing volume of services A framework that defines and evaluates testcase potency based on coverage relationships can reduce testing effort while maintaining testing s effectiveness Service-oriented architectures (SOAs) support Web services by facilitating sharing and communication among collaborators The many standards and related techniques that address Web service security issues WS- Security, WS-Trust, Extensible Access Control Markup Language (XACML), Security Assertion Markup Language (SAML), and so on have produced a level of security that customers can trust For example, people can bank, pay bills, and shop through the Internet with confidence Despite such progress in SOAs, service reliability, testing, and verification techniques aren t mature enough to support dependable and trustworthy computing As the Related Work in Testing SOA Applications sidebar describes, current Web service and SOA research focuses largely on protocols, functionality, transactions, ontology, composition, the semantic Web, and interoperability, while little research has explored service dependability and trustworthiness SOAs let application builders search and discover services from service brokers and use services from different service providers Because service brokers aren t responsible for the quality of the services they refer to or host, service trustworthiness isn t guaranteed Traditional dependability techniques correctness proof, fault-tolerant computing, model checking, testing, evaluation, and so on can improve individual services trustworthiness However, implementers must redesign these techniques to handle the dynamic applications composed of services at runtime SOA applications can use traditional independent verification and validation approaches to enforce verification in each phase of the SOA development life cycle (modeling, assembly, deployment, management, and so on) 1 In this case, however, all the code must be available and an independent team must test each service and all possible service combinations This approach is expensive to implement because the number of services available and their combinations can be huge In addition, service providers might be unwilling to share the code, which often runs on their own servers To address SOA dependability and trustworthiness issues, we propose an open framework that implements group testing to enhance test efficiency The framework identifies and eliminates test cases with overlapping coverage It also ranks newly added test cases and reranks existing test cases using updated coverage relationships and recent test results A case study demonstrates the framework s effectiveness in reducing testing effort while maintaining effectiveness Service Verification In Web 20, users can be active contributors Therefore, an open verification framework for testing SOA software would benefit all parties Such a framework 40 Computer Published by the IEEE Computer Society 0018-9162/08/$2500 2008 IEEE

Related Work in Testing SOA Applications Several studies have addressed the problems of testing service-oriented architecture applications Gerardo Canfora and Massimiliano Di Penta performed integration testing, functional testing, nonfunctional testing, and regression testing of SOAs 1 They also discussed the responsibilities and needs of SOA stakeholders, such as service providers and service consumers Luciano Baresi and Elisabetta Di Nitto presented various SOA verification and testing techniques, including monitoring, modeling, and reliability analysis 2 Yinong Chen and Wei-Tek Tsai systematically studied SOA software development, including the life cycle and techniques applied in each phase 3 Table A lists the types of testing SOA software must address Commercial tools for service testing are available IBM s Web Services Navigator, a testing and debugging tool, traces and visualizes the execution of services and thus helps programmers find bugs 4 The Web Services Interoperability Organization, an industry organization chartered to promote WS interoperability across platforms, released a service testing tool in March 2004 The tool has two components: WS-I monitor and WS-I analyzer WS-I monitor is placed between the client and the Web service to log all messages, requests, and responses as they travel back and forth The WS-I analyzer then analyzes these logs against the interoperability requirements References 1 G Canfora and M Di Penta, Testing Services and Service-Centric Systems: Challenges and Opportunities, IT Professional, vol 8, no 2, 2006, pp 10-17 2 L Baresi and E Di Nitto, eds, Test and Analysis of Web Services, 1st ed, Springer, 2007 3 Y Chen and WT Tsai, Distributed Service-Oriented Software Development, Kendall/Hunt Publishing, 2008 4 W De Pauw et al, Web Services Navigator: Visualizing the Execution of Web Services, IBM Systems J, vol 44, no 4, 2005, pp 821-845 Table A Testing service-oriented architecture software applications Type of testing SOA protocol testing Unit testing and individual service evaluations Integration testing and evaluation of application or composite services Interoperability testing Regression testing Load/stress testing Monitoring Security testing Service broker testing SOA testing and evaluation framework Description Test functionality and performance of SOA protocols for example, test SOAP, service publishing, and discovery; and evaluate protocol performance and the asynchronous nature of SOA operations Test, evaluate, and rank services with source code (both white-box and black-box testing) and those without source code (blackbox testing only) Multilevel integration testing and evaluation with or without all the source code Conformance testing to ensure compliance with SOA protocols and standards Modification compliance, including unit testing and integration testing Examine system behavior at different loads Track and evaluate runtime behavior Ensure and enforce security properties Ensure that service brokers, such as a UDDI or ebxml broker, perform registration and discovery properly, and enhance a service broker to act as an independent verification service to verify and rank services submitted for publication Develop integrated frameworks with processes and tools to test and evaluate services and applications could provide an experimental testbed for regulators, service providers, service brokers, service consumers, and researchers Using the framework, regulators could decide the metrics to establish service-quality criteria; service providers could evaluate their services before and after publishing them, and publish their evaluation data and mechanisms to increase consumer confidence; service brokers could provide value-added services by adding service verification as part of service discovery; service consumers could select services objectively, using quantitative data from the framework and could submit their test cases to the test-case repository; and researchers could develop and contribute techniques such as service performance and reliability assessments Thus, in this open framework, the services, test cases, test-case generation mechanisms, reliability models, and ranking algorithms are open to all parties, and can therefore be ranked as well In Web service testing scenarios, it s necessary to rapidly test multiple versions of services with the same August 2008 41

Service 1 Service 2 Implementations Service 3 Test cases Service 4 Atomic/composite service specification WSDL OWL-S BPEL4WS WSFL specifications, as Figure 1 shows Developers can specify atomic and composite services in the Business Process Execution Language for Web Services (BPEL4WS), the Semantic Web Ontology Language (OWL-S), or the Process Specification and Modeling Language for Service-Oriented Computing (PSML-S) with a Web Services Description Language (WSDL) interface Based on the specifications, testers can use test-case generation techniques to generate test cases The SOA verification techniques include testing, model checking, simulation, policy enforcement, and other mechanisms, such as completeness and consistency We focus on testing in particular, on how to test services efficiently Group Testing Services The service-oriented design lets service developers and providers, based on published service specifications, register services and compose complex (composite) services Testing Model checking Simulation Policy enforcement Other verification techniques Figure 1 Service verification scenarios In the figure, four services follow the same specification but with different implementations Test cases can be generated from the specification from other services As a result, for each service specification, alternative implementations might be available How can we test a large number of services efficiently? The group-testing technique, which was originally developed for testing blood samples and later for software regression testing, is a promising approach 2,3 We can apply group testing to both atomic and composite services Figure 2 outlines the testing mechanism for a group of atomic services implementing the same specification The group testing mechanism broadcasts the test cases T 1, T 2,, T m to all atomic services S 1, S 2,, S n under test A voting service, which can automatically generate an oracle for each test case based on the majority principle, collects the outputs It compares each service s output with the oracle It then dynamically logs the number of disagreements into each service profile and uses this number to evaluate and rank the service s reliability and the test cases effectiveness and to establish each test case s oracle Furthermore, we can calculate the oracle s reliability In the next testing phase, we apply the most effective test cases first, to reduce the testing time as a service that fails can be eliminated from further consideration We use these results to automatically update the service and test case rankings and the oracles reliability Assume a composite service consisting of n component services, with each component service having several equivalent services Thus, there are n sets of component services Assume Set i has m i equivalent component services If the composite service consists of one component service out of each set, m 1 * m 2 * * m n possible composite services exist A group of services that implement the same specification S 1 S 2 Voting S 3 T 1 T 2 T 3 T n 1 2 3 m S n Figure 2 Group testing for atomic services The total number of tests run is m * n However, the services can execute each test case in parallel to save test time 42 Computer

For example, if a composite consists of six atomic services, and each atomic service has 10 candidates, the total number of possible composite services is 10 6 Using a grouptesting mechanism can save test effort for composite services as well Figure 3 shows the group-testing process using a supply-chain example The supply-chain service consists of six atomic services: retail, lodging, transportation, payment, ordering, and discovering Group testing collects the outputs from all the retail services and establishes the oracle using the majority voting mechanism Incorrect retail services can be identified and eliminated using the established oracle Repeating this process for all atomic services can eliminate candidates from consideration Integration testing can be conducted using the same approach but with the best candidates from each atomic service only This process greatly reduces the number of combinations If the remaining combination is large, group testing at this level can eliminate candidate combinations Retail A supply chain composite service Test-Case Selection and Ranking Statistical analysis is often used in software testing James Whittaker and Michael Thomason proposed a statistical software testing model using a Markov chain 4 They represent the statistical testing model as a usage Markov chain and a testing Markov chain The usage Markov chain models the software s state diagram, and the testing Markov chain collects the testing profiles In Lodging Transportation Payment Ordering Discovering Failure analysis Figure 3 Applying group testing for composite services If each service has 10 candidates but seven are incorrect, group testing performs only 3 6 test runs rather than 10 6 to test different combinations of services Multiple retails Multiple ordering Failure analysis Multiple discovering services Voting group testing, test-case selection and ranking are the key factors in enhancing testing efficiency We use statistical data to rank test cases using two criteria: potency the probability that a test case can detect a fault (for example, if a test case fails 30 services out of 100, its potency is 03); and coverage relationship among test cases the amount of additional coverage one test case can bring given that we ve applied other test cases Motivation Figure 4 shows an example consisting of three test cases (T a,, ) and five services (S 1 ~ S 5 ) In Figure Voting 05 Services that generate correct output: Services that generate incorrect output: 033 1 T a T a S 1, S 2, S 1, S 4, S 1, S 3, S 3 S 5 S 4, S 5 S 4 S 2, S 3 S 2 S 1, S 2, S 1, S 4, S 1, S 3, S 3 S 5 S 4, S 5 S 4, S 5 033 075 05 S 2, S 3 S 2 (a) S 5 (b) Services, and the corresponding S-CRM Figure 4 Testing and service selection: (a) services are grouped by their output values and (b) services are grouped into two sets: correct services set, and incorrect services set For some type of services (for example, a forecasting service), the correct output might be unknown In this case, the majority voting mechanism can establish the oracle, evaluate the services, and then group the services according to their output values August 2008 43

4a, for each test case, the gray circles denote a correct output and the white circles denote various incorrect outputs After applying T a to the five services, S 1, S 2, and S 3 generate the same output, while S 4 and S 5 generate different outputs If the correct output is already given or is identifiable through the established oracle, we can group the services into two sets by their outputs correct services and incorrect services as Figure 4b shows If all other criteria are the same, group testing always applies the test case with the highest potency first, because statistically, the more potent the test case is, the more likely it will detect faults in the next services Applying potent cases first eliminates incorrect services early and thus reduces test efforts Coverage relationship If we consider only potency, the rank of the test cases in Figure 4 is T a However, this ranking doesn t consider the coverage relationship among the tests If T a and cover the same aspects (for example, test the same path), running one of them might be sufficient Thus, the correct ranking should be T a or T a We use a coverage relationship model (CRM) 3 as an additional test-case selection criterion Because we re concerned with two output sets, we propose the following simplified CRM (S-CRM) to reduce the computational complexity of constructing the full model: In S-CRM, each test case has two output sets: the correct output set, containing the services that generate the correct output; and the incorrect set, containing the services that generate incorrect output We use Δ(T 1, T 2 ) to denote the relation that test case T 1 can cover what test case T 2 can cover, or simply say T 1 covers T 2 We use Δ(t 1, t 2 ) to denote that t 1 doesn t cover t 2; The coverage probability (P) parameter that is, the probability that one service exists in the correct sets of both T 1 and T 2 quantifies the coverage relationship between any two test cases T 1 and T 2 Figure 4b shows the S-CRM for the example in Figure 4a The intersection of the correct sets of T a and is S 1, and the size of the correct set of T a is 3 Therefore, the coverage probability from T a to is 033 Similarly, the coverage probability from to is 1 because all services in the correct set of are also in, so Δ(, ) Therefore, the final rank is T a after we eliminate Using the P from T a to, we perform the following actions: Statistically, test cases derived from different testing techniques should have different test coverage If P is a small value (for example, P < 005), T a doesn t cover, so we calculate P from to T a to see if covers T a If P is a medium value, T a partially covers, so we calculate P from to T a to see if covers T a If P is a large value (for example, P > 095), T a covers, so we eliminate and use T a only Thus, ranking by potency only subjects the software to being penalized by the same faults multiple times We must therefore rank test cases by both potency and test case coverage relationships One way to identify test case coverage relationships is to analyze how test cases are developed Specifically, if two test cases aim to evaluate the same software aspect (for example, control flow) on the same software segment, they have similar coverage Instead of evaluating how test cases are derived, CRM evaluates the test case coverage by learning the previous results If T a and fail the same set of services, their coverage is highly correlated If they fail a completely different set of services, they might have little coverage overlap Because CRM is based totally on test results, two test cases derived from two different testing techniques and addressing two different code segments might have identical coverage in the CRM This doesn t imply that the two test cases address the same code segment or aspects Instead, it means that they occurred together accidentally As the CRM collects more data, test cases developed using different techniques will eventually detect different faults Statistically, test cases derived from different testing techniques should have different test coverage Although analyzing how test cases are derived might yield accurate results, assigning coverage relationships by examining test results has distinct advantages It allows automating the entire process to eliminate human errors, and it isn t necessary to track and record the derivation of test cases An identical test-derivation process applied to the same code segments might still produce different test cases with different results For example, one test case might detect an incorrect action within a path, whereas another might detect a different fault in a decision in the same path Thus, test derivation might still provide incorrect guidance with respect to the coverage relationship However, the CRM approach is based completely on testing results collected Adaptive test-case ranking Group testing can implement the test-case selection and ranking mechanism using CRM We can use CRM to 44 Computer

select and rank test cases and identify and remove test cases with similar coverage CRM can also rank test cases adaptively because it can rerank the test case whenever new test cases are added In this way, CRM can continuously rank test cases while we perform the test It selects only the most potent test cases with the least coverage overlap with previously applied test cases for execution In this manner, the test process becomes adaptive as it learns from the previous test results For a new test case t, CRM calculates t s potency and establishes its result sets by testing the services For all test cases that are more potent than t, CRM calculates the coverage relationship to check if these test cases cover t For all test cases that are less potent than t, CRM calculates the coverage relationship to check if t covers these test cases Case Study Although CRM saves testing efforts by eliminating test cases, it retains its effectiveness To demonstrate this effectiveness, we developed 60 Web services independently and developed 32 test cases based on the specification for experimentation Figure 5 shows the coverage for all 32 test cases Rows represent services; columns represent test cases, listed according to their potency; and cells represent the test results when we apply the cases to the services White cells denote correct outputs; black cells denote incorrect outputs CRM retains eight test cases (T1~4, T7, T10, T16, and T18, denoted in bold) It identifies the other 24 test cases (T5, T6, T8, T9, T11~15, T17, T19~32) as covered As Figure 5 shows, T18 can detect all the faults that T17 and T19~32 detected Similarly, T1 covers T5 Therefore, CRM eliminates these 24 test cases For each Web service, the CRM column shows the number of faults detected by all 32 test cases, whereas the Total column shows the number of faults detected by the eight test cases retained by the CRM For example, 16 of the 32 test cases failed Web service 13, while seven of the eight test cases failed the same service A comparison of the two columns shows that if the 32-test-case set can detect certain faults in a given service, the reduced test-case set can detect the same faults Therefore, in this experiment, the CRM doesn t lose any effectiveness, despite the smaller number of test cases Table 1 summarizes the test results For the 32-testcase set, CRM detects 262 failures in all 60 services The size of the test-case set the CRM selected is 8, reducing the test effort to 8/32 = 25 percent Figure 5 Coverage map of test cases We generated the 32 test cases based on a service specification Table 1 Effectiveness and efforts analysis Test cases Effectiveness (%) Test effort (%) Failures Total: 32 100 100 262 S-CRM: 8 100 25 123 In addition to testing service-oriented software, our CRM technique can be applied to other domains where multiple versions of applications are available In N-version programming, for example, multiple versions of a system implement the same function Regression testing, in which multiple versions of software are developed, is another potential application area A third area is standards-based testing, which involves systems that implement the functionality and interfaces specified in a published standard For example, vendors can develop their own software to implement Oasis and W3C standards Standards-making organizations, such as Oasis and the W3C, often need to publish test cases to ensure that the software produced by vendors meets the standards requirements Traditional software testing often focuses on code or design coverage Our approach uses previous testing results and an adaptive testing process Because serviceoriented computing focuses on composition, possibly even dynamic composition at runtime, the need for adaptive testing will become important n Acknowledgment The authors thank Raymond A Paul for his contributions to this article August 2008 45

References 1 R High, S Kinder, and S Graham, IBM SOA Foundation: An Architectural Introduction and Overview (Version 10), IBM white paper, Nov 2005; wwwibmcom/developerworks/ webservices/library/ws-soa-whitepaper 2 DZ Du and F Hwang, Combinatorial Group Testing and Its Applications, 2nd ed, World Scientific, 2000 3 WT Tsai et al, A Coverage Relationship Model for Test Case Selection and Ranking for Multi-Version Software, Proc 10th IEEE High Assurance Systems Eng Symp (HASE 07), IEEE Press, 2007, pp 105-112 4 JA Whittaker and MG Thomason, A Markov Chain Model for Statistical Software Testing, IEEE Trans Software Eng, vol 20, no 10, 1994, pp 812-824 Wei-Tek Tsai is a professor in the Computer Science and Engineering Department and director of the Software Research Laboratory at Arizona State University His research interests include software engineering and Web services testing and verification Tsai received a PhD in computer science from the University of California, Berkeley Contact him at wtsai@asuedu Xinyu Zhou is a software engineer at VMware His research interests include Web services design, testing, and implementation Zhou received a PhD in computer science from Arizona State University Contact him at xinyuzhou@asuedu Yinong Chen is a lecturer in the Computer Science and Engineering Department at Arizona State University His research interests include service-oriented software development, fault-tolerant computing, reliability modeling, and embedded systems Chen received a PhD in computer science from the University of Karlsruhe, Germany Contact him at yinong@asuedu Xiaoying Bai is an associate professor in the Department of Computer Science and Technology at Tsinghua University, China Her research interests include software engineering, software testing, and service-oriented architectures She received a PhD in computer science from Arizona State University Contact her at baixy@tsinghua educn 46 Computer