Using JMeter to load test SOAP based web service

The Using JMeter for load testing REST service entry talks about how to test REST service using JMeter, but what if you have JAX-WS service that you want to load test with JMEter, if that's the case you have to make one simple change and same script should work. You can download the sample load script from here My sample JAX-WS service has insertContact method that takes Contact object as input, i want to pass different firstName, lastNames to this service. So that first contact that gets inserted as values like [firstName-1,lastName-1,email] and then the second contact should be [firstName-2,lastName-2,email],.. etc. I followed these steps. You can download the sample JAX-WS that i used for testing from here You can follow same steps from 1-5 as in Using JMeter for load testing REST service , only thing that will change will be step 4, While testing REST service the step 4 was to make HTTP request, in case of SOAP service the step 4 is to make SOAP/XML-RPC request like this.
I used one of the SOAP testing tools like Generic Test Client in the RAD to get the basic SOAP request XML which looks like this

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns1="http://ws.webspherenotes.com/">
<soapenv:Body>
<tns1:insertContact>
<arg0>
<contactId>0</contactId>
<email>test@gmail.com</email>
<firstName>firstName-${contactId}</firstName>
<lastName>lastname-${contactId}</lastName>
</arg0>
</tns1:insertContact>
</soapenv:Body>
</soapenv:Envelope>
Then i just changed this xml to use dynamic variables.

1 comment:

Software Development Company said...

Hello,
The Article on Using JMeter to load test SOAP based web service, gives detailed information about it. Thanks for Sharing the information about Load Testing of Web Services, For More information check the detail on the load testing process here Software Testing Company