LoadRunner Variables

LoadRunner Variables

There is always a confusion related to variables in LoadRunner script. Because some variables require defining at the start of the script while some variables can be used directly without any initialization. Let’s discuss what is the exact difference in them?

Basically, there are two types of variable in the LoadRunner:

1. Language-Specific Variables:

Language-specific variables are those variables which need both declaration and definition (optional) at the start of the script such as:

int count;

float amount;

You can use these variables to perform some mathematical or file handling operations in the script.

2. LoadRunner Variables:

These variables do not require any explicit declaration. When a function calls then LoadRunner declares these variables internally. Such as:

lr_save_string("ABC","myVar");

web_reg_save_param("correlationVar", "LB =", "RB =", LAST);

LoadRunner variable is used with curly braces in the script. For example, the correlation variable will be written as {correlationVar}. 

The assigning of values for these variables always occurs at the time of execution.

Leave a Reply

Your email address will not be published. Required fields are marked *