如何在 10 分钟后退出 While 控制器

How to Escape a While Controller after 10 Minutes

我在 Apache JMeter 中创建了一个 While 控制器,我想 运行 持续 10 分钟或直到满足退出条件。但是,以下功能不起作用。

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

我是 JMeter 的新手。我可能误解了 JEXL 评估的工作原理。

您需要去掉变量周围的引号,否则__jexl3() function would be comparing Strings instead of Longs

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

您可以使用 Dummy Sampler in order to evaluate various parts of the expression and the whole expression. The results can be visualized via View Results Tree 侦听器。