You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by pm...@apache.org on 2017/11/29 07:36:35 UTC

svn commit: r1816602 - /jmeter/trunk/xdocs/usermanual/component_reference.xml

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

Modified: jmeter/trunk/xdocs/usermanual/component_reference.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/usermanual/component_reference.xml?rev=1816602&r1=1816601&r2=1816602&view=diff
==============================================================================
--- jmeter/trunk/xdocs/usermanual/component_reference.xml (original)
+++ jmeter/trunk/xdocs/usermanual/component_reference.xml Wed Nov 29 07:36:35 2017
@@ -2033,6 +2033,9 @@ loop through them a certain number of ti
 specified for the Thread Group.  For example, if you add one HTTP Request to a
 Loop Controller with a loop count of two, and configure the Thread Group loop
 count to three, JMeter will send a total of <code>2 * 3 = 6</code> HTTP Requests.
+<note>JMeter will expose the looping index as a variable named <code>__jm__&lt;Name of your element&gt;__idx</code>. So for
+example, if your Loop Controller is named LC, then you can access the looping index through <code>${__jm__LC__idx}</code>.
+Index starts at 0</note>
 </p></description>
 
 <properties>
@@ -2403,6 +2406,9 @@ So for example when the input variable h
 When the return variable is given as "<code>returnVar</code>", the collection of samplers and controllers under the ForEach controller will be executed <code>4</code> consecutive times,
 with the return variable having the respective above values, which can then be used in the samplers.
 </p>
+<p><note>JMeter will expose the looping index as a variable named <code>__jm__&lt;Name of your element&gt;__idx</code>. So for
+example, if your Loop Controller is named FEC, then you can access the looping index through <code>${__jm__FEC__idx}</code>.
+Index starts at 0</note></p>
 <p>
 It is especially suited for running with the regular expression post-processor. 
 This can "create" the necessary input variables out of the result data of a previous request.