Web Services Automation-Testing Eng

Download as pdf or txt
Download as pdf or txt
You are on page 1of 51

Automated testing of web-services

SOA architecture
What is a web-service?
Automation using SOAP UI
Automation using HP QT Pro
A case from practice
SOA architecture
Web-service?

A web-service is a remote program module, providing its functional


using http
SOA principles

Information system components do not depend on the technical features


of implementation,

Components communicate with each other via open standards,

Using services which do not depend on concrete applications, with the


uniform interfaces of access to them,

Each component, making up the information system implements an


independent, repeatable business function,

Organization of services as loosely-coupled components for system


integration.
Service-Oriented Architecture
(SOA)

Network

Enterprise Service Bus(ESB)

SOA Workflow Service SOA Business


Registry engine broker supervisor service
What is a web service?
Web-service?

A web-service is a remote program module, providing its functional


using http
<definitions>
WSDL?
<!—abstract descriptions-->
<types>
Definition of types........
</types>
<message>
Definition of message....
</message>
<portType>
Definition of port........
</portType>
<!– concrete description-->
<binding>
Definition of binding.......
</binding>
</definitions>

WSDL(Web Services Description Language) is an XML-oriented language,


describing a web-service
SOAP?

• SOAP Simple Object Access Protocol

• SOAP is a communication protocol

• SOAP is used for binding between applications

• SOAP is a format for message communication

• SOAP provides communication via Internet

• SOAP does not depend on the platform

• SOAP does not depend on the language

• SOAP is based on XML

• SOAP is easy and extendible


SOAP?
<soap:Envelope mlns:soap="http://www.w3.org/2001/12/soap-envelope"

soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding">

<soap:Header>

...

</soap:Header>

<soap:Body>

...

<soap:Fault>

...

</soap:Fault>

</soap:Body>

</soap:Envelope>

SOAP specification defines an XML- “envelope” for message communication


UDDI?

UDDI system (Universal Description, Discovery and Integration ) allows


companies to make their web-service available to the public
And what to test?

Business logic. We test to meet the requirements

Standards compliance, if one has used a nonconventional


platform.

Interfaces. Validators and data converters.

Error handling
Why is automation needed?

In most cases GUI is not provided

Reduces the time for testing easy scenarios

Regressive testing has not been cancelled by anyone

Irreplaceable when carrying out load-testing


Automation using SOAP UI
Web-services testing

Web-services calling

Web-services development

Web-services simulation and mocking


Functional testing
Functional testing
Functional testing
Functional testing
Functional testing
Functional testing
Functional testing
Load-testing
Load-testing
Testing using simulators
Testing using simulators
Testing using simulators
Testing using simulators
Testing using simulators
Testing using simulators
Testing using simulators
Testing using simulators
Automation using HP QT Pro
Web service

QTP
(WSDL for Methods
scanning)

Using a WebService object allows to set up a qtp communication process– a web-


service
Defining a web service object
Defining a web service object
Defining a web service object
Defining a web service object
Defining a web service object

Known issues:

Microsoft .NET Framework WSE

1. An array in an array as parameters

2. Requests from DIME attachments

Apache Axis

1. Entity objects

2. Conflict of methods names

3. Testing of headers

4. Protected IIS server


Definition of in parameters
Definition of in parameters
Results review
Results review
Intrinsic functions

VerifyXMLFile – compares two XML files;

VerifyXMLValue- checks for tags for the expected result;

ValidateXML – checks an XML file for compliance with the


defined scheme;

OutputXMLValue – returns the value of the defined tag.

..\%QuickTest Professional HOME%\dat\BPT_Resources\


A case from practice
Alternative VBS variant
XMLHttpRequest

XMLHttpRequest.open(…)
XMLHttpRequestclose(…)
XMLHttpRequest.send(…)
XMLHttpRequest.responseXML
DOMDocument

DOMDocument.load(…)
DOMDocument.GetElementsByTagName(…)
To sum up:
The strategy of testing web-services does not differ in any way from testing other
products

Automation is the matter of importance here considering the absence of the user
interface

Any means of automation can suit, it is to your choice which one is better
Thank you for your attention
Your questions

You might also like