SlideShare a Scribd company logo
Introducing soapUI http://www.soapui.org
Introduction
SOAP and REST services: main QA aspects
Compliance to protocols’ standards
Functional testing
• API functions tests with supported parameters range
• Negative tests
Security testing
Load and Performance testing
Usability testing
Documentation and Logging
Most of these types can be tested with soapUI.
• It supports SOAP, REST and regular Web services via HTTP protocol
• It has a multi-OS test-runner that can be integrated into a build server
Main elements
Available elements of a soapUI project
Web Service Description Language (.wsdl) file
• A default config element for Simple Object Access Protocol (SOAP) services
Web Application Description Language (.wadl) file
• A default config element for REpresentation State Transfer (REST) services
REST Service
• A config element of a REST service, created manually
Mock Service
• A config element of a Stub Service that can emulate several operations (see
below)
Test Suite
• An element containing Test Cases and Web Test Cases (see below)
• Can contain Setup and TearDown scripts
Test Cases
What types of Test Cases does soapUI support?
Test Case
• A set of requests to any service/server
• Includes test steps, load tests and security tests
• Can contain Setup and TearDown scripts
Web Test Case
• A set of requests to a web server with support of HTTP recording
• Includes test steps, load tests and security tests
• Can contain Setup and TearDown scripts
Test Steps
What types of Test Steps does soapUI support?
Test Request – a request to a SOAP service
REST Test Request – a request to a REST service
HTTP Test Request – a request to a HTTP server
JDBC Request – a query to a Database
Property Transfer – a special step allowing to transfer parameters between
other Test Steps
Groovy Script – a script that can do any action
Delay – a pause
Conditional Goto – goes to a given step if an XPath expression applied to the
previous step returns true; otherwise goes to the next step
Security Test – a test request with specific parameters and assertions
Load Test – a set of test requests with specific statistics
Etc…
Main testing cycle
How are most of test cases written?
Parameters Test Request
Assertions
Property
Transfer
Parameters
• Three-level hierarchy: Project level, Test Suite level, Test Case level
• Accessible from Property Transfer elements, from Groovy Scripts and from any
place as expressions ${#Level#Name}
Main testing cycle
What elements are in Test Requests?
Resource/Method (for SOAP/REST requests) or EndPoint (for Web request)
A list of pre-defined parameters with values:
• Template parameters – <endpoint>/<path>/val1/val2
• Query parameters – <endpoint>/<path>?par1=val1&par2=val2
• Matrix parameters – <endpoint>/<path>;par1=val1,val2
• Header parameters – par1: val1
Accept Header
Content-Type Header (for requests with content)
Additional Headers and Assertions (see below)
Etc…
Response – a result of a request, which can be presented in XML, JSON, HTML or
Raw format
Main testing cycle
What are main types of assertions?
Assertions
• Contains / Not Contains – checks if a response contains / does not contain a given
fragment. Allows regular expressions
• XPath Match – checks if a part of a response, obtained using XPath query, equals
to a given fragment. Allows wildcards
• XQuery Match – checks if a part of a response, obtained using XQuery expression,
equals to a given fragment. Allows wildcards
• Valid HTTP Status Codes / Invalid HTTP Status Codes – allows to specify a list of
valid / invalid response codes
• Script Assertion – allows to check any response element using a groovy script
• Etc…
Main testing cycle
XQuery assertion?
Supports XPath and XML insertions
Can convert nodes to attributes and vice versa
Can return a part of xml tree
Allows sorting
Has a recurrent structure
Main testing cycle
How to transfer properties?
Property Transfer
• Can transfer fragments of a test request object to pre-created parameters (in its
hierarchy) or directly to another request
• Can use XPath or XQuery when transferring, or transfer the whole response
• Can transfer text content of a node or an XML tree
• Supports JSON responses as well as XML ones
Using Groovy Scripts for transferring properties
• Can transfer wider set of values
• Can transfer to any pre-created parameter
Security tests
SQL Injection : tries to exploit bad database integration coding.
statement = "SELECT * FROM `users` WHERE `name` = '" + userName + "';“
userName = ' or '1'='1
XPath Injection : tries to exploit bad XML processing inside your target service
String xpathQuery = "//user[name/text()='" + request.get("username") + "' And
password/text()='" + request.get("password") + "']";
userName = lol' or 1=1 or 'a'='a
Boundary Scan/Ivalid types : tries to exploit bad handling of values that are outside of
defined ranges or of different type, e.g.:
xsd:min, xsd:max, xsd:length, xsd:minInclusive, xsd:maxInclusive, xsd:minExclusive,
xsd:maxExclusive, xsd:totalDigits, xsd:fractionDigits
Continuation on the next page…
What attacks are you able to simulate?
Security tests
Malformed XML : tries to exploit bad handling of invalid XML on your server or in your
service
XML Bomb : tries to exploit bad handling of malicious XML request (be careful)
Malicious Attachment : tries to exploit bad handling of attached files
• Corrupted or very large files intended to make the server to crash.
• Files containing code that is harmful for the server or server to execute/parse, i.e. a
virus targeted at the server.
The Malicious Attachment Security Scan allows generation of corrupt files as well as
attachment of user-selected files.
Continuation on the next page…
What attacks are you able to simulate?
Security tests
Cross Site Scripting (XSS): tries to find cross-site scripting vulnerabilities
Custom Script : allows you to use a script for generating custom parameter fuzzing
values
• The Custom Scan follows the basic model of the other parameter-based Security
Scans but requires you to specify a script (Groovy, Javascript or Java) that will
provide the values to send for each permutation, giving you maximum flexibility
with how you can provoke your target services.
e.g.: fuzzling test
What attacks are you able to simulate?
Performance tests
Validation of:
• speed
• scalability
• stability characteristics
Key types of performance tests
It’s all about the load model that you choose…
What are performance tests aiming at?
By means of assessing:
• response times
• throughput
• resource-utilization levels
Term Purpose
Performance test To determine or validate speed, scalability, and/or stability.
Load test
To verify application behavior under normal and peak load
conditions.
Stress test
To determine or validate an application’s behavior when it
is pushed beyond normal or peak load conditions.
Capacity test
To determine how many users and/or transactions a given
system will support and still meet performance goals.
Performance tests
Simple performance test in soapUI
1
2
Profit!
Performance tests
And so what? Assertions!
We allowed a max response of one second, 1000 milliseconds. And we see
that number of errors is growing since responses take much more time.
Create more complicated strategies and models, take reports, it’s all in soapUI…
Performance tests
Load Strategies
Choose load strategy corresponding your load model.
More info on strategies: http://www.soapui.org/Load-Testing/strategies.html
API Mocking
According to the Cambridge Dictionary something that is “mocked” is:
“Not real but appearing or pretending to be exactly like something”
So we are essentially talking about something that will not behave as a real
service, but will only mimic the behavior of the service.
A mock service is not the same as a full service simulation. A mock will only
simulate a part, perhaps one specific interaction, of a system. While a service
simulator will simulate the entire system and behave in an expected way
for all calls.
What is a Mock Service?
API Mocking
The real service is not implemented
• While serial development usually sux (slow)
Services out of your control:
• Test data
• Life cycle
• Availability & Access
• Negative scenarios
Charged services
Prototyping
3rd-party Consumers
Why should you mock a service?
API Mocking
What do you need to run a mocked service?
• A service contract (WSDL) to mock
• Specify port to run the mock on from soapUI
• Generate responses you need (positive or negative, static or dynamic)
• Launch your mock
What is your mock good for?
• A MockService can simulate any number of WSDL contracts
• Built in scripting functionality (Groovy) helps simulate almost any
desired behavior
• Fixed responses, random errors, dynamic results, etc.
How is your mock managed and hosted?
• You may run it from soapUI tool GUI
• You may run it from command-line (Java-based multi-OS runner)
• You may deploy it to a standard servlet container as a WAR
How does soapUI help?
Slideshare - https://www.slideshare.net/Sperasoft/
SpeakerDeck - https://speakerdeck.com/sperasoft
GitHub - http://github.com/sperasoft
Check out more knowledge sharing here:
Company site - http://www.sperasoft.com/
On Facebook - https://facebook.com/sperasoft
On Twitter - http://twitter.com/sperasoft
Learn more about Sperasoft:

