When Avalanche creates a SimUser ( simulated user), that user walks the action list and then exits. If you want a user to perform an action list item multiple times you can use the LOOP command. Here are the details from the Avalanche Commander online help ( accessed from the GUI by hitting the F1 key)
Use the LOOP action to execute a set of URLs multiple times, eliminating the need to cut and paste the same URLs repeatedly into your Action list. You can control the number of times you execute a loop by elapsed time (TIME) or by counting (COUNT) the number of times the loop runs.
If you use TIME, the Action list executes the URLs, and then checks the Time value you specify. If time remains, the Action list executes the URLs again. If not, it jumps to the LOOP STOP action. If you use COUNT, the URLs are executed repeatedly for the count that you indicate. For example, a count of five, executes the set of URLs five times.
You can also use the ASSIGN and APPLY actions to configure loops by assigning a variable name and then applying it to the COUNT value. A forms database can provide the variable value.
The Loop report, available in the summary.csv URL section of results, shows the minimum, maximum, and average response times. For more information, see Client URL Results.
TIP: To measures the amount of time in milliseconds that it takes to execute a list of URLS, use the TIMER action.
LOOP loop_name START COUNT=number of loops
list of urls
LOOP loop_name STOP
loop_name—an alphanumeric name that identifies the loop
number of loops—the number of times you want to execute the URLS contained in the loop. When the count is reached, the action list jumps to the STOP LOOP action.
list of URLs—the set of URLS that you want to execute.
The following loop executes a set of six URLs three times.
LOOP my_loop1 START COUNT=3
1 GET https://www.somewebsite.com/
2 GET https://www.somewebsite.com/images/about.gif
1 GET https://www.somewebsite2.com/
2 GET https://www.somewebsite.com/images/notes.gif
1 GET https://www.somewebsite3.com/
2 GET https://www.somewebsite3.com/images/welcome.gif
LOOP my_loop1 STOP
LOOP loop_name START TIME=amount of time
loop name—an alphanumeric name that identifies the loop.
amount of time—time in milliseconds that the loop runs. If the time has expired, the action list jumps to the STOP LOOP action.
The following loop repeatedly executes a set of six URLs for 200 milliseconds.
LOOP loopabc START TIME=200
2 GET https://www.somewebsite2.com/images/notes.gif
LOOP loopabc STOP
LOOP loop_name START COUNT=<APPLY variable>
list of URLs
variable—a variable that sets the count. The variable has been assigned a value previously.
For more information about ASSIGN, APPLY and Forms Databases, see HTTP Assign Variables, HTTP Apply, and Using Forms Databases with Action Lists.
Example one variable
The following loop uses a variable to set the count to five.
ASSIGN VARIABLE <loopvariable "5">
LOOP loopxyz START COUNT=<APPLY loopvariable>
LOOP loopxyz STOP
Example nested loops, variable, forms database
The following example uses a nested loop that repeats the inner loop a number of times. Each time through the loop it executes the URLs.
When the inner loop exits, the myvar1 and inner_loop_counter variables are assigned new values from the Numbers.$1 and Numbers.$2 form databases respectively.
The outer loop repeats the assignment and inner loop sequence 10 times before exiting.
As an example, assume the inner loop counter is 10. The total number of requested URLs would then be equal to the outer loop (10) * inner loop (10) * number of URLs (6), or 600 requests.
ASSIGN VARIABLE <outer_loop_counter "10">
LOOP loop_outer START COUNT=<APPLY outer_loop_counter>
ASSIGN VARIABLE <myvar1 Numbers.$1>
ASSIGN VARIABLE <inner_loop_counter Numbers.$2>
LOOP loop_inner START COUNT =<APPLY inner_loop_counter>
1 GET https://www.somewebsite.com/index.html?test=<apply myvar1>
2 GET https://www.somewebsite.com/pages/about.html?test=<apply myvar1>
1 GET https://www.somewebsite2.com/index.html?test=<apply myvar1>
2 GET https://www.somewebsite2.com/pages/notes.html?test=<apply myvar1>
1 GET https://www.somewebsite3.com/index.html?test=<apply myvar1>
2 GET https://www.somewebsite3.com/pages/welcome.html?test=<apply myvar1>
LOOP loop_inner STOP
LOOP loop_outer STOP