Hi, I have a script to upload a file. I have modified the file path to pick it from the csv file instead. Though the csv file have multiple rows the script is not proceeding to the second row i.e the same file is being sent in the request for each iteration/loop. This was working fine with version 2.3.1. Please let me know the changes to be made in case I need to fix this one.
How are you reading the CSV file? Please attach a simple test plan that works under 2.3.1 and fails under 2.3.2. Remove any sensitive data first.
Created attachment 23406 [details] Script to upload location The "Submit File for Upload" HTTP Request uses send files with the request to upload files. The ${importFile} is being picked up from the "CSV Data Set Config" The first file name is passed to all the "Import Location" iterations in JMeter 2.3.2 r665936. The second iteration should move on to the next row within "CSV Data Set Config"
Added a script as attachment. I am using JMeter 2.3.2 r665936. The attached script fails on this release since the same file name mentioned in row 1 of the CSV Data Config is picked up by all iterations. The same file works on 2.3.1. I cannot use 2.3.1 for other scripts developed due to some other issues.
The test plan is not exactly "simple". Which sampler is failing?
To put it precisely any HTTP Request with at least one file in the "Send Files With the Request" fails when I parameterize the File path as in ${importFile} and then run it through iterations. The ${importFile} gets replaced for the first iteration with appropriate file name but for next iteration picks the same file path instead of proceeding further.
I think this has been fixed in SVN - could you try the nightly build and see if that works for you?
No its still giving me the same issue both the first iteration and second iteration are picking the same file.
I have tried with jakarta-jmeter-r753086.
Please note: I do have some other parameters along with the File to be sent with the request as well
Any updates on this. When is the next release of Jmeter? Will this be fixed by then? Is there any alternative I can go ahead with?
I have found that the problem does exist - I thought it was solved in the current nightlies, but not so. It's not yet clear how to fix this, so I can't say when a fix will be released. However, I have found that the problem only affects the first file in the list, which is treated differently for compatibility reasons. If you can put up with sending a dummy file as well, then you can use JMeter 2.3.2 or a nightly. Otherwise you will have to use JMeter 2.3.1.
This seems to be working OK now. Please test one of the nightlies and report back.
I tried to verify this issue against the release jmeter version 2.3.3 and it is still exist. It always pick up the first file name. But, the same script works like charm in 2.3.1 version. I am not sure what got fixed in 2.3.3 because the behavoir still the same as in 2.3.2 I need to do diff in source to see what changes were made between 2.3.1 to 2.3.3
Created attachment 23821 [details] Sample test plan
Created attachment 23822 [details] Sample test data
It works fine for me with the attached test plan and CSV file. Create 3 dummy files - f1.tmp, f2.tmp, f3.tmp and start the mirror-server. You should see that the files are correctly uploaded.
I'm seeing this bug on v2.3.3 and v2.3.4. I'm using HTTP Request HTTPClient Sampler. I'm using a variable name for "File Path". The variable is changed in a BeanShell preprocessor. In a loop I'm posting a file to a server. The first file name generated in the beanshell keeps getting posted over and over even though I verified that the variable is getting changed.
I verified that it works correctly on 2.3.1 and is broken on all releases after that.
BUMP
please, fix this issue soon
This has taken a long while to fix, but as can be seen from the change it was not trivial. [It might have been fixed earlier had there been a simple test case.] The changes will be in nightly builds from r905484. URL: http://svn.apache.org/viewvc?rev=905484&view=rev Log: Bug 46901 - HTTP Sampler does not process var/func refs correctly in first file parameter Simplify file handling at run-time by using only a single list which is merged at start-up if necessary. Added: jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBaseConverter.java (with props) Modified: jakarta/jmeter/trunk/bin/saveservice.properties jakarta/jmeter/trunk/bin/testfiles/AssertionTestPlan.jmx jakarta/jmeter/trunk/bin/testfiles/AuthManagerTestPlan.jmx jakarta/jmeter/trunk/bin/testfiles/GuiTest.jmx jakarta/jmeter/trunk/bin/testfiles/GuiTest231.jmx jakarta/jmeter/trunk/bin/testfiles/HeaderManagerTestPlan.jmx jakarta/jmeter/trunk/bin/testfiles/InterleaveTestPlan.jmx jakarta/jmeter/trunk/bin/testfiles/InterleaveTestPlan2.jmx jakarta/jmeter/trunk/bin/testfiles/LoopTestPlan.jmx jakarta/jmeter/trunk/bin/testfiles/Modification Manager.jmx jakarta/jmeter/trunk/bin/testfiles/OnceOnlyTestPlan.jmx jakarta/jmeter/trunk/bin/testfiles/SimpleTestPlan.jmx jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java jakarta/jmeter/trunk/xdocs/changes.xml
*** Bug 49223 has been marked as a duplicate of this bug. ***
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/2212