SlideShare a Scribd company logo
1 of 14
How to test WebServices using
SOAP UI
What is a WebService?
• Definition: The term Web services describes a standardized way of integrating Web-based applications using
the XML, SOAP, WSDL and UDDI open standards over an Internet protocol backbone. XML is used to tag the
data, SOAP is used to transfer the data, WSDL is used for describing the services available and UDDI is used
for listing what services are available.
• Usage:
Amazon Web Services offers a complete set of infrastructure and application services that enable you to run
virtually everything in the cloud: from enterprise applications and big data projects to social games and mobile
apps.
A report from 2012 done by a web analytics firm has revealed that web sites using cloud computing outfit
Amazon Web Services (AWS) are visited daily by a third of all internet users worldwide.
Travel Holdings WebServices
Our web services are mostly oriented to the travelling industry exposing our API in order to:
• Search for products (mainly hotels)
• Get hotel details
• Book reservations
• Manage previous reservations
Internally we are also using where possible as much WS as we can in order to push our solution development to
be more an more service oriented.
Commercially we are called by an average of 2 million searches per hour allowing our clients to book an average
of almost 10000 reservations per day.
What is SoapUI?
http://www.soapui.org/
SoapUI is a free and open source cross-platform Functional Testing solution. With an easy-to-use graphical
interface, and enterprise-class features, SoapUI allows you to easily and rapidly create and execute automated
functional, regression, compliance, and load tests. In a single test environment, SoapUI provides complete test
coverage and supports all the standard protocols and technologies. There are simply no limits to what you can
do with your tests. Meet SoapUI, the world's most complete testing tool!
What can it do?
• Automated testing solution including: data driven tests, load tests, scenario-based tests
• MockServices feature gives the unique ability to mimic Web services and create/run Functional and Load Tests
against them even before they are implemented.
• Built-in reporting capabilities
SoapUI Test Structure
SoapUI structures functional tests into three levels; TestSuites, TestCases and TestSteps.
1. A TestSuite is a collection of TestCases that can be used for grouping functional tests into logical units. Any
number of TestSuites can be created inside a soapUI project to support massive testing scenarios.
2. A TestCase is a collection of TestSteps that are assembled to test some specific aspect of your service(s). You
can add any number of TestCases to a containing TestSuite and even modularize them to call each other for
complex testing scenarios.
3. TestSteps are the "building blocks" of functional tests in soapUI. They are added to a TestCase and used
control the flow of execution and validate the functionality of the service(s) to be tested.
SoapUI Test Structure
A test is added by creating a new project and setting the wsdl page of your WS application. For example we used
public WS which provides Country Details: http://www.webservicex.net/country.asmx?WSDL
SoapUI Test Structure
When adding a new project, all of the WSs
methods will be loaded with sample (empty)
requests already created.
Opening such a request will show you the editor of
the .xml file which is to be sent to the web server.
SoapUI gives you possibility to see the request in
the editor as xml, raw data, Outline and Form,
making it easier to manually edit the data you plan
to send to the WS server.
The response received is also shown (on the right
side of the tool’s layout) as xml, raw data, Outline
or Form, making it easier to read.
SoapUI Test Structure
Data Driven Tests
http://www.soapui.org/
SoapUI is a free and open source cross-platform Functional Testing solution. With an easy-to-use graphical
interface, and enterprise-class features, SoapUI allows you to easily and rapidly create and execute automated
functional, regression, compliance, and load tests. In a single test environment, SoapUI provides complete test
coverage and supports all the standard protocols and technologies. There are simply no limits to what you can
do with your tests. Meet SoapUI, the world's most complete testing tool!
What can it do?
• Automated testing solution including: data driven tests, load tests, scenario-based tests
• MockServices feature gives the unique ability to mimic Web services and create/run Functional and Load Tests
against them even before they are implemented.
• Built-in reporting capabilities
Data Driven Example
http://www.webservicex.net/uszip.asmx?WSDL
We used a public WS which we found on the internet. This is returning the details of specific ZIP codes from
United States which is a good opportunity for us to validate if data received from our clients is valid or not.
Extracting from our DB random ZIP Codes, City Names and State Codes we can validate if City Name and State
Code are matching the ZIP code by using it as a request and assert if the result is correct. All this test data we
added into an Excel file which we used as DataSource for our test.
Data Driven Example
DataSource will require the file location from you and also what are the Test Properties to be used from the file.
These declared TestProperties are actually the parameters you will use for the requests or for the assertion.
When adding a new TestRequest you will have the possibility to replace the single parameter from the request
with a Property from the DataSource by right-clicking the field:
Data Driven Example
In the same TestRequest you can add an assertion and choosing Property Content / XPath Match in order to
choose specific element from the response to be validated against specific TestProperty from the DataSource:
Data Driven Example
In the assertion you will need to replace the hardcoded value with the TestProperty from the DataSource:
Data Driven Example
Now your test will be ready and will validate request parameters with specific values from the response, all this
according to the .xls DataSource..
Thank You!

