简体   繁体   English

如果控制器在JMeter中的While控制器中

[英]If controller in While controller in JMeter

I am using JMeter for load testing. 我正在使用JMeter进行负载测试。 My requirement is to make request till server does not give 200 as status code. 我的要求是发出请求,直到服务器不给200作为状态码。 And if status code is other than 200 then wait for 5 sec and retry again. 如果状态代码不是200,则请等待5秒钟,然后重试。 To wait for 5 sec I have taken constatnt timer. 为了等待5秒,我使用了持续计时器。 My problem is constatnt timer in if controller is not working. 我的问题是,如果控制器不工作,则为持续计时器。 What could be the solution? 可能是什么解决方案? I have attached snapshot of jmeter window. 我附上了jmeter窗口的快照。 在此输入图像描述

我用这个例子结束了BeansShellTimer脚本。

Putting the constant timer as the only child in an if controller makes no sense. 将常量计时器作为if控制器中的唯一子项是没有意义的。 Timers work as pre-processors for samplers in JMeter. 计时器充当JMeter中采样器的预处理器。

So please put your timer as a child of the sampler. 所以请把你的计时器作为采样器的孩子。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM