首页 > 解决方案 > Jmeter - 在线程内连续而不是同时运行请求

问题描述

如何使用 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

我已经意识到我正在使用一种非常糟糕的方法,我该如何实现呢?这就是我所做的:

在此处输入图像描述

标签: jmeterjmeter-5.0jmeter-4.0

解决方案


建议是使用 ONE 线程配置 TG,并使用循环(在 TG 内)连续执行请求,无论您需要什么请求。


推荐阅读