I expect two possible cases in my application: Search was successful and search was failed. In both cases I have two different sets of HTTP requests, which JMeter should execute. How can I implement if-else block in JMeter scenario? I've tried to use if controller with Regular Expression Extractor, but relying on the results of Debug Sampler, this kind of extractors doesn't attached for the current thread. Hence, one thread can simply override the result of another thread. Is it bug or feature? Are there any workarounds?
My Regular Expression Extractor:
My first If controller:
My second if controller:
Order of execution:
Always fires the first controller and never the second. When the customer search was failed, the page does not contains the word "Daniel" and I expect ${customer_name} with 0 length. Moreover, Debug Sampler returns customer_name with filled value after unsuccessful search. Looks like that other thread overrides it and this extractor is not thread safe.