jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Niraj <niraj.khatm...@gmail.com>
Subject Need Help on grovvy script for OR (||) condition
Date Mon, 06 May 2019 07:18:57 GMT
Hi,

Can someone please help me with a groovy script?

I have added one If Controller and added below condition.

${__groovy(vars.get('testName').contains("test1"),)}

This works fine for me when testName is test1. Requests below IF
controllers gets executed.

But when I want OR(||) or And (&&) Condition in same grovvy script, JMeter


${__groovy(vars.get('testName').contains("test2")||(vars.get('testName').contains("test3"),)}
I am getting below error
org.apache.jmeter.functions.InvalidVariableException: Expected } after
__groovy function call in
${__groovy((vars.get('testName').contains("GetUnderlyingDetails")||(vars.get('testName').contains("G

Kindly help to get groovy script with OR condition.


Thanks in advance!
-Niraj

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message