How to Validate SOAP Performance Test Results

DZone 's Guide to

How to Validate SOAP Performance Test Results

Learn how to verify the response from your SOAP load testing in this tutorial.

· Performance Zone ·
Free Resource

In our previous article, How to Test Soap Services With JMeter, we explained the basics of SOAP testing. If you have practiced this example, you are now able to perform load testing on your applications. In this article, we’ll show you how you can verify the result of your response.

Assertions in JMeter are very strong. By using the assertions, you will be able to verify the stability of your application under heavy load.  There are two options to make a validation:

  1. Response Assertion
  2. XPath Assertion

Response Assertion

It requires you to specify “Field to Test” and “Pattern matching Rules”. By setting these two values, you will be able to verify your expected result. Let’s take a look at the most used ones.



  • Text Response: This option lets you search for a string in the whole response. You can use patterns like “Contains,” “Matches,” etc. However, it’s not always a good approach to use this assertion type because your response might also exist in another attribute of the XML message as you might have hundreds of attributes in your XML response.
  • Response Code: This assertion is a good approach to verify the status of your application as there’s no verification on the test data. You will be able to monitor the state of your application, nothing more. You can check a different kind of HTTP status here.
  • Document (Text): This one uses the same approach as Text Response.
  • Request Data: This one checks if your request is valid according to the pattern you choose.

Any of these approaches might be good, but there are some flaws. That’s why we suggest you use XPath Assertion for a stable performance testing script.


In XPath Assertion, there’s one configuration you should make: XML parsing options.

  • Use Tidy: This option should be checked if you make an assertion on a pure XML document with a different structure than an XHTML file. If the response is an XHTML document, you might need to uncheck this option for proper parsing.

When you uncheck “Use Tidy,” you will have four other configuration elements. The most common are below:

  • Validate XML: This option checks the structure of response and validates its schema. This is a good approach to check the functionality of your response.
  • Ignore Whitespace: Whitespace is always a pain during parsing or regular expression of data. This option will remove all the whitespaces for you, saving you time.

Then you need to provide a valid XPath Expression for your test.

Besides those verifications, we always recommend you to use the Duration assertion to watch over your KPIs. Even if all your assertions work properly, you might have a performance problem in your service under heavy load. By using the duration assertion, you will be able to set a threshold for your request and monitor its performance.

Now we are able to verify the state of SOAP services from a functional and non-functional view.

jmeter, performance, performance testing, soap, testing, tutorial, web services

Published at DZone with permission of Canberk Akduygu . See the original article here.

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}