【发布时间】:2019-02-19 15:35:26
【问题描述】:
我正在使用 Jmeter 进行 webservice -Restful 测试。
我收到以下错误:
软件导致连接中止:socket write error
对于 post 方法,我发送大小为 1MB 的 JSON 请求并使用 HTTPclient4 实现。
后来我尝试使用 Java 实现,我得到了成功的响应,但发送的字节数对于 Java 为 0,而对于 HTTPclient4 则非常高。
采样器结果:
HTTPclient4
Thread Name: Thread Group 1-1
Sample Start: 2019-02-19 10:00:57 EST
Load time: 770
Connect Time: 295
Latency: 770
Size in bytes: 151
Sent bytes:1112854
Headers size in bytes: 151
Body size in bytes: 0
Sample Count: 1
Error Count: 0
Data type ("text"|"bin"|""):
Response code: 200
Response message: OK
HTTPSampleResult fields:
ContentType:
DataEncoding: null
采样器结果:
JAVA 实现:
Thread Name: Thread Group 1-1
Sample Start: 2019-02-19 10:06:08 EST
Load time: 217
Connect Time: 0
Latency: 217
Size in bytes: 151
Sent bytes:0
Headers size in bytes: 151
Body size in bytes: 0
Sample Count: 1
Error Count: 0
Data type ("text"|"bin"|""):
Response code: 200
Response message: OK
HTTPSampleResult fields:
ContentType:
DataEncoding: null
JAVA 实现的工作原理以及为什么 jmeter 中 JAVA 实现的字节大小为 0。
请帮帮我
【问题讨论】: