Correlation Functions in Web, Database and Java Vuser Script in Load Runner

  • lr_eval_string: Replaces all occurrences of a parameter with its current value.
    • lr_output_message("value: %s", lr_eval_string("The row count is: <row_cnt>"));
  • lr_save_string: To save a NULL terminated string to a parameter, use lr_save_string. To save a variable length string, use lr_save_var and specify the length of the string to save.
    • lr_save_string("777", "emp_id");
  • lr_save_var: Saves a variable length string to a parameter.

Correlation Functions - Java Vuser Scripts 

  • lr.eval_string: Replaces a parameter with its current value. lr.message("Get report card for " + lr.eval_string("<Student>"));
  • lr.eval_data: Replaces a parameter with a byte value.
  • lr.eval_int: Replaces a parameter with an integer value. lr.message(" Track Stock: " + lr.eval_int(ID_num));
  • lr.eval_string: Replaces a parameter with a string.
  • lr.save_data: Saves a byte as a parameter.
  • lr.save_int: Saves an integer as a parameter.
  • lr.save_string: Saves a null-terminated string to a parameter.

Correlation Functions - Database Vuser Scripts

  • lrd_save_col saves a query result appearing in a grid, to a parameter. This function is placed before fetching the data. It assigns the value retrieved by the subsequent lrd_fetch to the specified parameter. (lrd_ora8_save_col for Oracle 8 and higher)
  • lrd_save_value saves the current value of a placeholder descriptor to a parameter. It is used with database functions that set output placeholders.
  • lrd_save_ret_param saves a stored procedure’s return value to a parameter. It is used primarily with database procedures stored in DbLib that generate return values.

Create Parameter Dialog Box

This dialog box enables you to correlate data and create parameters in Winsock scripts.Tree View > Right-click menu > Create Parameter

  • Parameter Name: The name of the parameter.
  • Data Range: You can define the parameter by a start and end range in bytes. Enter the numbers manually in the From and To fields or click Select Range and highlight the desired text.
  • Boundaries: You can define the parameter by defining a left and right boundary. To do so, select Extract parameter data using boundaries. Click the button to right of the Left field, highlight the desired text, and click Done. Repeat the
    procedure for the Right boundary.
  • Script Statement: The statement that will appear in your script based on the options selected in this dialog box. You can manually edit this statement.