Jmeter component: Random CSV Data Set Config (random read file data)

1. Jmeter component: Random CSV Data Set Config (randomly read file data)

Function: This component can randomly read the data of each row in the CSV file

2. Download the plugin: (jmeter-plugins-random-csv-data-set-xx.jar), put it in the lib/ext directory, and restart jmeter

You can also install the plugin in the Jmeter interface option -plugins Manager, provided that you download the installation manager plugin first.
insert image description here
3. Create a script and add configuration components: bzm - Random CSV Data Set Config
insert image description here
parameter description:

Filename (file name): the path of the file, just select the absolute path of the file directly, or write a relative path.

File encoding: read the encoding of the file, the default is UTF-8.

Delimiter: default comma, in txt file, you can use comma to separate two columns.

Variable name: Refer to the data in the csv configuration file and specify the variable name, which means to read out the csv data and put it in the variable, which can be referenced by other requests.

Random order: This is the key point of this plugin. If selected, the data in the csv will be read randomly. If not selected, the data in the csv will be read sequentially.

Circulate again when encountering the end of the file: After the data in the csv is checked, it will continue to loop, which is generally selected.

The first line is the csv title: If the first line in the csv file is a field, then the data in the first line will not be read if checked.

Independent list for each thread: each thread reads the config file by itself, when using random order (item 5), each thread will run its own random sequence, not all threads go through the same variable order.

Test reading csv file: Before using it, you can test reading the value of csv to see if it is correct.

Note :

(1) Random CSV Data Set Config (randomly read file data), is to randomly read the data of the file line, that is, if there are multiple variables in a CSV file, multiple variables are randomly read in one cycle For the data in the same row, if different variables want to randomly read data in different rows in a loop, you need to put these variables in different CSV files to read separately.

(2) The variables in the CSV configuration element are always read from the first column of the CSV file, the first variable reads the data in the first column, and the second variable reads the data in the second column...

Guess you like

Origin blog.csdn.net/baidu_24752135/article/details/129955013