__csvread use of common functions of jmeter-

Source: Internet
Author: User

Refer to: http://www.cnblogs.com/liu-ke/p/4324157.html

Some parameters in the test are fixed range of values, or in pairs appear (such as login account number and password), a large number of users at the same time log on the site as an example:

1. Create a new CSV or TXT file-logins.txt

The first column is username, the second column corresponds to the password, and the middle is separated by commas, such as

Username1,password1

Username2,password2

Username3,password3

Username4,password4

Username5,password5

2. The parameters in the HTTP request call the file directly:

Click Options, Function Assistant dialog box, select __csvread

When you click the Generate button, a function is generated:

CSV file to get values from | *alias refers to the first parameter within () of ${__csvread (,)} that invokes the address of a file logins.txt

CSV file Column number | Next| *alias refers to the second parameter within () in ${__csvread (,)}, calling the parameters of the first column in the file Logins.txt, noting that the number of columns is 0, second column 1, and so on ...

3. parameterization of username and password on HTTP requests

The account value is ${__csvread (d:\jmeter\logins.txt,0)},

The value of the password is replaced with ${__csvread (d:\jmeter\logins.txt,1)}

4. Start the HTTP request for JMeter and view the result tree to see that the parameters of the call are the values in Logins.txt

__csvread use of common functions of jmeter-

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.