Highlighted
New Member..
New Member..
1400 views

How to handle cookies in Load Runner

Hi guys,

I have a loadrunner script with too many refresh_tokens and access_tokens. Both refresh_tokens and access_tokens are changing on every links in my script. I collerrated all these values and/ pass them to the links below. 

the problem starts when I'm loading users for a test. they fail with the error, "No match found for the requested parameter "pAccess_Cookie_4". Either the specified boundaries were not found in the response or the matched text is longer than current max html parameter size of 4096 bytes. The total length of the response is 25 bytes. You can use "web_set_max_html_param_len" to increase the max parameter size."

HERE IS THE VALUE THAT I HAVE TO CORRELLATE AND PASS IT TO THE FOLLWING URL

 {\r\n
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6ImEzck1VZ01Gdjl0UGNsTGE2eUY
 zekFrZnF1RSIsImtpZCI6ImEzck1VZ01Gdjl0UGNsTGE2eUYzekFrZnF1RSJ9.eyJpc3MiOiJodHRwczovL2ZuYnNx
YXNzby5mbmIuY28uemEvaWRlbnRpdHkiLCJhdWQiOiJodHRwczovL2ZuYnNxYXNzby5mbmIuY28uemEvaWRlbnRpdHkvcmVzb3VyY2VzIiwiZXhwIjoxNDkwNjkzMTAyLCJuYmYiOjE0OTA2OTMwNDIsInN1YiI6Ijg4MjQ1IiwiYXV0aF90
aW1lIjoxNDkwNjkzMDQyLCJpZHAiOiJpZHNydiIsIm5hbWUiOiJEYXJyZWxsTWljaGVhbCIsImNsaWVudF9pZCI6Im
ZuYnN3ZWIiLCJzY29wZSI6WyJmbmJzc3RyZWFtaW5nIiwiZm5ic3dlYmFwaSIsIm9mZmxpbmVfYWNjZXNzIl0sInN0
cmVhbWluZ19kZWxheWVkIjp0cnVlLCJ3ZWJhcGlfdHJhZGluZyI6dHJ1ZSwid2ViYXBpX2FjY291bnQiOnRydWUsIn
dlYmFwaV9wb3J0Zm9saW8iOnRydWUsIndlYmFwaV9xdW90ZXMiOnRydWUsIndlYmFwaV9tYXJrZXRzIjp0cnVlLCJ3ZWJhcGlfcGVyc29uYWwiOnRydWUsImFtciI6WyJwYXNzd29yZCJdfQ.JtI3cEzJWqWQKG54MXAhFN5kf51p_uhISSU
HtEivNPyT1CYFoQYwuAa75I9Mh1IjDO7CweJRVGEepW5SzuMybCcpulwRhHUSZpsMgba8NoS9lwIbzZ-oBv0JzM6M8XE3UAQ_7m77JY7uQANCs3ZpbhAtRrzzde9VJeVj4CrtMO7ZGNZ_2ISq2Qi7lC1R35DIsVr9BvW8yUxlmk0caltlXyxzJ2D3WYO5wz6HIYOnIGH8c6kz189zm4IeVaxHsoOwk0jmw3wrlmwIMNTGhMPIRwRpvpKyn_OmFAsN51ClgNdjz5ALlaMYJKemZuz1wQwsAA3dN3IZ0B-wkRpnBZnQ",\r\n
 "expires_in": 60,\r\n
"token_type": "Bearer",\r\n
"refresh_token": "9e92534807396d483bcd50a90bdb676d"\r\n
}

Please help me find a better way to handle these tokens.

 

 

0 Likes
2 Replies
Highlighted
Respected Contributor.. Respected Contributor..
Respected Contributor..

Re: How to handle cookies in Load Runner

Heya,

In my experience you shouldn't really need to correlate these.

In Recording Options I deselect the checkbox: generate web_add_cookie functions [], you could also try adding web_cleanup_cookies() at the head of your script and replay and see if that helps handle the cookies. This way you only need to deal with your users authentication to the application.

0 Likes
Highlighted
Frequent Contributor.
Frequent Contributor.

Re: How to handle cookies in Load Runner

Are you saying that it runs single user iteration but not in load test with multiple users? If yes, try the suggestions by jes73.

If you couldnt get it working single user in vugen another area to consider is url encode/decode. Verify the recorded raw data and replay raw data and make sure they are similar (I mean encode it if it is encoded in recorded version and vice versa).

 

0 Likes
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.