jmeter 不是 运行 脚本的编写顺序
jmeter is not running script in the order it is written
在 jmeter 中,我使用了嵌套循环控制器,以及每个循环内的一些 JSR223 后处理器
脚本的编写顺序如下:
Loop Controller
Loop Controller
http request
Endloop
JSR223 postprocessor
Endloop
我希望脚本首先 运行 http 请求(多次),然后在循环完成后,运行 JSR223 后处理器,然后重复所有这些。
相反,它进入第一个循环控制器,然后 运行 进入 JSR223 后处理器,然后 运行 进入第二个嵌套循环控制器。
为什么?我如何按照从上到下和嵌套的顺序将它运行脚本?
从使用对 scope 中的每个请求执行的后处理器更改为执行一次的采样器
Some elements in the test trees are strictly hierarchical (Listeners, Config Elements, Post-Processors, Pre-Processors, Assertions, Timers), and some are primarily ordered (controllers, samplers).
另一种选择是将其添加到采样器下,它将在采样器之后立即执行
JSR223 后处理器正在执行 在 之后每个 Sampler in its Scope,在你的例子中是在 HTTP 请求采样器的每次迭代之后。
如果你只想 运行 它一次 - 要么将 Flow Control Action 采样器放在 JSR223 后处理器的位置,然后使 JSR223 后处理器成为 子级 Flow Control Action 采样器。
否则,您可以在脚本中的某处使用 JSR223 Sampler instead of the JSR223 PostProcessor, if you don't want the JSR223 Sampler to appear in test results - put SampleResult.setIgnore()
函数。
在 jmeter 中,我使用了嵌套循环控制器,以及每个循环内的一些 JSR223 后处理器
脚本的编写顺序如下:
Loop Controller
Loop Controller
http request
Endloop
JSR223 postprocessor
Endloop
我希望脚本首先 运行 http 请求(多次),然后在循环完成后,运行 JSR223 后处理器,然后重复所有这些。
相反,它进入第一个循环控制器,然后 运行 进入 JSR223 后处理器,然后 运行 进入第二个嵌套循环控制器。
为什么?我如何按照从上到下和嵌套的顺序将它运行脚本?
从使用对 scope 中的每个请求执行的后处理器更改为执行一次的采样器
Some elements in the test trees are strictly hierarchical (Listeners, Config Elements, Post-Processors, Pre-Processors, Assertions, Timers), and some are primarily ordered (controllers, samplers).
另一种选择是将其添加到采样器下,它将在采样器之后立即执行
JSR223 后处理器正在执行 在 之后每个 Sampler in its Scope,在你的例子中是在 HTTP 请求采样器的每次迭代之后。
如果你只想 运行 它一次 - 要么将 Flow Control Action 采样器放在 JSR223 后处理器的位置,然后使 JSR223 后处理器成为 子级 Flow Control Action 采样器。
否则,您可以在脚本中的某处使用 JSR223 Sampler instead of the JSR223 PostProcessor, if you don't want the JSR223 Sampler to appear in test results - put SampleResult.setIgnore()
函数。