You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by ja...@apache.org on 2005/03/09 18:02:42 UTC

[Apache JMeter Wiki] New: UserManual/Reference/LoopController

   Date: 2005-03-09T09:02:42
   Editor: MichaelStover
   Wiki: Apache JMeter Wiki
   Page: UserManual/Reference/LoopController
   URL: http://wiki.apache.org/jakarta-jmeter/UserManual/Reference/LoopController

   no comment

New Page:

= Loop Controller =

If you add Samplers or Controllers to a Loop Controller, JMeter will loop through them a certain number of times, in addition to the loop value you 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 2 * 3 = 6 HTTP Requests.

'''Control Panel'''
 http://jakarta.apache.org/jmeter/images/screenshots/logic-controller/loop-controller.gif

'''Parameters'''
|| '''Attribute''' || '''Description''' || '''Required''' ||
|| '''Name''' || Descriptive name for this controller that is shown in the tree. || No ||
|| '''Loop Count''' || The number of times the subelements of this controller will be iterated each time through a test run. [[BR]]Special Case: The Loop Controller embedded in the Thread Group element behaves slightly differently. Unless set to forever, it stops the test after the given number of iterations have been done. || Yes, unless "Forever" is checked ||

== Looping Example ==

[http://jakarta.apache.org/jmeter/demos/LoopTestPlan.jmx Download] this example (see Figure 3). In this example, we created a Test Plan that sends a particular HTTP Request only once and sends another HTTP Request five times.

 http://jakarta.apache.org/jmeter/images/screenshots/logic-controller/loop-example.gif [[BR]]
 ^Figure 3 - Loop Controller Example^

We configured the Thread Group for a single thread and a loop count value of one. Instead of letting the Thread Group control the looping, we used a Loop Controller. You can see that we added one HTTP Request to the Thread Group and another HTTP Request to a Loop Controller. We configured the Loop Controller with a loop count value of five.

JMeter will send the requests in the following order: Home Page, News Page, News Page, News Page, News Page, and News Page. Note, the File Reporter is configured to store the results in a file named "loop-test.dat" in the current directory.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org