SlideShare a Scribd company logo
SoapUI Training
Induction course
Fresh Grads
Ionut David
02.04.2013
•What is SoapUI
•SoapUI Features
•SOAP and WSDL
•Functional Testing
•Service Mocking
Agenda
2
What is SoapUI
3
• Free and open source cross-platform Functional Testing solution.
• Creating even the most advanced test scenarios is very simple.
• SoapUI is a complete and automated testing solution.
• Testing for everyone.
• Streamlined service simulation.
• Advanced functionality comes standard.
SoapUI Features
4
• Functional Testing.
• Service Simulation.
• Security Testing.
• Load Testing.
• Technology Support.
• Automation.
• Analytics.
• Recording.
• Ecosystem.
What is a Web Service
5
• A web service is a method of communication between two electronic devices over the World Wide Web. A
web service is a software function provided at a network address over the web or the cloud, it is a service that
is "always on“.
• The Web Services Description Language is an XML-based interface description language that is used for
describing the functionality offered by a web service. A WSDL description of a web service (also referred to as
a WSDL file) provides a machine-readable description of how the service can be called, what parameters it
expects, and what data structures it returns.
SOAP and WSDL
6
• XML-based protocol to let applications exchange
information over HTTP.
• SOAP stands for Simple Object Access Protocol
• SOAP is a communication protocol
• SOAP is a format for sending messages
• SOAP is platform independent
• SOAP is language independent
• XML-based language for describing Web services
and how to access them.
• WSDL stands for Web Services Description
Language
• WSDL is an XML document
• WSDL is also used to locate Web services.
SOAP Definition WSDL Definition
SOAP and WSDL
7
• A SOAP message is an ordinary XML document containing the following elements:
• An Envelope element that identifies the XML document as a SOAP message.
• A Header element that contains header information.
• A Body element that contains call and response information.
• A Fault element containing errors and status information.
SOAP Syntax
SOAP and WSDL
8
<?xml version="1.0"?>
<soap:Envelope
xmlns: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 Syntax Example
SOAP and WSDL
9
• A WSDL document describes a web service using these major elements:
• A container for data type definitions used by the web service.
• A typed definition of the data being communicated.
• A set of operations supported by one or more endpoints.
• A protocol and data format specification for a particular port type.
WSDL Document Structure
SOAP and WSDL
10
<definitions>
<types>
data type definitions........
</types>
<message>
definition of the data being communicated....
</message>
<portType>
set of operations......
</portType>
<binding>
protocol and data format specification....
</binding>
</definitions>
WSDL Example
Functional Testing
11
• Create a SoapUI Project
• Right click on the project node and select New SoapUI Project.
Functional Testing
12
• In the New SoapUI Project dialog enter a project name (i.e. Country_info) and click OK.
• Right click on the project node and select Add WSDL.
Functional Testing
13
• The Add WSDL dialog is now open
• Enter http://webservices.oorsprong.org/websamples.countryinfo/CountryInfoService.wso?WSDL.
• Click OK.
Functional Testing
14
• Now see that the WSDL was successfully added to the
project by seeing the operations in the Web Service in
the navigatorEnter
Functional Testing
15
• Create a request from your WSDL
• Click on the plus sign next to the web service in the navigator to expand.
• Double click on the request.
• You now have to enter your data manually in the code editor as shown below. Replace “?” with “RO” (without
quotes)
Functional Testing
16
• Run a request to the Web Service
• Click on the green arrow head sign to submit the request.
Functional Testing
17
• Receive response
• On the right side of the window the response will be displayed.
Functional Testing
18
• Run an invalid request to the Web Service.
• Introduce a wrong country code (like “ZZ”).
• Click on the green arrow head sign to submit the request.
• The response of the Web Service will indicate that the country was not found.
• After seeing the result, correct the input data.
Functional Testing
19
• Create a Test Case from a request.
• In the request editor, select Add This Request to TestCase.
Functional Testing
20
• Next step:
• Adding a request to a TestCase will open the Create TestSuite dialog box. Enter a name for your TestSuite
and click OK.
• After clicking OK, you will be asked to create a TestCase. In the Create TestCase dialog, enter a name for your
TestCase and click OK.
Functional Testing
21
• Next step:
• The dialog box Add Request to TestCase will appear. Click OK.
Functional Testing
22
• Final step:
• SoapUI will now generate a TestSuite and TestCase for you while the request will be added as a TestRequest.
Below is a copy of the request that appears in the interface. A TestCase editor will also open with your new
TestRequest.
• The next step is to validate the response in your test by adding an Assertion.
Functional Testing
23
• Add an Assertion to the test:
• Now that we've created and run our first test, we are going to add a validation of the response. In SoapUI,
this is called adding an assertion.
• Examples of assertions that is possible in SoapUI are:
• Schema Compliance
• Simple Contains
• Simple Not Contains
• SOAP Faults
• Response SLA
• XPath Match
• XQuery Match
• WS Security Status
• WS-Addressing Request/Response Assertion
• Script Assertion
Functional Testing
24
• Close all windows you have open in SoapUI before starting:
• Double Click on your Test Request as shown below. This will open the request editor.
• After clicking OK, you will be asked to create a TestCase. In the Create TestCase dialog, enter a name for your
TestCase and click OK.
Functional Testing
25
• Next step:
• Select Response SLA from the Add Assertion menu.
• In the Configure Response SLA Assertion dialog box, write 500 and click OK. This will validate that the
response of the SLA is under 500.
Functional Testing
26
• Next step:
• Now that you've added the assertion, you are going to run the request to validate the response. If all
assertions are successful, the SOAP icon should turn green in three places as shown below.
Functional Testing
27
• Validate response with XPath Match:
• Select XPath Match from the Add Assertion menu.
Functional Testing
28
• Validate response with XPath Match:
• In the XPath Match Configuration press Declare button and write below “//m:CapitalCityResult”
• Click “Select from current” and you should see the word Bucharest appearing in the Expected Results field.
• Click Save
Functional Testing
29
• Final step:
• Now that you've added a new assertion, you are going to run the test again. If all assertions are successful,
the SOAP icon should turn green in three places as shown below.
Service Mocking
30
• “Service Mocking, or simulation, is the practice of creating a facsimile environment that works similar to the
environment you’re facsimileing”.
• When to use it: You should use mocks when you can’t use the real thing
• Advantages:
• You can create tests in advance.
• Teams can work in parallel.
• You can create proof of concepts or demos.
• You can isolate systems.
• You can write test for resource not accessible.
• Mock can be delivered to the customer.
• Disadvantages:
• You have to do Double work.
• Deployment constraints.
• It’s not live is it?
Service Mocking
31
• Start a new SoapUI project using the following wsdl:
http://www.webservicex.net/CurrencyConvertor.asmx?WSDL
• Click OK button.
Service Mocking
32
• Right-click on one of the SOAP interfaces and select Generate MockService.
Service Mocking
33
• In the dialog Generate Mock Service you can specify the local port/path for the service you're creating but for
the moment just click OK
Service Mocking
34
• Enter the name of your Mock Service in the Name dialog and click OK. For example: Mock convertor
• After creating the MockService, you should get a MockService with one operation and one request.
• As you can see, the Icons are Grey and inactive. This is an indication that the MockService is not yet running. We
have successfully created our first MockService.
Service Mocking
35
• Now, double click on the MockService to see the MockService editor. In the editor we can see a list of all
operations for the service, as well as a request and response log which logs all incoming requests that have
been handled by the MockService.
• Double Click on the Conversion Rate Operation to see the MockResponses we have in the MockService
Service Mocking
36
• As you can see we do only have one, Let's edit it, double click on it to open the Response Editor
• The MockResponse editor is very similar to the standard SoapUI Request editor , but instead of requests, we'll
edit responses. The Incoming Request view is still very useful; it shows the last received request to the
operation which is useful for debugging client calls, including attachments and HTTP headers.
• Edit the ConversionRateResult to be something else than the default empty value "?“. For example: 2.5
Service Mocking
37
• First we must start the MockService. Click the Start button in the MockService editor, the green arrow head ,
this will start the service on the configured port and path
• To the Top Right of the Editor you should see that it's running, and the port it's responding on. The play Button
is greyed out and if you would like to stop the MockService, just click the stop button.
Service Mocking
38
• Now in the MockResponse editor, Click the Button Create Request.
• This will prompt you to open one of the existing requests for its operation in your project.
• You will also need to give it a name.
Service Mocking
39
• When you open the request, SoapUI will automatically change its endpoint to the endpoint of the locally
running MockService instead of the endpoint that the WSDL is using. Submit the opened request by clicking the
Run Button
• As you can see the MockService returned the values we entered earlier as the response.
Service Mocking
40
• Let's continue by making the created MockResponse a bit more dynamic by changing the dispatch and
by Groovy scripting.
• First we’ll create a second MockResponse.
• Give it a Groovy Name
Service Mocking
41
• Let's write a script for the response. Click the Script tab in the Response and enter the following Groovy Script,
(context.rand = Math.random() *10)
It will look like this:
• This script sets a property called rand to a random number (from 0 to 10).
• Now that we have written a script and the random results will be inserted into the response.
42
Ionut David| Software Engineer
ionut.david@endava.com
Tel +40 727 772 636 |Skype en_idavid
thank you
Ad

More Related Content

What's hot (20)

Microservices Interview Questions and Answers | Microservices Architecture Tr...
Microservices Interview Questions and Answers | Microservices Architecture Tr...Microservices Interview Questions and Answers | Microservices Architecture Tr...
Microservices Interview Questions and Answers | Microservices Architecture Tr...
Edureka!
 
Deep dive into SoapUI
Deep dive into SoapUIDeep dive into SoapUI
Deep dive into SoapUI
Andrey Oleynik
 
Accelerate Quality with Postman - Basics
Accelerate Quality with Postman - BasicsAccelerate Quality with Postman - Basics
Accelerate Quality with Postman - Basics
Knoldus Inc.
 
REST API testing with SpecFlow
REST API testing with SpecFlowREST API testing with SpecFlow
REST API testing with SpecFlow
Aiste Stikliute
 
Rest assured
Rest assuredRest assured
Rest assured
Varun Deshpande
 
Selenium Handbook
Selenium HandbookSelenium Handbook
Selenium Handbook
Suresh Thammishetty
 
Performance Testing using Loadrunner
Performance Testingusing LoadrunnerPerformance Testingusing Loadrunner
Performance Testing using Loadrunner
hmfive
 
Frans Rosén Keynote at BSides Ahmedabad
Frans Rosén Keynote at BSides AhmedabadFrans Rosén Keynote at BSides Ahmedabad
Frans Rosén Keynote at BSides Ahmedabad
Security BSides Ahmedabad
 
