【发布时间】:2015-04-08 19:40:49
【问题描述】:
我有一个 jmeter 测试正在运行,它只是输出响应代码(所有连接超时)。当我从盒子中使用 curl 时,请求有效。我想看看它击中的 URL 是什么。无论如何要查看 GET 请求实际上在哪个 URL 上失败?
【问题讨论】:
标签: url curl get jmeter connection-timeout
我有一个 jmeter 测试正在运行,它只是输出响应代码(所有连接超时)。当我从盒子中使用 curl 时,请求有效。我想看看它击中的 URL 是什么。无论如何要查看 GET 请求实际上在哪个 URL 上失败?
【问题讨论】:
标签: url curl get jmeter connection-timeout
你的测试中有View Results Tree 监听器吗?
它可以显示它发送的 URL 和其他详细信息。
注意:此侦听器会消耗更多内存。仅用于调试目的。
【讨论】:
您可以配置 JMeter 以在 jmeter.log 文件中存储更多信息,方法是将以下行添加到“user.properties”文件(位于 JMeter 安装的 /bin 文件夹下)
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 属性类型以及设置/覆盖它们的方法的更多信息,请参阅 Apache JMeter Properties Customization Guide。
【讨论】: