LoadRunner Forms 身份验证 cookie 已过期

发布于 2024-11-15 19:43:29 字数 574 浏览 2 评论 0原文

使用 loadrunner 进行负载测试时,我的所有虚拟用户都会在 30 分钟后从应用程序中注销。详细查看后发现,即使我们有用户持续执行的活动,身份验证 cookie 也会过期。

现在,我们尝试在每次操作后显式更新 cookie 以防止过期,但不确定服务器如何识别身份验证 cookie 已过期。该 cookie 仅包含加密文本,没有提及到期时间的明确标题。

身份验证 cookie 中应更新 cookie 中的哪些信息以防止其过期?

Cookie 信息:

Cookie:

.ASPXAUTH=66DD4AB74239F00D553BA9640D3AD3F284F47DEC315FD6789AE3FB8D67D2A46A4E89EDB45845C921A7557BD6B39A12EE07188D1009D581 AA7AAF6743710653AE44EEF2733CC16082C595D7AE7C73D3E7E3D44BA1BAEEFEB1BF5F98B35C5F8429670FFDD5586E03BB3138C5B78945D82702BDD7C4; 路径=/;仅限 Http

While load testing using loadrunner all my virtual users are getting logged off from application after 30 min. Looking in detail came to know that authentication cookie is getting expired even though we have continuous activity performed by users.

Now we are trying to update the cookie explicitly after each action to prevent expiration, but not sure how server identifies that authentication cookie is expired. The cookie has only encrypted text and no explicit title mentioning expiry time.

What information in cookie should be updated in authentication cookie to prevent it from expiring?

Cookie Information:

Cookie:

.ASPXAUTH=66DD4AB74239F00D553BA9640D3AD3F284F47DEC315FD6789AE3FB8D67D2A46A4E89EDB45845C921A7557BD6B39A12EE07188D1009D581AA7AAF6743710653AE44EEF2733CC16082C595D7AE7C73D3E7E3D44BA1BAEEFEB1BF5F98B35C5F8429670FFDD5586E03BB3138C5B78945D82702BDD7C4;
path=/; HttpOnly

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

煮酒 2024-11-22 19:43:29

告诉我们您如何在脚本中管理会话状态。一般来说,如果您正在清理所有 cookie 并为每次迭代实例化一个新会话,则不应遇到这种情况。如果您试图在整个测试过程中保持某种单一的会话状态,我可以看到在您的原始会话从技术上注销系统(作为业务流程的一部分)后,服务器可能会如何将您踢出。

另外,您的脚本中是否明确记录了 cookie?如果是这样,您可能需要考虑注释掉这些语句,因为 LoadRunner 将自动管理 cookie。作为老化的一部分,请考虑运行单个虚拟用户 30 分钟到一个小时,看看您是否在单个虚拟用户级别上遇到这种情况。修复单个用户然后预测加载比尝试找出数十个或数百个遇到类似问题的用户所发生的情况要容易得多。

Tell us how you are managing session state in your script. Generally if you are cleaning all cookies and instantiating a new session for each iteration you should not run into this. If you are attempting to maintain some sort of singular session state for the entire length of your test I could see how the server would potentially kick you out after your original session technically logged out of the system (as part of a business process).

Also, do you have explicit cookies noted in your script? If so, you may want to consider commenting these statements out as LoadRunner will manage cookies automatically. As part of your burn in consider running a singular virtual user for 30 minutes to an hour to see if you experience this on a single virtual user level. It's a lot easier to fix for a single user and then projecting to load than it is to try and figure out what is happening across dozens or hundreds of users experiencing a similar issue.

冬天的雪花 2024-11-22 19:43:29

据我所知,服务器会跟踪 cookie 的过期时间,并且服务器也会更新过期时间,这意味着作为客户端的您对此无法控制。

我假设流程是这样的:

The browser or LoadRunner Script will always send the cookie and the
server then verifies it's expiry time on the server side, redirecting
you to the login page if it has expired.

我遇到过这种情况,并通过访问服务器上“更新客户端会话到期时间”的特殊页面来解决它。或许你也有类似的情况?

From what I can gather the Server keeps track of the expiry time of the cookies, and it's also the server that updates the expiry time, meaning you as the client have no control over this.

I assume the flow is this:

The browser or LoadRunner Script will always send the cookie and the
server then verifies it's expiry time on the server side, redirecting
you to the login page if it has expired.

I've had this happen to me, and solved it by visiting a special page on the server that "updated the client session expiry time". Perhaps you have a similar situation?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文