JMeter cookie handling

huangapple go评论60阅读模式
英文:

JMeter cookie handling

问题

我有一个执行网站登录的JMeter测试脚本。我可以看到带有适当信息的POST请求,但似乎在那之后会丢失会话,因为下一步进入主页时期望进行身份验证,但实际上没有。有什么建议吗?如果需要,我可以发布代码。我已经配置了Cookie管理器。

英文:

I have a JMeter test script that performs logon to a website. I can see the POST request with the appropriate information, but it seems the session is lost after that point, as the next step goes to the homepage expecting to be authenticated but isn't. Any ideas? I can post the code if necessary. I do have a cookie manager configured.

答案1

得分: 0

Most probably it's due to missing or improperly implemented correlation, cookies might be not the only one dynamic parameter which you need to take care of, modern web applications widely use others for i.e. client-side state tracking or security purposes.

So inspect your test script and check for parameters which are dynamic, the easiest way is recording the same scenario once again and comparing resulting .jmx scripts. Everything which differs is a subject to correlation.

More information: How to Handle Correlation in JMeter

英文:

Most probably it's due to missing or improperly implemented correlation, cookies might be not the only one dynamic parameter which you need to take care of, modern web applications widely use others for i.e. client-side state tracking or security purposes.

So inspect your test script and check for parameters which are dynamic, the easiest way is recording the same scenario once again and comparing resulting .jmx scripts. Everything which differs is a subject to correlation.

More information: How to Handle Correlation in JMeter

huangapple
  • 本文由 发表于 2023年2月10日 11:12:30
  • 转载请务必保留本文链接:https://go.coder-hub.com/75406585.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定