Title: Web Service Testing
1Web Service Testing
- Malcolm Munro
- Samer Hanna
- Department Computer Science
- Durham University
2Service-Oriented Architecture
- SOA is an approach for building software systems
that is based on loosely coupled services that
have been described in a uniform way and that can
be discovered and composed.
3Web Services
- Implementation
- discovered using UDDI
- interface describe using WSDL
- interact using SOAP
4Web Services Advantages
- Based on open standards
- Increased reusability and consequently reduced
time to build Web based distributed applications - Facilitates the communication between
heterogeneous applications using open standards
and the Internet
5Web Services Problems
- Malicious Service Requesters
- Because Web Services are advertised on the
Internet then any service requester or consumer
can access them - some might be malicious
requesters - Trustworthiness
- Service requesters can only see the contract
(WSDL) of a Web Service but not the source code - Selection
- Service requesters have no criteria to choose
between Web Services that accomplish the same task
6WSDL
- An XML-based language for describing Web Services
- the operations it provides
- the data types of the operations input and
output parameters - how it can be invoked
- where it resides
7A Model for Web Service Invocation
8Web Service Testing Challenges
- Lack of technologies for Web Services testing
- Current technologies cannot ensure Web Services
trustworthiness - Existing traditional software testing techniques
deserve re-inspection in the domain of Web
Services and new techniques are required - Unavailability of the source code of a Web
Service to the Service Consumers. - After analysis of WSDL documents it has been
found that the descriptions provided for the
input parameters must be extended to enable
efficient test cases generation (increase
testability)
9Trustworthiness Quality Model
Trustworthiness assurance that a system will
perform as expected
Robustness the degree to which a system or
component can function correctly in the presence
of invalid inputs or stressful environment
conditions
10Software Testing
- Testing is a Software Engineering technique that
is used to - Detect faults
- Assess quality attributes
- Testing techniques can be categorized as
- Black-box vs White-Box testing
- Validation vs Defect or Fault-based testing
- Testing includes
- Designing test data
- Using the test data as input to the system under
test - Comparing the results with the expected results
11Fault Based Testing
12Web Services Robustness Failure Modes
13Web Services Robustness Testing Architecture
14WSDL Data Types
- Simple Data Types
- Built-in primitive (integer, string)
- Derived from built-in primitive
(nonPositiveInteger) - User-derived (constraining facets integer 2..5)
- List
- Union
- Complex Data Types
- consists of one or more elements and attributes
of simple data types
15Hierarchy of XML Data Types
16A Schema for Test Case Generation Rules
17Constraining Facets
18Example of Generation Rules
19W3C XML Schema Simple Data Types
20Notation
- N Numeric Data types
- S String Data types
- DT Date-Time Data types
- B boolean
21Test Case Generation Rules for Primitive Data
Types
22Test Case Generation Rule
23Test Case Generation Rule
24Numeric XML Schema Data Type Boundaries
25Test Case Generation Rules for User-Derived Data
Types
26Test Case Generation Rule
27WS-Robust Tool
- Java version 1.5.0_06.
- WSDL4J (Java API for WSDL)
- Eclipse plug-in that provide an API and
implementation for XML Schema. - Document Object Model (DOM) (W3C, 2005) XML
parser. - MySQL
- Axis 1.4
- Apache Tomcat
28Notation
- FMP Fault Message with Proper fault string sent
by the Web Service platform - RM Response Message
- FM Fault Message
- NA Not Applicable.
- null accepted null has been accepted as input
and response message has been received
29Responses for Numeric Data Types
30Responses for Numeric Data Types
31Axis vs GLUE
- Java version 1.5.0_06.
- Axis 1.4
- Apache Tomcat
- GLUE 1.2
32Double Parameter
33String Data Type
34Conclusions
- Automated the process of generating test cases to
assess Web Services - Addressed the Service Requesters trustworthiness
problem by assessing the robustness quality
attribute - Addressed the Service Consumers selection
problem by giving the Consumer the robustness
criteria to choose between Web Services that
accomplish the same task - Addressed the problem of the lack of technologies
for the verification of Web Services - Addressed the Web Services testing problem of the
unavailability of the source code by designing
test cases based only on WSDL - Addressed the Web Services testing challenge of
modifying the traditional software testing
techniques to make them work with Web Services - Addressed the effect of the specific Web Service
Platform on Web Services testing and quality
attributes assessment