Regular expression in While Controller Jmeter

流过昼夜 提交于 2019-12-25 18:28:56

问题


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?


回答1:


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.




回答2:


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




回答3:


You can try the following using while controller:

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




回答4:


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"



来源:https://stackoverflow.com/questions/14069529/regular-expression-in-while-controller-jmeter

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!