Error loading jmeter in record

I am trying to record a session that has a download function.
I used an http proxy for recording, a recording controller, and an http cookie manager.
When I try to upload a file and click "Save", the following error will appear:

java.io.FileNotFoundException: a12-13538_110q.htm (the system cannot find the specified file) in java.io.FileInputStream.open (native Method) in java.io.FileInputStream. (Unknown source) in java.io.FileInputStream. (Unknown source) in org.apache.jmeter.protocol.http.sampler.PostWriter.writeFileToStream (PostWriter.java:408) in org.apache.jmeter.protocol.http.sampler.PostWriter.sendPostData (PostWriter.java:117) in org.apache.jmeter.protocol.http.sampler.HTTPJavaImpl.sendPostData (HTTPJavaImpl.java:115) in org.apache.jmeter.protocol.http.sampler.HTTPJavaImpl.sample (HTTPJavaImpl.java//10) in org.apache .jmeter.protocol.http.sampler.HTTPSamplerProxy.sample (HTTPSamplerProxy.java:62) at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample (HTTPSamplerBase.java:1060) at org.apache.jmeter.protocol .http.proxy.Proxy.run (Proxy.java:238)

This function works fine when I don't use jmeter record.

Please help with this.
Is there any way to run this test?

+5
source share
1 answer

Error 50079 : Jmeter does not write file path.

According to your exception, jmeter cannot find the file to download due to the problem mentioned above.
Thus, you must set the path manually in the sampler, and it is better to use a variable for this, for test parameterization.

Do not use recording and playback at all, or at least check and tune recorded samplers. In your case, you need to set the following in the http [POST] request:

  • Use multipart/form-data for POST = true - send the file as part of the request;
  • Send Files with Request -> File Path = PATH_TO_FILE - , .
    . . .
    UPLOAD HTTP Request
    Method = POST
    Use multipart/form-data for POST = true
    -- Send Files with Request -- section:
    File Path = ${testFile}
    Parameter Name = datafile
    MIME Type = ...
    . . .
+6

All Articles