More Related Content

What's hot

Less03 2 e_testermodule_2
Less03 2 e_testermodule_2Less03 2 e_testermodule_2
Less03 2 e_testermodule_2
Suresh Mishra
 
Asp.net server controls
Asp.net server controlsAsp.net server controls
Asp.net server controls
Raed Aldahdooh
 
Less02 2 e_testermodule_1
Less02 2 e_testermodule_1Less02 2 e_testermodule_1
Less02 2 e_testermodule_1
Suresh Mishra
 
Microsoft Azure
Microsoft AzureMicrosoft Azure
Microsoft Azure
Dima Maleev
 
Integrating SharePoint 2010 and Visual Studio Lightswitch
Integrating SharePoint 2010 and Visual Studio LightswitchIntegrating SharePoint 2010 and Visual Studio Lightswitch
Integrating SharePoint 2010 and Visual Studio Lightswitch
Rob Windsor
 
Less12 3 e_loadmodule_2
Less12 3 e_loadmodule_2Less12 3 e_loadmodule_2
Less12 3 e_loadmodule_2
Suresh Mishra
 

What's hot (20)

Mulesoft salesforce connector to update Object.
Mulesoft salesforce connector to update Object.Mulesoft salesforce connector to update Object.
Mulesoft salesforce connector to update Object.
 
Dataweavewithflowreflookup
DataweavewithflowreflookupDataweavewithflowreflookup
Dataweavewithflowreflookup
 
Less11 3 e_loadmodule_1
Less11 3 e_loadmodule_1Less11 3 e_loadmodule_1
Less11 3 e_loadmodule_1
 
Automatic documentation with mule
Automatic documentation with muleAutomatic documentation with mule
Automatic documentation with mule
 
Less03 2 e_testermodule_2
Less03 2 e_testermodule_2Less03 2 e_testermodule_2
Less03 2 e_testermodule_2
 
Integration of mule esb with microsoft azure
Integration of mule esb with microsoft azureIntegration of mule esb with microsoft azure
Integration of mule esb with microsoft azure
 
Less13 3 e_loadmodule_3
Less13 3 e_loadmodule_3Less13 3 e_loadmodule_3
Less13 3 e_loadmodule_3
 
Asp.net server controls
Asp.net server controlsAsp.net server controls
Asp.net server controls
 
Olap
OlapOlap
Olap
 
Mean Stack Vs Meteor js
Mean Stack Vs Meteor jsMean Stack Vs Meteor js
Mean Stack Vs Meteor js
 
Less02 2 e_testermodule_1
Less02 2 e_testermodule_1Less02 2 e_testermodule_1
Less02 2 e_testermodule_1
 
Less14 3 e_loadmodule_4
Less14 3 e_loadmodule_4Less14 3 e_loadmodule_4
Less14 3 e_loadmodule_4
 
