Self-Solve Knowledge Search

Minimize Maximize
lr_eval_string function returns the parameter name instead of its value
Title :
lr_eval_string function returns the parameter name instead of its value
Document ID :
KM01012764
Product - Version:
performance center ; loadrunner ;
OS :
Updated :
Fri Jun 27 08:45:30 GMT 2014
Summary :
lr_eval_string function returns the parameter name in brackets instead of the value of the parameter. The issue can appear if the Left and Right parameter braces values used in the script are different than these defined in VuGen General options.
Problem

The VuGen lr_eval_string function returns the parameter name in brackets instead of the value of the parameter as is shown in the example below:

Example script:
lr_save_string("Text", "Parameter");
lr_output_message("The parameter value is: %s", lr_eval_string("{Parameter}"));

Result output:
vuser_init.c(5): The parameter value is: {Parameter}

Cause
In VuGen -> Tools -> General options -> Parameterization the Left and Right parameter braces are defined.
This issue will appear if the Left and Right parameter braces values used in the script are different than these defined in VuGen General options.
Fix

Use the same Left and Right parameter braces values in your script as the ones defined in
Tools -> General options -> Parameterization > Left Brace and Right brace.

Using the above example if the Left brace is set to “{“ and  the Right brace is set to “}”

image text

lr_eval_string function will return the correct parameter value
vuser_init.c(5): The parameter value is: Text