The scene design of Loadrunner11 's mobile terminal performance test

Source: Internet
Author: User
Tags hp loadrunner

Test step Scene Design (Controller) into the manual scene

Once the script is ready, the scene can be designed and executed, and from the Vugen, see:

Enter after the first for the target scene, choose the second more flexible manual scene, my target number of 200, the third to save the address of the result, it is best to put in a larger disk, other default.

Enter the scene design page after confirmation, or you can enter it separately in "HP LoadRunner"-"Applications"-"Controller". Select the first manual scene, select the script you need to run on the left, click "Add" to add to the scene script, click OK, then set up the virtual user later.

After the successful entry of the scene as follows, the left is the script group, that is, the virtual user needs to run a script, you can set up multiple scripts, the right is the service level agreement, temporarily do not care, the lower left is the scene plan, for setting the scene run time and user loading exit mode, the bottom right is the interactive plan diagram, looks very

Go to target scene

The general manual scene can flexibly design the scene model according to the requirement, the target scene is whether the test performance can achieve the expected goal. The design of the scene is similar, here is the example of a manual scene.

As you can see, the two scenarios are the same, but the schedule configuration is slightly different.

Five goals for the target scenario: number of users (Virtual users), ClickThrough rate (Hits per Second), number of things per second (Transaction per Second), object response time (Transaction Response Time) and the number of pages processed per minute (pages per Minute).

Click "Edit Schedule Goal" at the bottom right to enter the settings screen.

Know how to create a scene, OK, just a moment, let's do some preparatory work.

IP spoofing technology locally set static IP

Because it was a concurrent user test, I learned that in LR, when the scene was running, the vuser on each load generator computer used its computer's fixed IP address, which did not simulate the actual situation of the user using different computers.

Therefore, we have to enable its own IP spoofing feature, it is important to note that IP spoofer to be enabled before connection to the load generator, and each load generator needs to be a fixed IP, do not use dynamic IP (DHCP). Such as:

To set up a static IP process I don't have to say much, a bunch of online, DOS commands, Ipconfig/all can view the current IP, gateway, and DNS servers. Follow the manual modification, otherwise it will break the net. Of course, if you had a net before.

IP Wizard Settings

After setting the static IP, then set the IP spoofer, select "Start"-"So Program"-"HP LoadRunner"-"Tools"-"IP Wizard

"As shown in

The first is to create a new setting, the previously created selection of the second import, the third is to release the IP, after the general test, you need to release the IP you added, otherwise occupy more IP, and sometimes conflict with others.

Click "Next", if the computer has more than one network card, to select the network card for these addresses, and then click "Next", in the popup dialog box set the server's IP address, that is, the requested address in the script.

Note: The server is not set up on the same network segment as the load machine.

Click "Next", such as, then click on the "Add button" in the graph to add IP.

So to the address add interface, A,b,c class address is based on the number of virtual users to choose, C-class address can only accommodate 255 hosts, more than this number to choose the other two types of address.

Note: Class B address range: 172.16.0.0-172.31.255.255; Class A address range: 10.0.0.0-10.255.255.255

From IP is the start Ip,number to add is how much, the gateway does not have to tube, set well, click "OK"

This is the address that was just generated, the wrong one, select click "Remove", and then regenerate.

If the following prompt in the build process, refers to the following address has been used, OK, and then add another address, then the from IP is your last address, the number of missing how many to add.

Finally I generated 200 IPs, click "Done"

The final confirmation page appears, click "OK"

Below on the DOS black window, whistling down, restart the computer, the network protocol to take effect, use the ipconfig command to see if the added success. Such as

Enable IP spoofing

After adding the success, the following steps

One, open Conreoller, click "Scenario"-select "Enable IP spoofer" (IP spoofing is allowed).

Second, then in Conreoller, click on "Tools"-Select "Expert Mode".

Third, finally click on "Tools"-"Options"-"general" in the context of the thread or process settings, this option must match the pattern of the current scene, that is, the use of local virtual IP testing needs to choose the threading method, You need to check the process mode when using a virtual IP test with the load generator. Mine is the local, selected process.

View Vusers IP

How to view these IP, controller's run page, run the scene (run), in Vusers, the Status column right-click to view the VUser log, the first few lines of the popup box will show the current use of IP.

Note: I have to say that I have been doing this for a long time, because the server and client are not on the same network segment and the server IP is entered, but the IP Wizard of LR does not generate a script (BAT file) in the Windows Temp directory, which causes the server routing table not to be updated. Then check the VUser log and no IP is displayed ... Multiple query data and found that Win7 does not support IP spoofing, even if the success of the log display, even if it is a different IP, but the packet capture will find that the request is still the same fixed IP.

Add Load Generators

Speaking of which, I'll mention how to add the load generator (generators) as shown in

