我无法使用JMeter录制脚本并获取连接中止和致命警报。
JMeter日志:
2018-02-13 13:41:24,653 WARN o.a.j.p.h.p.Proxy: [54571] Problem with SSL certificate for url for 'api.amplitude.com'? Ensure browser is set to accept the JMeter proxy cert: Software caused connection abort: recv failed
2018-02-13 13:41:39,823 WARN o.a.j.p.h.p.Proxy: [54636] Problem with SSL certificate for url for 'api.amplitude.com'? Ensure browser is set to accept the JMeter proxy cert: Received fatal alert: unknown_ca
2018-02-13 13:41:40,868 WARN o.a.j.p.h.p.Proxy: [54650] Problem with SSL certificate for url for 'code.jquery.com'? Ensure browser is set to accept the JMeter proxy cert: Software caused connection abort: recv failed
答案 0 :(得分:0)
出现此错误的主要原因是浏览器配置不正确,您需要将JMeter的自签名证书导入浏览器,该文件名为ApacheJMeterTemporaryRootCA.crt
,并在其中生成"箱"启动HTTP(S) Test Script Recorder时JMeter安装的文件夹。有关如何将JMeter证书安装到不同浏览器的概念和说明的详细信息,请参阅JMeter用户手册的 HTTPS记录和证书一章。我还建议您查看Recording HTTPS Traffic with JMeter's Proxy Server文章以获取更多详细信息。
如果您的应用程序没有使用HTTPS,并且由于解析了嵌入资源而生成了对api.amplitude.com
的调用,您可以通过将此URL添加到URL Patterns to Exclude
字段来简单地将此URL排除在记录之外HTTP(S)测试脚本记录器,如: