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]

20 thoughts on “How to correlate dynamic boundaries in LoadRunner?”

  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]

    Reply
      • 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

        Reply
      • 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

        Reply
        • 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

          Reply
  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

    Reply
  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

    Reply
  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

    Reply
  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”

    Reply
  6. Hi Naveen,

    I am having dynamic Left and Right boundaries with -*1.1.0.1 and 1.1.0.0.*1
    eg on response I am getting
    sup=-*1.1.0.1.A7656HJGFYEHW8766H8JJ9889KOIUPy.1.1.0.0.*1

    on request supa=-*1.1.0.1
    supc=1.1.0.0.*1
    value=A7656HJGFYEHW8766H8JJ9889KOIUPy.

    how can I correlate value?

    how can I correlate value?

    Reply
  7. Hi

    I have correlated one value and this i need to pass in LB of another value then please suggest steps to follow.

    Scenario:
    My first Correlation name is C_SearchCert1 and need to pass in other LB –
    SearchCertDet{ C_SearchCert1}\”>
    is this correct way of passing other correlation value into other correlation of LB?

    Reply
  8. Hi,

    Just a question arrived in my mind

    I need to capture the value 56 were as the valuye is 123456789
    LB is 1234
    RB is 789
    and my LB and RB is changing everytime

    could you please help me on this

    Thanks
    Ganesh

    Reply

Leave a Comment

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

Learn Kubernetes and Get Certified in CKAD.SHOW ME HOW
+ +
Share via
Copy link