Skip to main content


Showing posts from May, 2014

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 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 ( "" ,          " URL = " ,          " 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 s

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 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 Log One 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 Log Sometime 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. Redirection If 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 y