How can I perform tests (load test, stress test) on my SOAP servers? How do I use Webserver Stress Tool for that?
How can I load and stress test my SOAP services with Webserver Stress Tool?
Votes:
0
1 Reply
Votes:
0
Load and Stress Testing SOAP Servers and SOAP Services
With Webserver Stress Tool you can perform load and stress tests for SOAP Servers/SOAP Services.
SOAP method calls are nothing else than HTTP requests that send an XML dataset using a POST request to a webserver and then receive the results as an XML string.
Even though our web server performance software Webserver Stress Tool is not specialized in reading and writing the XML data for these requests, you can still use it as a load generator for your SOAP services.
This sample shows how to use Webserver Stress Tool. to issue a SOAP request to Google's Webservices API. Note: Of course you should refrain from load testing Google's webservers!
Step 1: Finding out Configuration Data
The trickiest thing of course is to find out the three input parameters. You must get this information from the SOAP server's documentation. For Google these are:
HTTP URL: http://api.google.com/search/beta2 SOAPACTION: "urn:GoogleSearchAction"
The XML-POSTDATA for the request should be stored into a file on your disk (see below for a sample for Google).
Step 2: Configuring Webserver Stress Tool
Having this information we can now set up the URL script for Webserver Stress Tool for our test. By setting a value for data.soapaction we instruct Webserver Stress Tool to actually send a SOAP request with content type "text/xml".
The content of the XML file and the necessary URL script can be found below.
Step 3: Running the Test
Now simply run the load test as usual with Webserver Stress Tool. Note that you need Version 7.0.2 or later to run this test.
Sample Code
XML Data
<?xml version="1.0" encoding="utf-16"?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="urn:GoogleSearch" xmlns:types="urn:GoogleSearch/encodedTypes" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <soap:Body soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <tns:doGoogleSearch> <key xsi:type="xsd:string">***PLACE YOUR GOOGLE API ACCESS KEY HERE***</key> <q xsi:type="xsd:string">paessler</q> <start xsi:type="xsd:int">0</start> <maxResults xsi:type="xsd:int">10</maxResults> <filter xsi:type="xsd:boolean">false</filter> <restrict xsi:type="xsd:string" /> <safeSearch xsi:type="xsd:boolean">false</safeSearch> <lr xsi:type="xsd:string" /> <ie xsi:type="xsd:string" /> <oe xsi:type="xsd:string" /> </tns:doGoogleSearch> </soap:Body> </soap:Envelope>
URL Script
Sub OnBeforeClick data.url="http://api.google.com/search/beta2" data.postdata=loadstringfromfile("c:yourpath\soaprequest.txt") data.soapaction="urn:GoogleSearchAction" end Sub Sub OnAfterClick data.log="" end sub Sub OnbeforeRequest data.log="" end sub Sub OnAfterRequest data.log="" end sub
Related Topics
Created on Feb 24, 2010 8:56:42 AM by
Daniel Zobel [Product Manager]
Last change on Feb 24, 2010 8:57:37 AM by
Daniel Zobel [Product Manager]
Add comment