Bug 61802

Summary: Loop / ForEach Controller should expose a variable for current iteration
Product: JMeter - Now in Github Reporter: Philippe Mouawad <p.mouawad>
Component: MainAssignee: JMeter issues mailing list <issues>
Status: RESOLVED FIXED    
Severity: enhancement CC: p.mouawad
Priority: P2 Keywords: FixedInTrunk
Version: 3.3   
Target Milestone: ---   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 63165    

Description Philippe Mouawad 2017-11-22 21:42:23 UTC
When I introduce those components, newbies don't understand why we don't expose OOTB this information which is very useful in many cases. Workaround is to use a Counter but why ?

I propose to name variable :
- "_jm_<controller name>_it"


If I missed an element that should also do, please update.
Thanks
Comment 1 Philippe Mouawad 2017-11-28 07:12:44 UTC
Author: pmouawad
Date: Tue Nov 28 07:11:35 2017
New Revision: 1816519

URL: http://svn.apache.org/viewvc?rev=1816519&view=rev
Log:
Bug 61802 - Loop / ForEach Controller should expose a variable for current iteration
Bugzilla Id: 61802

Modified:
    jmeter/trunk/src/components/org/apache/jmeter/control/ForeachController.java
    jmeter/trunk/src/core/org/apache/jmeter/control/LoopController.java
    jmeter/trunk/src/core/org/apache/jmeter/util/JMeterUtils.java
    jmeter/trunk/test/src/org/apache/jmeter/control/TestLoopController.java
    jmeter/trunk/xdocs/changes.xml
Comment 2 Philippe Mouawad 2017-11-28 21:41:09 UTC
2 remaining things before closing this Bugzilla:
- Documentation
- JUnit or Spcock Spec for ForEachController
- Possibly refactor LoopController tests which are not very readable
Comment 3 Philippe Mouawad 2017-11-28 21:42:11 UTC
(In reply to Philippe Mouawad from comment #2)
> 2 remaining things before closing this Bugzilla:
> - Documentation
> - JUnit or Spcock Spec for ForEachController
> - Possibly refactor LoopController tests which are not very readable

PRs welcome :-)
Comment 4 Philippe Mouawad 2017-11-29 07:36:52 UTC
Author: pmouawad
Date: Wed Nov 29 07:36:35 2017
New Revision: 1816602

URL: http://svn.apache.org/viewvc?rev=1816602&view=rev
Log:
Bug 61802 - Loop / ForEach Controller should expose a variable for current iteration
Document exposed variable
Bugzilla Id: 61802

Modified:
    jmeter/trunk/xdocs/usermanual/component_reference.xml
Comment 5 Philippe Mouawad 2019-02-10 21:29:09 UTC
Fixed in 4.0.
Create Bug 63165 for remaining work.
Comment 6 The ASF infrastructure team 2022-09-24 20:38:11 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/4606