Bug 65583 - While Controller not getting execute when use more than twice in Test Plan
Summary: While Controller not getting execute when use more than twice in Test Plan
Status: NEEDINFO
Alias: None
Product: JMeter
Classification: Unclassified
Component: Main (show other bugs)
Version: 5.2.1
Hardware: PC All
: P2 blocker (vote)
Target Milestone: JMETER_5.5
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-09-20 04:20 UTC by Madan Singh
Modified: 2021-09-30 11:37 UTC (History)
1 user (show)



Attachments
While Controller not getting execute when use more than twice in Test Plan (98.95 KB, image/jpeg)
2021-09-20 04:20 UTC, Madan Singh
Details

Note You need to log in before you can comment on or make changes to this bug.
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