Shing, Bean shell preprocessor is executed for each sampler call. If you want to have the same value throughout the loop use a bean shell sampler instead. Note, this may produce extra samples into your reporting so in that case use a simple controller below the bean shell sampler and put your listener inside the scope of the simple controller with the samplers.
John Sent from my iPad > On Feb 8, 2014, at 3:46 PM, Shing Hing Man <[email protected]> wrote: > > Hi, > I am using JMeter 2.9. > I have a test plan : > ThreadGroup (no of threads 2, loop count =1) > Simple controller > BeanShell PrePocessor : vars.put("myId", "${__UUID}") > hashHttpRequest > dataHttpRequest > In both hashHttpRequest, dataHttpRequest sampler, I want to set a http > get parameter impId=${myId} . > In other words, in each iteration each thread sends a hashHttpRequest, > dataHttpRequest with a common impld value. > But from "View Result Tree", the value of impId in hashHttpRequest is > different from the one in dataHttpRequest. > Eg : > http://localhost:8081/test/hash?imp_id=7a0509dc-b362-4fc0-8229-a8c692d16dd9 > http://localhost:8081/test/data?imp_id=a85374d8-7a46-4eda-b1c4-44fbf4081db1&name0=foo0 > > > May I know how to get imp_id in both http request to be the same ? > Thanks in advance for any assistance ! > Shing --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
