HP, LoadRunner, Performance Testing, Testing, Tools

How to correlate dynamic boundaries in LoadRunner?

Every performance testers must know about how to correlate, no matter which tool they are using. Correlation is nothing but capturing the dynamic data (response) from the server and send the captured response to the subsequent requests.

To capture the dynamic data from the server, in LoadRunner we use web_reg_save_param function. In web_reg_save_param function, we use following parameters: Left boundary, Right boundary, Ord, SaveLen etc.

E.g. consider below is the dynamic data from the server which has the LB and RB as <span class=”login-bold”> and </span> respectively.

 [stextbox id=”grey”]<span class=”login-bold”>@[email protected]$39945ksjklsg</span>[/stextbox]

In above case, we can easily capture the dynamic data and pass it to subsequent requests. But what if the left and right boundaries changes dynamically? How to handle dynamic boundaries? In this article, we are going to see about how to correlate dynamic boundaries in LoadRunner.

E.g. consider the below response from the server which has the dynamic boundaries.

 [stextbox id=”grey”]

OrderID1234=dynamicresponsedata1234

OrderID3456=dynamicresponsedata3456

OrderID8798=dynamicresponsedata8798

[/stextbox]

The left and right boundaries are OrderID1234, OrderID3456, OrderID8798 and 1234, 3456, and 8798 respectively. The dynamic data is dynamicresponsedata

To capture the dynamicresponsedata by using left and right boundaries (of course that is also dynamic in nature), use below syntax:

 [stextbox id=”grey”]

web_reg_save_param(“Correlation_1”, “LB/DIG= OrderID####\=”, “RB=####”, LAST);

[/stextbox]

you need to enter DIG to interpret # (hash) tag where you expect digit. You can use IC flag i.e. ignore case flag in your function as shown below. Apart from IC, DIG, you can also use ALNUM (alpha numeric), to specify binary data, use /BIN

 [stextbox id=”grey”]

web_reg_save_param(“Correlation_2”, “LB/IC/DIG= OrderID####\=”, “RB/IC=####”, LAST);

[/stextbox]

If the left and right boundaries has dynamic string e.g. four letter user name, you use below syntax.

OrderIDUsername=dynamicresponsedataUsername

[stextbox id=”grey”]

web_reg_save_param(“Correlation_3”, “LB/IC/DIG= OrderID^^^^\=”, “RB/IC=^^^^”, LAST);

[/stextbox]

Once a week we send a digest with the most popular articles.

14 Comments

  1. what if the left boudary is not constant
    ex. abcd123/hyderabad>” here left boudary is= abcd123/ Rb=>”
    abcde12345=chennai>” here lb=abcde12345= Nd rb=>”
    bcedf123456*mumbai>” here lb=bcedf123456* and rb=>”
    could u please tell me how to correlate now

    [email protected]

      1. Thanks Naveen.. What would I do , if boundaries like,
        lb12ga
        lbXYMga
        lb1234ga…

        Please advice which funtion I should use here, and explain how it works…

        Thanks,
        Karthik

      2. Hi Naveen,

        Have one more doubt here in Jmeter,
        i=charts_0/chart_0_2.png&g=93a696c6864046e8bc5dcc36881c80ad is a response from the server.

        Where “g=” is left boundary and not able to mark anything here as my right boundary..

        Can u assist, how to work without right/left boundary in Jmeter

        1. Hi Karthikkumar R,

          You can use the below Regular expression to get the g value alone.

          g=(\S+), it will retrieve the value without giving the right boundary. Please
          Note : \s is used to for escape from space + is used for get the required value

  2. Hi,

    I want to correlate the field(RollNo=123456&amp)

    where my LB=RollNo= and what would be my right boundary.

    If I give my RB as RB=&amp, LR is throwing error during run time as No match found for the requested parameter.

    Thanks in Advance

  3. Hi Naveen,

    How to do correlate a value with out LB and RB? am getting the server response as 32 digit dynamic value, could you please help me /suggest me how to correlate the value??

    thanks,
    Pruthviraj

  4. Hi Naveen,

    How to do correlate a value with out LB and RB? am getting the server response as 32 digit dynamic value, could you please help me /suggest me how to correlate the value??

    thanks,
    Pruthviraj

  5. From below text, I need the get the value “56767 – Business Apps” How to specify the LB and the RB. LB and RB are in different lines. We cant take LB as”value=” because there are many other data with same value. We have to specify the LB as “name=”billToDept” “. Please Suggest

    readOnly=”readOnly” id=”departmentName_0″ name=”billToDept”
    value=”56767 – Business Apps” title=”56767 – Business Apps”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Get Performance Testing Jobs real quickClick here to apply now
+ +