jmeterjexl

JMeter - Difference between jexl2 and jexl3


What is jexl and why is it faster performing than JavaScript in JMeter? ${__jexl3("${checkResponse}" != "")} this code just runs fine in a while controller of Jmeter while the same is not true with "${checkResponse}" != "" or "${checkResponse}" != "\${checkResponse}".


Solution

  • To find the differences, see Jexl 3 changes list, e.g.

    Added the range operator (x .. y)

    JMeter allow you to choose either version by calling __jexl2 or __jexl3 functions

    Jexl has more features you can use, for example:

    Jexl can also create classes and call methods on them:

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