jian yu caise13-
TRANSCRIPT
![Page 1: Jian yu caise13-](https://reader035.vdocument.in/reader035/viewer/2022081511/558ec6211a28ab66628b467c/html5/thumbnails/1.jpg)
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
![Page 2: Jian yu caise13-](https://reader035.vdocument.in/reader035/viewer/2022081511/558ec6211a28ab66628b467c/html5/thumbnails/2.jpg)
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
![Page 3: Jian yu caise13-](https://reader035.vdocument.in/reader035/viewer/2022081511/558ec6211a28ab66628b467c/html5/thumbnails/3.jpg)
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
![Page 4: Jian yu caise13-](https://reader035.vdocument.in/reader035/viewer/2022081511/558ec6211a28ab66628b467c/html5/thumbnails/4.jpg)
Web services
4 - CAISE 2013 @ Valencia, Spain
WebService Service
WSDL/SOAP/HTTP
Service
BPEL process (encapsulated as a service)
![Page 5: Jian yu caise13-](https://reader035.vdocument.in/reader035/viewer/2022081511/558ec6211a28ab66628b467c/html5/thumbnails/5.jpg)
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
![Page 6: Jian yu caise13-](https://reader035.vdocument.in/reader035/viewer/2022081511/558ec6211a28ab66628b467c/html5/thumbnails/6.jpg)
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
![Page 7: Jian yu caise13-](https://reader035.vdocument.in/reader035/viewer/2022081511/558ec6211a28ab66628b467c/html5/thumbnails/7.jpg)
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?
![Page 8: Jian yu caise13-](https://reader035.vdocument.in/reader035/viewer/2022081511/558ec6211a28ab66628b467c/html5/thumbnails/8.jpg)
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
![Page 9: Jian yu caise13-](https://reader035.vdocument.in/reader035/viewer/2022081511/558ec6211a28ab66628b467c/html5/thumbnails/9.jpg)
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
![Page 10: Jian yu caise13-](https://reader035.vdocument.in/reader035/viewer/2022081511/558ec6211a28ab66628b467c/html5/thumbnails/10.jpg)
PROPOLS basic expressions
pattern scope
10 - CAISE 2013 @ Valencia, Spain
![Page 11: Jian yu caise13-](https://reader035.vdocument.in/reader035/viewer/2022081511/558ec6211a28ab66628b467c/html5/thumbnails/11.jpg)
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
![Page 12: Jian yu caise13-](https://reader035.vdocument.in/reader035/viewer/2022081511/558ec6211a28ab66628b467c/html5/thumbnails/12.jpg)
PROPOLS composite expressions
isa
(Customer.getConfirmNotification Exists GloballyXor Customer.getCancelNotifcation Exists Globally)
12 - CAISE 2013 @ Valencia, Spain
![Page 13: Jian yu caise13-](https://reader035.vdocument.in/reader035/viewer/2022081511/558ec6211a28ab66628b467c/html5/thumbnails/13.jpg)
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
![Page 14: Jian yu caise13-](https://reader035.vdocument.in/reader035/viewer/2022081511/558ec6211a28ab66628b467c/html5/thumbnails/14.jpg)
The PROPOLS Ontology
14
![Page 15: Jian yu caise13-](https://reader035.vdocument.in/reader035/viewer/2022081511/558ec6211a28ab66628b467c/html5/thumbnails/15.jpg)
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
![Page 16: Jian yu caise13-](https://reader035.vdocument.in/reader035/viewer/2022081511/558ec6211a28ab66628b467c/html5/thumbnails/16.jpg)
A composite partner service and the mock of partner services
A preliminary solution to the 2nd issue
16 - CAISE 2013 @ Valencia, Spain
![Page 17: Jian yu caise13-](https://reader035.vdocument.in/reader035/viewer/2022081511/558ec6211a28ab66628b467c/html5/thumbnails/17.jpg)
Approach revisit
17 - CAISE 2013 @ Valencia, Spain
![Page 18: Jian yu caise13-](https://reader035.vdocument.in/reader035/viewer/2022081511/558ec6211a28ab66628b467c/html5/thumbnails/18.jpg)
Step 1 (specification) tool support
18 - CAISE 2013 @ Valencia, Spain
![Page 19: Jian yu caise13-](https://reader035.vdocument.in/reader035/viewer/2022081511/558ec6211a28ab66628b467c/html5/thumbnails/19.jpg)
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
![Page 20: Jian yu caise13-](https://reader035.vdocument.in/reader035/viewer/2022081511/558ec6211a28ab66628b467c/html5/thumbnails/20.jpg)
Test case definition GUI
20 - CAISE 2013 @ Valencia, Spain
![Page 21: Jian yu caise13-](https://reader035.vdocument.in/reader035/viewer/2022081511/558ec6211a28ab66628b467c/html5/thumbnails/21.jpg)
Testing results GUI
21 - CAISE 2013 @ Valencia, Spain
![Page 22: Jian yu caise13-](https://reader035.vdocument.in/reader035/viewer/2022081511/558ec6211a28ab66628b467c/html5/thumbnails/22.jpg)
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