Professional Documents
Culture Documents
Topics to be Covered
Why Performance ? Definitions: Performance Testing Benchmark Design Performance Testing Tools LoadRunner Components What is load testing process? Getting Familiar with Mercury Tours Application Requirements
Why Performance?
Does the application respond quickly enough for the intended users? Will the application handle the expected user load and beyond? Will the application handle the number of transactions required by the business? Is the application stable under expected and unexpected user loads? Are you sure that users will have a positive experience on go-live day?
Stress Testing: Stress Testing is done in order to check when the application fails by reducing the system resources such as RAM, HDD etc. and keeping the number of users as constant. Load Testing: Load Testing is done in order to check when the application fails by increasing the number of users and keeping the system resources as constant. Performance Testing: The term Performance can mean measuring response time, throughput, resource utilization, or some other system characteristic( or group of them), by varying the number of users.
Benchmark Design
The Benchmark is the representative workload used during the performance test run. It should be representative of the likely real-world operating conditions. Benchmark is provided by the client. In Industry scenario the benchmark is as follows:
No. of transactions passed per second >= 8 Response time <= 5 sec.
Empirix e-Load/RSW)
Soft Light Site Tools Loader
LoadRunner Components
The Virtual User Generator captures end-user business processes and creates an automated performance testing script, also known as a virtual user script. The Controller organizes, drives, manages, and monitors the load test. The Load Generators create the load by running virtual users. The Analysis helps you view, dissect, and compare the performance results. The Launcher provides a single point of access for all of the LoadRunner components.
Application Requirements
Mercury Tours must successfully handle 10 concurrent travel agents. Mercury Tours must be able to process 10 simultaneous flight bookings with response time not exceeding 90 seconds. Mercury Tours must be able to handle 10 travel agents running simultaneous itinerary checks with response time not exceeding 120 seconds. Mercury Tours must be able to handle 10 agents signing in and signing out of the system with response time not exceeding 10 seconds.
Building Scripts
Topics to be Covered
Introducing the Virtual User Generator (VuGen) How do I start recording user activities? How do I record a business process to create a script? How do I view the script?
Recording Levels
1. 2. 3. 4.
5.
6. 7. 8.
Start recording on the Mercury Tours Web site. Login to the Mercury Tours Web site. Enter flight details. Select a flight. Check the itinerary. Click sign off in the left pane. Click Stop on the floating toolbar to stop the recording . Choose File > Save or click the Save button. Type basic_tutorial in the File name box and click Save.
Tree View
Script View
Topics to be Covered
How do I set the run-time behavior? How do I watch my script running in real time? Where can I view a summary of the playback?
Topics to be Covered
What is Correlation? Preparing Mercury Tours for Playback Errors How do I work with unique server values?
What is Correlation?
Many applications use dynamic values that change each time you use the application. For example, some servers assign a unique session ID for every new session. When you try to replay a recorded session, the application creates a new session ID that differs from the recorded session ID. LoadRunner addresses this issue through correlation. Correlation saves the changing values, in our case the session ID, to a parameter. When running the emulation, the Vuser does not use the recorded valueinstead, it uses the new session ID, assigned to it by the server.
3. 4.
Open Mercury Tours. Choose Start > Programs > Mercury LoadRunner > Samples > Web > Mercury Web Tours Application. Change the server options. Click SERVER OPTIONS in the left pane. Select the Setting 3 option. Scroll down to the bottom of the page and click the Reconfigure Server Details button. Scroll down to the bottom of the page and click the Return to the Mercury Tours Homepage link. This setting tells the server not to allowduplicate session IDs. (Note that if you have IIS installed on your machine, you will need to modify the settings for this application. Search for the file xitami.cfg in the xitami folder, and open it in a text editor. Locate the line portbase=1000, and modify it to portbase=1001. Save and exit the file.) Close the browser. Record the script again to create a new script with dynamic values.
Record the script again. Replay the script. Scan the script for correlations. View the correlations. Correlate the Session ID. Examine the syntax of the correlation statement. Play the script again. Fix the server configuration. Choose Start > Programs > Mercury LoadRunner > Samples > Web > Mercury Web Tours Application to open Mercury tours. Click SERVER OPTIONS in the left pane. Clear all of the options. Scroll down to the bottom of the page and click the Reconfigure Server Details button. Close the browser.
Topics to be Covered
How do I measure business processes? How do I emulate multiple users? How do I verify Web page content? Did my test succeed?
2.
3. 4. 5. 6. 7. 8.
URL Access Login Flight Button click FindFlight_Continue_Button SelectFlight_Continue_Button Purchase Flight Button Check Itinerary Log Off
Contd..
Contd..
Create File
Contd..
Contd..
Text Checkpoint - checks that a text string appears on a Web page. Image Checkpoint - checks for an image on a Web page.
Contd..
Contd..
4.
Enable image checks. Run the script. Locate the text check. Locate the image check.
Topics to be Covered
Introducing the LoadRunner Controller What mixture of users should be part of the load test? How do I generate a heavy load? How do I emulate real load behavior? How do I emulate different types of users?
Scenario Objective
The objective is to create a scenario that emulates the behavior of ten travel agents simultaneously logging on, searching flights, purchasing flights, checking itineraries, and logging off the system.
Contd..
Open Mercury LoadRunner - Choose Start > Programs > Mercury LoadRunner > LoadRunner. Open the Controller. - In the Load Testing tab, click Run Load Tests. The LoadRunner Controller opens. Select a Scenario Type. Manual or Goal Oriented Scenario
What mixture of users should be part of the load test? Eight users would be added simultaneously and two afterwards
1. 2.
3.
Add a script to the load test. Begin designing the load test scenario. Change the Group Name and number of Vusers.
1. 2.
3.
Click the Details button. In the Vuser Quantity box, enter 8. Click on OK.
Click the Generators button and add the generator which can be used to apply load.
Select the localhost load generator and click Connect. Click Close.
2.
4. 5.
6.
Change the Scenario Schedule default settings. Specify a gradual start. (Ramp Up) Initialize the Vusers. (To minimize CPU consumption) Schedule the duration. Schedule a gradual closure.( Ramp Down) View Graphical representation of the scheduler. Click OK
4.
5. 6.
Open the Run-Time settings. Enable think time. Enable logging. Browser Emulation Content Check Pacing
Topics to be Covered
The Controller Run View at a Glance How do I run a load test scenario? How do I monitor the application under load? How can I increase the load during the test? Did the application perform well under load?
Running Vusers - Whole Scenario Transaction Response Time - Whole Scenario Hits per Second - Whole Scenario Double click the graph to highlight the same
2.
2.
Visualize the Transaction Response Time and determine whether the transaction was within acceptable limit for the customer. If the transaction response time degrades, look for bottlenecks.
Analyzing Scenario
Topics to be Covered
How does an analysis session work? How do I start my analysis session? The Analysis Window at a Glance Did I reach my goals? Did my server perform well? How can I pinpoint the source of the problem? How can I publish my findings?
2.
Were the test expectations met? What was the transaction response time on the users end under load? What was the average transaction response time of the transactions? What parts of the system could have contributed to the decline in performance? What was the response time of the network and servers?
2. 3.
Contd..
Study the behavior of the Vusers. Click Running Vusers in the graph tree.
Filter the graph so that you see only the time slice when all the Vusers ran simultaneously.
Contd..
Correlate the Running Vusers and Average Transaction Response Time graphs to compare their data.
Right-click the Running Vusers graph and choose Merge Graphs. From the Select graph to merge with list, choose Average Transaction Response Time. In the Select type of merge area, select Correlate, and click OK.
From the graph tree, select the Average Transaction Response Time graph.
Filter the Average Transaction Response Time graph to display only the check_itinerary transaction. Right-click the graph, and choose Set Filter/Group by.
Click OK.
Auto-correlate the graph. Right-click the graph, and choose Auto Correlate. Click OK.
Choose Rename Graph. Type Auto Correlated - check_itinerary and press ENTER Look at the legend below the graph.
In the Measurement column you can see that the Private Bytes and Pool Nonpaged Bytes, both of which are memory-related measurements, have a Correlation Match of over 70% with the check_itinerary transaction.