LoadRunner - Parameterize and increase iteratively a value from database
/* Initialize variables and character buffer */
int i;
int j;
char ssbuf[12];
/* Extract the value of database parameter and convert it into int by using atoi */
i = atoi(lr_eval_string("{UPLOADID}"));
/* Output the value */
lr_output_message("Integer Value of Parameter: %d", i);
/* Extract the iteration number from NewParam which is configured to extract iteration number
j = atoi(lr_eval_string("{NewParam}"));
i = i+j;
/* Add integer to character stream */
sprintf(ssbuf,"%d", i);
/* save the parameter value */
lr_save_string(ssbuf,"UPLOADID");
lr_output_message("Integer Value of Parameter: %d", i);
Labels: Load Runner - Theory

0 Comments:
Post a Comment
<< Home