Skip to main content

Posts

Showing posts with the label Loadrunner

lr_debug_message function in loadrunner with examples

We can use this function in two ways with run time settings in loadrunner and with lr_set_debug_message.
Example 1: Set extended log in run time settings(F4)->Log->Extended Log->Data Returned by Server.

Now I have recorded Facebook.com and used lr_debug_message.

If the extended log is enabled it will print the message "I Love Facebook" else it will ignore the message. It will not print any message if the extended log is not enabled.

lr_debug_message(LR_MSG_CLASS_EXTENDED_LOG, "I Love Facebook");

web_url("www.facebook.com",
"URL=http://www.facebook.com/",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
LAST);
Example 2: With lr_set_debug_message In this example I have used lr_set_debug_message with lr_debug_message as shown in the following example. It will print the message "I Love Facebook" if lr_set_debug_message is written else it will ignore. Try…

File operations in loadrunner with examples

In this post I will explain how to capture a value from server response and save to a text file using vugen.
How to capture and save to text file using loadrunner:
First I have recorded the script using bing.com and then i searched for IBM. We will get 10 results. I have captured all the 10 values and saved to a file.
Here is the code for that.

Different Ways to do Correlation in Loadrunner You Must Know

1. Generation LogOne of the common options in loadrunner is generation log. You will take the left and right boundary and search in the generation log and use CTRL+F and find the request name and place the web_reg_save_param before that request.
2. Replay LogSometime you do not find correlation value in generation log than the alternative way is go to run time settings and click on Log->Extended Log-> "Data Returned by Server" option and replay the script. Once you replay the script you will use CTRL+F and find the left and right boundaries. Sometimes replay log may fail or it will take a long time if you select “data returned by server” as it is printing all the response to the replay log then the alternate method to use is  lr_set_debug_message as shown in this link.
3. RedirectionIf you are not able to find the value in generation log and replay log then there might be 301 or 302 redirection.  Find out the pages that have 301 or 302 redirection. Once you find the page…

Loadrunner Interview Questions and Answers

Hello, looking for interview questions in loadrunner? I have tried my level best to put these interview questions. If you find any new questions, you can always send me through the comments below. I will include them in this list. Never give up in the interview. If you fail in one interview try for another interview, try and try until you get success. If you need any help you can always contact me through the comments  below. I will reply as soon as possible. All the best for your interview!
I have categorized the loadrunner interview questions and answers into 5 parts: Performance TestingLoadrunner General QuestionsVugen and ScriptingControllerAnalysisPerformance Testing Interview Questions and Answers: What is Performance Testing?
Performance Testing on a software application is done  to determine how speed, stability and scalability the application is. Speed refers to how fast the software application will respond, and stability refers to how the application handles varying workloads. …

Loadrunner PDFs, PPTs and Documents You Must Have

Loadrunner Web Services Tutorial Scripting in Two Ways

Web Services in loadrunner: We can do web services scripting in two ways:
By using Web Services Protocol. (Need additional License)By using Web Protocol. Scripting using Web Services Protocol: I have taken weather web service as example shown in this link.
Steps: First open the vugen and select Web Services protocol.Click on Manage Services on top nav bar and Click on Import and give the WSDL URL which is usually ends with wsdl http://www.webservicex.net/globalweather.asmx?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.
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",
"SOAPMethod=GlobalWeather|GlobalWeatherSoap|GetCitiesByCountry",
"ResponsePa…