Can anybody help me in the below scenario. a)...

  • Thread starter Rayapeddi Subramanya Prasad
  • Start date
  • perf-test.com need your contributions to build up a strong repository of performance engineering resources.

R

Rayapeddi Subramanya Prasad

Guest
Can anybody help me in the below scenario. a) suppose there are 4 different values in drop down with 4 iterations . How do I pick value randomly for each iteration. Also how can I correlate it. Kindly provide the inputs.
 
dont need to correlate.. capture the values in the drop down and parameterize those values.. make it random in the parameter settings
 
I won't suggest to parametrize the list as if value changes the script will fail. You can try this: Take the count of drop down list using correlation "parametername_count" generate the random number from '0 to parameter count'. Capture this randomly generated number into a variable and pass it as a parameter.
 
Thanx Saravanan Subramani Gounder and Ravi Ranjan for ur valuable inputs.
 
we can capture all the values, ORD=ALL, and Generate random value to array, with help of "lr_paramarr_rando()" function.
 
Ravi Ranjan i feel parameterize is the simplest way to handle this. instead of correlating. share your thoughts
 
No doubt parametrization is the simplest way but your script will be dependent on those parameter values. Suppose in future if they remove or change the name that you have parametrized then the script will fail.
 
web_reg_save_param("corrval","lb=mention your left bound here","rb=your rightboundary","ord=all",LAST);temp=lr_paramarr_random("corrval");//we need to declare it as char *temp.....now this temp is c_variable,we need to convert it in to lr_variable.for that : lr_save_string(temp,lr_eval_string("new_corrval"));//replace this new parameterr in the script where exactly we want to parameterize...this is the way to correlate values in the drop downs.
 
for the drop down boxes parametrization is not good,because there might be a chance to updates and deletions for those values which are present in the drop downs.so always best way is to go with correlations instead of going with parametrization....