Sunday, 7 July 2013

WSO2 Stratos 1.6 – Testing the Application Server worker nodes behavior using soapUI

In this example I'm going to explain how to test the behavior of Application Server worker nodes when its deal with a heavy load of web requests which is generated using soapUI.

Prerequisites
Please refer the my previous blog to find the information about how to download, install and initialize the servers.

Step 1:
Write a simple Hello service as follows and export project as deployable archive.

package org.wso2.sample;

import java.util.Date;

public class HelloService{

public String sayHello(String name) {
String message = "Hello, " + name + "! " + System.currentTimeMillis();
System.out.println(message + " " + new Date());
System.out.flush();
return message;
}

}

Step 2:
Log in to the management console of Application Server management node and deploy the created Axis2 Web service (Go to Manage --> Axis2 Services --> Add --> AAR service). Once the service is deployed in the management node go to the services list and click on 'Try this service' to make sure that the created service functioning well.


Step 3:
Then create a new soapUI project using the Hello service, WSDL1.1.

After that, right click on the 'Request 1' and add it to Test case and then the project list will be updated as follows;

To create a heavy load of request, you have to create new load test by right click on 'Load Tests' link. Once you create the load test you will get a window as follows to adjust the load according to you requirement. i.e. increasing the no of Threads in to 100.

Step 4:
Click on 'run' button and check the server logs which passing in to Application Server worker node01 and node02.

No comments:

Post a Comment