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

PPT
Ppt of soap ui
PDF
Appium: Automation for Mobile Apps
PPTX
B4USolution_API-Testing
PDF
API Testing
PDF
An Introduction To Automated API Testing
PDF
API Testing: The heart of functional testing" with Bj Rollison
PPTX
REST API testing with SpecFlow
Ppt of soap ui
Appium: Automation for Mobile Apps
B4USolution_API-Testing
API Testing
An Introduction To Automated API Testing
API Testing: The heart of functional testing" with Bj Rollison
REST API testing with SpecFlow

What's hot (20)

PPT
Presentation for soap ui
PPT
Test Automation Framework Designs
PPTX
Automated UI Testing
ODP
Testing RESTful Webservices using the REST-assured framework
PPTX
QA Challenge Accepted 4.0 - Cypress vs. Selenium
PPTX
Web Services and Introduction of SOAPUI
PDF
API Testing. Streamline your testing process.
PDF
Building a Test Automation Strategy for Success
PDF
Automate REST API Testing
PDF
Postman & API Testing by Amber Race
PPTX
Api Testing
PPTX
Learn SoapUI
PPTX
POSTMAN.pptx
PPTX
Api testing
PPTX
RESTful API Testing using Postman, Newman, and Jenkins
PDF
31b - JUnit and Mockito.pdf
PPT
Performance testing and reporting with JMeter
PPTX
API Testing for everyone.pptx
PDF
API TESTING
PPT
SOAP-UI The Web service Testing
Presentation for soap ui
Test Automation Framework Designs
Automated UI Testing
Testing RESTful Webservices using the REST-assured framework
QA Challenge Accepted 4.0 - Cypress vs. Selenium
Web Services and Introduction of SOAPUI
API Testing. Streamline your testing process.
Building a Test Automation Strategy for Success
Automate REST API Testing
Postman & API Testing by Amber Race
Api Testing
Learn SoapUI
POSTMAN.pptx
Api testing
RESTful API Testing using Postman, Newman, and Jenkins
31b - JUnit and Mockito.pdf
Performance testing and reporting with JMeter
API Testing for everyone.pptx
API TESTING
SOAP-UI The Web service Testing
Ad

Viewers also liked (17)

