gpt4 book ai didi

proxy - Postman 与 JMeter 的集成

转载 作者:行者123 更新时间:2023-12-01 13:15:57 25 4
gpt4 key购买 nike

我想指出,这个当前的问题是对早期帖子的后续讨论,该帖子讨论了将 Postman 与 JMeter 结合使用。可以在此处找到其他线程:
Postman script to JMeter script

无论如何,原始线程建议 JMeter 可以通过以下过程记录 Postman 集合将触发的流量:

1- Launch Postman and setup the proxy server under File>Settings>Proxy to use port as localhost:8087.

2- Launch JMeter tool, open recording template and setup the proxy to use the port '8087' under 'HTTP(S) Test Script Recorder' element (same port that is set in Postman)

3- Now all the API requests that you send in Postman will be captured in JMeter and store under Thread Group>Recording Controller.



我试图在 Postman 中设置代理,但这对我不起作用(除非我遗漏了一些东西)。

当我运行一个没有定义代理的集合时,我得到的响应很好。但是当我打开“自定义代理”(使用 localhost:8087)时,我收到此错误:

错误:无法建立隧道套接字,cause=connect ECONNREFUSED 127.0.0.1:8087

我已经浏览了 GitHub 上发布的一些解决方案,但没有成功。如果它有任何相关性,我在 Windows 7 上。有人熟悉这种行为吗?

最佳答案

您收到的错误意味着 Postman 无法连接到 JMeter,因此请仔细检查:

  • HTTP(S) 测试脚本记录器确实配置为使用端口 8087
  • HTTP(S) 测试脚本记录器已启动

  • 如果您想从头开始:
  • 准备 JMeter 进行记录。最快和最简单的方法是使用 JMeter Templates feature .从 JMeter 的主菜单中选择 File -> Templates -> Recording然后点击 Create
    enter image description here
  • 将端口更改为 8087然后点击“开始”

    enter image description here
  • 如果您仍然遇到任何问题 - 查看 jmeter.log file .
  • 您也可能需要 install JMeter's self-signed certificate into Postman
  • 关于proxy - Postman 与 JMeter 的集成,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55032961/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com