Highlighted
Contributor.
Contributor.
603 views

Pass the correlation value to next request

I have capture the correlation value and i am able to see correlation value in replay log . and this dynamic value need to pass to next request in loadrunner?

Please help me.

 

0 Likes
5 Replies
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: Pass the correlation value to next request

Could you be a bit more specific? Are you using the Correlation Studio? Usually correlations automatically created by correlations studio automatically pass the dynamic value to the relevant following requests. It automatically detects which values are dynamic (e.g. in the replies) and where those dynamic values are used later on in following requests. 

0 Likes
Highlighted
Outstanding Contributor.. Outstanding Contributor..
Outstanding Contributor..

Re: Pass the correlation value to next request

If I have not misunderstood, you want to pass a value from the response to the next request. In this case, you can use the web_reg_save_param() to catch the interested value and pass it to another request. Follow a simple example: 

   web_custom_request("call_1", .... );

suppose that "call_1" return a body response that contains our interested value in the tag "id". To catch its value and use it in next requests, 

   web_reg_save_param_ex("ParamName=id", "LB=</id>", "RB=</id>", SEARCH_FILTERS, "Scope=Body", RequestUrl=.../*", LAST);

   web_custom_request("call_2", ...., "Body=" "<...>" .... "<id> {id} </id>", .... );

You can control the correct development of the parameter with the option "Runtime Settins -> Log -> Extended Log -> Paramter substitution / Data returned by server" enabled. 

Hope to be helpfull, 

Lorenzo

 

0 Likes
Highlighted
Contributor.
Contributor.

Re: Pass the correlation value to next request

Hi Thomas,

Thanks for your response.

I have captured one dynamic value it generates 1 reference no (Ex : 10200) this value i am getting in response .

This value (10200) i need to pass to next request.I am unable to pass this getting error.

I have done manual correlation.

 

0 Likes
Highlighted
Contributor.
Contributor.

Re: Pass the correlation value to next request

Thanks for the response.

I have done same process. Still my script is failling

0 Likes
Highlighted
Acclaimed Contributor.. Acclaimed Contributor..
Acclaimed Contributor..

Re: Pass the correlation value to next request

Please supply code snippits of the relavant code. I assume that you verified that the value is captured correctly with help of logging of parameters

Signature:
Reward community members who take time to respond and help.
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.