Hello,
i have the following code
static String [] ip = {"Value1","Value2","Value3","Value4","Value5",Value6","Value7"};
I am trying to pass the above values randomly in a later statement and its working fine, no problem with the script, the only issue is that, the purpose here is for each virtual user to pick one of the values (value1 through value7) randomly, however, when i load 10 virtual users, they all get the first or second value only although i have set the random as below, the values3,4,5,6,7 are never used for some reason. Any explanation or solution to why it isnt picking up the other values since its random ?
static Random rand = new Random();
static int i = rand.nextInt(ip.length);
then i pass on the value using ip [ i ]
Any help is appreciated. Thanks