Xray for Jira 3.0 - What's New?
Xray for Jira 3.0 - What's New?Xray for Jira 3.0 - What's New?
Xray for Jira 3.0 - What's New?
Xpand IT
 
Introduction to SoapUI day 1
Introduction to SoapUI day 1Introduction to SoapUI day 1
Introduction to SoapUI day 1
Qualitest
 
Introduction to Selenium Web Driver
Introduction to Selenium Web DriverIntroduction to Selenium Web Driver
Introduction to Selenium Web Driver
Return on Intelligence
 
Testing microservices with rest assured
Testing microservices with rest assuredTesting microservices with rest assured
Testing microservices with rest assured
Kushan Shalindra Amarasiri - Technical QE Specialist
 
An Introduction To Automated API Testing
An Introduction To Automated API TestingAn Introduction To Automated API Testing
An Introduction To Automated API Testing
Sauce Labs
 
The OWASP Zed Attack Proxy
The OWASP Zed Attack ProxyThe OWASP Zed Attack Proxy
The OWASP Zed Attack Proxy
Aditya Gupta
 
LoadRunner Performance Testing
LoadRunner Performance TestingLoadRunner Performance Testing
LoadRunner Performance Testing
Atul Pant
 
Selenium
SeleniumSelenium
Selenium
Kalyan ch
 
RESTful API Testing using Postman, Newman, and Jenkins
RESTful API Testing using Postman, Newman, and JenkinsRESTful API Testing using Postman, Newman, and Jenkins
RESTful API Testing using Postman, Newman, and Jenkins
QASymphony
 
Cucumber & gherkin language
Cucumber & gherkin languageCucumber & gherkin language
Cucumber & gherkin language
selvanathankapilan
 
API Testing
API TestingAPI Testing
API Testing
Bikash Sharma
 
Agile test-management-test-rail-lastest
Agile test-management-test-rail-lastestAgile test-management-test-rail-lastest
Agile test-management-test-rail-lastest
Onur Baskirt
 
Microservices Interview Questions and Answers | Microservices Architecture Tr...
Microservices Interview Questions and Answers | Microservices Architecture Tr...Microservices Interview Questions and Answers | Microservices Architecture Tr...
Microservices Interview Questions and Answers | Microservices Architecture Tr...
Edureka!
 
Accelerate Quality with Postman - Basics
Accelerate Quality with Postman - BasicsAccelerate Quality with Postman - Basics
Accelerate Quality with Postman - Basics
Knoldus Inc.
 
REST API testing with SpecFlow
REST API testing with SpecFlowREST API testing with SpecFlow
REST API testing with SpecFlow
Aiste Stikliute
 
Performance Testing using Loadrunner
Performance Testingusing LoadrunnerPerformance Testingusing Loadrunner
Performance Testing using Loadrunner
hmfive
 
Xray for Jira 3.0 - What's New?
Xray for Jira 3.0 - What's New?Xray for Jira 3.0 - What's New?
Xray for Jira 3.0 - What's New?
Xpand IT
 