Microsoft Azure
Microsoft AzureMicrosoft Azure
Microsoft Azure
 
SharePoint 2010 Client Object Model
SharePoint 2010 Client Object ModelSharePoint 2010 Client Object Model
SharePoint 2010 Client Object Model
 
Amazone s3 in mule
Amazone s3 in muleAmazone s3 in mule
Amazone s3 in mule
 
Less09 2 e_testermodule_8
Less09 2 e_testermodule_8Less09 2 e_testermodule_8
Less09 2 e_testermodule_8
 
Integrating SharePoint 2010 and Visual Studio Lightswitch
Integrating SharePoint 2010 and Visual Studio LightswitchIntegrating SharePoint 2010 and Visual Studio Lightswitch
Integrating SharePoint 2010 and Visual Studio Lightswitch
 
Less12 3 e_loadmodule_2
Less12 3 e_loadmodule_2Less12 3 e_loadmodule_2
Less12 3 e_loadmodule_2
 
Mule cloud hub console overview
Mule   cloud hub console overviewMule   cloud hub console overview
Mule cloud hub console overview
 
Mule data weave
Mule data weaveMule data weave
Mule data weave
 

Viewers also liked

PreservaciĂłn del patrimonio histĂłrico en el estado TĂĄchira
PreservaciĂłn del patrimonio histĂłrico en el estado TĂĄchira PreservaciĂłn del patrimonio histĂłrico en el estado TĂĄchira
PreservaciĂłn del patrimonio histĂłrico en el estado TĂĄchira
alberto2595
 
Buscan desarrar una baterĂ­a sĂłlida con una vida
Buscan desarrar una baterĂ­a sĂłlida con una vidaBuscan desarrar una baterĂ­a sĂłlida con una vida
Buscan desarrar una baterĂ­a sĂłlida con una vida
Tomas Nasurdi
 

Viewers also liked (14)

천안건마 역삼건마 《수유오피》 강남역건마
천안건마 역삼건마 《수유오피》 강남역건마천안건마 역삼건마 《수유오피》 강남역건마
천안건마 역삼건마 《수유오피》 강남역건마
 
인천건마 서현건마 《논현오피》 분당건마
인천건마 서현건마 《논현오피》 분당건마인천건마 서현건마 《논현오피》 분당건마
인천건마 서현건마 《논현오피》 분당건마
 
Ballon pensioen
Ballon pensioenBallon pensioen
Ballon pensioen
 
PreservaciĂłn del patrimonio histĂłrico en el estado TĂĄchira
PreservaciĂłn del patrimonio histĂłrico en el estado TĂĄchira PreservaciĂłn del patrimonio histĂłrico en el estado TĂĄchira
PreservaciĂłn del patrimonio histĂłrico en el estado TĂĄchira
 
Buscan desarrar una baterĂ­a sĂłlida con una vida
Buscan desarrar una baterĂ­a sĂłlida con una vidaBuscan desarrar una baterĂ­a sĂłlida con una vida
Buscan desarrar una baterĂ­a sĂłlida con una vida
 
일산건마 안산건마 《일산오피》 인천건마
일산건마 안산건마 《일산오피》 인천건마일산건마 안산건마 《일산오피》 인천건마
일산건마 안산건마 《일산오피》 인천건마
 
Sneak Preview Web Performance Scan Elektrische Fiets Feb'16
Sneak Preview Web Performance Scan Elektrische Fiets  Feb'16Sneak Preview Web Performance Scan Elektrische Fiets  Feb'16
Sneak Preview Web Performance Scan Elektrische Fiets Feb'16
 
부천건마 목동건마 《강남오피》 수원건마
부천건마 목동건마 《강남오피》 수원건마부천건마 목동건마 《강남오피》 수원건마
부천건마 목동건마 《강남오피》 수원건마
 
부천건마 목동건마 《인천오피》 동탄건마
부천건마 목동건마 《인천오피》 동탄건마부천건마 목동건마 《인천오피》 동탄건마
부천건마 목동건마 《인천오피》 동탄건마
 
