【问题标题】:Not able to do Jmeter UI recording due to CORS error由于 CORS 错误,无法进行 Jmeter UI 记录
【发布时间】:2019-03-08 13:04:21
【问题描述】:

我们在 Jmeter UI 记录中面临 CORS 问题:

CORS request did not succeed

我们有网站 uat.torchmarkets.com,内部调用 tradeuat.torchmarkets.com,其中对跨域请求进行安全检查。分享。我们想为 uat.torchmarkets.com 进行 UI 重新编码

下面是jmeter UI记录器设置

以下是浏览器中的代理设置。子域 loadtesting.torchmarkets.com 已列入白名单。

下面有CORS错误

任何解决此问题的帮助将不胜感激!

提前致谢!!

【问题讨论】:

    标签: jmeter-4.0


    【解决方案1】:

    在我的情况下,导入 JMeter 的证书后,CORS 错误消失了。

    在 JMeter 的 bin 文件夹中,您会找到一个 .crt 文件。这个需要导入到浏览器中。我只用 Firefox 测试过。

    1. 在 Firefox 中,转到Privacy & Security 设置部分 找到View Certificates...
    2. 选择Authorities 标签
    3. 点击Import...并浏览JMeter的证书
    4. 检查This certificate can identify web sites.并确认

    从那时起,您应该不会再看到 CORS 错误,直到证书过期,默认为 7 天。

    (可选)在 JMeter 的 bin 文件夹中找到文件 jmeter.properties,如果您需要证书的有效期超过默认 7 天,则通过更改值 proxy.cert.validitylet the certificate regenerate 来更改证书的有效期。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-03-15
      • 1970-01-01
      • 1970-01-01
      • 2020-12-31
      • 1970-01-01
      相关资源
      最近更新 更多