且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何使用JMeter在Tomcat中模拟表单身份验证?

更新时间:2023-12-01 19:26:58

您是尝试记录登录过程还是全部手动完成?

Did you try recording the login process, or were these all done manually?

如果手动进行操作,则您的请求中可能缺少一个参数.

If manually, there could be a parameter missing from one of your requests.

如果已记录,则可能会有一个需要动态的硬编码参数(JSessionID等).您可能需要添加带有正则表达式的GET来检索此值并将其传递给POST.

If recorded, there could be a hardcoded parameter that needs to be dynamic (JSessionID, etc.) You may need to add a GET with a regex to retrieve this value and pass to your POST.

如果期望将JSessionID作为参数,则将无法通过cookie管理器传递它,则需要将其作为HTTP参数.

If the JSessionID is expected as a parameter, you won't be able to pass it through the cookie manager, you'll need to do it as an HTTP parameter.

有关录制的摘要,请参见 http://jmeter.apache.org/usermanual/jmeter_proxy_step_by_step.pdf

For a rundown on recording, please see http://jmeter.apache.org/usermanual/jmeter_proxy_step_by_step.pdf