Jmeter - 从重定向URL获取参数
问题内容:
我正在尝试编写性能测试。
在步骤1中,我要访问网址:https://example.com/login?redirect_to=http://somesite.com
该网址将我重定向回 http://somesite.com?ticket=afsgdfasdfasg
在我的JMeter脚本中,我需要提取ticket参数并在进一步的逻辑中重用它。
您能告诉我如何实现吗?
问题答案:
- 添加PostProcessor =>正则表达式提取器;
-
看起来像这样: 正则表达式
-
进一步将此变量称为$ {ticket}
Good luck!