LoadRunner Load Test Instance

Source: Internet
Author: User

Recall the first time to do performance testing, filled with emotion, so write this article, from: Set up virtual users, set up the scene and analysis of the results of the operation of three aspects of the elaboration

Hardware Environment : Hard disk 1tg,cpu 3.40GHz, memory 4G

Software Environment : ie9.0,weblogic12c, Orace 12

network environment : 100M Bandwidth

Test Tool : LR11

First, the load generator machine must use a fixed IP and cannot use dynamic IP to determine the IP address that is not conflicting in the network.

1, Start-Program-loadrunner-tools-ip Wizard.

Note: Add new IP to select the first item; Use the saved file to increase IP select the second item; release the IP selection that has already been set to the third item.

Click "Next", here is the IP address of the input Web server, do not enter, direct point ' next '. Description: Use the Remove button to delete the selected virtual IP.

2, click the Add button,

Note: the option "Check if a new IP is already present" does not work, and is automatically added to the virtual IP list based on the first value and quantity of the IP entered, for example: 192.168.1.111, the increased virtual IP is: 192.168.1.111, 192.168.67.112, 192.168.1.113, 192.168.1.114. Click the OK button and click the "Finish" button.

You need to restart your computer now.

(After restarting the computer, the virtual IP is set to take effect, at which point the ping will be able to ping, and the local IP is changed to the first virtual IP address.) The method of confirming that the virtual IP is in effect: Enter CMD in the run, input ipconfig/all in the command window, and then you can see all the IPs that are in effect. )

Using virtual IP (example of a manual scenario)

In the controller, select Scenario-enable IP spoofer, which allows IP spoofing to be used. Press the Generators button to set up the virtual user generator, add the virtual IP address, and connect. The virtual user builder that is connected successfully is displayed in the toolbar. Then design the scheme and run the program.

With the virtual IP test complete, open the IP Wizard, release all virtual IPs, and restart the computer.

Scenario Requirements :

1.5s per page Opening time

2, add 5 users per 10s, and then reduce the 5 users per 10s (actual test can be set according to actual performance requirements)

3. Duration is 5 minutes

4. The number of iterations per user is 5 times, (in this think time do not set)

Scene settings

1. Start-Program-loadrunner

2, directly select the second run load test, where we use the default first, the first is a manual scene, (the second is target-oriented scene), add the recorded script, click Add.

3. Now we run the time setting.

A, in the Open dialog box, select the first, run logic, enter the number of iterations we want to set here, here we set to 2.

b, below we choose the setting of the step (pacing), where we choose to control the time between iterations through this node. You can specify this time as a random time. This will accurately simulate the actual time set that the user waits between actions, but at random intervals, you don't see the actual user waiting for exactly 5 seconds between repeated actions. (That is, choose a third).

C, the log setting is now set, and the log setting indicates the level of detail to be logged when the test is run. During development, for debugging purposes, you can choose to enable a level of logging, but you can only enable or disable error logging after the validation script is working correctly.

D, now think time setting (think times), think time has 2 kinds, one is to ignore think time, one is to replay think time. Because in reality it is impossible to think time, if not set the thinking time, the script will pass quickly, so we can set the percentage of think time, or select, to limit our thinking time, where we set the think time to 10s.

E, click OK to close the run time setting.

4, change the group name and vuser number. Double-click the script in the scene card. The group information (Add Group) dialog box opens. In the Group Name box, enter a name, such as Xzchinamobile _agent. In the number of VUser box, enter 10. This is the number of vuser that will run in the localhost load generator.

5, now to the scene design interface, on the interface we can see the current selection of the script and the location of the save. Now we click to edit the scene.

6, the plan name by ourselves to revise, certainly also may not make the modification. On the scene Edit Schedule page, select Schedule by scene, and then set separately in the following tabs, as required by the scene. However, the following should be ticked, as the initialization represents the VUser and load generators for the run of the load test. Pre-pressurization of VUser can reduce CPU consumption and help provide more realistic results. As for the duration this piece has been bothering me for a while, then find the information to figure out, if the duration is set, the test will run the number of iterations that must be implemented in that duration, regardless of the number of iterations set in the run-time settings of the test. And it's a long time to run after the pressure is done.

7, now we set the virtual user pressurization process, select the first means that all virtual users are loaded at the same time. We choose the second one here, regular start vuser allows you to check the VUser load over time on the site and can help you determine the exact point in time when the system response time slows down. Finally, set up the virtual user as per the above requirements.

8. After setting up the scene, click OK to complete the scene design. Then on the interface, came to run the main interface. You can also directly click on the interface to run directly.

9, now wait for the result of the operation. You can also click on the run screen to view the user's running situation.

Results analysis

The average response time gradient contrast chart, transaction distribution comparison chart and resource monitoring diagram are analyzed.

Summarize

through a period of learning to find, combined with the user's Manual of LR, as well as on the Internet to find more than n information, more watching learning video, and then more hands-on operation. Slowly LR Some of the steps will do, the so-called practice is this thing, as for the analysis of the results of this piece of things involved in a lot, this depends on the accumulation of long-term experience and learning. Insist on doing more than learning to ask, it is a lot of harvest. Come on!

LoadRunner Load Test Instance

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.