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=http://www.bing.com/",
"Mode=HTML",
LAST );
lr_set_debug_message (LR_MSG_CLASS_EXTENDED_LOG | LR_MSG_CLASS_FULL_TRACE, LR_SWITCH_OFF);
There are mainly three setting for message logging. The second table is used to further refine the message logging.lr_set_debug_message (LR_MSG_CLASS_EXTENDED_LOG | LR_MSG_CLASS_FULL_TRACE, LR_SWITCH_ON);
web_url("Bing",
"URL=http://www.bing.com/",
"Mode=HTML",
LAST );
lr_set_debug_message (LR_MSG_CLASS_EXTENDED_LOG | LR_MSG_CLASS_FULL_TRACE, LR_SWITCH_OFF);
Log Level | C LanguageConstants | Value |
---|---|---|
Disabled | LR_MSG_CLASS_DISABLE_LOG | 0 |
Brief | LR_MSG_CLASS_BRIEF_LOG | 1 |
Extended Log | LR_MSG_CLASS_EXTENDED_LOG | 16 |
Log Level | C Language Constants | Value |
---|---|---|
Result Data | LR_MSG_CLASS_RESULT_DATA | 2 |
Parameter Substitution | LR_MSG_CLASS_PARAMETERS | 4 |
Full Run-Time Trace | LR_MSG_CLASS_FULL_TRACE | 8 |
No comments:
Post a Comment