SlideShare ist ein Scribd-Unternehmen logo
1 von 42
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

Weitere ähnliche Inhalte

Was ist angesagt?

Performance Testing using LoadRunner - Kamran Khan [chromeis.com]
Performance Testing using LoadRunner - Kamran Khan [chromeis.com]Performance Testing using LoadRunner - Kamran Khan [chromeis.com]
Performance Testing using LoadRunner - Kamran Khan [chromeis.com]Kamran Khan
 
An Introduction To Automated API Testing
An Introduction To Automated API TestingAn Introduction To Automated API Testing
An Introduction To Automated API TestingSauce Labs
 
Apache JMeter - A brief introduction
Apache JMeter - A brief introductionApache JMeter - A brief introduction
Apache JMeter - A brief introductionsilenceIT Inc.
 
Test Design and Automation for REST API
Test Design and Automation for REST APITest Design and Automation for REST API
Test Design and Automation for REST APIIvan Katunou
 
How to Automate API Testing
How to Automate API TestingHow to Automate API Testing
How to Automate API TestingBruno Pedro
 
Web Services Automated Testing via SoapUI Tool
Web Services Automated Testing via SoapUI ToolWeb Services Automated Testing via SoapUI Tool
Web Services Automated Testing via SoapUI ToolSperasoft
 
Jmeter Performance Testing
Jmeter Performance TestingJmeter Performance Testing
Jmeter Performance TestingAtul Pant
 
Postman. From simple API test to end to end scenario
Postman. From simple API test to end to end scenarioPostman. From simple API test to end to end scenario
Postman. From simple API test to end to end scenarioHYS Enterprise
 
Page Object Model and Implementation in Selenium
Page Object Model and Implementation in Selenium  Page Object Model and Implementation in Selenium
Page Object Model and Implementation in Selenium Zoe Gilbert
 
API Testing Presentations.pptx
API Testing Presentations.pptxAPI Testing Presentations.pptx
API Testing Presentations.pptxManmitSalunke
 
Load Testing and JMeter Presentation
Load Testing and JMeter PresentationLoad Testing and JMeter Presentation
Load Testing and JMeter PresentationNeill Lima
 

Was ist angesagt? (20)

Performance Testing using LoadRunner - Kamran Khan [chromeis.com]
Performance Testing using LoadRunner - Kamran Khan [chromeis.com]Performance Testing using LoadRunner - Kamran Khan [chromeis.com]
Performance Testing using LoadRunner - Kamran Khan [chromeis.com]
 
Api testing
Api testingApi testing
Api testing
 
Api Testing
Api TestingApi Testing
Api Testing
 
An Introduction To Automated API Testing
An Introduction To Automated API TestingAn Introduction To Automated API Testing
An Introduction To Automated API Testing
 
Rest assured
Rest assuredRest assured
Rest assured
 
Apache jMeter
Apache jMeterApache jMeter
Apache jMeter
 
Postman
PostmanPostman
Postman
 
Apache JMeter - A brief introduction
Apache JMeter - A brief introductionApache JMeter - A brief introduction
Apache JMeter - A brief introduction
 
Test Design and Automation for REST API
Test Design and Automation for REST APITest Design and Automation for REST API
Test Design and Automation for REST API
 
How to Automate API Testing
How to Automate API TestingHow to Automate API Testing
How to Automate API Testing
 
Web Services Automated Testing via SoapUI Tool
Web Services Automated Testing via SoapUI ToolWeb Services Automated Testing via SoapUI Tool
Web Services Automated Testing via SoapUI Tool
 
Jmeter Performance Testing
Jmeter Performance TestingJmeter Performance Testing
Jmeter Performance Testing
 
Postman. From simple API test to end to end scenario
Postman. From simple API test to end to end scenarioPostman. From simple API test to end to end scenario
Postman. From simple API test to end to end scenario
 
Api testing
Api testingApi testing
Api testing
 
Api presentation
Api presentationApi presentation
Api presentation
 
Belajar Postman test runner
Belajar Postman test runnerBelajar Postman test runner
Belajar Postman test runner
 
What is an API?
What is an API?What is an API?
What is an API?
 
Page Object Model and Implementation in Selenium
Page Object Model and Implementation in Selenium  Page Object Model and Implementation in Selenium
Page Object Model and Implementation in Selenium
 
API Testing Presentations.pptx
API Testing Presentations.pptxAPI Testing Presentations.pptx
API Testing Presentations.pptx
 
Load Testing and JMeter Presentation
Load Testing and JMeter PresentationLoad Testing and JMeter Presentation
Load Testing and JMeter Presentation
 

Andere mochten auch

Testing web services
Testing web servicesTesting web services
Testing web servicesTaras 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 RollisonTEST Huddle
 
В поисках магической кнопки, или как воспитать SoapUI
В поисках магической кнопки, или как воспитать SoapUIВ поисках магической кнопки, или как воспитать SoapUI
В поисках магической кнопки, или как воспитать SoapUISQALab
 