General installation Good LoadRunner, will have localhost this load machine, click "Load Generators" after the following

Click "Add" below, enter the name, select the system, click "OK", note: name do not casually input, usually localhost or the load machine IP address; platform refers to the system of the load machine.

After adding the load, test the link and click "Connect", as follows

When successful, the status is ready and I am using IP spoofing locally, such as

When using other load machines remotely, enter the IP of the other load machine and remember to "start"-"So Program"-"HP LoadRunner"-"Advanced Setting"-"LoadRunner agaent" before the remote connection before the other load machine Process " starts the LR agaent agent .

Collection point settings for a scene

The login module needs to test the concurrent user, so I inserted the collection point in the script before, need to set before running the scene, when the user enters the verification code, when all the users arrive at the meeting point, release the user and make the login request, it simulates the situation that the user is logged in simultaneously.

Such as

Click "Scenario"-"Rendezvous ..."

Click "Policy" to set up, the first refers to all users to reach the meeting point is released, the second refers to all running users to reach the collection point is released, the third refers to the number of X users to reach the collection point on the release, the last is to set the waiting time, such as 30 seconds, 30 seconds to reach the specified number of users, Start execution of the scene, in 30 seconds to reach the user specified number, also began to execute the scene, no longer wait. General choice of the second line, click "OK"

When you run the scene, you can turn the collection point on or off in the previous picture, or you can manually click the release button to release the collection point.

Scenario Schdule Configuration Schedule Basic Configuration

Manual scene Schedule configuration, the location is as follows, the scene group on the left can be set according to the needs of their own

Schedule name scene names, 1 scene, 2 sets of scenes (multiple scripts can choose this mode), 3 real environment mode (more flexible, very common) 4 basic mode, the above four buttons temporarily without tube, by default

Schedule target Configuration

Next is the target setting, double-click on the "Initialize" line, go to initialize user settings, generally select the third script to initialize all users before running, click "OK"

Then double-click "Start Vusers" line, go to start user settings, set number of users 200, 10 users per 15 seconds, click "OK"

Then double-click on the "durations" line, enter the run time setting, the single trading scene generally run for 10-15 minutes, click "OK"

Note: When the scene is running, the run time is set, and the number of iterations of the script is ignored, and the simple point is that the script repeats itself until the time has elapsed.
Finally double-click on the "Stop VUser" line, go to the user stop setting, set the same as Start vusers, click "OK"

The above running scenario is probably set up and can be changed according to your own needs.

Introduction to the scene map

The following is said to the right of the scene map, the meaning of the vertical axis is not to say, the left slash on behalf of the user to start running, the middle is the user is running, the right is of course the user to quit, the above several buttons on their own research.

Note: Use the pen that button can drag the settings yourself, + number-the button is zoom out, very fun, when the scene is running, the page's user graph will also change dynamically.

Scene Run page

Set up, start running, click the "Run" button and go to the run Scene page.

Click on the left side of the user status table, status: Off (down), suspend (Pending), Initialize (Init), ready, running (run), meeting Point (Rendezvous), completed and passed (pass), completed but failed (Failed) , errors (Error), Step-out (gradualexiting), exit (Exiting), Stop (Stopped).

On the right, you can view transactions, user passes, or failure information.

The middle is a variety of scene monitoring charts, double click to toggle, click to enlarge.

The bottom is the data for each parameter of the chart to see the maximum, minimum, and average values.

Windows Resource Monitor settings

By default, Windows Monitor has no data and needs to be added by ourselves.

Right-click Windows Resource Map-"addmeasurements"-tap "Add"-Enter name-click "OK"

Platform select the corresponding load machine system. (Note: If you need to monitor other load machines or servers, name input corresponds to IP, and when monitoring local, enter localhost.) )

is to add the machine after the settings, the following resource metrics, you can set your own, click on "OK"

After a while, below is the runtime's Windows resource metrics, which are used to assist in analyzing data and performance bottlenecks, similar to monitoring server resources, but the Linux class generally uses third-party monitoring tools.

Run scene start Scenario

All settings are basically done here, click "Startscenario" and start run.

When you are waiting patiently, you can also view the various graphs at runtime, which can be useful to view the log of individual users (show user log) in the VUser button, provided that the extended logging feature is turned on in runtimesetting.

Add user

In the load process if the system pressure is found to be relatively small, you can increase the number of users, click "Vusers"-"Add vusers"-Enter the number of Add-Confirm script-click "OK".

See note: The newly added user is in the "down" state and needs to click the "Run" button in the VUser diagram to allow the user to run.

The results of the scene run are automatically saved, and when you exit, pay attention to the storage location so that the results are not overwritten the next time you run.

The scene design of Loadrunner11 's mobile terminal performance test

Related Article

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.