Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Mastering SoapUI
Mastering SoapUI

Mastering SoapUI: Experience SOA Test and Test Automation from an expert view

eBook
€8.99 €23.99
Paperback
€29.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

Mastering SoapUI

Chapter 2. Functional Testing In Detail

In the previous chapter we learnt how to configure SoapUI to test the services functionally, in this chapter we will cover the following topics in detail

  • Service orchestration and testing it using SoapUI
  • Assertions
  • Configuring SoapUI for JMS Services using Hermes JMS
  • Real time example of testing a service orchestration

Service orchestration

When services act in a manner that serves a business purpose which results in a business process being completed, it's known as service orchestration. It directly addresses the implementation of business process implementation. It actually binds business logic and data exchange between applications together so that the desired flow is met.

From another point of view, it can also be said that service orchestration arranges services so that they look like a single service meant to complete a single flow.

To achieve service orchestration, every service involved in orchestration shares data among themselves where sometimes an output of one service acts as an input to the other.

But it should be noted that individual services are not designed to communicate with each other, messages should be exchanged based on certain business rules and execution sequence. To provide communication between all applications in SOA we have the concept of Enterprise Application Integration...

Property transfer

We have seen in our pre examples that in service orchestration, response parameter data of one service may become essential for the other service. Therefore, we would need to transfer the necessary data from a response to another request. To achieve the data transfer between services we use property transfer.

To add property transfer as a test step, repeat the steps as shown previously to add a groovy script and finally, when you reach the window where you have all the steps listed, select the following step:

Property transfer

You will then find the Property Transfer configuration window:

Property transfer

In the preceding window you need to configure the following:

  • Source: Test step which is the source of the data to be transferred
  • Property: Usually the response which has the response parameter data to be transferred
  • Path language: XPath for a single node of the same parameter name, X query for a multiple data set with the same parameter name, and JSON for a REST API using JSON message exchange format
  • Target:...

Assertions

Assertions are validations which are used to validate whether the system is working as expected or not.

SoapUI provides you with a variety of assertions, let's have a look at each one of them by category:

  • Property Content: This assertion type is used to validate the parameter data returned in response by the service
    • XPath Match: This assertion is used to match a particular node value in the response with the expected values
      Assertions
    • XQuery Match: When you want to validate multiple sets of values from the response, XQuery Match is used to validate multiple parameters of data in the response in a single assertion
    Assertions

In the preceding example there is an XML which has multiple price tags and the tester wants to retrieve all the prices from an XML response.

So the XQuery searches in every item and returns all the prices for each Item.

  • Contains: This assertion is used to validate if a particular value or string exists in the response or supports wildcards
    Assertions
  • NotContains: This assertion is to make sure...

Configuring SoapUI for JMS services using Hermes JMS

Web services use multiple protocols for transport, for example, HTTP or JMS. Communication can also be different, for example, Soap or JSON. So let's go configure JMS for different middleware like Tibco,Oracle SOA, IBM WebSphere.

To configure JMS in SoapUI we have a utility called Hermes JMS to help us configure JMS in our test.

Following are the steps to configure Hermes JMS in SoapUI:

  1. Open HermesJMS from the Tools option on the top and select HermesJMS:
    Configuring SoapUI for JMS services using Hermes JMS
  2. Verify that HermesJMS will open on your desktop:
    Configuring SoapUI for JMS services using Hermes JMS
  3. Configuring a session: Select a New Session:
    Configuring SoapUI for JMS services using Hermes JMS
  4. Configuring a New session: On selection of a new session, verify that the Preferences window comes up:
    Configuring SoapUI for JMS services using Hermes JMS
  5. On the Preferences window select the Providers tab.
    Configuring SoapUI for JMS services using Hermes JMS
  6. On selection of a New Group add the Jars based on the middleware used, for example, for Tibco, use the following JARS:
    • Tibemsd.JAR
    • Tibjms.jar
    • Tibjmsadmin.jar
  7. For Active MQ use the following:
    • com.ibm.mq.pcf-6.1.jar
    • com.ibm.mq.jar
    • com.ibm.mqjms.jar
    • dhbcore...

Groovy script

This groovy script lets you create a JMS endpoint and sends messages to queues using Groovy script:

