3--Jmeter中的逻辑控制器

想象一些场景
1、连续发10个相同的请求
2、其中前两个做特殊处理
Logic Controller出场
1、首先必须声明的是: Jmeter中的Controller 和 LoadRunner中的Controller的区别。
2、回到执行顺序。查看Controller的执行顺序

Simple Controller
1、 The Simple Logic Controller lets you organize your Samplers and other Logic Controllers. Unlike other Logic Controllers, this controller provides no functionality beyond that of a storage device.
2、提供一个块的结构和控制。更方便,更清晰。 例子 SimpleComtroller.jmx
3、嵌套其他的Controller
4、适用场景
Loop Controller
1、 简单的说就是提供一个循环
2、查看例子 LoopComtroller1.jmx
LoopComtroller2.jmx
3、适用场景
Once Only Controller
1、 The Once Only Logic Controller tells JMeter to process the controller(s) inside it only once per Thread, and pass over any requests under it during further iterations through the test plan.
2、 例子 OnceOnlyController1.jmx
OnceOnlyController2.jmx
OnceOnlyController3.jmx
3、适用场景
ForEach Controller
1、 The ForEach Controller is used in tandem with User Defined Variables (UDV). It is a variant of a Loop Controller as every sampler or controller that we add is executed one or more times according to the number of times to repeat. 2、 例子 ForEach1.jmx
ForEach2.jmx
3、适用场景
Transaction Controller
1、 The Transaction Controller generates an additional sample which measures the overall time taken to perform the nested test elements. 2、 例子 TransactionController1.jmx
TransactionController2.jmx
3、适用场景
If Controller
1、The If Controller allows the user to control whether the test elements below it (its children) are run or not. 2、 例子 IfController1.jmx
IfController2.jmx
IfController3.jmx
IfController4.jmx
IfController5.jmx
3、适用场景

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值