Book Image

Mastering SoapUI

Book Image

Mastering SoapUI

Overview of this book

SoapUI is an open-source cross-platform testing application that provides complete test coverage and supports all the standard protocols and technologies. This book includes real-time examples of implementing SoapUI to achieve quality and business assurance. Starting with the features and functionalities of SoapUI, the book will then focus on functional testing, load testing, and security testing of web services. Furthermore, you will learn how to automate your services and then design data-driven, keyword-driven, and hybrid-driven frameworks in SoapUI. Then the book will show you how to test UIs and services using SoapUI with the help of Selenium. You will also learn how to integrate SoapUI with Jenkins for CI and SoapUI test with QC with backward- and forward-compatibility. The final part of the book will show you how to virtualize a service response in SoapUI using Service Mocking. You will finish the journey by discovering the best practices for SoapUI test automation and preparing yourself for the online certification of SoapUI.
Table of Contents (18 chapters)
Mastering SoapUI
Credits
About the Author
Acknowledgments
About the Reviewer
www.PacktPub.com
Preface
7
SoapUI Integration with Jenkins and HP QC
Index

Dispatch methods


Dispatch methods provides us with more functionality, flexibility and support to create robust mock services. We can create and select the dispatch method based on our requirements, whether they are simple or complex. Let's have a look at the dispatch method available in the SoapUI mocking feature.

Following are the various dispatch methods:

  • Sequence

  • Random

  • XQuery Match

  • XPath

  • Script

Sequence

The sequence dispatch method is the most basic of all the five and the responses are returned in the sequence in which they were added.

Let's have look at an example:

On the following screen when you right click, you will receive an option to create a New MockResponse.

On the previous screen, when you select New MockResponse, you may add a new response.

So, as you can see, now you have created two responses for the service.

Both the responses will be called in sequence each time the service is invoked.

Random

the random dispatch method is used to call any response at a given point of time.

If you really...