jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Flik Shen <>
Subject Need help for scripting
Date Fri, 30 Jul 2010 09:36:39 GMT

I want to generate a random id and validate its existing in DB.
I have tried using below components but failed.
Please give me some suggestions.

 1.  BeanShell Sampler, add variable with value 1 into "vars" map by following statement.

vars.put("LoopCountNum", "1");

 1.  While Controller with following condition.

${__javaScript(${ LoopCountNum} < 2)}

 1.  JDBC Sampler with following "Select Statement" and output variable "DuplicateAmount".

SELECT COUNT('X') AS DuplicateAmount FROM table_user WHERE user_id = XXX

 1.  BeanShell Sampler update "LoopCountNum" according to previous return "DuplicateAmount".

if ("0".equals(vars.get("DuplicateAmount"))) vars.put("LoopCountNum", "2");
Item #3 and #4 are children of item #2.
This test plan is executed endlessly.

Please help me to identify the root cause.
Any scripting references or guideline preferred are also welcome.

Thanks and best regards,

BTW the version of Jmeter is 2.3.4

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message