无法使用 Mozilla Firefox 浏览器在 Jmeter 中记录

Unable to record in Jmeter using Mozilla Firefox browser

在使用 Mozilla Firefox 从 Jmeter 记录 https 应用程序时,我在浏览器中收到一个标题为 'This site is asking you to sign in.' 的弹出窗口,其中包含用户名和密码的文本框。

不确定我们是否需要在此处提供代理 - username/password(或)应用程序 - username/password,两者都尝试过,但一次又一次地获得相同的弹出窗口并在弹出窗口中单击取消它显示 401-Unauthorised

注意: 当代理是“使用系统代理设置”时,mozilla forefox 工作正常。上述问题仅在代理为“手动代理配置”并从 Jmeter 记录时存在。 Jmeter 是通过提供代理详细信息从 cmd 启动的。 jmeter 证书已安装在 mozilla firefox 中。

尝试在 system.properties 文件中指定用户名、密码和您的域(位于 JMeter 安装的“bin”文件夹中)

http.proxyUser=username
http.proxyPass=password
http.proxyDomain=your_domain

因为您的企业浏览器可能配置为使用当前登录用户的帐户自动登录网站(该方法称为 SSO

有关详细信息,请参阅 Using JMeter behind a proxy 文章。

还要注意记录 JMeter 测试的替代方法:JMeter Chrome Extension, in this case you won't have to bother about proxies and certificates as the extension is less "invasive" than JMeter's MITM proxy