I need to increment a parameter value by 1. This
parameter value has 16 digits (ex:1234567890123456). When I use INT or
LONG data types for this variable, it is working as expected only when the
value has less than 10 digits (ex: 12345678).
But it’s not working as expected when the value exceeds 10 digits. The output is shown in red below. Could you please let me know how to fix this? Your help is very much appreciated.
Code:
int i;
lr_save_string("1234567890123456", "id");
i = atoi(lr_eval_string("{id}"));
i += 1;
lr_save_int(i, “id");
lr_output_message("Value is: %s", lr_eval_string("{id}"));
Output:
Starting iteration 1.
Starting action Action.
Action.c(12): Value is: -2147483648
Ending action Action.
Ending iteration 1.--
You received this message because you are subscribed to the Google Groups "LoadRunner" group.
To unsubscribe from this group and stop receiving emails from it, send an email to LR-LoadRunne...@googlegroups.com.
To post to this group, send email to LR-Loa...@googlegroups.com.
Visit this group at http://groups.google.com/group/LR-LoadRunner.
For more options, visit https://groups.google.com/d/optout.
Or hard code the 1st 8 digits as "10000000" and follow it up with a "unique number" parameter of 8 digits. Append the hard coded value manually as needed.
The above works for a single user. For multiple users just create a vuid parameter and adjust the length of the unique number parameter accordingly.
Unique number parameter might not support 16 digit numbers.
Instead use 2 "unique number" parameters and append each by 1.
Just need to be aware of the values used after every test so that the parameter value can be adjusted for the next run.
Unique number parameter might not support 16 digit numbers.
Instead use 2 "unique number" parameters and append each by 1.
Just need to be aware of the values used after every test so that the parameter value can be adjusted for the next run.
You can use file type parameter from parameter list window and put the 16 or what ever digits in the value to the column. And then use this parameter name in your script.
Thanks
Varun
--
You received this message because you are subscribed to the Google Groups "LoadRunner" group.
To unsubscribe from this group and stop receiving emails from it, send an email to LR-LoadRunne...@googlegroups.com.
To post to this group, send email to LR-Loa...@googlegroups.com.
Visit this group at http://groups.google.com/group/LR-LoadRunner.
To view this discussion on the web visit https://groups.google.com/d/msgid/LR-LoadRunner/a2e3a19e-06e2-4c17-8c0e-13637ebb19d7%40googlegroups.com.