Introduction to SoapUI day 1
Introduction to SoapUI day 1Introduction to SoapUI day 1
Introduction to SoapUI day 1
Qualitest
 
An Introduction To Automated API Testing
An Introduction To Automated API TestingAn Introduction To Automated API Testing
An Introduction To Automated API Testing
Sauce Labs
 
The OWASP Zed Attack Proxy
The OWASP Zed Attack ProxyThe OWASP Zed Attack Proxy
The OWASP Zed Attack Proxy
Aditya Gupta
 
LoadRunner Performance Testing
LoadRunner Performance TestingLoadRunner Performance Testing
LoadRunner Performance Testing
Atul Pant
 
RESTful API Testing using Postman, Newman, and Jenkins
RESTful API Testing using Postman, Newman, and JenkinsRESTful API Testing using Postman, Newman, and Jenkins
RESTful API Testing using Postman, Newman, and Jenkins
QASymphony
 
Agile test-management-test-rail-lastest
Agile test-management-test-rail-lastestAgile test-management-test-rail-lastest
Agile test-management-test-rail-lastest
Onur Baskirt
 

Viewers also liked (13)

Testing web services
Testing web servicesTesting web services
Testing web services
Taras Lytvyn
 
API Testing: The heart of functional testing" with Bj Rollison
API Testing: The heart of functional testing" with Bj RollisonAPI Testing: The heart of functional testing" with Bj Rollison
API Testing: The heart of functional testing" with Bj Rollison
TEST Huddle
 
В поисках магической кнопки, или как воспитать SoapUI
В поисках магической кнопки, или как воспитать SoapUIВ поисках магической кнопки, или как воспитать SoapUI
В поисках магической кнопки, или как воспитать SoapUI
SQALab
 
