After repeated issues trying to get what I thought would be a simple ‘If controller’ working in JMeter, it looks like my issue is to do with the poor examples on the JMeter site. Or else something is making my version and or/installation behave differently.
While the example provided on the JMeter site would have led me to use “${valid_data}”==”Y” as the Condition, with the ‘Interpret Condition as Variable Expression’ field unchecked, doing so was causing a silent failure.
After checking the log files, I could see this error:
“jmeter.control.IfController: missing ; before statement ”
After following some diagnostic advice that failed to work (the log function just seemed to repeatedly spit out my condition as a string, not evaluate it), and randomly experimenting with combinations, I still hadn’t managed to make it work as the log function was also seemingly not passing back the return value. So I removed it and then discovered that I’d somehow managed to make it work. The solution was to add a semicolon at the end:
“${valid_data}”==”Y”;
That was all it took. All good. Hope this helps someone.