천안건마 대전건마 《분당오피》 일산건마
천안건마 대전건마 《분당오피》 일산건마천안건마 대전건마 《분당오피》 일산건마
천안건마 대전건마 《분당오피》 일산건마
 
Employment Proof
Employment ProofEmployment Proof
Employment Proof
 
SISTEMAS DE CONTROL
SISTEMAS DE CONTROLSISTEMAS DE CONTROL
SISTEMAS DE CONTROL
 
Adjunto Adnominal e Complemento Nominal
Adjunto Adnominal e Complemento NominalAdjunto Adnominal e Complemento Nominal
Adjunto Adnominal e Complemento Nominal
 
Product Based Company Vs Service Based Company
Product Based Company Vs Service Based CompanyProduct Based Company Vs Service Based Company
Product Based Company Vs Service Based Company
 

Similar to Testing soapui

Testing soa, web services and application development framework applications
Testing soa, web services and application development framework applicationsTesting soa, web services and application development framework applications
Testing soa, web services and application development framework applications
InSync Conference
 
Soap ui documentation
Soap ui documentationSoap ui documentation
Soap ui documentation
Follower Test
 
Transform-to-Smart-ERP-using-Custom-Mobile-Apps.pptx
Transform-to-Smart-ERP-using-Custom-Mobile-Apps.pptxTransform-to-Smart-ERP-using-Custom-Mobile-Apps.pptx
Transform-to-Smart-ERP-using-Custom-Mobile-Apps.pptx
kmani5
 
Transform-to-Smart-ERP-using-Custom-Mobile-Apps.pptx (3).ppt
Transform-to-Smart-ERP-using-Custom-Mobile-Apps.pptx (3).pptTransform-to-Smart-ERP-using-Custom-Mobile-Apps.pptx (3).ppt
Transform-to-Smart-ERP-using-Custom-Mobile-Apps.pptx (3).ppt
HusseinWassof
 
markfinleyResumeMarch2016
markfinleyResumeMarch2016markfinleyResumeMarch2016
markfinleyResumeMarch2016
Mark Finley
 

Similar to Testing soapui (20)

White paper ready api
White paper  ready apiWhite paper  ready api
White paper ready api
 
Tools that have made cloud testing easy
Tools that have made cloud testing easyTools that have made cloud testing easy
Tools that have made cloud testing easy
 
Netserv Software Testing
Netserv Software TestingNetserv Software Testing
Netserv Software Testing
 
Testing soa, web services and application development framework applications
Testing soa, web services and application development framework applicationsTesting soa, web services and application development framework applications
Testing soa, web services and application development framework applications
 
WebServices Basic Introduction
WebServices Basic IntroductionWebServices Basic Introduction
WebServices Basic Introduction
 
Soap UI and postman
Soap UI and postmanSoap UI and postman
Soap UI and postman
 
Introduction of WebServices
Introduction of WebServicesIntroduction of WebServices
Introduction of WebServices
 
Soap ui documentation
Soap ui documentationSoap ui documentation
Soap ui documentation
 
Testing of Serverless Application on Amazon WebService Cloud
Testing of Serverless Application on Amazon WebService CloudTesting of Serverless Application on Amazon WebService Cloud
Testing of Serverless Application on Amazon WebService Cloud
 
C09
C09C09
C09
 
Transform-to-Smart-ERP-using-Custom-Mobile-Apps.pptx
Transform-to-Smart-ERP-using-Custom-Mobile-Apps.pptxTransform-to-Smart-ERP-using-Custom-Mobile-Apps.pptx
Transform-to-Smart-ERP-using-Custom-Mobile-Apps.pptx
 
Transform-to-Smart-ERP-using-Custom-Mobile-Apps.pptx (3).ppt
Transform-to-Smart-ERP-using-Custom-Mobile-Apps.pptx (3).pptTransform-to-Smart-ERP-using-Custom-Mobile-Apps.pptx (3).ppt
Transform-to-Smart-ERP-using-Custom-Mobile-Apps.pptx (3).ppt
 
