{{announcement.body}}
{{announcement.title}}

Web Service Testing Using Neoload

DZone 's Guide to

Web Service Testing Using Neoload

In this tutorial, we will understand how to design SOAP and REST services using Neoload to validate the performance of web services.

· Performance Zone ·
Free Resource

In this tutorial, we will understand how to design SOAP and REST services using Neoload to validate the performance of web services.

Designing SOAP request in Neoload

Step 1: Create New Project (Go to File -> Click on New -> Enter Project Name -> Click Finish)

Creating new projecct

Step 2: Create New User Path (Right Click on User Paths ->Click on Create a User Path -> select New User Path -> Enter User Path Name )

Creating new user path

Step 3: Create SOAP request inside Actions (Right click on Actions -> select Insert as child -> Select Request -> Select SOAP Request)

SOAP Request Wizard window will appear like below,

Creating SOAP request


In two ways , we able to create SOAP request. Either by using WSDL file or by creating the SOAP request manually. Ensure you selected with option “Generate a Request within a WSDL File”.

Enter the WSDL url as http://www.dneonline.com/calculator.asmx?WSDL and click Next on SOAP Request Wizard.

Step 4:  Select all the methods to call like below,

SOAP request wizard

Click Next and Finish on SOAP Request Wizard.

We able to see all the methods added under Actions.

Now, we must select the method to Edit Call Parameters to provide inputs to the request. Simply click on Edit Call Parameters. Then, you'll see below screen where we can enter inputs.

Enterring input values

Execute the request in a temporary user path by clicking on the Check button to validate request and response.

Validating request

There is a different type of validation can be done by clicking on Validation button. Such as,

  1. Duration validation
  2. Content length validation
  3. Response content validation

Duration Validation is used to check expected response with actual response time in milliseconds.

Content Length Validation is used to check expected response content length with actual content length in bytes.

Response Content Validation  is used to check expected response content with actual response content.

Designing a REST Request in Neoload:

Either we can create a new project or create New User Path to design a REST request. Here, we have demonstrated designing REST request in existing project using employee webservices, which is already available in web.

Employee URI is http://dummy.restapiexample.com/.

Here, we want to fetch all the employee details from employee service using GET method. Please follow the below steps to perform.

Step 1: Create New User Path (Right Click on User Paths ->Click on Create a User Path -> select New User Path -> Enter User Path Name )

Step 2: Add Http Request to add REST service (Right click on Actions -> Insert as child -> Request -> Http Request)

Enterring HTTP method and request URL

Simply execute your request in the temporary user path and validate the response.

Some of your web services required credentials to access the service. If so, then we have to mention the credentials under the servers component like below:

Enterring credentials

Define Scenario and populations under Runtime options to set Duration and Load Variation Policy.

Defining Scenarios and populations

Click Run to execute web services created in Neoload to calculate the performance of it. We will get Neoload performance report like below:

Neoland performance report


Topics:
microservice, neoload, performance and testing, rest, soap api, webservice testing

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}