0
votes

I want a jdbc sampler execute only once in a thread group in jmeter.

I tried using a once only controller and a if controller (${__threadNum} == 1) but it doesn't seem to work. The jdbc sampler keeps repeating along with other samplers. what am I missing here?

enter image description here

1

1 Answers

0
votes

Use the following condition (assumes __jexl3() function which has better performance than JavaScript)

${__jexl3(${__threadNum} == 1 && ${__jm__Validate Pin__idx} == 0 ,)}

If you change the name of the Thread Group you will need to change the condition to exactly match the name.

More information: 6 Tips for JMeter If Controller Usage