如何绕过 JMeter 记录的代理?

How to bypass proxy for JMeter recording?

我无法记录 JMeter 脚本,因为组织在浏览器中的代理设置阻止 JMeter 记录网络调用。我不允许在浏览器中更改组织的默认代理设置。

如何绕过此代理设置并记录 JMeter 脚本?

另外,当我在 JMeter 中手动添加 API 调用并执行时,它会给我组织默认代理 html 消息页面的响应。我在 Http 请求代理服务器选项卡中添加了组织代理详细信息,这也失败了。

  1. 您可以使用具有自己代理配置的浏览器,例如 Firefox, a fresh installation should not be impacted with your organization policies. Alternatively if you're allowed to install browser extensions you can use i.e. JMeter Chrome Extension. And finally it's possible to export recorded requests from the "Network" tab of your browser developer tools in form of .HAR file and convert this file into a JMeter test script using BlazeMeter Converter

  2. 为了通过代理重播请求,您需要配置 JMeter 以使用此代理,请参阅 Using JMeter behind a proxy for detailed instructions, the easiest way is providing proxy details via command-line arguments,例如:

    jmeter -H my.proxy.server -P 8000 -u username -a password