|
⇤ ← Revision 1 as of 2005-03-09 17:02:41
Size: 2030
Comment:
|
← Revision 2 as of 2009-09-20 21:56:29 ⇥
Size: 2040
Comment: converted to 1.6 markup
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 6: | Line 6: |
| http://jakarta.apache.org/jmeter/images/screenshots/logic-controller/loop-controller.gif | {{http://jakarta.apache.org/jmeter/images/screenshots/logic-controller/loop-controller.gif}} |
| Line 11: | Line 11: |
| || '''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 || | || '''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 || |
| Line 15: | Line 15: |
| [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/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. |
| Line 17: | Line 17: |
| http://jakarta.apache.org/jmeter/images/screenshots/logic-controller/loop-example.gif [[BR]] | {{http://jakarta.apache.org/jmeter/images/screenshots/logic-controller/loop-example.gif}} <<BR>> |
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
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. |
Yes, unless "Forever" is checked |
Looping Example
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.
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.