Highlighted
Absent Member.
Absent Member.
2352 views

Handling cookies in VUGen Script

Hi,

We have an application which stores server returned values into cookies and uses these values for further processing.

Can you please tell me how to handle the dynamic values (which i cannot see them in the server responses) which are saved in the cookies through web_add_cookie function?

Thanks,
Prasad
0 Likes
1 Reply
Highlighted
Absent Member.
Absent Member.

Unless the client side scripts change the cookies from what the server sent. LR/Vugen will handle standard cookies, session values automatically. If the server sends a cookie script playback will send them back automatically. I always record, strip out all cookie statements, fix other stuff. and playback. Setting cookies manually in vugen either lets you handle non standard cookies. Or to change the values in order to workaround another issue like security or uniqueness or mess with the server.

Standard session ID, usernames, GUID, domains cookies set by server are typically automatic. Cookies not set by the server but by another site (ads) not under test will need to be added into the script.

If you are curious you can look in after a test run in the script directory in result1\iteration1 to see what headers were sent back and forth on playback. the data directory has the headers that were recorded.
"Although I am an HP employee, I am speaking for myself and not for HP"
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.