Jmeter proxy server doesn't capture file uploa

2019-05-01 15:04发布

问题:

I was trying to capture a file upload request from the Jmeter's proxy server but while uploading the file error message was displayed. I had already configured the proxy.binary.types property to application/x-amf,application/x-java-serialized-object,application/octet-stream,application/vnd.ms-excel.

Below is the error message displayed on 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)

回答1:

Copy the files to upload in bin folder of JMeter, see:

  • http://jmeter.512774.n5.nabble.com/File-Upload-failure-td530225.html