Web Services.pptx
Web Services.pptxWeb Services.pptx
Web Services.pptx
 
Introduction to soapui and webservices
Introduction to soapui  and webservicesIntroduction to soapui  and webservices
Introduction to soapui and webservices
 
markfinleyResumeMarch2016
markfinleyResumeMarch2016markfinleyResumeMarch2016
markfinleyResumeMarch2016
 
Unit 5.pptx
Unit 5.pptxUnit 5.pptx
Unit 5.pptx
 
Application integration framework & Adaptor ppt
Application integration framework & Adaptor pptApplication integration framework & Adaptor ppt
Application integration framework & Adaptor ppt
 
App Service Web
App Service WebApp Service Web
App Service Web
 
web services
web servicesweb services
web services
 
Technology Overview
Technology OverviewTechnology Overview
Technology Overview
 

More from F K

More from F K (20)

WebServices introduction in Mule
WebServices introduction in MuleWebServices introduction in Mule
WebServices introduction in Mule
 
Java For Begineers
Java For BegineersJava For Begineers
Java For Begineers
 
Vm component
Vm componentVm component
Vm component
 
Until successful component in mule
Until successful component in muleUntil successful component in mule
Until successful component in mule
 
Quartz component
Quartz componentQuartz component
Quartz component
 
Mule management console installation
Mule management console installation Mule management console installation
Mule management console installation
 
Mule esb made system integration easy
Mule esb made system integration easy Mule esb made system integration easy
Mule esb made system integration easy
 
Message properties component
Message properties componentMessage properties component
Message properties component
 
Junit in mule
Junit in muleJunit in mule
Junit in mule
 
Install sonarqube plugin in anypoint
Install sonarqube plugin in anypoint Install sonarqube plugin in anypoint
Install sonarqube plugin in anypoint
 
Commit a project in svn using svn plugin in anypoint studio
Commit a project in svn using svn plugin in anypoint studioCommit a project in svn using svn plugin in anypoint studio
Commit a project in svn using svn plugin in anypoint studio
 
Github plugin setup in anypoint studio
Github plugin setup in anypoint studio Github plugin setup in anypoint studio
Github plugin setup in anypoint studio
 
For each component
For each component For each component
For each component
 
Filter expression
Filter expression Filter expression
Filter expression
 
File component
File component File component
File component
 
Database component
Database component Database component
Database component
 
Choice component
Choice component Choice component
Choice component
 
Mule with drools
Mule with droolsMule with drools
Mule with drools
 
Mule esb Data Weave
Mule esb Data WeaveMule esb Data Weave
Mule esb Data Weave
 
Idempotent filter in Mule
Idempotent filter in MuleIdempotent filter in Mule
Idempotent filter in Mule
 

Recently uploaded

Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 