More Related Content

What's hot (20)

PDF
Running distributed tests with k6.pdf
LibbySchulze
 
PPTX
Web Services and Introduction of SOAPUI
Dinesh Kaushik
 
PPTX
Introduction to AWS API Gateway Presentation
Knoldus Inc.
 
PPTX
Python in Test automation
Krishnana Sreeraman
 
PDF
Introduction to Test Automation
Pekka Klärck
 
PDF
Test Automation Framework Design | www.idexcel.com
Idexcel Technologies
 
PPT
Hybrid Automation Framework Development introduction
Ganuka Yashantha
 
PDF
Selenium Page Object Model Using Page Factory | Selenium Tutorial For Beginne...
Edureka!
 
ODP
BDD with Cucumber
Knoldus Inc.
 
PDF
API Testing. Streamline your testing process.
Andrey Oleynik
 
PDF
Playwright: A New Test Automation Framework for the Modern Web
Applitools
 
PDF
Postman
Igor Shubovych
 
PPT
Appium
Deepshikha Singh
 
PDF
Robot Framework Introduction & Sauce Labs Integration
Sauce Labs
 
PPTX
Xray for Jira - How to automate your QA process
Xpand IT
 
PDF
Postman Webinar: Postman 101
Nikita Sharma
 
PDF
API TESTING
Sijan Bhandari
 
