In this post we'll see how to test a SOAP web service in JMeter. Using JMeter, we can do both functional testing as well as load testing of a SOAP web services. As we know that web services are headless so, we can't use the record and playback feature of JMeter to record the web service requests. Hence, we need to create the Sampler requests manually. In this tutorial, we will use the S"OAP/XML-RPC Request" sampler to create and send the SOAP request.
The SOAP/XML-RPC Request sampler is used to send a SOAP or an XML-RPC request to a webservice. This sampler creates an HTTP POST request(as SOAP is based POST method) with the request body specified in the "SOAP/XML-RPC Data" field. We can specify the SOAPAction in the SOAPAction field after checking the Send SOAPAction checkbox.
We can improve the test by adding "CSV Data Set Config" to parameterize the test by fetching the test data from an external file. Furthermore, we can add "Assertions" to validate the web service response (especially used in functional testing).