Автоматизация настолько хороша, насколько хорош человек использующий ее (блиц...
Автоматизация настолько хороша, насколько хорош человек использующий ее (блиц...Автоматизация настолько хороша, насколько хорош человек использующий ее (блиц...
Автоматизация настолько хороша, насколько хорош человек использующий ее (блиц...SQALab
 
Automate REST API Testing
Automate REST API TestingAutomate REST API Testing
Automate REST API TestingTechWell
 
SOAP-UI The Web service Testing
SOAP-UI The Web service TestingSOAP-UI The Web service Testing
SOAP-UI The Web service TestingGanesh 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 TzemachDavid Tzemach
 
REST API testing with SpecFlow
REST API testing with SpecFlowREST API testing with SpecFlow
REST API testing with SpecFlowAiste Stikliute
 
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 TestingSmartBear
 
Testing Agile Web Services from soapUI
Testing Agile Web Services from soapUITesting Agile Web Services from soapUI
Testing Agile Web Services from soapUIPLM Mechanic .
 

Andere mochten auch (13)

Testing web services
Testing web servicesTesting web services
Testing web services
 
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
 
В поисках магической кнопки, или как воспитать SoapUI
В поисках магической кнопки, или как воспитать SoapUIВ поисках магической кнопки, или как воспитать SoapUI
В поисках магической кнопки, или как воспитать SoapUI
 
Автоматизация настолько хороша, насколько хорош человек использующий ее (блиц...
Автоматизация настолько хороша, насколько хорош человек использующий ее (блиц...Автоматизация настолько хороша, насколько хорош человек использующий ее (блиц...
Автоматизация настолько хороша, насколько хорош человек использующий ее (блиц...
 
Automate REST API Testing
Automate REST API TestingAutomate REST API Testing
Automate REST API Testing
 
Testing soapui
Testing soapuiTesting soapui
Testing soapui
 
SOAP-UI The Web service Testing
SOAP-UI The Web service TestingSOAP-UI The Web service Testing
SOAP-UI The Web service Testing
 
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
 
REST API testing with SpecFlow
REST API testing with SpecFlowREST API testing with SpecFlow
REST API testing with SpecFlow
 
Soa testing soap ui (2)
Soa testing   soap ui (2)Soa testing   soap ui (2)
Soa testing soap ui (2)
 
Getting Started with API Security Testing
Getting Started with API Security TestingGetting Started with API Security Testing
Getting Started with API Security Testing
 
Testing Agile Web Services from soapUI
Testing Agile Web Services from soapUITesting Agile Web Services from soapUI
Testing Agile Web Services from soapUI
 
API Testing
API TestingAPI Testing
API Testing
 

Ähnlich wie Learn SoapUI

Web services testing
Web services testingWeb services testing
Web services testingrammikn
 
Load testing using_neoload by kc
Load testing using_neoload by kcLoad testing using_neoload by kc
Load testing using_neoload by kckrishna chaitanya
 
Debugging Integration Flows
Debugging Integration FlowsDebugging Integration Flows
Debugging Integration FlowsWSO2
 
LoadUI web performance testing tool
LoadUI web performance testing toolLoadUI web performance testing tool
LoadUI web performance testing toolMilind 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_testsMadhu Mohan
 
Cloud-based Test Microservices JavaOne 2014
Cloud-based Test Microservices JavaOne 2014Cloud-based Test Microservices JavaOne 2014
Cloud-based Test Microservices JavaOne 2014Shelley 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.0Banking at Ho Chi Minh city
 
Soap ui documentation
Soap ui documentationSoap ui documentation
Soap ui documentationFollower 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 DevelopersMark Myers
 
Making Rational HATS a Strategic Investment
Making Rational HATS a Strategic InvestmentMaking Rational HATS a Strategic Investment
Making Rational HATS a Strategic InvestmentStrongback 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 ToolSubrat Srivastava
 
Getting started with_testcomplete
Getting started with_testcompleteGetting started with_testcomplete
Getting started with_testcompleteankit.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-flyquest2900
 

Ähnlich wie Learn SoapUI (20)

Web services testing
Web services testingWeb services testing
Web services testing
 
Load testing using_neoload by kc
Load testing using_neoload by kcLoad testing using_neoload by kc
Load testing using_neoload by kc
 
Debugging Integration Flows
Debugging Integration FlowsDebugging Integration Flows
Debugging Integration Flows
 
LoadUI web performance testing tool
LoadUI web performance testing toolLoadUI web performance testing tool
LoadUI web performance testing tool
 
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...
 
Grails Services
Grails ServicesGrails Services
Grails Services
 
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
 
Cloud-based Test Microservices JavaOne 2014
Cloud-based Test Microservices JavaOne 2014Cloud-based Test Microservices JavaOne 2014
Cloud-based Test Microservices JavaOne 2014
 
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
 
Soap ui documentation
Soap ui documentationSoap ui documentation
Soap ui documentation
 
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
 
Making Rational HATS a Strategic Investment
Making Rational HATS a Strategic InvestmentMaking Rational HATS a Strategic Investment
Making Rational HATS a Strategic Investment
 
Пирамида Тестирования через призму ROI калькулятора и прочая геометрия
Пирамида Тестирования через призму ROI калькулятора и прочая геометрияПирамида Тестирования через призму ROI калькулятора и прочая геометрия
Пирамида Тестирования через призму ROI калькулятора и прочая геометрия
 
Test Pyramid vs Roi
Test Pyramid vs Roi Test Pyramid vs Roi
Test Pyramid vs Roi
 
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
 
Getting started with_testcomplete
Getting started with_testcompleteGetting started with_testcomplete
Getting started with_testcomplete
 
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
 
White paper ready api
White paper  ready apiWhite paper  ready api
White paper ready api
 
Webservice Testing
Webservice TestingWebservice Testing
Webservice Testing
 
HP ALM QC
HP ALM QCHP ALM QC
HP ALM QC
 

Kürzlich hochgeladen

Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
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 WorkerThousandEyes
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 

Kürzlich hochgeladen (20)

Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
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
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 

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 ionut.david@endava.com Tel +40 727 772 636 |Skype en_idavid thank you