Regular expression in While Controller Jmeter

2019-09-20 08:49发布

I am using While Controller with Condition:

${_javaScript("${DONE}" ! = "Resolved and Downloaded";)}

where initially DONE="Not Assigned yet".

After few iterations DONE changes and has value Resolved and Downloaded (which I check in Debug Sampler) but loop continues and doesn't quit.

What did I do wrong,What should I do to make it work?

4条回答
女痞
2楼-- · 2019-09-20 09:13

You may use if controller.Keeping the if controller as a child of runtime controller.Specify max time in runtime controller.

Under If controller specify the following: "${DONE}" !="Resolved and Downloaded"

查看更多
家丑人穷心不美
3楼-- · 2019-09-20 09:20

${__javaScript("${DONE}"!="Resolved and Downloaded")}

查看更多
走好不送
4楼-- · 2019-09-20 09:21

You can try the following using while controller:

${__javaScript(${DONE} !="Resolved and Downloaded")}

查看更多
欢心
5楼-- · 2019-09-20 09:25

Check syntax of your condition expression first: should be double __ before function name and , instead of ; after condition in function's params list:

${__javaScript("${DONE}"!="Resolved and Downloaded",)}

This can break your test case.
As well you can look into jmeter.log for possible issue details.

查看更多
登录 后发表回答