import com.eviware.soapui.impl.wsdl.submit.transports.jms.JMSConnectionHolder;
import com.eviware.soapui.impl.wsdl.submit.transports.jms.util.HermesUtils;
import com.eviware.soapui.impl.wsdl.submit.transports.jms.JMSEndpoint;
import hermes.Hermes;
import javax.jms.*;
def jmsEndpoint = new  JMSEndpoint("jms://activeMQSession::queue_testQ1::queue_testQ1");
def hermes = HermesUtils.getHermes( context.testCase.testSuite.project, jmsEndpoint.sessionName);
def jmsConnectionHolder = new JMSConnectionHolder( jmsEndpoint, hermes, false, null ,null ,null);
Session queueSession = jmsConnectionHolder.getSession();
Queue queueSend = jmsConnectionHolder.getQueue( jmsConnectionHolder.getJmsEndpoint().getSend() );
Queue queueBrowse = jmsConnectionHolder.getQueue( jmsConnectionHolder.getJmsEndpoint().getReceive() );
MessageProducer messageProducer =queueSession.createProducer( queueSend...

Service orchestration


When services act in a manner that serves a business purpose which results in a business process being completed, it's known as service orchestration. It directly addresses the implementation of business process implementation. It actually binds business logic and data exchange between applications together so that the desired flow is met.

From another point of view, it can also be said that service orchestration arranges services so that they look like a single service meant to complete a single flow.

To achieve service orchestration, every service involved in orchestration shares data among themselves where sometimes an output of one service acts as an input to the other.

But it should be noted that individual services are not designed to communicate with each other, messages should be exchanged based on certain business rules and execution sequence. To provide communication between all applications in SOA we have the concept of Enterprise Application Integration (EAI...

Property transfer


We have seen in our pre examples that in service orchestration, response parameter data of one service may become essential for the other service. Therefore, we would need to transfer the necessary data from a response to another request. To achieve the data transfer between services we use property transfer.

To add property transfer as a test step, repeat the steps as shown previously to add a groovy script and finally, when you reach the window where you have all the steps listed, select the following step:

You will then find the Property Transfer configuration window:

In the preceding window you need to configure the following:

  • Source: Test step which is the source of the data to be transferred

  • Property: Usually the response which has the response parameter data to be transferred

  • Path language: XPath for a single node of the same parameter name, X query for a multiple data set with the same parameter name, and JSON for a REST API using JSON message exchange format

  • Target...

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Design real-time test automation frameworks for Enterprise applications using SoapUI
  • Learn how to solve test automation issues for complex systems
  • A complete guide to understanding SOA automation from quality assurance to business assurance

Description

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.

Who is this book for?

The book is intended for test architects, SOA test specialists, automation testers, test managers, and software developers who have a good understanding of SOA, web services, Groovy Scripting, and the SOAP UI tool.

What you will learn

  • Familiarize yourself with Test Web services from functional, nonfunctional, and security aspects
  • Learn to test real-time service orchestrations
  • Design test automation solutions for SOA-based Enterprise applications
  • Learn multilayer test automation
  • Selenium plus SoapUI under a single umbrella
  • Integrate your SoapUI framework with Jenkins

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Aug 30, 2016
Length: 240 pages
Edition : 1st
Language : English
ISBN-13 : 9781783980819
Category :
Languages :
Tools :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Aug 30, 2016
Length: 240 pages
Edition : 1st
Language : English
ISBN-13 : 9781783980819
Category :
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
€189.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
€264.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 108.97
Web Services Testing with soapUI
€41.99
Mastering SoapUI
€29.99
SoapUI Cookbook
€36.99
Total 108.97 Stars icon
Banner background image

Table of Contents

11 Chapters
1. Introduction to SOA Testing Chevron down icon Chevron up icon
2. Functional Testing In Detail Chevron down icon Chevron up icon
3. Performance Testing of SOA Applications in Detail Chevron down icon Chevron up icon
4. Security Testing in Detail Chevron down icon Chevron up icon
5. Test Automation in SOA World Chevron down icon Chevron up icon
6. Multilayer Test Automation Using SoapUI and Selenium Chevron down icon Chevron up icon
7. SoapUI Integration with Jenkins and HP QC Chevron down icon Chevron up icon
8. End-to-End Test Automation Chevron down icon Chevron up icon
9. Service Mocking Chevron down icon Chevron up icon
10. Best Practices in SOA Test Automation Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Full star icon Full star icon 5
(1 Ratings)
5 star 100%
4 star 0%
3 star 0%
2 star 0%
1 star 0%
ricky Dec 18, 2017
Full star icon Full star icon Full star icon Full star icon Full star icon 5
liked it
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.