PPTX
Testing web services
PPTX
Автоматизация Π½Π°ΡΡ‚ΠΎΠ»ΡŒΠΊΠΎ Ρ…ΠΎΡ€ΠΎΡˆΠ°, насколько Ρ…ΠΎΡ€ΠΎΡˆ Ρ‡Π΅Π»ΠΎΠ²Π΅ΠΊ ΠΈΡΠΏΠΎΠ»ΡŒΠ·ΡƒΡŽΡ‰ΠΈΠΉ Π΅Π΅ (Π±Π»ΠΈΡ†...
Β 
PPTX
Π’ поисках магичСской ΠΊΠ½ΠΎΠΏΠΊΠΈ, ΠΈΠ»ΠΈ ΠΊΠ°ΠΊ Π²ΠΎΡΠΏΠΈΡ‚Π°Ρ‚ΡŒ SoapUI
Β 
PDF
Web services automation workshop sreedhar dakshinamurthy
Β 
PPTX
Web services automation from sketch
PDF
Pugazhvanan_Ganapathy_Web_Services_Test_Automation
PDF
Mykola Kovsh - Functional API automation with Jmeter
PDF
Major Incident Management Trends: 2016 Survey Report
PDF
Software Testing Process, Testing Automation and Software Testing Trends
PDF
Automation anywhere Training Materials
PPTX
Getting Started with API Security Testing
PPTX
Testing Agile Web Services from soapUI
PPT
Soa testing soap ui (2)
PPTX
Testing soapui
PPTX
An introduction to api testing | David Tzemach
PDF
4 Major Advantages of API Testing
PPTX
Designing REST API automation tests in Kotlin
Testing web services
Автоматизация Π½Π°ΡΡ‚ΠΎΠ»ΡŒΠΊΠΎ Ρ…ΠΎΡ€ΠΎΡˆΠ°, насколько Ρ…ΠΎΡ€ΠΎΡˆ Ρ‡Π΅Π»ΠΎΠ²Π΅ΠΊ ΠΈΡΠΏΠΎΠ»ΡŒΠ·ΡƒΡŽΡ‰ΠΈΠΉ Π΅Π΅ (Π±Π»ΠΈΡ†...
Β 
Π’ поисках магичСской ΠΊΠ½ΠΎΠΏΠΊΠΈ, ΠΈΠ»ΠΈ ΠΊΠ°ΠΊ Π²ΠΎΡΠΏΠΈΡ‚Π°Ρ‚ΡŒ SoapUI
Β 
Web services automation workshop sreedhar dakshinamurthy
Β 
Web services automation from sketch
Pugazhvanan_Ganapathy_Web_Services_Test_Automation
Mykola Kovsh - Functional API automation with Jmeter
Major Incident Management Trends: 2016 Survey Report
Software Testing Process, Testing Automation and Software Testing Trends
Automation anywhere Training Materials
Getting Started with API Security Testing
Testing Agile Web Services from soapUI
Soa testing soap ui (2)
Testing soapui
An introduction to api testing | David Tzemach
4 Major Advantages of API Testing
Designing REST API automation tests in Kotlin
Ad

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

PPTX
Structured Functional Automated Web Service Testing
PPT
Netserv Software Testing
PDF
Software Quality and Test Strategies for Ruby and Rails Applications
PPTX
Prowess presentation
PPT
Unit testing with Spock Framework
PPTX
Beginners overview of automated testing with Rspec
PPTX
Cerberus_Presentation1
PPTX
Cerberus : Framework for Manual and Automated Testing (Web Application)
PPT
Performance testing jmeter
PDF
Testing tools concepts
PPTX
Testing Rapidly Changing Applications With Self-Testing Object-Oriented Selen...
PPT
Web Services Security
PDF
How to Build Your Own Test Automation Framework?
PDF
Javascript-heavy Salesforce Applications
PPTX
API-Testing-SOAPUI-1.pptx
ODP
Unit Testing and Coverage for AngularJS
PDF
Cloud-based Test Microservices JavaOne 2014
PDF
Modernizing Testing as Apps Re-Architect
PPTX
Test automation lesson
PDF
Tools. Techniques. Trouble?
Structured Functional Automated Web Service Testing
Netserv Software Testing
Software Quality and Test Strategies for Ruby and Rails Applications
Prowess presentation
Unit testing with Spock Framework
Beginners overview of automated testing with Rspec
Cerberus_Presentation1
Cerberus : Framework for Manual and Automated Testing (Web Application)
Performance testing jmeter
Testing tools concepts
Testing Rapidly Changing Applications With Self-Testing Object-Oriented Selen...
Web Services Security
How to Build Your Own Test Automation Framework?
Javascript-heavy Salesforce Applications
API-Testing-SOAPUI-1.pptx
Unit Testing and Coverage for AngularJS
Cloud-based Test Microservices JavaOne 2014
Modernizing Testing as Apps Re-Architect
Test automation lesson
Tools. Techniques. Trouble?

More from Sperasoft (20)

PDF
особСнности Ρ€Π°Π±ΠΎΡ‚Ρ‹ с Locomotion Π² Unreal Engine 4
PDF
ΠΊΠΎΠ½Ρ†Π΅ΠΏΡ‚ ΠΈ Π°Ρ€Ρ…ΠΈΡ‚Π΅ΠΊΡ‚ΡƒΡ€Π° гСймплСя Π² Creach: The Depleted World
PPTX
ΠžΠΏΡ‹Ρ‚ Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠΈ VR ΠΈΠ³Ρ€Ρ‹ для UE4
PPTX
ΠžΡ€Π³Π°Π½ΠΈΠ·Π°Ρ†ΠΈΡ Ρ€Π°Π±ΠΎΡ‚Ρ‹ с UE4 Π² ΠΊΠΎΠΌΠ°Π½Π΄Π΅ Π΄ΠΎ 20 Ρ‡Π΅Π»ΠΎΠ²Π΅ΠΊ
PPTX
Gameplay Tags
PDF
Data Driven Gameplay in UE4
PPTX
Code and Memory Optimisation Tricks
PPTX
The theory of relational databases
PPTX
Automated layout testing using Galen Framework
PDF
Sperasoft talks: Android Security Threats
PDF
Sperasoft Talks: RxJava Functional Reactive Programming on Android
PDF
Sperasoft‬ talks j point 2015
PDF
Effective Мeetings
PDF
Unreal Engine 4 Introduction
PDF
JIRA Development
PDF
Introduction to Elasticsearch
PDF
MOBILE DEVELOPMENT with HTML, CSS and JS
PDF
Quick Intro Into Kanban
PDF
ECMAScript 6 Review
PDF
Console Development in 15 minutes
особСнности Ρ€Π°Π±ΠΎΡ‚Ρ‹ с Locomotion Π² Unreal Engine 4
ΠΊΠΎΠ½Ρ†Π΅ΠΏΡ‚ ΠΈ Π°Ρ€Ρ…ΠΈΡ‚Π΅ΠΊΡ‚ΡƒΡ€Π° гСймплСя Π² Creach: The Depleted World
ΠžΠΏΡ‹Ρ‚ Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠΈ VR ΠΈΠ³Ρ€Ρ‹ для UE4
ΠžΡ€Π³Π°Π½ΠΈΠ·Π°Ρ†ΠΈΡ Ρ€Π°Π±ΠΎΡ‚Ρ‹ с UE4 Π² ΠΊΠΎΠΌΠ°Π½Π΄Π΅ Π΄ΠΎ 20 Ρ‡Π΅Π»ΠΎΠ²Π΅ΠΊ
Gameplay Tags
Data Driven Gameplay in UE4
Code and Memory Optimisation Tricks
The theory of relational databases
Automated layout testing using Galen Framework
Sperasoft talks: Android Security Threats
Sperasoft Talks: RxJava Functional Reactive Programming on Android
Sperasoft‬ talks j point 2015
Effective Мeetings
Unreal Engine 4 Introduction
JIRA Development
Introduction to Elasticsearch
MOBILE DEVELOPMENT with HTML, CSS and JS
Quick Intro Into Kanban
ECMAScript 6 Review
Console Development in 15 minutes

Recently uploaded (20)

PPTX
Understanding_Digital_Forensics_Presentation.pptx
PPT
Teaching material agriculture food technology
PDF
Transforming Manufacturing operations through Intelligent Integrations
PDF
madgavkar20181017ppt McKinsey Presentation.pdf
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
GDG Cloud Iasi [PUBLIC] Florian Blaga - Unveiling the Evolution of Cybersecur...
PDF
Modernizing your data center with Dell and AMD
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Β 
PDF
cuic standard and advanced reporting.pdf
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Β 
PPTX
Big Data Technologies - Introduction.pptx
PPT
β€œAI and Expert System Decision Support & Business Intelligence Systems”
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
Understanding_Digital_Forensics_Presentation.pptx
Teaching material agriculture food technology
Transforming Manufacturing operations through Intelligent Integrations
madgavkar20181017ppt McKinsey Presentation.pdf
Spectral efficient network and resource selection model in 5G networks
GDG Cloud Iasi [PUBLIC] Florian Blaga - Unveiling the Evolution of Cybersecur...
Modernizing your data center with Dell and AMD
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Β 
cuic standard and advanced reporting.pdf
Review of recent advances in non-invasive hemoglobin estimation
Mobile App Security Testing_ A Comprehensive Guide.pdf
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Β 
Big Data Technologies - Introduction.pptx
β€œAI and Expert System Decision Support & Business Intelligence Systems”
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Per capita expenditure prediction using model stacking based on satellite ima...

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: