Bug 55495 - ForEach Controller: start index not checked before looping
Summary: ForEach Controller: start index not checked before looping
Status: RESOLVED DUPLICATE of bug 55201
Alias: None
Product: JMeter - Now in Github
Classification: Unclassified
Component: Main (show other bugs)
Version: 2.9
Hardware: Macintosh All
: P2 normal (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-28 15:14 UTC by John Jenkins
Modified: 2013-08-28 17:10 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Jenkins 2013-08-28 15:14:43 UTC
When the ForEach Controller begins, it checks that <variable>_1 exists, regardless of what the start index is. To recreate it, simple create a variable named something like "myVar_0" and then call the ForEach Controller with a start index of 0. Because there is no "myVar_1", the ForEach Controller will not run.

The documentation does clearly state that if <variable>_1 is null, the looper will not run. My impression is that this is a legacy, default value from before start and end indices existed. I feel that a more intuitive solution would be to check the start index and, if not given, default to 1. Then, loop until the variable returned is null.
Comment 1 Philippe Mouawad 2013-08-28 17:10:26 UTC

*** This bug has been marked as a duplicate of bug 55201 ***
Comment 2 The ASF infrastructure team 2022-09-24 20:37:55 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/3211