Bug 56243 - Foreach works incorrectly with indexes on subsequent iterations
Summary: Foreach works incorrectly with indexes on subsequent iterations
Status: RESOLVED FIXED
Alias: None
Product: JMeter
Classification: Unclassified
Component: Main (show other bugs)
Version: 2.9
Hardware: All All
: P2 major (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-11 09:02 UTC by Vladimir Ryabtsev
Modified: 2014-03-17 14:39 UTC (History)
2 users (show)



Attachments
Simple test plan demonstrating the bug (5.77 KB, text/plain)
2014-03-11 09:02 UTC, Vladimir Ryabtsev
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Ryabtsev 2014-03-11 09:02:37 UTC
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.
Comment 1 Philippe Mouawad 2014-03-12 21:44:35 UTC
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)
Comment 2 Philippe Mouawad 2014-03-12 21:45:22 UTC
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
Comment 3 Philippe Mouawad 2014-03-12 21:59:45 UTC
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
Comment 4 Vladimir Ryabtsev 2014-03-17 14:39:04 UTC
Verified in r1578205: bug is not reproduced.