我试图从 Jmeter 的代理服务器捕获文件上传请求,但在上传文件时显示错误消息。我已经配置了proxy.binary.types
属性(property)到application/x-amf,application/x-java-serialized-object,application/octet-stream,application/vnd.ms-excel
.
以下是显示在 UI 上的错误消息:
java.io.FileNotFoundException: employee_template.xls (The system cannot find the file specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(Unknown Source)
at java.io.FileInputStream.<init>(Unknown Source)
at org.apache.jmeter.protocol.http.sampler.PostWriter.writeFileToStream(PostWriter.java:406)
at org.apache.jmeter.protocol.http.sampler.PostWriter.sendPostData(PostWriter.java:115)
at org.apache.jmeter.protocol.http.sampler.HTTPSampler.sendPostData(HTTPSampler.java:122)
at org.apache.jmeter.protocol.http.sampler.HTTPSampler.sample(HTTPSampler.java:508)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:965)
at org.apache.jmeter.protocol.http.proxy.Proxy.run(Proxy.java:242)
最佳答案
将要上传的文件复制到JMeter的bin文件夹中,见:
关于file-upload - Jmeter 代理服务器不捕获文件上传请求,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14121551/