I've a thread group to run for 100+ users with-in that there is a need to execute a particular http request only once for all the threads. I know the "Once only Controller" but it execute the child samplers once per thread that is why it doesn't meet the requirement here:
As shown in the image: The "once only controller" run the request E & F only once for every thread where as I my requirement to run the sampler request E & F once only for all the threads A, B, C & D. having said that if i run the 100+ thread request E & F should run only 1 time.
Is there any way to achieve this in jmeter??
Problem ScreenShot:
Put your requests E
and F
under the If Controller and use the following condition:
${__BeanShell(ctx.getThreadNum() == 0 && vars.getIteration() == 1)}
Where:
ctx
- shorthand for JMeterContext class instancevars
- shorthand for JMeterVariables class instance