PPTX
Test Automation Framework with BDD and Cucumber
Rhoynar Software Consulting
 
PDF
How to Automate API Testing
Bruno Pedro
 
PPTX
Xray for Jira - Overview
Xpand IT
 
Running distributed tests with k6.pdf
LibbySchulze
 
Web Services and Introduction of SOAPUI
Dinesh Kaushik
 
Introduction to AWS API Gateway Presentation
Knoldus Inc.
 
Python in Test automation
Krishnana Sreeraman
 
Introduction to Test Automation
Pekka Klärck
 
Test Automation Framework Design | www.idexcel.com
Idexcel Technologies
 
Hybrid Automation Framework Development introduction
Ganuka Yashantha
 
Selenium Page Object Model Using Page Factory | Selenium Tutorial For Beginne...
Edureka!
 
BDD with Cucumber
Knoldus Inc.
 
API Testing. Streamline your testing process.
Andrey Oleynik
 
Playwright: A New Test Automation Framework for the Modern Web
Applitools
 
Robot Framework Introduction & Sauce Labs Integration
Sauce Labs
 
Xray for Jira - How to automate your QA process
Xpand IT
 
Postman Webinar: Postman 101
Nikita Sharma
 
API TESTING
Sijan Bhandari
 
Test Automation Framework with BDD and Cucumber
Rhoynar Software Consulting
 
How to Automate API Testing
Bruno Pedro
 
Xray for Jira - Overview
Xpand IT
 

Viewers also liked (20)

PPTX
Testing web services
Taras Lytvyn
 
