循环交错控制器 [英] Loop interleave controller

查看:21
本文介绍了循环交错控制器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在另一个控制器(ForEach OR Loop OR any other)中使用交错控制器,以便交错控制器下的每个采样器(即 HTTP 请求)执行一次并且测试退出外部"控制器一次最后一个采样器完成了.

I am trying to use the interleave controller inside another controller (ForEach OR Loop OR any other) such that each of the sampler (which is HTTP request) under Interleave controller is executed once and the test exits the "outer" controller once the last sampler is done.

我的测试计划看起来有点像下图

My test plan looks somewhat like show below

test plan
--Loop controller ( with loop count = num of requests in Interleave Controller)
----Some test elements
----Interleave Controller
--------HTTP requests (count = n, with some differences)
----Some More test elements

测试计划是测试许多 REST 服务的多个测试场景(对请求数据进行一些更改等),因此有些服务可能有 2 个场景,有些可能有 10 个.

The test plan is to test multiple test scenarios of a lot of REST services (having some changes in the request data etc) so some services might have 2 scenarios some might have 10.

因此有没有办法获得交错控制器下的采样器数量?或者对我的测试计划有更好的设计.

Thus is there any way of getting the number of samplers under the interleave controller ? OR a better design to my test plan.

谢谢

推荐答案

看看 interleave 文档,因为它很好地解释了它是如何工作的以及如何从上到下执行每次迭代.如果您只想随机执行一个采样器(每次迭代),您可以使用 随机控制器.

Have a look at the interleave documentation as it explains nicely how it works and how one sampler, going from top to bottom, is executed per iteration. If you want only one sampler executed randomly (per iteration) you can use the random controller.

注意:如果所有子节点都已执行,这些控制器不会自行停止.他们重新开始.如果你想停止,你必须添加不同的逻辑来实现.

Note: Those controllers don't stop by them selves if all children have been executed. They start all over again. If you want to stop you have to add different logic to make that happen.

这篇关于循环交错控制器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