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_aP2_a
P1_bP2_b
P1_cP2_c
P1_dP2_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 %s, Param1 %s, Param2 %s",
    lr_eval_string("{Iteration}"),
    lr_eval_string("{Param1}"),
    lr_eval_string("{Param2}"));
lr_advance_param("Param1");
lr_output_message("Iteration %s, Param1 %s, Param2 %s",
    lr_eval_string("{Iteration}"),
    lr_eval_string("{Param1}"),
    lr_eval_string("{Param2}"));
Example: Output: When Select next row is set to "sequential":
Starting iteration 1.
Action.c(3): Iteration 1, Param1 P1_a, Param2 P2_a
Action.c(10): Iteration 1, Param1 P1_b, Param2 P2_a
Ending iteration 1.
Starting iteration 2.
Action.c(3): Iteration 2, Param1 P1_c, Param2 P2_b
Action.c(10): Iteration 2, Param1 P1_d, Param2 P2_b
Ending iteration 2.
When Select next row is set to "Same line as Param1":
Starting iteration 1.
Action.c(3): Iteration 1, Param1 P1_a, Param2 P2_a
Action.c(10): Iteration 1, Param1 P1_b, Param2 P2_b
Ending iteration 1.
Starting iteration 2.
Action.c(3): Iteration 2, Param1 P1_c, Param2 P2_c
Action.c(10): Iteration 2, Param1 P1_d, Param2 P2_d
Ending iteration 2.