0
votes

This is my first question. I've read other responses about uploading scenarios, but I cannot find a solution.

When I try to open an "upload file" window:

java.net.URISyntaxException: Illegal character in query at index 51: http://xxxxxxxxxx/upload_file_window.ud121?vds={%22oid%22:0,%22folder%22:0,%22section%22:%22myfiles%22,%22last_section%22:%22videos%22,%22uploaded%22:false,%22uploader%22:null,%22searchresults%22:[],%22plupload_settings%22:{%22upload_url%22:%22upload_file_final.ud121%22,%22filters%22:[{%22title%22:%22Image%20files%22,%22extensions%22:%22jpg,gif,png,jpeg,JPG,GIF,PNG,JPEG%22},{%22title%22:%22Audio%20files%22,%22extensions%22:%22mp3,wmaupload,m4a,wav%22},{%22title%22:%22Video%20files%22,%22extensions%22:%22mpg,mpeg,wmv,flv,mov,swf,mp4,f4v%22}],%22file_size_limit%22:%222048mb%22},%22new_playlist_x%22:1280,%22new_playlist_y%22:720}

at java.net.URI$Parser.fail(URI.java:2829)
at java.net.URI$Parser.checkChars(URI.java:3002)
at java.net.URI$Parser.parseHierarchical(URI.java:3092)
at java.net.URI$Parser.parse(URI.java:3034)
at java.net.URI.<init>(URI.java:595)
at java.net.URL.toURI(URL.java:936)
at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:234)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:62)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1088)
at org.apache.jmeter.protocol.http.proxy.Proxy.run(Proxy.java:211)

It's a jmeter protocol error? (I see something recorded in ajax in jmeter). How could I see the HTTP request for the upload? Firebug? Wher should be the files for uploading in local?

Thanks!!

2

2 Answers

0
votes

You need to put the file to upload in /bin.

http://jmeter.apache.org/usermanual/component_reference.html#HTTP%28S%29_Test_Script_Recorder

Uploading files Some browsers (e.g. Firefox and Opera) don't include the full name of a file when uploading files. This can cause the JMeter proxy server to fail. One solution is to ensure that any files to be uploaded are in the JMeter working directory, either by copying the files there or by starting JMeter in the directory containing the files.

0
votes
  1. You cannot use HTTP GET method for file upload. I believe that it should be POST or PUT.
  2. Even if your application supports it your whole request size will be limited to something like 2 kilobytes
  3. No matter where files live, it's better to provide full path for anything external: files to upload, CSV Data Set files, etc.
  4. You can record file upload but JMeter isn't smart enough to pick up file's full path, it has to be in JMeter's working directory (usually /bin folder of your JMeter installation but it may be different i.e. in case if you start JMeter via desktop shortcut)
  5. See Performance testing: Upload and Download Scenarios with Apache JMeter post for more information and step-by-step guidelines.