Highlighted
Absent Member.
Absent Member.
20108 views

Handling session in cookies in Loadrunner script

Hi,

When I recorded an application,I am getting session related information in the cookies that were generated.
How do I handle this?When I delete the Cookie I am not able to replay the script.
When I run the script for a different user,the script fails.
Please help me out.Thanks.
0 Likes
2 Replies
Highlighted
Absent Member.
Absent Member.

Re: Handling session in cookies in Loadrunner script

Check web_add_cookie function.

That might help.
0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: Handling session in cookies in Loadrunner script

LoadRunner records a web_add_cookie() when a browser sends a cookie from its permanent cookie table to a server.

If a server sends a "Set-Cookie" header to a vuser, LoadRunner will add this cookie to the Vusers virtual cookie table.

All cookies in LoadRunner are maintained in memory. Cookies can be set by the server automatically, or by the client, using web_add_cookies. When the user invokes web_cleanup_cookies(), ALL cookies are removed from the Vuser's cookie cache including those added with web_add_cookie(...); and those set by the server.

If you desire to remove a specific cookie from the table, be it set by the web server or via web_add_cookie(), you can use web_remove_cookie(...) function

For more details, please refer LR online books...

start->LoadRunner->Documentation->Function reference
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.