Performance test from scratch-LoadRunner entry (4)

Source: Internet
Author: User

Finally, I have finished watching the Aug event. Today I want to complete the Reading Notes in chapter 5, haha.

4. parameterization

The book has spent a lot of effort to demonstrate this usage, showing the importance of parameterization in the whole script production process. At the beginning of this session, the book used a lot of nonsense to illustrate the meaning of white parameterization and parameterization methods.

In my opinion, the core of parameterization is how to define the attributes of parameters. I have read this part many times. This is because you need to understand the meaning of different scripts in the production process.

Here is what I think should be noted down when creating a script:

1. Generally, we use data files to save our parameters. Generally, LR has no limit on the number of parameters, but only 100 parameters can be displayed in the parameter list. So when you see that the number of parameters displayed in the list is less than the number saved in your file, don't worry. Before I found out, I got nervous for a while.

2. when the parameter update method uses a unique (unique), ensure that the number of parameters you add is greater than or equal to the Loop set in the Controller in the future, otherwise, when the script starts running, LR will show you an error without mercy, which is not very nice.

3. When different parameters need to be synchronized, we can use a benchmark parameter. For other parameters, select the same line as benchmark parameter in the update method. Everyone knows that the parameters above each line in each parameter file must be synchronized. This method is probably used at most when the user name and password are required.

4. Some unusual situations about LR during my script execution. When you directly edit the parameter. dat file and set the number of parameters to 1, you can only viewThe parameter to the first line is a blank box (the probability of occurrence is 30% );When you directly edit the parameter. dat file,Make the number of parameters = 100. In the parameter list, there are only 99 actual parameter values (the probability is 20%). I don't know if these are bugs, but I can see that, which of the following is not recorded?

I finally found out where the problem was.

 

The problem is described in figure 4.

This problem occurs because no blank lines are left behind the last line in the parameter file.

after parameterization, the book enters the stage of script reinforcement. For example, insert checkpoints, multiple actions, and script error handling mechanisms. I just got to know these parts on paper. I will use them later, or you have already used them, and I will pay attention to what I have not mentioned in the book, tell me. Thank you first.

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.