Stackosaurus
Stackosaurus

Reputation: 43

How to Escape a While Controller after 10 Minutes

I've created a While Controller in Apache JMeter that I want to run for 10 minutes or until an exit condition is met. However the following function doesn't work.

${__jexl3( ("${start}" + 600000) > "${__time()}" || "${exit}" )}

I'm new to JMeter. I may be misunderstanding how the JEXL evaluation works.

Upvotes: 0

Views: 559

Answers (1)

Dmitri T
Dmitri T

Reputation: 167992

You need to remove quotation marks around the variables, otherwise __jexl3() function would be comparing Strings instead of Longs

${__jexl3(${start} + 600000 > ${__time(,)},)}

You can use i.e. Dummy Sampler in order to evaluate various parts of the expression and the whole expression. The results can be visualized via View Results Tree listener.

enter image description here

Upvotes: 1

Related Questions