Académique Documents
Professionnel Documents
Culture Documents
ODTUG 2010
Basel
Baden
Bern
Lausanne
Zrich
Dsseldorf
Frankfurt/M.
Freiburg i. Br.
Hamburg
Mnchen
Stuttgart
Wien
Introduction
Guido Schmutz
Working for Trivadis for more than 13 years
leading and independent IT service company operating in Germany, Austria and Switzerland
Oracle ACE Director for Fusion Middleware and SOA Co-Author of different books Consultant, Trainer Software Architect for Java, Oracle, SOA and EDA More than 20 years of software development experience
2009
About Trivadis
Swiss IT consulting company
13 locations in Switzerland, Germany and Austria ~ 540 employees
2009
Agenda
Introduction Scenario with SOA Suite 11g as an example Unit Testing of SOA Suite 11g components
Data are always part of the game.
2009
A lot of these approaches can be used/adapted for testing SOA solutions as well Testing a SOA solution is as/even more important
Often enterprise wide systems (backbone of an enterprise) Many different users Each single error can have a huge impact
Even if SOA uses a lot of existing functionality, its not enough to just test the existing functionality
A SOA adds some additional logic which needs to be tested as well!
Router, Filter, Enrichment, Orchestration, Business Process Logic, Rules,
Best Practices for Testing SOA Suite 11g based systems
2009
Business processes often depend on timed events unit of test usually larger than in traditional applications
Best Practices for Testing SOA Suite 11g based systems
2009
Automatic Testing
Relies on automatic, programmatic execution of the different test scenarios results can be verified against expected results Efficient development and execution of test cases only achievable through Testing Frameworks
i.E. JUnit for Java
2009
Generator
Produces the test data Executes the components under test
Verifier/Asserter
Compares the actual test results with the expected results a Verifier/Asserter makes an accurate, binary decision whether a test was successful or not
Mock/Stub
Testing component which simulates part of the system to be tested
Best Practices for Testing SOA Suite 11g based systems
2009
2009
Integration Testing
Focuses on the interaction between multiple components Focuses on the lower layers first
Because they have the least external dependencies
If the test fails in a component of an upper layer, its less likely that the reason is a faulty lower layer component
These have already been tested
t
Best Practices for Testing SOA Suite 11g based systems
2009
Agenda
Introduction Scenario with SOA Suite 11g as an example Unit Testing of SOA Suite 11g components
Data are always part of the game.
2009
BPA
Business View
Workspace
MS Office
Process Composer
Human Workflow (+AMX, AG, Orgn)
Business Rules
Mediator
B2B
Unified Runtime
Process Analytics Common JCA-based connectivity infrastructure
Optimized binding
Policy Manager
BAM
Proc Cubes
Repository
12
2009
Sample scenario
External
2009
2009
Artifacts to be tested
BPEL/BPMN flow logic
Decisions, Orchestrations
Mediator logic OSB flow logic XQuery / XSL Transformations Business Rules
2009
OSB Console
2009
Agenda
Introduction Scenario with SOA Suite 11g as an example Unit Testing of SOA Suite 11g components
Data are always part of the game.
2009
Emulation
Defined the message or error, which will be returned from a reference or a component
Assertion
Compares the message or part of the message against expected data
Best Practices for Testing SOA Suite 11g based systems
2009
2009
Emulated answer from customer service, without calling the real service (Mock)
2009
Mediator only
2009
Generate
Mock
Visa
Mock
Amexco
2009
One advantage of SOA is the standardized definition of the interfaces through WSDL and XSD
There are more and more utilities/tools available, simplifying some of the tasks with a SOA solution
Functional testing Load testing
2009
soapUI
http://www.soapui.org/
Tool for Web Service Testing Available in a free version Supports the Testing of SOAP as well as REST Web Services Covers the following functionalities:
Inspection and call of web services Functional testing of web services Load testing of web services Creation of Web Service Dummies (Mock Services)
2009
2009
2009
Request
Response
2009
2009
Agenda
Introduction Scenario with SOA Suite 11g as an example Unit Testing of SOA Suite 11g components
Data are always part of the game.
2009
What should we do, if there is no test version available of a given (external) service? What should we do, if the service is not yet available?
2009
The solution is again a Mock Service, which takes over the place of the external services
G V
BPEL
Mediator / ESB
2009
2009
Agenda
Introduction Scenario with SOA Suite 11g as an example Unit Testing of SOA Suite 11g components
Data are always part of the game.
2009
Summary
Best Practices for testing conventional applications are valid for SOA solutions as well Unit Testing of SCA components is well supported via the SOA Suite 11g testing framework
Not complete yet, but already quite usable Would be nice to be able to zoom into BPEL and BPMN with unit testing (was there in 10g)
Thank you!
ODTUG 2010 Guido Schmutz, Technology Manager / Partner Trivadis AG 29.6.2010, Washington
Basel
Baden
Bern
Lausanne
Zrich
Dsseldorf
Frankfurt/M.
Freiburg i. Br.
Hamburg
Mnchen
Stuttgart
Wien