'Multiple conditions in While controller not work

I need multiple conditions in While controller, but if I have more then one condition every time is infinite loop.

${__javaScript("${type}" != "book",)} && ${__javaScript("${author_surname}" != "Novak",)} && ${__javaScript("${author_name}" != "John",)}


Solution 1:[1]

As per Using the While Controller in JMeter article I think you need to put all the conditions into single __javaScript() function like:

${__javaScript("${type}" != "book" && "${author_surname}" != "Novak" && "${author_name}" != "John",)}

also as per the function documentation:

javaScript is not the best scripting language for performances in JMeter. If your plan requires a high number of threads it is advised to use __jexl3 or __groovy functions.

so it worth considering migrating

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Dmitri T