问题
I add in JMeter Test Fragment with Sample Timeout and Timers but without any Samplers.
I add a Module controller using this Test Fragment in Thread Group with Samplers in same hierarchy (before and after, also HTTP samplers).
I expected that the Timers and Sample Timeout will work on every Sample in scope but no timeout/delay is been done,
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?
- Other Pre Processor as
User Parametersare working so I wonder why timeout is ignored.
回答1:
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.
Note that ability of adding such useless elements will be removed in upcoming 4.0 version:
- https://bz.apache.org/bugzilla/show_bug.cgi?id=61965
来源:https://stackoverflow.com/questions/48078118/test-fragment-not-executing-timers-or-sample-timeout