Testing soapui

  • 1. How to test WebServices using SOAP UI
  • 2. What is a WebService? • Definition: The term Web services describes a standardized way of integrating Web-based applications using the XML, SOAP, WSDL and UDDI open standards over an Internet protocol backbone. XML is used to tag the data, SOAP is used to transfer the data, WSDL is used for describing the services available and UDDI is used for listing what services are available. • Usage: Amazon Web Services offers a complete set of infrastructure and application services that enable you to run virtually everything in the cloud: from enterprise applications and big data projects to social games and mobile apps. A report from 2012 done by a web analytics firm has revealed that web sites using cloud computing outfit Amazon Web Services (AWS) are visited daily by a third of all internet users worldwide.
  • 3. Travel Holdings WebServices Our web services are mostly oriented to the travelling industry exposing our API in order to: • Search for products (mainly hotels) • Get hotel details • Book reservations • Manage previous reservations Internally we are also using where possible as much WS as we can in order to push our solution development to be more an more service oriented. Commercially we are called by an average of 2 million searches per hour allowing our clients to book an average of almost 10000 reservations per day.
  • 4. What is SoapUI? http://www.soapui.org/ SoapUI is a free and open source cross-platform Functional Testing solution. With an easy-to-use graphical interface, and enterprise-class features, SoapUI allows you to easily and rapidly create and execute automated functional, regression, compliance, and load tests. In a single test environment, SoapUI provides complete test coverage and supports all the standard protocols and technologies. There are simply no limits to what you can do with your tests. Meet SoapUI, the world's most complete testing tool! What can it do? • Automated testing solution including: data driven tests, load tests, scenario-based tests • MockServices feature gives the unique ability to mimic Web services and create/run Functional and Load Tests against them even before they are implemented. • Built-in reporting capabilities
  • 5. SoapUI Test Structure SoapUI structures functional tests into three levels; TestSuites, TestCases and TestSteps. 1. A TestSuite is a collection of TestCases that can be used for grouping functional tests into logical units. Any number of TestSuites can be created inside a soapUI project to support massive testing scenarios. 2. A TestCase is a collection of TestSteps that are assembled to test some specific aspect of your service(s). You can add any number of TestCases to a containing TestSuite and even modularize them to call each other for complex testing scenarios. 3. TestSteps are the "building blocks" of functional tests in soapUI. They are added to a TestCase and used control the flow of execution and validate the functionality of the service(s) to be tested.
  • 6. SoapUI Test Structure A test is added by creating a new project and setting the wsdl page of your WS application. For example we used public WS which provides Country Details: http://www.webservicex.net/country.asmx?WSDL
  • 7. SoapUI Test Structure When adding a new project, all of the WSs methods will be loaded with sample (empty) requests already created. Opening such a request will show you the editor of the .xml file which is to be sent to the web server. SoapUI gives you possibility to see the request in the editor as xml, raw data, Outline and Form, making it easier to manually edit the data you plan to send to the WS server. The response received is also shown (on the right side of the tool’s layout) as xml, raw data, Outline or Form, making it easier to read.
  • 9. Data Driven Tests http://www.soapui.org/ SoapUI is a free and open source cross-platform Functional Testing solution. With an easy-to-use graphical interface, and enterprise-class features, SoapUI allows you to easily and rapidly create and execute automated functional, regression, compliance, and load tests. In a single test environment, SoapUI provides complete test coverage and supports all the standard protocols and technologies. There are simply no limits to what you can do with your tests. Meet SoapUI, the world's most complete testing tool! What can it do? • Automated testing solution including: data driven tests, load tests, scenario-based tests • MockServices feature gives the unique ability to mimic Web services and create/run Functional and Load Tests against them even before they are implemented. • Built-in reporting capabilities
  • 10. Data Driven Example http://www.webservicex.net/uszip.asmx?WSDL We used a public WS which we found on the internet. This is returning the details of specific ZIP codes from United States which is a good opportunity for us to validate if data received from our clients is valid or not. Extracting from our DB random ZIP Codes, City Names and State Codes we can validate if City Name and State Code are matching the ZIP code by using it as a request and assert if the result is correct. All this test data we added into an Excel file which we used as DataSource for our test.
  • 11. Data Driven Example DataSource will require the file location from you and also what are the Test Properties to be used from the file. These declared TestProperties are actually the parameters you will use for the requests or for the assertion. When adding a new TestRequest you will have the possibility to replace the single parameter from the request with a Property from the DataSource by right-clicking the field:
  • 12. Data Driven Example In the same TestRequest you can add an assertion and choosing Property Content / XPath Match in order to choose specific element from the response to be validated against specific TestProperty from the DataSource:
  • 13. Data Driven Example In the assertion you will need to replace the hardcoded value with the TestProperty from the DataSource:
  • 14. Data Driven Example Now your test will be ready and will validate request parameters with specific values from the response, all this according to the .xls DataSource.. Thank You!