Example: lr.advance_param

In the following example, there are three parameters defined. Iteration is an Iteration Number type parameter, and Param1 and Param2 are defined in file Params.dat.The values of Param1 and Param2 are:

Param1
Param2
P1_a
P2_a
P1_b
P2_b
P1_c
P2_c
P1_d
P2_d

This script shows the effect of lr.advance_param. Param1 advances at each call to lr.advance_param, and at each new iteration. With Select next row set to "sequential" in the Vuser parameter list dialog for Param2, Param2 advances only by iteration, though it is in the same file. However, with Select next row set to "Same line as Param1", Param2 advances with Param1.

lr.output_message "Iteration " + lr.eval_string("<Iteration>") _
        + ", Param1 " + lr.eval_string("<Param1>") _
        + ", Param2 " + lr.eval_string("<Param2>")

lr.advance_param "Param1"


lr.output_message "Iteration " + lr.eval_string("<Iteration>") _
        + ", Param1 " + lr.eval_string("<Param1>") _
        + ", Param2 " + lr.eval_string("<Param2>")
Example: Output: When Select next row is set to "sequential":

Starting iteration 1.
Iteration 1, Param1 P1_a, Param2 P2_a
Iteration 1, Param1 P1_b, Param2 P2_a

Starting iteration 2.
Iteration 2, Param1 P1_c, Param2 P2_b
Iteration 2, Param1 P1_d, Param2 P2_b

When Select next row is set to "Same line as Param1":

Starting iteration 1.
Iteration 1, Param1 P1_a, Param2 P2_a
Iteration 1, Param1 P1_b, Param2 P2_b

Starting iteration 2.
Iteration 2, Param1 P1_c, Param2 P2_c
Iteration 2, Param1 P1_d, Param2 P2_d