Skip to main content


Showing posts with the label lr functions

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

lr_set_debug_message function in loadrunner with examples

Lr_set_debug_message – One of my favorite lr function in loadrunner. It is mainly useful when we are unable to find correlation value in a particular request. We usually use Extended log -> Data Returned by Server in Run-time Settings to get all the response in replay log. Sometimes the vugen will crash or becomes slow as the vugen is writing all the response to replay log. Extended Log in Run-time Settings If it crashes or taking long time to execute the script then it’s better to use lr_set_debug_message instead of using Data Returned by Server . In the following example we have added data returned by server only to particular request. Example: lr_set_debug_message   ( LR_MSG_CLASS_EXTENDED_LOG   |   LR_MSG_CLASS_FULL_TRACE ,   LR_SWITCH_ON );          web_ url ( "Bing" ,          " URL = " ,          " Mode = HTML " ,          LAST   ); lr_set_debug_message   ( LR_MSG_CLASS_EXTENDED_LOG   |   LR_M