Jmeter - 运行 线程内连续请求而不是同时请求

Jmeter - Run Requests inside the thread consecutively and not at the same time

如何运行线程内的请求连续而不是同时使用Jmeter(一个接一个)。我想一次实现以下一个。

Thread 1 - Create Product

Create Product
Create Product
Create Product
Create Product
Create Product
Create Product
Create Product
Create Product
Create Product
Create Product

Thread 2 - Get Product by Id

Get Product By Id
Get Product By Id
Get Product By Id
Get Product By Id
Get Product By Id
Get Product By Id
Get Product By Id
Get Product By Id
Get Product By Id
Get Product By Id

Thread 3 - Get All Products

Get Products
Get Products
Get Products
Get Products
Get Products
Get Products
Get Products
Get Products
Get Products
Get Products

我意识到我使用了一个非常糟糕的方法我怎样才能做到这一点?这就是我所做的:

建议使用一个线程配置一个 TG,并使用一个循环(在 TG 内)连续执行您需要的任何请求。

默认情况下,每个 JMeter 线程(虚拟用户)运行s Samplers 连续(颠倒),因此您实际上不需要做任何事情来实现所需的行为。

如果您希望第 2 个线程组在第一个线程组之后 运行,第 2 个线程组之后的第 3 个线程组,等等,只需勾选 Test Plan 级别上的 Run Thread Groups consecutively 框:

您还可以考虑 parameterizing your test plan using i.e. CSV Data Set Config,这样您就不必复制和粘贴请求,而是为每个虚拟 user/iteration

提供来自外部来源的不同值