Автоматизация настолько хороша, насколько хорош человек использующий ее (блиц...
Автоматизация настолько хороша, насколько хорош человек использующий ее (блиц...Автоматизация настолько хороша, насколько хорош человек использующий ее (блиц...
Автоматизация настолько хороша, насколько хорош человек использующий ее (блиц...
SQALab
 
Automate REST API Testing
Automate REST API TestingAutomate REST API Testing
Automate REST API Testing
TechWell
 
SOAP-UI The Web service Testing
SOAP-UI The Web service TestingSOAP-UI The Web service Testing
SOAP-UI The Web service Testing
Ganesh Mandala
 
An introduction to api testing | David Tzemach
An introduction to api testing | David TzemachAn introduction to api testing | David Tzemach
An introduction to api testing | David Tzemach
David Tzemach
 
Presentation for soap ui
Presentation for soap uiPresentation for soap ui
Presentation for soap ui
Anjali Rao
 
Soa testing soap ui (2)
Soa testing   soap ui (2)Soa testing   soap ui (2)
Soa testing soap ui (2)
Knoldus Inc.
 
Getting Started with API Security Testing
Getting Started with API Security TestingGetting Started with API Security Testing
Getting Started with API Security Testing
SmartBear
 
Testing Agile Web Services from soapUI
Testing Agile Web Services from soapUITesting Agile Web Services from soapUI
Testing Agile Web Services from soapUI
PLM Mechanic .
 
4 Major Advantages of API Testing
4 Major Advantages of API Testing4 Major Advantages of API Testing
4 Major Advantages of API Testing
QASource
 
Api testing
Api testingApi testing
Api testing
Keshav Kashyap
 
Testing web services
Testing web servicesTesting web services
Testing web services
Taras Lytvyn
 
API Testing: The heart of functional testing" with Bj Rollison
API Testing: The heart of functional testing" with Bj RollisonAPI Testing: The heart of functional testing" with Bj Rollison
API Testing: The heart of functional testing" with Bj Rollison
TEST Huddle
 
В поисках магической кнопки, или как воспитать SoapUI
В поисках магической кнопки, или как воспитать SoapUIВ поисках магической кнопки, или как воспитать SoapUI
В поисках магической кнопки, или как воспитать SoapUI
SQALab
 
Автоматизация настолько хороша, насколько хорош человек использующий ее (блиц...
Автоматизация настолько хороша, насколько хорош человек использующий ее (блиц...Автоматизация настолько хороша, насколько хорош человек использующий ее (блиц...
Автоматизация настолько хороша, насколько хорош человек использующий ее (блиц...
SQALab
 
Automate REST API Testing
Automate REST API TestingAutomate REST API Testing
Automate REST API Testing
TechWell
 
SOAP-UI The Web service Testing
SOAP-UI The Web service TestingSOAP-UI The Web service Testing
SOAP-UI The Web service Testing
Ganesh Mandala
 
An introduction to api testing | David Tzemach
An introduction to api testing | David TzemachAn introduction to api testing | David Tzemach
An introduction to api testing | David Tzemach
David Tzemach
 
Presentation for soap ui
Presentation for soap uiPresentation for soap ui
Presentation for soap ui
Anjali Rao
 
Soa testing soap ui (2)
Soa testing   soap ui (2)Soa testing   soap ui (2)
Soa testing soap ui (2)
Knoldus Inc.
 
Getting Started with API Security Testing
Getting Started with API Security TestingGetting Started with API Security Testing
Getting Started with API Security Testing
SmartBear
 
Testing Agile Web Services from soapUI
Testing Agile Web Services from soapUITesting Agile Web Services from soapUI
Testing Agile Web Services from soapUI
PLM Mechanic .
 
4 Major Advantages of API Testing
4 Major Advantages of API Testing4 Major Advantages of API Testing
4 Major Advantages of API Testing
QASource
 
Ad

Similar to Learn SoapUI (20)

Web services testing
Web services testingWeb services testing
Web services testing
rammikn
 
09. OPC DA with Measurement Studio 2019.pdf
09. OPC DA with Measurement Studio 2019.pdf09. OPC DA with Measurement Studio 2019.pdf
09. OPC DA with Measurement Studio 2019.pdf
ManhHoangVan
 
Load testing using_neoload by kc
Load testing using_neoload by kcLoad testing using_neoload by kc
Load testing using_neoload by kc
krishna chaitanya
 
Debugging Integration Flows
Debugging Integration FlowsDebugging Integration Flows
Debugging Integration Flows
WSO2
 
LoadUI web performance testing tool
LoadUI web performance testing toolLoadUI web performance testing tool
LoadUI web performance testing tool
Milind Rupchandani
 
Load ui web Load Testing Open source Performance Testing tool Learn Load UI W...
Load ui web Load Testing Open source Performance Testing tool Learn Load UI W...Load ui web Load Testing Open source Performance Testing tool Learn Load UI W...
Load ui web Load Testing Open source Performance Testing tool Learn Load UI W...
Vishal Parekh
 
Grails Services
Grails ServicesGrails Services
Grails Services
NexThoughts Technologies
 
Soap ui oracle_brm_automated_performance_tests
Soap ui oracle_brm_automated_performance_testsSoap ui oracle_brm_automated_performance_tests
Soap ui oracle_brm_automated_performance_tests
Madhu Mohan
 
Cloud-based Test Microservices JavaOne 2014
Cloud-based Test Microservices JavaOne 2014Cloud-based Test Microservices JavaOne 2014
Cloud-based Test Microservices JavaOne 2014
Shelley Lambert
 
IBM MobileFirst Platform v7.0 POT Offers Lab v1.0
IBM MobileFirst Platform v7.0 POT Offers Lab v1.0IBM MobileFirst Platform v7.0 POT Offers Lab v1.0
IBM MobileFirst Platform v7.0 POT Offers Lab v1.0
Banking at Ho Chi Minh city
 
Soap ui documentation
Soap ui documentationSoap ui documentation
Soap ui documentation
Follower Test
 
Proper Connections Development for Proper Domino Developers
Proper Connections Development for Proper Domino DevelopersProper Connections Development for Proper Domino Developers
Proper Connections Development for Proper Domino Developers
Mark Myers
 
Making Rational HATS a Strategic Investment
Making Rational HATS a Strategic InvestmentMaking Rational HATS a Strategic Investment
Making Rational HATS a Strategic Investment
Strongback Consulting
 
Пирамида Тестирования через призму ROI калькулятора и прочая геометрия
Пирамида Тестирования через призму ROI калькулятора и прочая геометрияПирамида Тестирования через призму ROI калькулятора и прочая геометрия
Пирамида Тестирования через призму ROI калькулятора и прочая геометрия
SQALab
 
Test Pyramid vs Roi
Test Pyramid vs Roi Test Pyramid vs Roi
Test Pyramid vs Roi
COMAQA.BY
 
Guide for Quality Center (QC) Automation Tool
Guide for Quality Center (QC) Automation ToolGuide for Quality Center (QC) Automation Tool
Guide for Quality Center (QC) Automation Tool
Subrat Srivastava
 
Getting started with_testcomplete
Getting started with_testcompleteGetting started with_testcomplete
Getting started with_testcomplete
ankit.das
 
Access tips access and sql part 4 building select queries on-the-fly
Access tips  access and sql part 4  building select queries on-the-flyAccess tips  access and sql part 4  building select queries on-the-fly
Access tips access and sql part 4 building select queries on-the-fly
quest2900
 
White paper ready api
White paper  ready apiWhite paper  ready api
White paper ready api
Nithin Bijjala
 
Webservice Testing
Webservice TestingWebservice Testing
Webservice Testing
Rachana Khedekar
 
Web services testing
Web services testingWeb services testing
Web services testing
rammikn
 
09. OPC DA with Measurement Studio 2019.pdf
09. OPC DA with Measurement Studio 2019.pdf09. OPC DA with Measurement Studio 2019.pdf
09. OPC DA with Measurement Studio 2019.pdf
ManhHoangVan
 
Load testing using_neoload by kc
Load testing using_neoload by kcLoad testing using_neoload by kc
Load testing using_neoload by kc
krishna chaitanya
 
Debugging Integration Flows
Debugging Integration FlowsDebugging Integration Flows
Debugging Integration Flows
WSO2
 
LoadUI web performance testing tool
LoadUI web performance testing toolLoadUI web performance testing tool
LoadUI web performance testing tool
Milind Rupchandani
 
Load ui web Load Testing Open source Performance Testing tool Learn Load UI W...
Load ui web Load Testing Open source Performance Testing tool Learn Load UI W...Load ui web Load Testing Open source Performance Testing tool Learn Load UI W...
Load ui web Load Testing Open source Performance Testing tool Learn Load UI W...
Vishal Parekh
 
Soap ui oracle_brm_automated_performance_tests
Soap ui oracle_brm_automated_performance_testsSoap ui oracle_brm_automated_performance_tests
Soap ui oracle_brm_automated_performance_tests
Madhu Mohan
 
Cloud-based Test Microservices JavaOne 2014
Cloud-based Test Microservices JavaOne 2014Cloud-based Test Microservices JavaOne 2014
Cloud-based Test Microservices JavaOne 2014
Shelley Lambert
 
IBM MobileFirst Platform v7.0 POT Offers Lab v1.0
IBM MobileFirst Platform v7.0 POT Offers Lab v1.0IBM MobileFirst Platform v7.0 POT Offers Lab v1.0
IBM MobileFirst Platform v7.0 POT Offers Lab v1.0
Banking at Ho Chi Minh city
 
Soap ui documentation
Soap ui documentationSoap ui documentation
Soap ui documentation
Follower Test
 
Proper Connections Development for Proper Domino Developers
Proper Connections Development for Proper Domino DevelopersProper Connections Development for Proper Domino Developers
Proper Connections Development for Proper Domino Developers
Mark Myers
 
Making Rational HATS a Strategic Investment
Making Rational HATS a Strategic InvestmentMaking Rational HATS a Strategic Investment
Making Rational HATS a Strategic Investment
Strongback Consulting
 
Пирамида Тестирования через призму ROI калькулятора и прочая геометрия
Пирамида Тестирования через призму ROI калькулятора и прочая геометрияПирамида Тестирования через призму ROI калькулятора и прочая геометрия
Пирамида Тестирования через призму ROI калькулятора и прочая геометрия
SQALab
 
Test Pyramid vs Roi
Test Pyramid vs Roi Test Pyramid vs Roi
Test Pyramid vs Roi
COMAQA.BY
 
Guide for Quality Center (QC) Automation Tool
Guide for Quality Center (QC) Automation ToolGuide for Quality Center (QC) Automation Tool
Guide for Quality Center (QC) Automation Tool
Subrat Srivastava
 
Getting started with_testcomplete
Getting started with_testcompleteGetting started with_testcomplete
Getting started with_testcomplete
ankit.das
 
Access tips access and sql part 4 building select queries on-the-fly
Access tips  access and sql part 4  building select queries on-the-flyAccess tips  access and sql part 4  building select queries on-the-fly
Access tips access and sql part 4 building select queries on-the-fly
quest2900
 
Ad

Recently uploaded (20)

Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...
Vishnu Singh Chundawat
 
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptxIncreasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Anoop Ashok
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
 
TrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business ConsultingTrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business Consulting
Trs Labs
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...
Vishnu Singh Chundawat
 
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptxIncreasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Anoop Ashok
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
 
TrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business ConsultingTrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business Consulting
Trs Labs
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 

Learn SoapUI

  • 1. SoapUI Training Induction course Fresh Grads Ionut David 02.04.2013
  • 2. •What is SoapUI •SoapUI Features •SOAP and WSDL •Functional Testing •Service Mocking Agenda 2
  • 3. What is SoapUI 3 • Free and open source cross-platform Functional Testing solution. • Creating even the most advanced test scenarios is very simple. • SoapUI is a complete and automated testing solution. • Testing for everyone. • Streamlined service simulation. • Advanced functionality comes standard.
  • 4. SoapUI Features 4 • Functional Testing. • Service Simulation. • Security Testing. • Load Testing. • Technology Support. • Automation. • Analytics. • Recording. • Ecosystem.
  • 5. What is a Web Service 5 • A web service is a method of communication between two electronic devices over the World Wide Web. A web service is a software function provided at a network address over the web or the cloud, it is a service that is "always on“. • The Web Services Description Language is an XML-based interface description language that is used for describing the functionality offered by a web service. A WSDL description of a web service (also referred to as a WSDL file) provides a machine-readable description of how the service can be called, what parameters it expects, and what data structures it returns.
  • 6. SOAP and WSDL 6 • XML-based protocol to let applications exchange information over HTTP. • SOAP stands for Simple Object Access Protocol • SOAP is a communication protocol • SOAP is a format for sending messages • SOAP is platform independent • SOAP is language independent • XML-based language for describing Web services and how to access them. • WSDL stands for Web Services Description Language • WSDL is an XML document • WSDL is also used to locate Web services. SOAP Definition WSDL Definition
  • 7. SOAP and WSDL 7 • A SOAP message is an ordinary XML document containing the following elements: • An Envelope element that identifies the XML document as a SOAP message. • A Header element that contains header information. • A Body element that contains call and response information. • A Fault element containing errors and status information. SOAP Syntax
  • 8. SOAP and WSDL 8 <?xml version="1.0"?> <soap:Envelope xmlns: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 Syntax Example
  • 9. SOAP and WSDL 9 • A WSDL document describes a web service using these major elements: • A container for data type definitions used by the web service. • A typed definition of the data being communicated. • A set of operations supported by one or more endpoints. • A protocol and data format specification for a particular port type. WSDL Document Structure
  • 10. SOAP and WSDL 10 <definitions> <types> data type definitions........ </types> <message> definition of the data being communicated.... </message> <portType> set of operations...... </portType> <binding> protocol and data format specification.... </binding> </definitions> WSDL Example
  • 11. Functional Testing 11 • Create a SoapUI Project • Right click on the project node and select New SoapUI Project.
  • 12. Functional Testing 12 • In the New SoapUI Project dialog enter a project name (i.e. Country_info) and click OK. • Right click on the project node and select Add WSDL.
  • 13. Functional Testing 13 • The Add WSDL dialog is now open • Enter http://webservices.oorsprong.org/websamples.countryinfo/CountryInfoService.wso?WSDL. • Click OK.
  • 14. Functional Testing 14 • Now see that the WSDL was successfully added to the project by seeing the operations in the Web Service in the navigatorEnter
  • 15. Functional Testing 15 • Create a request from your WSDL • Click on the plus sign next to the web service in the navigator to expand. • Double click on the request. • You now have to enter your data manually in the code editor as shown below. Replace “?” with “RO” (without quotes)
  • 16. Functional Testing 16 • Run a request to the Web Service • Click on the green arrow head sign to submit the request.
  • 17. Functional Testing 17 • Receive response • On the right side of the window the response will be displayed.
  • 18. Functional Testing 18 • Run an invalid request to the Web Service. • Introduce a wrong country code (like “ZZ”). • Click on the green arrow head sign to submit the request. • The response of the Web Service will indicate that the country was not found. • After seeing the result, correct the input data.
  • 19. Functional Testing 19 • Create a Test Case from a request. • In the request editor, select Add This Request to TestCase.
  • 20. Functional Testing 20 • Next step: • Adding a request to a TestCase will open the Create TestSuite dialog box. Enter a name for your TestSuite and click OK. • After clicking OK, you will be asked to create a TestCase. In the Create TestCase dialog, enter a name for your TestCase and click OK.
  • 21. Functional Testing 21 • Next step: • The dialog box Add Request to TestCase will appear. Click OK.
  • 22. Functional Testing 22 • Final step: • SoapUI will now generate a TestSuite and TestCase for you while the request will be added as a TestRequest. Below is a copy of the request that appears in the interface. A TestCase editor will also open with your new TestRequest. • The next step is to validate the response in your test by adding an Assertion.
  • 23. Functional Testing 23 • Add an Assertion to the test: • Now that we've created and run our first test, we are going to add a validation of the response. In SoapUI, this is called adding an assertion. • Examples of assertions that is possible in SoapUI are: • Schema Compliance • Simple Contains • Simple Not Contains • SOAP Faults • Response SLA • XPath Match • XQuery Match • WS Security Status • WS-Addressing Request/Response Assertion • Script Assertion
  • 24. Functional Testing 24 • Close all windows you have open in SoapUI before starting: • Double Click on your Test Request as shown below. This will open the request editor. • After clicking OK, you will be asked to create a TestCase. In the Create TestCase dialog, enter a name for your TestCase and click OK.
  • 25. Functional Testing 25 • Next step: • Select Response SLA from the Add Assertion menu. • In the Configure Response SLA Assertion dialog box, write 500 and click OK. This will validate that the response of the SLA is under 500.
  • 26. Functional Testing 26 • Next step: • Now that you've added the assertion, you are going to run the request to validate the response. If all assertions are successful, the SOAP icon should turn green in three places as shown below.
  • 27. Functional Testing 27 • Validate response with XPath Match: • Select XPath Match from the Add Assertion menu.
  • 28. Functional Testing 28 • Validate response with XPath Match: • In the XPath Match Configuration press Declare button and write below “//m:CapitalCityResult” • Click “Select from current” and you should see the word Bucharest appearing in the Expected Results field. • Click Save
  • 29. Functional Testing 29 • Final step: • Now that you've added a new assertion, you are going to run the test again. If all assertions are successful, the SOAP icon should turn green in three places as shown below.
  • 30. Service Mocking 30 • “Service Mocking, or simulation, is the practice of creating a facsimile environment that works similar to the environment you’re facsimileing”. • When to use it: You should use mocks when you can’t use the real thing • Advantages: • You can create tests in advance. • Teams can work in parallel. • You can create proof of concepts or demos. • You can isolate systems. • You can write test for resource not accessible. • Mock can be delivered to the customer. • Disadvantages: • You have to do Double work. • Deployment constraints. • It’s not live is it?
  • 31. Service Mocking 31 • Start a new SoapUI project using the following wsdl: http://www.webservicex.net/CurrencyConvertor.asmx?WSDL • Click OK button.
  • 32. Service Mocking 32 • Right-click on one of the SOAP interfaces and select Generate MockService.
  • 33. Service Mocking 33 • In the dialog Generate Mock Service you can specify the local port/path for the service you're creating but for the moment just click OK
  • 34. Service Mocking 34 • Enter the name of your Mock Service in the Name dialog and click OK. For example: Mock convertor • After creating the MockService, you should get a MockService with one operation and one request. • As you can see, the Icons are Grey and inactive. This is an indication that the MockService is not yet running. We have successfully created our first MockService.
  • 35. Service Mocking 35 • Now, double click on the MockService to see the MockService editor. In the editor we can see a list of all operations for the service, as well as a request and response log which logs all incoming requests that have been handled by the MockService. • Double Click on the Conversion Rate Operation to see the MockResponses we have in the MockService
  • 36. Service Mocking 36 • As you can see we do only have one, Let's edit it, double click on it to open the Response Editor • The MockResponse editor is very similar to the standard SoapUI Request editor , but instead of requests, we'll edit responses. The Incoming Request view is still very useful; it shows the last received request to the operation which is useful for debugging client calls, including attachments and HTTP headers. • Edit the ConversionRateResult to be something else than the default empty value "?“. For example: 2.5
  • 37. Service Mocking 37 • First we must start the MockService. Click the Start button in the MockService editor, the green arrow head , this will start the service on the configured port and path • To the Top Right of the Editor you should see that it's running, and the port it's responding on. The play Button is greyed out and if you would like to stop the MockService, just click the stop button.
  • 38. Service Mocking 38 • Now in the MockResponse editor, Click the Button Create Request. • This will prompt you to open one of the existing requests for its operation in your project. • You will also need to give it a name.
  • 39. Service Mocking 39 • When you open the request, SoapUI will automatically change its endpoint to the endpoint of the locally running MockService instead of the endpoint that the WSDL is using. Submit the opened request by clicking the Run Button • As you can see the MockService returned the values we entered earlier as the response.
  • 40. Service Mocking 40 • Let's continue by making the created MockResponse a bit more dynamic by changing the dispatch and by Groovy scripting. • First we’ll create a second MockResponse. • Give it a Groovy Name
  • 41. Service Mocking 41 • Let's write a script for the response. Click the Script tab in the Response and enter the following Groovy Script, (context.rand = Math.random() *10) It will look like this: • This script sets a property called rand to a random number (from 0 to 10). • Now that we have written a script and the random results will be inserted into the response.
  • 42. 42 Ionut David| Software Engineer [email protected] Tel +40 727 772 636 |Skype en_idavid thank you