bvm101
2007-06-12 19:47:58 UTC
Within a BeanShell PreProcessor I have a following code:
java.util.List ids = new java.util.ArrayList();
ids.add("key1");
ids.add("key2");
ids.add("key3");
int clientSize = ids.size();
${__Random(0,3 ,myRandom)};
vars.put("Col_65537", ids.get(${myRandom}));
However, when calling random function I would like to pass a variable for
the max value, in this case "clientSize", instead of number 3.
Your help will be greatly appreciated.
Thanks,
Boban
java.util.List ids = new java.util.ArrayList();
ids.add("key1");
ids.add("key2");
ids.add("key3");
int clientSize = ids.size();
${__Random(0,3 ,myRandom)};
vars.put("Col_65537", ids.get(${myRandom}));
However, when calling random function I would like to pass a variable for
the max value, in this case "clientSize", instead of number 3.
Your help will be greatly appreciated.
Thanks,
Boban
--
View this message in context: http://www.nabble.com/How-to-pass-a-variable-as-a-parameter-to-random-function-tf3909593.html#a11085352
Sent from the JMeter - User mailing list archive at Nabble.com.
View this message in context: http://www.nabble.com/How-to-pass-a-variable-as-a-parameter-to-random-function-tf3909593.html#a11085352
Sent from the JMeter - User mailing list archive at Nabble.com.