Config 'Files Upload` tab for reproduce: <elementProp name="${__TestPlanName}" elementType="HTTPFileArg"> <stringProp name="File.path">${__TestPlanName}</stringProp> <stringProp name="File.paramname"></stringProp> <stringProp name="File.mimetype"></stringProp> </elementProp> Method: POST Use multipart/form-data: UNchecked ----- Solution: - add missed FileServer.getResolvedFile()
Fix https://github.com/apache/jmeter/pull/400
Hello Artem, Thanks for report and PR. I don't think bug description is good, as if I put an absolute path and empty filename and mime type , it works. I would say issue is more about finding relative file no ?
Hi Phillipe The other additional requirement for reproduce this bug is the different JMeter_home and jmx_file_location. Also I use just relative path in my example. For example: I have my JMeter in /home/artem/apache-jmeter/ folder and I tried open the attached test plan from /home/artem/Downloads/ folder it will not work and will throws an exception.
Created attachment 36180 [details] Test plan that reproduces this bug
I have to agree, that the title of this bug is misleading (the patch looks good). The bug is an incomplete search path applied to the filenames used in the upload functionality of the http sampler, no?
Sure. I changed the bug label
Thanks for the nice patch (especially that it includes a test case :) Will be included in the next version (which is probably 5.1) Date: Wed Oct 3 09:54:37 2018 New Revision: 1842697 URL: http://svn.apache.org/viewvc?rev=1842697&view=rev Log: Incomplete search path applied to the filenames used in the upload functionality of the HTTP sampler Implemented by Artem Fedorov (artem.fedorov at blazemeter.com) and contributed by BlazeMeter. Closes #400 on github Bugzilla Id: 62785
@Felix, @Artem, Just in case: the test case is wrong. The test passes even without the changes to HTTPHC4Impl class.
@Vladimir The test fails for me when I run it via "ant clean install test". How did you run it?
@Felix, I was running the test from IDE. Apparently the test relies on "current working directory" which is `jmeter_svn/bin/` in Ant case and `jmeter_svn/` in IDE.
That's what I thought. I am currently working on a better version, that works in both settings.
Date: Sat Mar 2 17:17:47 2019 New Revision: 1854657 URL: http://svn.apache.org/viewvc?rev=1854657&view=rev Log: Make test work in both IDE and ant setting The test used the setting of CWD, which is different when run from an IDE or from ant. Now it uses JMeterHome which is the same for both environments. And while we are at the test, * we try to make sure, that we don't disturb other tests with the manipulated base dir * use more descriptive messages in the case of a failure Relates to #400 on github Bugzilla Id: 62785
Date: Sat Mar 2 18:23:39 2019 New Revision: 1854660 URL: http://svn.apache.org/viewvc?rev=1854660&view=rev Log: Add License header to new test class Relates to #400 on github Bugzilla Id: 62785 Modified: jmeter/trunk/test/src/org/apache/jmeter/protocol/http/sampler/TestSerializedHTTPSampler.java
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/4885