和IF控制器 - Jmeter(while and IF controller- Jmeter)

我有一个具有条件的While控制器

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

这工作完美。

现在我想添加另一个条件

${__javaScript("${Temp}"!="No Exceptions found")}

循环必须在上述条件之一中退出。

为此,我添加了一个“If Controller”作为While Controller的子项并给出了这个条件( ${__javaScript("${Temp}"!="No Exceptions found")} )在If Controller中但没有得到如何退出循环。

如果发现“没有发现异常”,如果它没有首先找到“已下载”,该如何退出该循环?

此外Jmeter在评估If Condition时在.log文件中生成错误,我做错了什么?

I have a While controller with condition

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

which works perfect.

Now I want to add another condition

${__javaScript("${Temp}"!="No Exceptions found")}

loop must quit in one of the above conditions.

For this I added an "If Controller" as a child of While Controller and give this condition( ${__javaScript("${Temp}"!="No Exceptions found")} ) in If Controller but did not get how to quit the loop.

What to do to quit this loop in case it finds "No Exceptions found" if it did not find "Downloaded" first?

Moreover Jmeter is generating error in .log file on evaluating If Condition, what did I do wrong?

最满意答案

您不需要在控制器内部放置If Controller。 您可以在While Controller中使用此条件:

${__javaScript("${DONE}"!="Downloaded" && "${Temp}"!="No Exceptions found")}

You don't need to put If Controller inside While Controller. You can use this condition in While Controller:

${__javaScript("${DONE}"!="Downloaded" && "${Temp}"!="No Exceptions found")}和IF控制器 - Jmeter(while and IF controller- Jmeter)

我有一个具有条件的While控制器

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

这工作完美。

现在我想添加另一个条件

${__javaScript("${Temp}"!="No Exceptions found")}

循环必须在上述条件之一中退出。

为此,我添加了一个“If Controller”作为While Controller的子项并给出了这个条件( ${__javaScript("${Temp}"!="No Exceptions found")} )在If Controller中但没有得到如何退出循环。

如果发现“没有发现异常”,如果它没有首先找到“已下载”,该如何退出该循环?

此外Jmeter在评估If Condition时在.log文件中生成错误,我做错了什么?

I have a While controller with condition

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

which works perfect.

Now I want to add another condition

${__javaScript("${Temp}"!="No Exceptions found")}

loop must quit in one of the above conditions.

For this I added an "If Controller" as a child of While Controller and give this condition( ${__javaScript("${Temp}"!="No Exceptions found")} ) in If Controller but did not get how to quit the loop.

What to do to quit this loop in case it finds "No Exceptions found" if it did not find "Downloaded" first?

Moreover Jmeter is generating error in .log file on evaluating If Condition, what did I do wrong?

最满意答案

您不需要在控制器内部放置If Controller。 您可以在While Controller中使用此条件:

${__javaScript("${DONE}"!="Downloaded" && "${Temp}"!="No Exceptions found")}

You don't need to put If Controller inside While Controller. You can use this condition in While Controller:

${__javaScript("${DONE}"!="Downloaded" && "${Temp}"!="No Exceptions found")}