Venkat Matta

it's all about the Performance Testing

WS By Loadrunner

Web Services in loadrunner: We can do web services scripting in two ways:

  1. By using Web Services Protocol. (Need additional License)
  2. By using Web Protocol.

Scripting Using Web Services Protocol:

  1. First open the vugen and select Web Services protocol.
  2. Click on Manage Services on top nav bar and Click on Import and give the WSDL URL which is usually ends with wsdl or
  3. SOA Tools -> Manage services -> Add url or file or UDDI

Note :- if their is any proxy settings click on connection setting and enter the proxy credentials or any specific frame u want to use , click on advance settings and select the frame work

Sample WSDL :-

Now Click on Add Web Service Call on top nav bar. Give the Input Arguments and Leave the out put arguments empty. And click on ok. As shown in the following image
Input Arguments.png

It will create a script in loadrunner as shown below. You can perform the steps one by one in this way for all the web services steps. You can use lr_xml_find and lr_xml_get_values to validate the page.

web_service_call( “StepName=GetCitiesByCountry_101”,

Scripting Using Web Protocol (Http/HTML):

We can create the same request using Web (HTTP/HTML) protocol. You need take the xml request as shown in the following and place in the web custom request.

Go to Design -> Insert in Script -> New Step tne web_custom_request



We need a xml input request to create the web custom request like below

Input Request

Now enter the soap body,method and URL  in the web custom request properties like below,


After entering all the values click on and it will generate below code.

web_custom_request(“Weather SOAP Request”,
“EncType=text/xml; charset=utf-8“,
“Body= Your Request should be here as shown in the following image

Now we have to necessary headers tag above this code in your script

web_add_header(“Connection”, “Keep-Alive”);
web_add_header(“Accept-Encoding”,        “gzip,deflate”);

Now  save your script and run the script.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s


This entry was posted on March 22, 2016 by in Webservices.
%d bloggers like this: