运行第一个请求多次,其他请求单线程单次
Run first request multiple times and other request single time in a single thread
我在单线程中有 5 个 HTTP 请求,我想 运行 首先请求多次,然后其他请求仅一次
我不能使用多线程,因为所有请求都相互依赖。
将第一个请求放在 Loop Controller 下,循环计数作为您要重复的次数
JMeter will loop through them a certain number of times, in addition to the loop value you specified for the Thread Group. For example, if you add one HTTP Request to a Loop Controller with a loop count of two, and configure the Thread Group loop count to three, JMeter will send a total of 2 * 3 = 6 HTTP Requests.
选择要多次执行的请求,然后:
右键单击 -> 插入父项 -> 逻辑控制器 -> 循环控制器
取决于您要实现的目标:
把需要运行的request放在Once Only Controller下只执行一次,这样Sampler只会在Thread Group[=16=的第一次迭代时执行]
如果你想要更多的complex/flexible条件 - 将只需要执行一次的请求放在If Controller下,这样你就可以指定你想要的任何条件想。例如,如果您只想在第 5 次迭代期间 运行 采样器,请使用以下条件:
${__jexl3("${__jm__Thread Group__idx}" == "5",)}
这样,If Controller 下的采样器只有在满足条件时才会执行:
我在单线程中有 5 个 HTTP 请求,我想 运行 首先请求多次,然后其他请求仅一次
我不能使用多线程,因为所有请求都相互依赖。
将第一个请求放在 Loop Controller 下,循环计数作为您要重复的次数
JMeter will loop through them a certain number of times, in addition to the loop value you specified for the Thread Group. For example, if you add one HTTP Request to a Loop Controller with a loop count of two, and configure the Thread Group loop count to three, JMeter will send a total of 2 * 3 = 6 HTTP Requests.
选择要多次执行的请求,然后:
右键单击 -> 插入父项 -> 逻辑控制器 -> 循环控制器
取决于您要实现的目标:
把需要运行的request放在Once Only Controller下只执行一次,这样Sampler只会在Thread Group[=16=的第一次迭代时执行]
如果你想要更多的complex/flexible条件 - 将只需要执行一次的请求放在If Controller下,这样你就可以指定你想要的任何条件想。例如,如果您只想在第 5 次迭代期间 运行 采样器,请使用以下条件:
${__jexl3("${__jm__Thread Group__idx}" == "5",)}
这样,If Controller 下的采样器只有在满足条件时才会执行: