White Paper Selected for
Presentation at the QAI STC 2008
Accelerators for SOA Testing
Sanghamitra Mitra Sunil Joglekar
Designation: Senior Software Specialist Designation: Technical Architect
Email: firstname.lastname@example.org Email: email@example.com
Company Address: Unit 17, SDF-VII, SEEPZ, Andheri (East), Mumbai – 400 096
ã Patni Computer Systems Methodology for Service Testing Page 1 of 10
EI Implementations in any of its form (i.e. EI, B2B or SOA) are inherently complex in nature. To ensure
the quality of any EI Implementation is therefore a significant challenge for the QA team.
The integration points in any EI Implementation are a source of lot of interesting defects. Testing the
Integration Points is crucial, at the same time it is complex and difficult. QA teams spend a lot of time to
understand Integration Points so that they can be tested individually as well as collectively in an effective
Gregor Hohpe has collected the Enterprise Integration Patterns especially for asynchronous messaging.
We have used the EI Patterns to form the basis for designing meaningful tests of an EI Implementation.
We have devised a methodology for test design & test automation which is agnostic of / common to the
underlying technology stacks such as various flavors of messaging, Web Services etc.
Using this approach, the testing team creates the test designs in a generic manner. These generic test deigns
can be easily transformed into the test templates for a SOA test automation tool e.g. iTKO Lisa. Thus, we
can accelerate the activities in testing Enterprise Integration. It also makes it economical in terms of time,
resources & effort.
This methodology helps us in getting engaged with the architects and the developers at the early stage of
the project viz. modeling & prototyping. Naturally, this results in the early detection of many crucial
defects. As the EI patterns are used for specifying the solution, we can perform verification in addition to
validations. It is easy to extend this to implement Test Driven Development.
In this paper we present the pattern based methodology with the help of an example.
ã Patni Computer Systems Methodology for Service Testing Page 2 of 10
Table of Contents
ABSTRACT: ................................................................................................... 2
1.0 CHALLENGES IN SOA TESTING .............................................................. 4
2.0 EI PATTERNS AS A BASIS FOR SOA TESTING......................................... 4
3.0 TEST DESIGN BASED ON EI PATTERNS .................................................. 5
4.0 TEST AUTOMATION BASED ON EI PATTERNS ......................................... 7
5.0 REAL-WORLD, PRACTICAL EXAMPLES.................................................... 8
6.0 BENEFITS OF PATTERNS-BASED TESTING ............................................. 9
7.0 REFERENCES.......................................................................................... 9
8.0 ACKNOWLEDGEMENTS........................................................................... 9
BIOGRAPHY OF THE AUTHORS ................................................................... 10
ã Patni Computer Systems Methodology for Service Testing Page 3 of 10
1.0 Challenges in SOA Testing
SOA created profound value by integrating technologies around business goals. However SOA (or any
other form of SOA Implementation) also significantly increases the cost and effort associated with
ensuring quality. Since an SOA approach usually arises from a need to collaborate between multiple
business groups in a shared environment, an increased number of variables due to interconnectedness make
testing very hard to share across teams. Ensuring end to end quality of a SOA implementation is a
significant challenge as:
It consists of Composite / Multi- layered applications
• Combination of legacy and new technologies
• Testing the asynchronous communications
It has multiple points of failure
• No clear view of point of failure
• Difficult to isolate faults due to multiple layers
In involves multi-disciplinary team
• Understand the WSDL (XML), Service Oriented
• Complex integration & Interoperability
2.0 EI Patterns As A Basis for SOA Testing
One major reason of enterprise integration being complex is lack of common vocabulary around
asynchronous messaging architecture used to build integration solution. Gregor Hohpe has collected a set
of patterns related to Enterprise Integration Domain with a particular focus on asynchronous messaging.
The figure below shows the programming model of the messaging architecture which is used to transport,
design, route, transform, produce and consume message and manage and test the system. EI Pattern catalog
describes 65 patterns related to each of the components shown in the figure below.
Each of the patterns is
identified with a specific
intent revealing name and a
visual representation, or
This pattern language
establishes a common
vocabulary to build a
messaging solution. It is
handy in modeling any EI
or SOA solution.
ã Patni Computer Systems Methodology for Service Testing Page 4 of 10
3.0 Test Design based on EI Patterns
We would explain our patterns based test design techniques using the example of Loan Broker Application.
We have chosen to model the process of a consumer obtaining quotes for a loan from multiple banks.
When shopping for a loan, a customer usually calls several banks to find the deal with the best possible
interest rate. Each bank asks the customer for his or her social security number, the amount of the loan and
the desired term. Each bank then investigates the customer's credit background, usually by contacting a
credit agency. Then the bank responds with an interest rate quote to the consumer. Because contacting
multiple banks with a loan quote request is a tedious task, loan brokers offer this service to consumers. The
loan broker coordinates with the banks to furnish the customers with information he wants.
Message Flow for Loan Broker
1. Receive the consumer's loan quote request
2. Obtain credit score and history from credit agency
3. Determine the most appropriate banks to contact
4. Send a request to each selected bank
5. Collect responses from each selected bank
6. Determine the best response
7. Pass the result back to the consumer
Modeling the Solution
As shown in this figure beside, typically a messaging
system looks like a set of Messaging End Points, who
are sending & receiving messages via the Message Bus.
Looking at this view it is not possible to figure out how
do the applications communicate to each other? Or how
does the message flow from one application to other? Or
what happens between each pair send & receive?
How to get these answers? EI Patterns helps us to bring
out the actual intent of a messaging solution.
We used EAI Patterns to create a model of a
Loan Broker Implementation. As specified in
the message flow, broker has to retrieve some
additional information, i.e. the customer's
credit score. A Content Enricher sounds like
the ideal choice. After that, the broker has to
determine the appropriate banks to route the
request message to multiple banks. We used
another Content Enricher that computes the
list of recipients for the request
ã Patni Computer Systems Methodology for Service Testing Page 5 of 10
Sending a request from, it appends the data to the message. If we use Content Enricher to describe a
specific message to multiple recipients and re-combining the responses back into a single message is the
specialty of the Scatter-Gather. Once the banks reply with their rate quotes, the Scatter-Gather aggregates
the individual rate quotes into a single quote for the consumer using an Aggregator.
The second diagram is a much better representation of loan broker application. It specifies intent of each of
the messaging end points clearly. For instance, Content Enricher uses information inside the incoming
message (e.g. key fields) to retrieve data from an external source. The model sketched with EI patterns
forms the basis of test design of any messaging solutions.
We used a simple framework to test each unit
described in the model. It consists of three core
• The test data generator create the test data
and feeds it into the component under test
• The test data verifier compares actual result
with the expected result
• A stub is a testing component that simulate
part of the system that are not ready
EI Pattern based model of the message
flow helps us to identify the individual
integration Points. The visual
representation of the patterns enables us to
understand the intent of each of ‘Unit’, (i.e.
the integration points). Based on this
specification we can create meaningful
tests for each integration points. With the
help of the generator and the verifier we
can test each individual unit.
Once the ‘unit‘s of each points are tested,
we performed the integration testing.
We carry out the integration testing in an
iterative and incremental manner. Each
phase we add one more ‘unit’ to verify if
the units are working collectively
We used the same approach to use the
generator and the verifier to generate the
data and to verify result.
End To End Testing
On completion of the validating the message flow we assumed the Messaging Application as a Black box
and perform the End to End Testing.
ã Patni Computer Systems Methodology for Service Testing Page 6 of 10
4.0 Test Automation based on EI Patterns
These generic tests created from the EI Pattern-based model can be easily transformed into the test
templates for a SOA test automation tool e.g. iTKO Lisa. As discussed earlier any test framework
needs two basic components, a Generator which will generates the data and a Verifier which verifies
the response. Similarly to test a messaging application, we need to have a Generator: Publisher Client,
and a Verifier: A Subscriber Client (as shown in the figure below)
Lisa’s workflow UI lets us visually sequence
test steps, executed against various SOA
components, to manage a test case or sequence
of tests. Using Lisa’s messaging test node we
created a test template. The figure below shows
how this generic test automation template woks.
Generic Test Template in Lisa
· The first JMS node of the testing tool picks up
the input message from the data set.
· The node publishes the data to the messaging
application as a request.
· The second JMS node in the tool subscribes to
the response returned by the messaging
· The third JMS node in the tool acts as message
· This node has an assertion to compare the
expected result with the actual result
Using the Lisa Node we created the template for the major EI Patterns. As an example we would
explain the template for Content Enricher
We need to configure following parameters
in the Lisa template for Content Enricher.
• Publisher Info for JMS Node #1
• Name of the Queue / Topic
• Type of Message
• Other JNDI Config Info
• Subscriber Info for JMS Node #2
• Name of the Queue / Topic
• Type of Message
• Other JNDI Config Info
This generic template can be extended for any messaging node supported by the testing tool such as Web
Method, TIBCO, Sun JCaps, Oracle OC4J, SONIC MQ or IBM Websphere.
ã Patni Computer Systems Methodology for Service Testing Page 7 of 10
5.0 Real-World, Practical Examples
We applied our Pattern based Test Methodology to test the following systems effectively.
Case Study 1
This is a purchase order system for a telecom
vendor. This was implemented using messaging
architecture. As part of the validation we checked
• Applying for a mobile phone &
Activation of the SIM
• Invoice Handling & Billing
• Reporting for the same
Case Study 2
This a is Trouble Ticketing system for
an the vending machine of a large
This system integrates the AS-400
system with the PDA application used
by the technicians serving the vending
Case Study 3
This is a Centralized Inventory and Point of
Sale System for a Telecom Company to
fulfill the requirement to help business across
their operating units. It consists of the
following units :
• Inventory Management
• Sales Channel Management
• Customer Registration
• Sales Order Management
ã Patni Computer Systems Methodology for Service Testing Page 8 of 10
6.0 Benefits of Patterns-based Testing
Our pattern based solution for test design & test automation provides a comprehensive solution to
maximize delivered quality and reduce business risk in a cost effective manner.
• Managing the Complexity : Using EI Patterns we can create model for the system under test quickly.
Gregor Hohpe’s simple messaging toolkit comes handy to quickly create a prototype that is executable
Taken together, the model & the prototype helps the testing team to capture & understand the essence
of the complex EI without getting bogged down by the complexities of the tech stack.
• Early Engagement with Architecture / Development Team : Using this model we established a
vocabulary, common among the Architects, Developers and the QA Team. The model helps the QA
team to engage with the architects and the developers at an early stage of the project implementation.
• Increase Testability. Helps in rapid modeling: Helps to understand the nature & character of the
system. Provide rapid, immediate, useful feedback, So helps in making the system more testable.
• Expedite Crucial Defect Detection. Modeling & Prototyping helps to build a common understanding
regarding the system under test, thereby it expedite the process of finding the crucial defects. The
model and the prototype can be used to make use of Mocking as well as Virtualization.
• Technology-agnostic solution. The solutions and approaches described here are valid for most
integration tools and standards such as IBM WebSphere MQ, TIBCO, Vitria, See Beyond,
WebMethods, BizTalk, JMS, MSMQ, Web Services etc.
• Cost Effective Validation Methodology. The pattern based test design and test automation approach
accelerate the activities in testing Enterprise Integration. It also makes it economical in terms of time,
resources & effort.
• Thus, we have managed to accelerate the SOA testing implementation !
 Enterprise Integration Patterns : Patterns and Best Practices for Enterprise Integration
 Home page for iTKO Lisa
