{"id":425,"date":"2010-01-15T22:53:59","date_gmt":"2010-01-15T12:53:59","guid":{"rendered":"http:\/\/software-testing.com.au\/blog\/?p=425"},"modified":"2011-01-28T11:31:16","modified_gmt":"2011-01-28T01:31:16","slug":"jmeter-annoyances-with-if-controller-missing-before-statement","status":"publish","type":"post","link":"http:\/\/www.software-testing.com.au\/blog\/2010\/01\/15\/jmeter-annoyances-with-if-controller-missing-before-statement\/","title":{"rendered":"JMeter annoyances with If Controller \u2013 missing ; before statement"},"content":{"rendered":"<p>After repeated issues trying to get what I thought would be a simple \u2018If controller\u2019 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.<\/p>\n<p>While the example provided on the JMeter site would have led me to use \u201c${valid_data}\u201d==\u201dY\u201d as the Condition, with the \u2018Interpret Condition as Variable Expression\u2019 field unchecked, doing so was causing a silent failure.<\/p>\n<p>After checking the log files, I could see this error:<\/p>\n<p>\u201cjmeter.control.IfController: missing ; before statement \u201d<\/p>\n<p>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\u2019t 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\u2019d somehow managed to make it work. The solution was to add a semicolon at the end:<\/p>\n<p>\u201c${valid_data}\u201d==\u201dY\u201d;<\/p>\n<p>That was all it took. All good. Hope this helps someone.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>After repeated issues trying to get what I thought would be a simple \u2018If controller\u2019 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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[106,107,36],"tags":[94,141],"class_list":["post-425","post","type-post","status-publish","format-standard","hentry","category-load-testing","category-performance-testing","category-test-tools","tag-jmeter","tag-performance-testing"],"_links":{"self":[{"href":"http:\/\/www.software-testing.com.au\/blog\/wp-json\/wp\/v2\/posts\/425","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.software-testing.com.au\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.software-testing.com.au\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.software-testing.com.au\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.software-testing.com.au\/blog\/wp-json\/wp\/v2\/comments?post=425"}],"version-history":[{"count":6,"href":"http:\/\/www.software-testing.com.au\/blog\/wp-json\/wp\/v2\/posts\/425\/revisions"}],"predecessor-version":[{"id":588,"href":"http:\/\/www.software-testing.com.au\/blog\/wp-json\/wp\/v2\/posts\/425\/revisions\/588"}],"wp:attachment":[{"href":"http:\/\/www.software-testing.com.au\/blog\/wp-json\/wp\/v2\/media?parent=425"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.software-testing.com.au\/blog\/wp-json\/wp\/v2\/categories?post=425"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.software-testing.com.au\/blog\/wp-json\/wp\/v2\/tags?post=425"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}