In Loadrunner script, we use block size per vuser for using the huge range of unique values in a parameter. But during the test, if the execution failes inbetween its very hard to re-allocate the block size again by checking the unused values. In-order to solve this issue, we can use the LR_ADVANCE_PARAM function in loadrunner. Please find below the usage format to implement this.

 
Action()
{
int x,y,v,i;  // declare these variables as integer
v=atoi(lr_eval_string(“{VuserID}”));  // get the VuserID and store it in v
i=atoi(lr_eval_string(“{ItNum}”));  // get the Iteration number and store it in i
if(i==1)
 x=v;  // For the first iteration, x = VuserID
else
 x=6;  // For the second iterations onward, x = No of Vusers  + 1 (assuming Vusers = 5)
for(y=1;y<x;y++)
lr_advance_param(“CreatedCustID”);  // parameter file name (keep settings as Sequential Once)

————-

———-

———
return 0;
}

Advertisements