Jmeter (7)-parameterization

Source: Internet
Author: User

 

The above is my parameterized data pool, which can be in the txt or dat format. This format is the same as loadrunner, And the requirements are not very strict, parameter files can be stored anywhere on the computer.

Let's take a look at what is different from loadrunner parameterization:

1. No column name exists in the first row of the jmeter parameter file.

2. Note the encoding of the parameter file. You can use NotePad to save it as a parameter file to modify the encoding (Encoding Problems in useCSV Data Set ConfigStrict requirements for parameterization)

3. The parameter settings of Jmeter are not excellent by LoadRunner. It depends on the thread settings (only the CSV Data Set Config parameter method is available)

JmeterTwo Parameter Methods-Dependent on function ASSISTANT:

Function assistant can be opened with ctrl-F.

Use Function assistant to find the _ CSVRrad Method

Path of the input parameter file

The CSV file column number starts from 0, the first column 0, the second column 1, the third column 2, and so on .. Some students say it is wrong to start from 1.

Click Generate to automatically generate the required parameterized functions.

Copy the generated parameterized function, open the login request page, and find the parameter field we want to parameterize In the parameter tree on the right. here we will parameterize the user name and password. The first column is the user name, the column number is 0, the second column is password, and the column number is 1. You can modify the parameterized field column number in the function.

Set the number of concurrent threads and start running the script.

By viewing the result tree, we can see that the data in the sent request data is obtained from our parameter pool,Data is parameterized using function assistant.

JmeterTwo Parameter Methods-Dependent on function ASSISTANT:

However, after setting the Set point, the execution sequence of parameterized Data using the jmeter function is disordered. The solution is not to use the csv control in the form of a function: CSV Data Set Config.

The function assistant method has weaker parameterization functions than the CSV control method.

The following is an explanation:

Filename: E: \ biz. dat file name, which is the file directory for storing parameterized data. It can be a relative or absolute path.

File encoding: UTF-8, biz. dat File encoding format, you can use the computer's built-in notebook save as select encoding mode can be

Variable Names (comma-delimited): user, pwd parameter name (for example, if there are several columns of parameters, write several parameter Names here. Each name is separated by a separator, the Delimiter is defined in the "Delimitet" below. To correspond to the "," in the file, "," is also used here to separate each parameter name. Here, the user, pwd, variable names can be referenced: $ {user}, $ {pwd}

Delimitet: defines the delimiter. If a separator is defined here, the parameter is separated by the delimiter defined here in "Variable Names.

Allow quote data: Garbled characters are processed when the option is set to "true ".
Recycle on EOF: Indicates whether to read Data cyclically. Because CSV Data Set Config reads one row at a time and stores the Data into several variables and submits the Data to a thread. If the number of threads exceeds the number of lines recorded in the text, then you can choose to read from scratch again

Open the login page request and set parameterized data in the corresponding parameters.

Jmeter (6)-Association settings

Jmeter (5)-Meeting Point

Jmeter (4)-assertions/checkpoints

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.