英文:
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
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论