Upload
caise2013vlc
View
122
Download
0
Tags:
Embed Size (px)
Citation preview
A Business Protocol Unit Testing Framework for Web Service Composition
Jian Yu, Jun Han, Steven Gunarso, Steve Versteeg
Faculty of ICT
Swinburne University of Technology
Melbourne, Victoria, Australia
Background and research issues Contribution overview The PROPOLS protocol specification language The unit testing approach and the framework Conclusion
Agenda
2 - CAISE 2013 @ Valencia, Spain
Web of Pages - text, manually created links - extensive navigation
2007
1997
Web of Resources - dynamically generated pages - data, services, mashups - web query interfaces
Web of People - social networks, user-created casual content - Facebook, Renren, Linkedin....
Web of Things
2009 - physical objects connect and interact over the Internet
- RFID, 2D barcode, sensors, SOA- Smart cities/homes, object
tracking/recalling, environment monitoring….
The Evolution of the Web
3 - CAISE 2013 @ Valencia, Spain
Web services
4 - CAISE 2013 @ Valencia, Spain
WebService Service
WSDL/SOAP/HTTP
Service
BPEL process (encapsulated as a service)
Unit: the smallest testable parts of a software system A unit needs to have clearly defined interface Testing is conducted around the interface
Unit testing
5 - CAISE 2013 @ Valencia, Spain
http://sourcemaking.com/refactoring/extract-interface
Business protocol as part of the interface
6 - CAISE 2013 @ Valencia, Spain
Customer Manufacturer (PUT) Bank
Place Order Check Order
Confirm OrderReject Orderxor
Deposit Payment
Notify Payment Arrival
Process OrderNotify Order Fulfilled
Login (max 3 tries)
Notify Payment
Order Received
How to facilitate the testing of business protocols between units (Web services)?
Primitive approach: hard code the protocol in programs: rigid, time-consuming, error-prone
Research issue
7 - CAISE 2013 @ Valencia, Spain
PUT: Process-Under-Test
How to test a service unit if its partner services are not available?
Declarative specification of protocol interface between services, and a framework to support the unit testing of defined protocol interface
Contribution overview
8 - CAISE 2013 @ Valencia, Spain
PROPOLS: Property Specification Pattern Ontology Language for Service Composition
A light-weight, declarative, temporal and causal dependency specification language
Based on Dwyer et al’s Property Specification Patterns (PSP) has a FSA-based semantics Encoded in Web Ontology Language
The protocol interface specification language: PROPOLS
9 - CAISE 2013 @ Valencia, Spain
Scenario & PROPOLS Examples
Manufacturer
$
Bank Client
Order
Validate
Confirm
Cancel xor
Deposit
Deposited
Process
Fulfilled
PayPaid
Hard Credit Rule
1. The received order must be validated:
Manufacturer.ReceiveOrder
Leads to
Manufacturer.ValidateOrder Globally
2. Payment must be deposited before order processing starts
Bank.Deposit
Precedes
Manufacturer.StartOrderProcessing
Globally
11 - CAISE 2013 @ Valencia, Spain
PROPOLS composite expressions
isa
(Customer.getConfirmNotification Exists GloballyXor Customer.getCancelNotifcation Exists Globally)
12 - CAISE 2013 @ Valencia, Spain
S is the Cartesian product A.S × B.S, s0 is the tuple (A.s0, B.s0), L is the union A.L B.L,
δ is {((a1, b1), l, (a2, b2)) | (a1,l,a2)∈A.δ (b1,l,b2)∈b.δ}, F is {(s1, s2) ∈S | s1∈A.F s2∈B.F}.
Composite expression semantics
13 - CAISE 2013 @ Valencia, Spain
A: P exists globally
B: Q exists globally
Error detection Error state reached in a defined FSA Any FSA in a non-final state when testing sequence finishes
Error detection condition
15 - CAISE 2013 @ Valencia, Spain
P: Manfacturer.LoginQ: Manufacturer.PlaceOrder
A composite partner service and the mock of partner services
A preliminary solution to the 2nd issue
16 - CAISE 2013 @ Valencia, Spain
1. PUT to Java mapping 2. Mock object setup
Manually define the request message
3. Test case definition Manually done
Step 2 (testing framework setup)
19 - CAISE 2013 @ Valencia, Spain
As far as we know, it’s the first testing framework to facilitate the unit testing of protocol interface between web services. All the other frameworks focus on test case programming
An approach to declaratively specify the service protocol interface between services and its associated framework software
Future work Integrating automatic test case generation techniques Partner service behavior emulation
Conclusion
22 - CAISE 2013 @ Valencia, Spain