jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bvm101 <boban...@yahoo.com>
Subject How to pass a variable as a parameter to random function
Date Tue, 12 Jun 2007 19:47:58 GMT

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
-- 
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.


---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Mime
View raw message