Month: December 2014

Scalable load testing for SOAP and Rest services on Cloud

Posted on Updated on

For every web application/ web services before going into the production an application developer needs to do performance/load testing. For this is reason you must have load testing framework in your toolbox. Always we want cost effective solution for this purpose. Here I am going to explore the open source Soap-UI capability along with elastic search, mysql, jenkins and groovy to do load testing for Soap/Rest service on AWS cloud.


Perform a load testing for SOAP and Rest services for following reason:

1. Get the average response time and test per second of web service under certain load.
2. Ensure the maximum capacity (number of requests per second) of the web server based on the current hardware infrastructure.
3. Get the CPU, Memory, Disk IO and Network usage for web server under certain load.
4. Generate a load test result report for analysis.


JMeter and SoapUI these are two popular frameworks used for load testing in open source community which are freely available. JMeter is a really good for load testing for multiple reasons. We used JMeter for load tesing of our ASP.NET MVC 4 applications. But when we consider it for SOAP services testing then need to generate the SOAP xml request and JMeter does not give the kind of flexibility required. Visual studio ultimate edition also provides the load testing framework based on test cases but need a cost effective solutions.

Soap-UI is our choice for multiple reasons. It generate the request and response using data contract provided through WSDL or WADL. Soap-UI comes with the capability of groovy script implicitly,it helps to manipulate the request, response as well as to get and save the test data to/from external sources.

Soap UI has nice GUI which help to create test suite, test cases and test step. SoapUI also support the property transfer test steps which helps to parse the response from previous request and set the properties at project, test suite, test case level. Properties are key value pair which can be accessed inside the request using expression language e.g ${#Project#PropertyName}. Here you can learn more about SoapUI.

You can also use groovy script test step to parse the response and apply some use case logic and set the properties for next request or store the responses in external sources which can be used for further processing.

When we perform the load test we are interested in numbers like avg response time and test per seconds and number of requests depending on load test strategy. Basic CSV file reporting is provide by SoapUI community edition. We integrated elastic search for reporting with soap ui for load test results. The distributed SoapUI load test results is dumped into the Elastic Search and the reports are visualized using the Kibana web user interface.

When System is under load we need to get the performance metrics like CPU, Memory, Disk IO, Network utilization. We get it using Jmeter Server Agent and custom TCP client for it. The tcp perfmon client also inserting the result into elastic search. It will helpful to analyze the load test stats with performance metrics.

The above mention setup work well from single instance but load testing need to scale on multiple instance to generate more load on server. In that case the current setup works as master node having Elastic search, mysql, PerfMon Tcp client, SoapUI load test runner and Jenkins for managing master/slave node. The Jenkins master will distribute the SoapUI load test runner job on SSH Client slave machines in a network. The slave node run the SoapUILoadTestRunner Job and publish the load test result to elastic search hosted on the master node. The scalability is achieved through adding n-numbers of slave node on the Cloud. These slave nodes are ubuntu based EC2 intances

This is cost effective solution for load testing using open source SoapUI against the paying huge license cost of SoapUI Pro and LoadUI Pro which help us to get more or less same result. By using this solution we at least saved USD 10000.

Happy Load testing  🙂