Bug 65583

Summary: While Controller not getting execute when use more than twice in Test Plan
Product: JMeter - Now in Github Reporter: Madan Singh <solanki.madan89>
Component: MainAssignee: JMeter issues mailing list <issues>
Status: NEEDINFO ---    
Severity: blocker CC: orimarko
Priority: P2    
Version: 5.2.1   
Target Milestone: JMETER_5.5   
Hardware: PC   
OS: All   
Attachments: While Controller not getting execute when use more than twice in Test Plan

Description Madan Singh 2021-09-20 04:20:08 UTC
Created attachment 38038 [details]
While Controller not getting execute when use more than twice in Test Plan

Test Objective:Loop http sampler unless response contains a specified string "Success"

Problem Description:Using While controller and regular expression extractor to implement the test object but observed I can only use this logic only twice in my test plan.

When I use while controller with same logic 3rd time(for 3rd different sampler), it do not execute sampler even the condition is true and as a result my scripting is blocked, I cannot execute my test and really feeling low that JMeter doesn't support such simple functionality.

I am a JMeter user from last 10 yrs.

Please help here for immediate resolution.I have attached screenshot for the while controller block I am using.

While controller condition used is ${__javascript("${status}".indexOf("SUCCESS") == -1,)}
Comment 1 Felix Schumacher 2021-09-20 14:45:37 UTC
Can you provide a minimal test plan, that exhibits this behaviour?
Comment 2 orimarko 2021-09-30 11:37:22 UTC
You can use ${__groovy(vars.get("status").indexOf("SUCCESS") == -1)} to get the results you want. 

See also https://jmeter.apache.org/usermanual/best-practices.html#jsr223
Comment 3 The ASF infrastructure team 2022-09-24 20:38:22 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/5578