JMeter - jexl2 和 jexl3 之间的区别

JMeter - Difference between jexl2 and jexl3

什么是 jexl,为什么它在 JMeter 中比 JavaScript 执行得更快? ${__jexl3("${checkResponse}" != "")} 这段代码在 Jmeter 的 while 控制器中运行良好,而 "${checkResponse}" != "" or "${checkResponse}" != "${checkResponse}".

则不然

要找出差异,请参阅 Jexl 3 changes list,例如

Added the range operator (x .. y)

JMeter 允许您通过调用 __jexl2__jexl3 函数来选择任一版本

Jexl 有更多功能可供您使用,例如:

Jexl 还可以创建 类 并对其调用方法:

Systemclass = log.class.forName("java.lang.System");
now = Systemclass.currentTimeMillis();