是否可以看到 JMeter 发出的完整请求?

Is it possible to see the complete request JMeter is making?

我有一个 jmeter 测试 运行 并且它只是输出响应代码(所有连接都超时)。当我在框中使用 curl 时,请求有效。我想看看 URL 它击中了什么。无论如何要看看 URL GET 请求实际上失败了什么?

你的测试中有 View Results Tree 监听器吗? 它可以显示它发送的 URL 和其他详细信息。

注意:此侦听器会消耗更多内存。仅用于调试目的。

您可以配置 JMeter 以在 jmeter.log 文件中存储更多信息,方法是将以下行添加到 "user.properties" 文件(位于您的 /bin 文件夹下JMeter安装)

log_level.jmeter.protocol.http=DEBUG

您将得到如下输出:

2015/04/09 11:20:26 DEBUG - jmeter.protocol.http.sampler.HTTPHC4Impl: Start : sample http://example.com/ 
2015/04/09 11:20:26 DEBUG - jmeter.protocol.http.sampler.HTTPHC4Impl: method GET followingRedirect false depth 0 
2015/04/09 11:20:26 DEBUG - jmeter.protocol.http.sampler.HTTPHC4Impl: Created new HttpClient: @563504346 http://example.com 
2015/04/09 11:20:26 DEBUG - jmeter.protocol.http.sampler.HTTPHC4Impl: ResponseHeadersSize=321 Content-Length=1270 Total=1591 
2015/04/09 11:20:26 DEBUG - jmeter.protocol.http.sampler.HTTPHC4Impl: Thread Finished

有关不同 JMeter 属性类型和 setting/overriding 它们的方式的更多信息,请参阅 Apache JMeter Properties Customization Guide