一、添加While Controllerjava
二、添加请求函数
三、添加断言,在断言不符合预期的时候加上代码:vars.put("status","pending"); 在断言符合预期的时候加上代码: vars.put("status","active");.net
在最后加上 vars.put("waitTimes","${__counter(FALSE,Vcount)}"); 用来统计循环次数blog
${__counter(FALSE,Vcount)} 为jmeter内置的自增函数ip
四、While Controller的判断条件为${__javaScript(("${status}"!="active")&&("${waitTimes}"<"5"))} 若是status不是active 而且重试次数小于5次的时候,则进行循环文档
注意:get
此时CSV文档的设置为it
部分参考:https://blog.csdn.net/wxmvp009/article/details/88715535mvp