Inner Loops

It is possible to define “inner loops” which include only some web pages of a recorded web surfing session.

As an example, inner loops can be used during a load test after the point where the users did login, to repeat the web pages between login and logout several times, before logout.

image

During the load test, inner loops execute within the "outer", normal loops (repetitions of the web surfing session per user); for example, if you run a load test with 10 users and 3 loops (with an unlimited test duration), each user will execute the recorded web surfing session 3 times. Within each repetition (outer loop), the inner loop(s) will be executed.

Inner loops must be composed of entire web pages, and not only a subset of URL calls to a single web page; however, you can define additional page breaks between URL calls after the recording has been completed.

You can define an inner loop by clicking on the item index at the left side of a page break.

image

Inner Loop Configuration
Inner Loop Description description of the inner loop (mandatory).
Inner Loop End Page the end page of the inner loop, including all URL calls on the end page itself.
Loop Iterations number of iterations. This can be a fixed value, or a variable value which can be extracted; for example, from an Input File, or from a User Input Field .
Action if planned duration of Load Test exceeded the option "Abort current loop after current iteration" means that at the end of the load test - when the maximum duration of the test has elapsed - the inner loop is aborted after the end of the current iteration, and remaining iterations are not executed. The option "Continue with iterations" means that the end of the load test will be postponed until all iterations have been completed.
Enable Pacing enabling this option sets a minimum elapsed time for all "in one iteration" executed page breaks and URL calls, before the next iteration can start. If the iteration is done faster than the pacing time, the "user" will be inactive until the pacing time has elapsed.

Inner loops are marked by black bars at the left side in the Web Admin GUI main menu. Nested inner loops are also supported.

image

image

If the number of iterations of an inner loop is controlled by a variable, the value of such a variable can also be 0 (zero). A value of zero means that a simulated user does not execute (enter) the inner loop. This can be used in combination with an Input File whose file scope is “new line per user” or “new line per loop” and whose lines contain values of zero and one which are assigned to the variables of the iterations; that is, some of the users skip parts of the recorded web surfing session during the load test. However, to get valid statistical data it is required that, at least once during the load test, at least one user executes the inner loop one or more times.

image

image

After you have defined an inner loop, you can also define additional conditions which allow you to control the run-time behavior inside of an inner loop. If such an additional condition applies (becomes true) the corresponding action can be break or continue.

Break means: jump out of the inner loop. After a "break", the simulated user will call the next URL Call subsequent to the end of the inner loop.

Continue means: jump back at the start of the inner loop, without calling the subsequent URL Calls of the current iteration inside the inner loop. However such a jump is not executed during the last iteration of an inner loop. In such a case the inner loop is immediately finished (similar to the "break" condition, but inclusive incrementing the inner loop iteration counter).

In addition, it is also supported to report a "red" fatal error after all iterations of an inner loop have been executed (no "break" was made in an iteration before the last iteration). If such a "red" fatal error is reported, the simulated user will abort the current "Outer Loop" and will start the next "Outer Loop".

image

The Text Input Fields of the conditions can contain fixed text as well as placeholders for variables. Example: Dear {\$vTitle} {\$vName}.

In addition it is also supported to define a NOT condition for an absence of a text. This can be done by enfolding the whole text with an exclamation mark and square brackets. Example: Dear {\$vTitle} {\$vName}.

Restrictions: if nested inner loops have been defined, a "continue" or a "break" action will only change the run-time behavior of the deepest inner loop. Breaking through several inner loop levels is not supported.

Further Tips for Using Variables: when using variables, please consider also the scope of the variables (page 32). If the scope is global all simulated users will see the same value for such a variable and therefore the same condition will be become true or false for all users. On the other hand, if the scope of a variable is user or loop, each simulated user will see a different value for such a variable and therefore the conditions will be calculated on a per user basis.