LR and some jmeter also have "parameterization"

Source: Internet
Author: User

After several days of preparation, I always wanted to write something about jmeter, which is a sort of learning. :)

Well, I have always felt that my comprehension ability is not strong, and I don't understand what others write for a long time. Okay! A common dummies (a large number of + parameter descriptions.

 

Parameterization: For a simple understanding, we have recorded a script that contains logon operations. You need to enter the user name and password. If the system does not allow simultaneous logon with the same user name and password, alternatively, you can simulate multiple users to log on to the system.

In this case, You Need To parameterize the user name and password so that each virtual user can use a different user name and password for access.

Prerequisites:

Assume that we have recorded a script (you can use the Badboy tool to record it), open it in jmeter, and find the page with the user name and password. As follows:

1.

We need "parameterized" data. Here I use NotePad to write five user names and passwords and save them as files in. dat format.

I put this file under my (D: \ test. dat) path. For how to obtain hundreds of thousands of user names and passwords, you must first create the data in the database, export and save the data.

 

2.

Well, we need to write a function to call the test. dat file. How can this problem be solved,

Click "options" ----> function Assistant dialog box on the menu bar.

 

3.

Copy the function we wrote to the user name and password location on the "login" page.

Now our parameterized settings are complete. During the script, the test. dat file under drive D will be called. The first column is the user and the second column is the password.

Note that the username and password are one-to-one, separated by commas.

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.