jmeter测试用例可以处理验证码吗?
我们正在尝试构建一个 jmeter 测试用例,它执行以下操作:
- 登录系统
- 获取一些信息并检查是否正确。
我们面临的问题是因为登录系统时有验证码。我们计划做的是下载验证码链接并显示,然后等待用户输入值。一旦完成,一切都会如常进行。
我们找不到任何可以执行相同操作的插件?除了自己写插件之外,还有什么选择吗?
We are trying to build a jmeter testcase which does the following:
- login to a system
- obtain some information and check whether correct.
Where we are facing issues is because there is a captcha while logging into the system. What we had planned to do was to download the captcha link and display, and wait for user to type in the value. Once done, everything goes as usual.
We couldnt find any plugin that can do the same? Other than writing our own plugin, is there any option here?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我自己解决了。解决方案如下:
JSR223 代理连接设置参数:
其中,以下内容代码显示验证码并等待用户输入
通过 vars.put 方法,我们可以以任何我们想要的方式使用验证码变量。感谢所有试图提供帮助的人。
I was able to solve it myself. The solution is as follows:
JSR223 Parameters for proxy connection setting:
In it, the following code displays the captcha and waits for user input
By vars.put method we can use the captcha variable in any way we want. Thank you everyone who tried to help.
由于 CAPTHA 用于检测非人类,JMeter 总是会失败。
您必须在软件中采取解决方法:禁用验证码请求或在页面上的某个位置打印正确的验证码。当然,仅适用于 JMeter 测试。
Since CAPTHA used to detect non-humans, JMeter will always fail it.
You have to make a workaround in your software: either disable captcha requesting or print somewhere on page correct captcha. Of course, only for JMeter tests.
肮脏的解决方法?在替代图像中打印验证码值以进行测试。然后您可以检索该值并继续。
Dirty workaround? Print the captcha value in alt image for the tests. And then you can retrieve the value and go on.