We would like to express our sincere thanks to Dr. Prasad Ramanathan for the encouragement,
support and feedback.
ã Patni Computer Systems Methodology for Service Testing Page 9 of 10
Biography of the authors
Author 1: (minimum 200 words)
Sanghamitra Mitra is a Senior Software Specialist with the Product & Technology Initiative Group at
Patni Computer Systems Ltd. She has around 9 years of experience in software development. Sanghamitra
has worked as a technical lead/designer for Enterprise Applications with dotNet & Microsoft Platforms
with international client such as British Airways, Hitachi Medical Corporation.
She has extensive experience in building and validating Enterprise Application as well as EAI
Implementation. She has successfully applied model based and pattern based testing techniques to validate
many Enterprise Application as well as EAI or SOA Implementation.
Her primary area of interest is devising & implementing solution related to EAI, SOA , SaaS as Agile Web
Author 2: (minimum 200 words)
Sunil Joglekar is a Technical Architect with the Product & Technology Initiative group, at Patni Computer
Systems Ltd. He has 18 years experience as a Software Professional working in Global Software Teams.
He has spent about 5 years in United States mostly as a consultant at Sun Microsystems.
Sunil has extensive experience in the development of products / product suites / product lines. Also, he is
well-versed in applying the Agile Methods / Practices. He specializes in architecting testable solutions for
complex enterprise software systems and their integrations such as EAI / B2Bi / SOA.
His primary areas of interest are : strategizing & architecting innovative solutions with Web 2.0, Cloud
Computing, Autonomic Computing et al
ã Patni Computer Systems Methodology for Service Testing Page 10 of 10