Siege Lion Beginner uses LOADRUNNER11 to do performance testing
The first step is to open virtual User Generator. Before you create the script, select the record optoins in tools to remove the option tick:
Click on the script and create the script, note the protocol to choose web/http/html the.
Then, in the pop-up recording window, fill in the information you want to record. Note turn off the security butler or other anti-virus software before recording .
1.Program to record is to choose the browser you want to use, the default will be ie, but if ie A high version of the recording will occur when there is a pop-up not browser error so that normal recording is not possible. If you do not have IE9 or the following browser, you need to choose Firefox. LR11 only support to IE9. I am here is an exe of Firefox .
The 2.URL address is the one you need to record.
3. note that the three drop-down options for the Record into Action ,init and end can only be iterated once , and Action You can iterate many times, and if you need to record an iteration of an action, you can't use Init and the End .
Then there will be a recording box, and it will be automatically recorded. The following interface will appear:
During recording, you manipulate what you want to record, andLR translates the actions we have made ( that is, scripts ). When the recording is complete (i.e. when events no longer jumps), click the Stop button as shown.
Then you can see some of the recording log information and click it to see the script information for the successful recording.
This is because the action selection is selected at the time of recording , so its corresponding script will appear in action. If you chose Vuser_initat that time, the recorded script will be displayedwhen you click vuser_init , but that cannot be iterated.
At this point, we have successfully recorded the script.
The second step, script playback. Its role is to detect whether the script we have recorded is correct. If this is wrong, we need to correct the recorded script until the script playback is passed smoothly. When we click the button like the play button, we can play back the script. or click Verify Replay on the left and click on the Start Replay on the right to achieve the same effect.
Of course, the right side is about the script playback of some introduction, you can understand.
Then there will be a small pop-up window, which will take a little time to do this replay, we click Yes to be good. Later, if successful, you will see:
That is, we have no errors detected. Well, that means we have a successful script replay and no errors.
In the third step, we need to go to the Controller to do the corresponding stress test. The test is actually divided into two scenarios, the first is the manual scene , the second is the target scene . As the name implies, the manual scene is you manually set the scene you want, such as I want to see every second a user to visit, duration of 1min, you want to see if the server can withstand. The target scenario is that you set a goal, let the target scene run, and finally LR will tell you whether the target scene is reached, which gives you a result. The manual scenario will not tell you the result, and you will need to do the appropriate analysis yourself.
In Virtual User Generator , click the Tool in the Create Controller Scenario, Of course, here is the target scenario, let's talk about the target scene.
Note that the Goal oriented Scenariois chosen here. Different from the Manual Scenario to be written below .
It then opens the Controller 's interface, which operates as follows:
First go in, you're in a tab in Design , if you have tab . First , the load Generator load generator is changed to localhost, then you are using this machine. Then click the Edit Scenario Goal button to set the corresponding target in the popup edit box.
1.Goal Type You can choose the number of hits per second or the amount of swallowing.
2.Reach Goal is the goal of writing what you are prepared for, or expected to achieve.
3. The third means the number of virtual users to access.
4. other settings, how much time to run after completion, etc. can also be set.
Next, switch to run tab and Click the Start Scenario button to start the scene.
Click, will pop up a box to let you choose to save the file, this is the result file, you have a good name after the save, this file later you want to do in the analysis of the chart to do a combination of analyses will need to use this saved results file.
The left area also can be drag the corresponding chart option to the right to display the view. In the target scenario, if you pass a prompt, you are given the appropriate information. If you do not pass, you will also be prompted, such as:
Here, how to run a target scenario to this end.
The target scene is clear. So how do you run a manual scene? , in fact, is very simple, when we come from vuser to choose the manual scene before the RadioButton is good.
Then it will be in the Controller 's Design tab interface:
Double click on the left side of the gloable Schedule area of the four configuration area will pop up the corresponding content let us do the settings. When set, the lower right corner of the figure will follow our settings to make corresponding changes.
Say a little bit about the meaning of a few of them:
1. set up the virtual user to start.
The virtual users here 10000 is from the vuser side of the set up, here can be modified accordingly. If the maximum vuser to be cracked is 10000 , then it can not be greater than 10000 . The first option below is to run as many users at the same time, and the second is to choose how many users to add to each interval.
2.Duration, the first option is persistent until completed, and the second is the duration of the last one.
3 subside and increase almost, entries.
is still set up, go back to the interface of the run tab , click Start Scenario, start running the scene, Then we can see the results of the corresponding analysis. Remember to save the file and remember the path before running, so It is convenient to find it if you want to analyze it with analysis.
For example, if it is to see how much traffic a server can withstand, it can be based on its per-second clicks and some of its monitoring memory, or io together to determine where the bottleneck, such as when running IO fast 100 %, and many others, you can optimize the IO if you optimize it.
The manual scene operation is probably the same.
In fact, LR still has a template called analysis . Its role is to view and analyze the results of the operation. So, clearly the controller can be viewed and analyzed, why analysis is needed because the controller The chart can not be merged to view, and analyisis . It is not very convenient to understand the analysis (for example, the above should be combined with some monitoring io,cpu system to do the corresponding analysis). So look at how it's done:
There are two ways to improve analysis.
1. The first method is to click Toolsabove the Controller and click on the analysis below to Enter in the analysis module.
2. the second way is to open the icon directly.
click file open Select the result file that you want to open, That is controller saved files , the file type must be selected loadrunner results analysis session files controller after the saved.
Open and click on the left side of the chart that we want to merge, such as the one I'm clicking on is hits/sec. Then right-click on the right-hand side of the chart and click Merge Graphs to view the menu and merge the chart.
In the box that pops up, select which chart to merge with and how to merge.
1.Overlay Overlay Merge, relatively good-looking, but also easier to understand.
2.Title.
3.Correlate
Based on these combined charts, a more accurate analysis can be done. For example overlay This figure, when the user has been increasing,hits/sec is in the downward trend, then there are some bottleneck problems, know how to do after the problem optimization, convenient analysis.
Last but not least, we can make a report of the chart we analyze, such as a page type report or a PDF report, just in the analysis. You can choose some of the actions you want to make, like here, to get these graphs directly HTML , then there is the choice HTML Report just fine.
Click Save, you can see the HTML report in the appropriate location, but this report is generated by the LR help us, if not very professional people do not understand, so the report is the last to write their own better.
Click on the desktop file to see:
things to note in the factory with LR :
1. Now the situation is best with the lr11 version, because There is no cracked version, like only a maximum of Users, there is not enough.
2. Do not consider downloading to the lr11 version of the computer in the factory , there seems to be a limit.
Siege Lion Beginner uses LOADRUNNER11 to do performance testing