本文介绍了测试片段未执行计时器或采样超时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Sample Timeout和计时器在JMeter中添加测试片段没有任何采样器.

I add in JMeter Test Fragment with Sample Timeout and Timers but without any Samplers.

我在线程组中使用此测试片段添加了一个模块控制器,并且采样器处于相同的层次结构(在HTTP采样器之前和之后).

I add a Module controller using this Test Fragment in Thread Group with Samplers in same hierarchy (before and after, also HTTP samplers).

我希望Timers和Sample Timeout可以在范围内的每个Sample上正常工作,但是没有超时/延迟完成

I expected that the Timers and Sample Timeout will work on every Sample in scope but no timeout/delay is been done,

我还注意到Sampler可以是Module controller的子级,但不会被执行(或定时器).

Also I notice that Sampler can be a child of Module controller but it won't be executed (or Timers).

这似乎是个错误,但是也许我错过了范围规则?

It seems like a bug, but maybe there are scoping rules I missed?

  • 其他User Parameters预处理器正在工作,所以我想知道为什么忽略超时.
  • Other Pre Processor as User Parameters are working so I wonder why timeout is ignored.

推荐答案

您的问题确实是由于作用域规则所致.

Your issue is indeed due to scoping rules.

您的测试片段就像一个控制器,它包含的所有元素都将应用于其作用域.由于此处不包含任何采样器,因此计时器和其他前置/后置处理器均不会运行.

Your Test Fragment is like a Controller, all elements it contains are applied to its scope.Since it doesn't contain any sampler here, neither the timer nor the other pre/post processor run.

请注意,添加此类无用元素的功能将在即将到来的4.0版本中删除:

Note that ability of adding such useless elements will be removed in upcoming 4.0 version:

这篇关于测试片段未执行计时器或采样超时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-26 19:01