我想按 jmeter.What 中的顺序从 csv 中获取数据应该完成吗?
i want to fetch the data from csv in sequential order in jmeter.What should be done?
在 jmeter 中,我必须使用 csv 数据配置从 csv 读取数据sequentially.could任何人请帮助我如何做到这一点。
如果您使用一个线程,那么它是顺序的,但是对于多个线程,每个线程将获取不同的数据行。检查以下信息:-
By default, the file is only opened once, and each thread will use a
different line from the file. However the order in which lines are
passed to threads depends on the order in which they execute, which
may vary between iterations. Lines are read at the start of each test
iteration. The file name and mode are resolved in the first iteration.
如果您需要每个线程都运行具有相同的数据集并按顺序排列,则将共享模式更改为当前线程。
如果您希望所有请求都遵循特定顺序并按顺序获取数据,请使用 critical section controller。
The Critical Section Controller ensures that its children elements
(samplers/controllers, etc.) will be executed by only one thread as a
named lock will be taken before executing children of controller.
但在所有情况下,下一行将在特定线程的下一次迭代中选取。
对于多线程,将 csv 拆分等于线程数,并在 csv 数据配置中连同文件名附加线程 num 函数作为 ${__threadNum} 和 post 一旦你执行您的 运行,线程将单独选择文件。
在 jmeter 中,我必须使用 csv 数据配置从 csv 读取数据sequentially.could任何人请帮助我如何做到这一点。
如果您使用一个线程,那么它是顺序的,但是对于多个线程,每个线程将获取不同的数据行。检查以下信息:-
By default, the file is only opened once, and each thread will use a different line from the file. However the order in which lines are passed to threads depends on the order in which they execute, which may vary between iterations. Lines are read at the start of each test iteration. The file name and mode are resolved in the first iteration.
如果您需要每个线程都运行具有相同的数据集并按顺序排列,则将共享模式更改为当前线程。
如果您希望所有请求都遵循特定顺序并按顺序获取数据,请使用 critical section controller。
The Critical Section Controller ensures that its children elements (samplers/controllers, etc.) will be executed by only one thread as a named lock will be taken before executing children of controller.
但在所有情况下,下一行将在特定线程的下一次迭代中选取。
对于多线程,将 csv 拆分等于线程数,并在 csv 数据配置中连同文件名附加线程 num 函数作为 ${__threadNum} 和 post 一旦你执行您的 运行,线程将单独选择文件。