Created attachment 31381 [details] Simple test plan demonstrating the bug ForEach Controller is used to iterate through results of extraction made by Regular Expression Extractor as recommended by documentation. Assuming RegEx found several results and I don't want to iterate through all of them, I set values for 'Start index' and 'End index' fields of ForEach Controller. On first itertion of thread ForEach works as expected, but on subsequent thread iterations ForEach does nothing. Please see attached test plan and run it. Then look at Results Tree. You'll find that Debug sampler inside ForEach Controller reached only at first iteration of the thread, although there is no differences between the thread iterations. Interestingly, that if we clear 'Start index' and 'End index' fields ForEach will start work as expected.
Date: Wed Mar 12 21:42:47 2014 New Revision: 1576933 URL: http://svn.apache.org/r1576933 Log: Bug 56243 - Foreach works incorrectly with indexes on subsequent iterations Bugzilla Id: 56243 Added: jmeter/trunk/bin/testfiles/Bug56243.csv jmeter/trunk/bin/testfiles/Bug56243.jmx jmeter/trunk/bin/testfiles/Bug56243.xml (with props) Modified: jmeter/trunk/build.xml jmeter/trunk/src/components/org/apache/jmeter/control/ForeachController.java jmeter/trunk/xdocs/changes.xml Date: Wed Mar 12 21:43:39 2014 New Revision: 1576934 URL: http://svn.apache.org/r1576934 Log: Bug 56243 - Foreach works incorrectly with indexes on subsequent iterations change svn eol Bugzilla Id: 56243 Modified: jmeter/trunk/bin/testfiles/Bug56243.csv (props changed)
Thanks for report, we would be very grateful if you could test nightly build once generated to confirm issue is fixed. https://jmeter.apache.org/nightly.html
Date: Wed Mar 12 21:58:13 2014 New Revision: 1576941 URL: http://svn.apache.org/r1576941 Log: Bug 56243 - Foreach works incorrectly with indexes on subsequent iterations remove hostname from output Bugzilla Id: 56243 Modified: jmeter/trunk/bin/testfiles/Bug56243.csv jmeter/trunk/bin/testfiles/Bug56243.jmx jmeter/trunk/bin/testfiles/Bug56243.xml
Verified in r1578205: bug is not reproduced.
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/3340