PPTX
Автоматизация настолько хороша, насколько хорош человек использующий ее (блиц...
SQALab
 
PPTX
В поисках магической кнопки, или как воспитать SoapUI
SQALab
 
PDF
Web services automation workshop sreedhar dakshinamurthy
vodQA
 
PPTX
Web services automation from sketch
IT Weekend
 
PDF
Pugazhvanan_Ganapathy_Web_Services_Test_Automation
Pugazhvanan Ganapathy
 
PDF
Mykola Kovsh - Functional API automation with Jmeter
Ievgenii Katsan
 
PDF
Major Incident Management Trends: 2016 Survey Report
xMatters Inc
 
PDF
Software Testing Process, Testing Automation and Software Testing Trends
KMS Technology
 
PDF
Automation anywhere Training Materials
Shekar S
 
PPT
SOAP-UI The Web service Testing
Ganesh Mandala
 
PPT
Presentation for soap ui
Anjali Rao
 
PPTX
Getting Started with API Security Testing
SmartBear
 
PPTX
REST API testing with SpecFlow
Aiste Stikliute
 
PPTX
Testing Agile Web Services from soapUI
PLM Mechanic .
 
PDF
Automate REST API Testing
TechWell
 
PPTX
Testing soapui
Shahid Shaik
 
PPTX
An introduction to api testing | David Tzemach
David Tzemach
 
PDF
4 Major Advantages of API Testing
QASource
 
PPTX
Api testing
Keshav Kashyap
 
Testing web services
Taras Lytvyn
 
Автоматизация настолько хороша, насколько хорош человек использующий ее (блиц...
SQALab
 
В поисках магической кнопки, или как воспитать SoapUI
SQALab
 
Web services automation workshop sreedhar dakshinamurthy
vodQA
 
Web services automation from sketch
IT Weekend
 
Pugazhvanan_Ganapathy_Web_Services_Test_Automation
Pugazhvanan Ganapathy
 
Mykola Kovsh - Functional API automation with Jmeter
Ievgenii Katsan
 
Major Incident Management Trends: 2016 Survey Report
xMatters Inc
 
Software Testing Process, Testing Automation and Software Testing Trends
KMS Technology
 
Automation anywhere Training Materials
Shekar S
 
SOAP-UI The Web service Testing
Ganesh Mandala
 
Presentation for soap ui
Anjali Rao
 
Getting Started with API Security Testing
SmartBear
 
REST API testing with SpecFlow
Aiste Stikliute
 
Testing Agile Web Services from soapUI
PLM Mechanic .
 
Automate REST API Testing
TechWell
 
Testing soapui
Shahid Shaik
 
An introduction to api testing | David Tzemach
David Tzemach
 
4 Major Advantages of API Testing
QASource
 
Api testing
Keshav Kashyap
 
Ad

Similar to Web Services Automated Testing via SoapUI Tool (20)

PPTX
WebServices using Soap
Mohammed625
 
PPTX
SoapUi using WebServices
AbdulImrankhan7
 
PPTX
WebServices using Soapui
javeed_mhd
 
PPTX
SOA Testing
Roopesh Kohad
 
PPTX
Testing soapui
F K
 
PPTX
Soap UI - Lesson45
Qualitest
 
PPTX
Introduction to SoapUI day 4-5
Qualitest
 
PPTX
Web services testing
rammikn
 
PDF
Productivity Acceleration Tools for SOA Testers
WSO2
 
PPTX
Soap UI and postman
Tushar Agarwal
 
PPTX
B4USolution_API-Testing
b4usolution .
 
PDF
Webservices Testing PPT.pdf
AbhishekDhotre4
 
DOC
Soap ui documentation
Follower Test
 
PDF
API Testing Interview Preparation and Methods
VivekanandaSamantra2
 
PPTX
Service testing - Introduction to SoapUI & groovy
Thessaloniki Software Testing and QA meetup
 
PDF
Soap ui and soapui pro course contents
Probal Sil
 
PPTX
API-Testing-SOAPUI-1.pptx
amarnathdeo
 
PDF
White paper ready api
Nithin Bijjala
 
PPTX
Test execution
adarsh j
 
PPT
Introduction to soapui and webservices
Anil Yadav
 
WebServices using Soap
Mohammed625
 
SoapUi using WebServices
AbdulImrankhan7
 
WebServices using Soapui
javeed_mhd
 
SOA Testing
Roopesh Kohad
 
Testing soapui
F K
 
Soap UI - Lesson45
Qualitest
 
Introduction to SoapUI day 4-5
Qualitest
 
Web services testing
rammikn
 
Productivity Acceleration Tools for SOA Testers
WSO2
 
Soap UI and postman
Tushar Agarwal
 
B4USolution_API-Testing
b4usolution .
 
Webservices Testing PPT.pdf
AbhishekDhotre4
 
Soap ui documentation
Follower Test
 
API Testing Interview Preparation and Methods
VivekanandaSamantra2
 
Service testing - Introduction to SoapUI & groovy
Thessaloniki Software Testing and QA meetup
 
Soap ui and soapui pro course contents
Probal Sil
 
API-Testing-SOAPUI-1.pptx
amarnathdeo
 
White paper ready api
Nithin Bijjala
 
Test execution
adarsh j
 
Introduction to soapui and webservices
Anil Yadav
 
Ad

More from Sperasoft (20)

PDF
особенности работы с Locomotion в Unreal Engine 4
Sperasoft
 
PDF
концепт и архитектура геймплея в Creach: The Depleted World
Sperasoft
 
PPTX
Опыт разработки VR игры для UE4
Sperasoft
 
PPTX
Организация работы с UE4 в команде до 20 человек
Sperasoft
 
PPTX
Gameplay Tags
Sperasoft
 
PDF
Data Driven Gameplay in UE4
Sperasoft
 
PPTX
Code and Memory Optimisation Tricks
Sperasoft
 
PPTX
The theory of relational databases
Sperasoft
 
PPTX
Automated layout testing using Galen Framework
Sperasoft
 
PDF
Sperasoft talks: Android Security Threats
Sperasoft
 
PDF
Sperasoft Talks: RxJava Functional Reactive Programming on Android
Sperasoft
 
PDF
Sperasoft‬ talks j point 2015
Sperasoft
 
PDF
Effective Мeetings
Sperasoft
 
PDF
Unreal Engine 4 Introduction
Sperasoft
 
PDF
JIRA Development
Sperasoft
 
PDF
Introduction to Elasticsearch
Sperasoft
 
PDF
MOBILE DEVELOPMENT with HTML, CSS and JS
Sperasoft
 
PDF
Quick Intro Into Kanban
Sperasoft
 
PDF
ECMAScript 6 Review
Sperasoft
 
PDF
Console Development in 15 minutes
Sperasoft
 
особенности работы с Locomotion в Unreal Engine 4
Sperasoft
 
концепт и архитектура геймплея в Creach: The Depleted World
Sperasoft
 
Опыт разработки VR игры для UE4
Sperasoft
 
Организация работы с UE4 в команде до 20 человек
Sperasoft
 
Gameplay Tags
Sperasoft
 
Data Driven Gameplay in UE4
Sperasoft
 
Code and Memory Optimisation Tricks
Sperasoft
 
The theory of relational databases
Sperasoft
 
Automated layout testing using Galen Framework
Sperasoft
 
Sperasoft talks: Android Security Threats
Sperasoft
 
Sperasoft Talks: RxJava Functional Reactive Programming on Android
Sperasoft
 
Sperasoft‬ talks j point 2015
Sperasoft
 
Effective Мeetings
Sperasoft
 
Unreal Engine 4 Introduction
Sperasoft
 
JIRA Development
Sperasoft
 
Introduction to Elasticsearch
Sperasoft
 
MOBILE DEVELOPMENT with HTML, CSS and JS
Sperasoft
 
Quick Intro Into Kanban
Sperasoft
 
ECMAScript 6 Review
Sperasoft
 
Console Development in 15 minutes
Sperasoft
 

Recently uploaded (20)

PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PDF
NLJUG Speaker academy 2025 - first session
Bert Jan Schrijver
 
PPTX
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
PDF
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
PDF
Future-Proof or Fall Behind? 10 Tech Trends You Can’t Afford to Ignore in 2025
DIGITALCONFEX
 
PPTX
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
 
PDF
Staying Human in a Machine- Accelerated World
Catalin Jora
 
PDF
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
PPTX
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
DOCX
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
PPTX
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
PDF
ICONIQ State of AI Report 2025 - The Builder's Playbook
Razin Mustafiz
 
PDF
SIZING YOUR AIR CONDITIONER---A PRACTICAL GUIDE.pdf
Muhammad Rizwan Akram
 
PDF
AI Agents in the Cloud: The Rise of Agentic Cloud Architecture
Lilly Gracia
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PDF
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
PDF
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
DOCX
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
NLJUG Speaker academy 2025 - first session
Bert Jan Schrijver
 
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
Future-Proof or Fall Behind? 10 Tech Trends You Can’t Afford to Ignore in 2025
DIGITALCONFEX
 
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
 
Staying Human in a Machine- Accelerated World
Catalin Jora
 
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
ICONIQ State of AI Report 2025 - The Builder's Playbook
Razin Mustafiz
 
SIZING YOUR AIR CONDITIONER---A PRACTICAL GUIDE.pdf
Muhammad Rizwan Akram
 
AI Agents in the Cloud: The Rise of Agentic Cloud Architecture
Lilly Gracia
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 

Web Services Automated Testing via SoapUI Tool

  • 2. Introduction SOAP and REST services: main QA aspects Compliance to protocols’ standards Functional testing • API functions tests with supported parameters range • Negative tests Security testing Load and Performance testing Usability testing Documentation and Logging Most of these types can be tested with soapUI. • It supports SOAP, REST and regular Web services via HTTP protocol • It has a multi-OS test-runner that can be integrated into a build server
  • 3. Main elements Available elements of a soapUI project Web Service Description Language (.wsdl) file • A default config element for Simple Object Access Protocol (SOAP) services Web Application Description Language (.wadl) file • A default config element for REpresentation State Transfer (REST) services REST Service • A config element of a REST service, created manually Mock Service • A config element of a Stub Service that can emulate several operations (see below) Test Suite • An element containing Test Cases and Web Test Cases (see below) • Can contain Setup and TearDown scripts
  • 4. Test Cases What types of Test Cases does soapUI support? Test Case • A set of requests to any service/server • Includes test steps, load tests and security tests • Can contain Setup and TearDown scripts Web Test Case • A set of requests to a web server with support of HTTP recording • Includes test steps, load tests and security tests • Can contain Setup and TearDown scripts
  • 5. Test Steps What types of Test Steps does soapUI support? Test Request – a request to a SOAP service REST Test Request – a request to a REST service HTTP Test Request – a request to a HTTP server JDBC Request – a query to a Database Property Transfer – a special step allowing to transfer parameters between other Test Steps Groovy Script – a script that can do any action Delay – a pause Conditional Goto – goes to a given step if an XPath expression applied to the previous step returns true; otherwise goes to the next step Security Test – a test request with specific parameters and assertions Load Test – a set of test requests with specific statistics Etc…
  • 6. Main testing cycle How are most of test cases written? Parameters Test Request Assertions Property Transfer Parameters • Three-level hierarchy: Project level, Test Suite level, Test Case level • Accessible from Property Transfer elements, from Groovy Scripts and from any place as expressions ${#Level#Name}
  • 7. Main testing cycle What elements are in Test Requests? Resource/Method (for SOAP/REST requests) or EndPoint (for Web request) A list of pre-defined parameters with values: • Template parameters – <endpoint>/<path>/val1/val2 • Query parameters – <endpoint>/<path>?par1=val1&par2=val2 • Matrix parameters – <endpoint>/<path>;par1=val1,val2 • Header parameters – par1: val1 Accept Header Content-Type Header (for requests with content) Additional Headers and Assertions (see below) Etc… Response – a result of a request, which can be presented in XML, JSON, HTML or Raw format
  • 8. Main testing cycle What are main types of assertions? Assertions • Contains / Not Contains – checks if a response contains / does not contain a given fragment. Allows regular expressions • XPath Match – checks if a part of a response, obtained using XPath query, equals to a given fragment. Allows wildcards • XQuery Match – checks if a part of a response, obtained using XQuery expression, equals to a given fragment. Allows wildcards • Valid HTTP Status Codes / Invalid HTTP Status Codes – allows to specify a list of valid / invalid response codes • Script Assertion – allows to check any response element using a groovy script • Etc…
  • 9. Main testing cycle XQuery assertion? Supports XPath and XML insertions Can convert nodes to attributes and vice versa Can return a part of xml tree Allows sorting Has a recurrent structure
  • 10. Main testing cycle How to transfer properties? Property Transfer • Can transfer fragments of a test request object to pre-created parameters (in its hierarchy) or directly to another request • Can use XPath or XQuery when transferring, or transfer the whole response • Can transfer text content of a node or an XML tree • Supports JSON responses as well as XML ones Using Groovy Scripts for transferring properties • Can transfer wider set of values • Can transfer to any pre-created parameter
  • 11. Security tests SQL Injection : tries to exploit bad database integration coding. statement = "SELECT * FROM `users` WHERE `name` = '" + userName + "';“ userName = ' or '1'='1 XPath Injection : tries to exploit bad XML processing inside your target service String xpathQuery = "//user[name/text()='" + request.get("username") + "' And password/text()='" + request.get("password") + "']"; userName = lol' or 1=1 or 'a'='a Boundary Scan/Ivalid types : tries to exploit bad handling of values that are outside of defined ranges or of different type, e.g.: xsd:min, xsd:max, xsd:length, xsd:minInclusive, xsd:maxInclusive, xsd:minExclusive, xsd:maxExclusive, xsd:totalDigits, xsd:fractionDigits Continuation on the next page… What attacks are you able to simulate?
  • 12. Security tests Malformed XML : tries to exploit bad handling of invalid XML on your server or in your service XML Bomb : tries to exploit bad handling of malicious XML request (be careful) Malicious Attachment : tries to exploit bad handling of attached files • Corrupted or very large files intended to make the server to crash. • Files containing code that is harmful for the server or server to execute/parse, i.e. a virus targeted at the server. The Malicious Attachment Security Scan allows generation of corrupt files as well as attachment of user-selected files. Continuation on the next page… What attacks are you able to simulate?
  • 13. Security tests Cross Site Scripting (XSS): tries to find cross-site scripting vulnerabilities Custom Script : allows you to use a script for generating custom parameter fuzzing values • The Custom Scan follows the basic model of the other parameter-based Security Scans but requires you to specify a script (Groovy, Javascript or Java) that will provide the values to send for each permutation, giving you maximum flexibility with how you can provoke your target services. e.g.: fuzzling test What attacks are you able to simulate?
  • 14. Performance tests Validation of: • speed • scalability • stability characteristics Key types of performance tests It’s all about the load model that you choose… What are performance tests aiming at? By means of assessing: • response times • throughput • resource-utilization levels Term Purpose Performance test To determine or validate speed, scalability, and/or stability. Load test To verify application behavior under normal and peak load conditions. Stress test To determine or validate an application’s behavior when it is pushed beyond normal or peak load conditions. Capacity test To determine how many users and/or transactions a given system will support and still meet performance goals.
  • 15. Performance tests Simple performance test in soapUI 1 2 Profit!
  • 16. Performance tests And so what? Assertions! We allowed a max response of one second, 1000 milliseconds. And we see that number of errors is growing since responses take much more time. Create more complicated strategies and models, take reports, it’s all in soapUI…
  • 17. Performance tests Load Strategies Choose load strategy corresponding your load model. More info on strategies: http://www.soapui.org/Load-Testing/strategies.html
  • 18. API Mocking According to the Cambridge Dictionary something that is “mocked” is: “Not real but appearing or pretending to be exactly like something” So we are essentially talking about something that will not behave as a real service, but will only mimic the behavior of the service. A mock service is not the same as a full service simulation. A mock will only simulate a part, perhaps one specific interaction, of a system. While a service simulator will simulate the entire system and behave in an expected way for all calls. What is a Mock Service?
  • 19. API Mocking The real service is not implemented • While serial development usually sux (slow) Services out of your control: • Test data • Life cycle • Availability & Access • Negative scenarios Charged services Prototyping 3rd-party Consumers Why should you mock a service?
  • 20. API Mocking What do you need to run a mocked service? • A service contract (WSDL) to mock • Specify port to run the mock on from soapUI • Generate responses you need (positive or negative, static or dynamic) • Launch your mock What is your mock good for? • A MockService can simulate any number of WSDL contracts • Built in scripting functionality (Groovy) helps simulate almost any desired behavior • Fixed responses, random errors, dynamic results, etc. How is your mock managed and hosted? • You may run it from soapUI tool GUI • You may run it from command-line (Java-based multi-OS runner) • You may deploy it to a standard servlet container as a WAR How does soapUI help?
  • 21. Slideshare - https://www.slideshare.net/Sperasoft/ SpeakerDeck - https://speakerdeck.com/sperasoft GitHub - http://github.com/sperasoft Check out more knowledge sharing here: Company site - http://www.sperasoft.com/ On Facebook - https://facebook.com/sperasoft On Twitter - http://twitter.com/sperasoft Learn more about Sperasoft: