Performance test from scratch-LoadRunner entry (2)

Source: Internet
Author: User

After a great deal of hard work, I finally finished reading the fifth chapter of this book. I was deeply touched by the fact that I had to learn about this in the book. This is because I read and practice it.

Recently, I have completed a script to implement the whole process from registering personal data, opening an account for a purchased product, and making a payment. In fact, this script is not for any performance test, but I learned a lot to solve the problem during the script creation process.

1. What kind of script should I upload?

First, I chose the web (HTTP/html) protocol.

When I started recording the entire script, I didn't have any plans for the script. Just record it. Therefore, the login-> Create Customer-> Customer Account-> payment-> exit system are all put in the same action of a script. Later, I put the login and exit systems in vuser_ini and vuser_end; finally, I put different functional points in different actions. The advantage of this separation is that we finally see the statistics on the action in the controller, so that we can clearly see which action is wrong and that action is running the slowest.

The above process makes me understand that no matter what script you need to plan. A planned script can help you debug the script and analyze the results more efficiently.

Speaking of the planning script, I have the following two examples:

A. Put login and logout In the INI and end actions (it may be nonsense for everyone)

B. differentiate actions based on function points. The advantage of this distinction is that the purpose of the script can be seen at a glance, and the functions that need to be completed can be achieved. The second is that when you streamline the script, clearly know which feature you are modifying. This is especially useful when you are recording a URL-Based Script. Finally, therefore, you can analyze the results in the controller.

C. Write down the comments you need in the appropriate place or place during the recording process. This is very important!

2. Which of the following is the base recording of your script?

In vu, LR provides two options: HTML-based and URL-based.

Generally, recording scripts use HTML-based scripts by default, because HTML-based scripts do not separately generate scripts for multiple requests on the same page, this looks concise.

The URL-Based Script, even a request for an image and a JS file will be separately written into a URL request and displayed in the script. This makes the script very complex. For example, a simple operation in the recording login script requires 64 URL requests.

Note: When you want to use the web_reg_save_param function, it is best to use URL-based to record the script.

<To be continued>

Today is the first day of the Year of the Ox. Wish you a happy New Year!

 

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.