LoadRunner, Mercury
Transcript of LoadRunner, Mercury
-
8/7/2019 LoadRunner, Mercury
1/77
Load RunnerLoad RunnerMercury Performance TestMercury Performance TestToolTool
-
8/7/2019 LoadRunner, Mercury
2/77
Topics to be CoveredTopics to be Covered
Why Performance ?Why Performance ?
Definitions: Performance TestingDefinitions: Performance Testing
Benchmark DesignBenchmark Design
Performance Testing ToolsPerformance Testing Tools LoadRunner ComponentsLoadRunner Components
What is load testing process?What is load testing process?
Getting Familiar with Mercury ToursGetting Familiar with Mercury Tours Application RequirementsApplication Requirements
-
8/7/2019 LoadRunner, Mercury
3/77
Why Performance?Why Performance?
Does the application respond quickly enough for theintended 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?
-
8/7/2019 LoadRunner, Mercury
4/77
Define Stress/Load/Performance TestingDefine Stress/Load/Performance Testing
Stress TestingStress Testing: Stress Testing is done in order to check: Stress Testing is done in order to check
when the application fails by reducing the system resourceswhen the application fails by reducing the system resources
such as RAM, HDD etc. and keeping the number of users assuch as RAM, HDD etc. and keeping the number of users as
constant.constant. Load TestingLoad Testing: Load Testing is done in order to check when: Load Testing is done in order to check when
the application fails by increasing the number of users andthe application fails by increasing the number of users and
keeping the system resources as constant.keeping the system resources as constant.
Performance TestingPerformance Testing: The term Performance can mean: The term Performance can meanmeasuring response time, throughput, resource utilization, ormeasuring response time, throughput, resource utilization, or
some other system characteristic( or group of them), bysome other system characteristic( or group of them), by
varying the number of users.varying the number of users.
-
8/7/2019 LoadRunner, Mercury
5/77
BenchmarkDesignBenchmarkDesign
The Benchmark is the representative workload used during theThe Benchmark is the representative workload used during the
performance test run. It should be representative of the likelyperformance test run. It should be representative of the likely
realreal--world operating conditions.world operating conditions.
Benchmark is provided by the client.Benchmark is provided by the client. In Industry scenario the benchmark is as follows:In Industry scenario the benchmark is as follows:
No. of transactions passed per second >= 8No. of transactions passed per second >= 8
Response time
-
8/7/2019 LoadRunner, Mercury
6/77
Performance Testing ToolsPerformance Testing Tools
Segue Silk PerformerSegue Silk Performer
Rational Team TestRational Team Test
Mercury Load RunnerMercury Load Runner
Empirix eEmpirix e--Load/RSW)Load/RSW)
Soft Light Site Tools LoaderSoft Light Site Tools Loader
-
8/7/2019 LoadRunner, Mercury
7/77
LoadRunner ComponentsLoadRunner 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 theload 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.
-
8/7/2019 LoadRunner, Mercury
8/77
What is the load testing process?
-
8/7/2019 LoadRunner, Mercury
9/77
Getting Familiar withMercury Tours
Opening Mercury Tours
Make sure that the sampleWeb server is
running. Open the Mercury Tours application.
Log into Mercury Tours.
Reserve a flight.
End your Mercury Tours session.
-
8/7/2019 LoadRunner, Mercury
10/77
Application Requirements
Mercury Tours must successfully handle 10 concurrenttravel agents.
Mercury Tours must be able to process 10 simultaneousflight bookings with response time not exceeding 90seconds.
Mercury Tours must be able to handle 10 travel agents
running simultaneous itinerary checks with responsetime not exceeding 120 seconds.
Mercury Tours must be able to handle 10 agents signingin and signing out of the system with response time not
exceeding 10 seconds.
-
8/7/2019 LoadRunner, Mercury
11/77
Building Scripts
-
8/7/2019 LoadRunner, Mercury
12/77
Topics to be CoveredTopics 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?
-
8/7/2019 LoadRunner, Mercury
13/77
Introducing the Virtual User
Generator (V
uGen)
-
8/7/2019 LoadRunner, Mercury
14/77
How do I start recording user
activities?1.1. Open Virtual User Generator.Open Virtual User Generator.
2.2. Create a single protocol Web script.Create a single protocol Web script.
-
8/7/2019 LoadRunner, Mercury
15/77
How do I record a business process
to create a script?First Step: Set Recording OptionsFirst Step: Set Recording Options
Recording LevelsRecording Levels
-
8/7/2019 LoadRunner, Mercury
16/77
How do I record a business process
to create a script?Contd
1.1. Start recording on the Mercury Tours Web site.Start recording on the Mercury Tours Web site.
2.2. Login to the Mercury Tours Web site.Login to the Mercury Tours Web site.
3.3. Enter flight details.Enter flight details.
4.4. Select a flight.Select a flight.
5.5. Check the itinerary.Check the itinerary.
6.6. Click sign off in the left pane.Click sign off in the left pane.
7.7. Click Stop on the floating toolbar to stop the recordingClick Stop on the floating toolbar to stop the recording ..
8.8. Choose File > Save or click the Save button. TypeChoose File > Save or click the Save button. Type
basic_tutorial in the File name box and click Save.basic_tutorial in the File name box and click Save.
-
8/7/2019 LoadRunner, Mercury
17/77
How do I view the script?
Tree ViewTree View
Script ViewScript View
Tree ViewTree View
ScriptV
iewScriptV
iew
-
8/7/2019 LoadRunner, Mercury
18/77
Playing Back Your
Script
-
8/7/2019 LoadRunner, Mercury
19/77
Topics to be CoveredTopics 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?
-
8/7/2019 LoadRunner, Mercury
20/77
How do I set the run-time behavior?
Choose VUser > RuntimeChoose VUser > Runtime--SettingsSettings Run LogicRun Logic
-
8/7/2019 LoadRunner, Mercury
21/77
How do I set the run-time behavior?
Contd..
Choose VUser > RuntimeChoose VUser > Runtime--SettingsSettings -- PacingPacing
-
8/7/2019 LoadRunner, Mercury
22/77
How do I set the run-time behavior?
Contd..
Choose VUser > RuntimeChoose VUser > Runtime--SettingsSettings -- LogLog
-
8/7/2019 LoadRunner, Mercury
23/77
How do I set the run-time behavior?
Contd..
Choose VUser > RuntimeChoose VUser > Runtime--SettingsSettings Think TimeThink Time
-
8/7/2019 LoadRunner, Mercury
24/77
How do I set the run-time behavior?
Contd..
Choose VUser > RuntimeChoose VUser > Runtime--SettingsSettings MiscellaneousMiscellaneous
-
8/7/2019 LoadRunner, Mercury
25/77
How do I set the run-time behavior?
Contd..
Choose VUser > RuntimeChoose VUser > Runtime--SettingsSettings Speed SimulationSpeed Simulation
-
8/7/2019 LoadRunner, Mercury
26/77
How do I set the run-time behavior?
Contd..
Choose VUser > RuntimeChoose VUser > Runtime--SettingsSettings Browser EmulationBrowser Emulation
-
8/7/2019 LoadRunner, Mercury
27/77
How do I set the run-time behavior?
Contd..
Choose VUser > RuntimeChoose VUser > Runtime--SettingsSettings ProxyProxy
-
8/7/2019 LoadRunner, Mercury
28/77
How do I set the run-time behavior?
Contd..
Choose VUser > RuntimeChoose VUser > Runtime--SettingsSettings PreferencesPreferences
-
8/7/2019 LoadRunner, Mercury
29/77
How do I set the run-time behavior?
Contd..
Choose VUser > RuntimeChoose VUser > Runtime--SettingsSettings Content CheckContent Check
Create NewApplication and New RuleCreate NewApplication and New Rule
-
8/7/2019 LoadRunner, Mercury
30/77
How do I watchmy script running in
real time?
Choose Tools > General Options and select the Display tab.
-
8/7/2019 LoadRunner, Mercury
31/77
Where can I view a summary of the
playback?
Go to Execution Log in VUGen screen
-
8/7/2019 LoadRunner, Mercury
32/77
Solving Common
Playback Problems
-
8/7/2019 LoadRunner, Mercury
33/77
Topics to be CoveredTopics to be Covered
What is Correlation?
Preparing Mercury Tours for Playback Errors
How do I work with unique server values?
-
8/7/2019 LoadRunner, Mercury
34/77
What is Correlation?
Many applications use dynamic values that change each timeyou use the application. For example, some servers assign aunique session ID for every new session. When you try to
replay a recorded session, the application creates a newsession ID that differs from the recorded session ID.
LoadRunner addresses this issue through correlation.
Correlation saves the changing values, in our case thesession ID, to a parameter. When running the emulation,the Vuser does not use the recorded valueinstead, it usesthe new session ID, assigned to it by the server.
-
8/7/2019 LoadRunner, Mercury
35/77
Preparing Mercury Tours for
Playback Errors1. Open Mercury Tours.
Choose Start > Programs > Mercury LoadRunner > Samples > Web >MercuryWeb Tours Application.
2. Change the server options.
ClickSERVER OPTIONS in the left pane. Select the Setting 3 option.
Scroll down to the bottom of the page and click the Reconfigure ServerDetails button. Scroll down to the bottom of the page and click the Returnto the Mercury Tours Homepage link. This setting tells the server not toallowduplicate session IDs.(Note that if you have IIS installed on your machine, you will need to modifythe settings for this application. Search for the file xitami.cfgin the xitamifolder, and open it in a text editor. Locate the line portbase=1000, andmodify it to portbase=1001. Save and exit the file.)
3. Close the browser.
4. Record the script again to create a new script with dynamic values.
-
8/7/2019 LoadRunner, Mercury
36/77
How do I work with unique server
values?1. Record the script again.
2. Replay the script.
3. Scan the script for correlations.
4. View the correlations.
5. Correlate the Session ID.
6. Examine the syntax of the correlation statement.
7. Play the script again.
8. Fix the server configuration.
Choose Start > Programs > Mercury LoadRunner > Samples > Web >MercuryWeb Tours Application to open Mercury tours.
ClickSERVER OPTIONS in the left pane. Clear all of the options. Scrolldown to the bottom of the page and click the Reconfigure Server Detailsbutton.
Close the browser.
-
8/7/2019 LoadRunner, Mercury
37/77
Preparing a Script for
Load Testing
-
8/7/2019 LoadRunner, Mercury
38/77
Topics to be CoveredTopics 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?
-
8/7/2019 LoadRunner, Mercury
39/77
How do I measure business processes?
Creating Transactions Re-Record the script usingTransactions
The transactions would be created for the following pages:
1. URL Access2. Login
3. Flight Button click
4. FindFlight_Continue_Button
5. SelectFlight_Continue_Button
6. Purchase Flight Button
7. Check Itinerary
8. Log Off
-
8/7/2019 LoadRunner, Mercury
40/77
How do I emulate multiple users?
Parameterization Step1
Right Click the textRight Click the text
-
8/7/2019 LoadRunner, Mercury
41/77
How do I emulate multiple users? Contd..
Parameterization Step2 Select or Create Parameter
Type theType the
parameterparameternamename
Click the buttonClick the button
-
8/7/2019 LoadRunner, Mercury
42/77
How do I emulate multiple users? Contd..
Parameterization Step3 Parameter Properties
Select Parameter TypeSelect Parameter Type
Create FileCreate File
-
8/7/2019 LoadRunner, Mercury
43/77
How do I emulate multiple users? Contd..
Parameterization Step4 Define Parameter and Close
-
8/7/2019 LoadRunner, Mercury
44/77
How do I emulate multiple users? Contd..
Parameterization View Parameter
-
8/7/2019 LoadRunner, Mercury
45/77
How do I verify Web page content?
Checkpoints Two Types
Text Checkpoint - checks that a text string appears on a
Web page.
Image Checkpoint - checks for an image on a Web page.
-
8/7/2019 LoadRunner, Mercury
46/77
How do I verify Web page content? Contd..
Text Checkpoint Go to Tree View
Right ClickRight Click
ClickHereClickHere
-
8/7/2019 LoadRunner, Mercury
47/77
How do I verify Web page content? Contd..
Image Checkpoint Go to Tree View
Right ClickRight Click
ClickHereClickHere
-
8/7/2019 LoadRunner, Mercury
48/77
Did my test succeed?
Playback the Script
1. Enable image checks.
2. Run the script.
3. Locate the text check.4. Locate the image check.
-
8/7/2019 LoadRunner, Mercury
49/77
Creating a Load Testing
Scenario
-
8/7/2019 LoadRunner, Mercury
50/77
Topics to be CoveredTopics 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?
-
8/7/2019 LoadRunner, Mercury
51/77
Introducing the LoadRunner Controller
Scenario Objective
The objective is to create a scenario that emulatesthe behavior of ten travel agents simultaneously
logging on, searching flights, purchasing flights,
checking itineraries, and logging off the system.
-
8/7/2019 LoadRunner, Mercury
52/77
Introducing the LoadRunner Controller Contd..
Starting the Controller
Open Mercury LoadRunner - Choose Start >Programs > Mercury LoadRunner > LoadRunner.
Open the Controller. - In the Load Testing tab, clickRun Load Tests. The LoadRunner Controller opens.
Select a Scenario Type. Manual or Goal Oriented
Scenario
-
8/7/2019 LoadRunner, Mercury
53/77
What mixture of users should be part of the load test?
Eight users would be added simultaneously and twoafterwards
1. Add a script to the load test.
2. Begin designing the load test scenario.3. Change the Group Name and number ofVusers.
1. Click the Details button.
2. In the Vuser Quantity box, enter 8.
3. Click on OK.
-
8/7/2019 LoadRunner, Mercury
54/77
-
8/7/2019 LoadRunner, Mercury
55/77
How do I emulate real load behavior?
Edit Schedule
1. Change the Scenario Schedule default settings.
2. Specify a gradual start. (Ramp Up)
3. Initialize the Vusers. (To minimize CPUconsumption)
4. Schedule the duration.
5. Sch
edule a gradual closure.( RampD
own)6. View Graphical representation of the scheduler.
Click OK
-
8/7/2019 LoadRunner, Mercury
56/77
How do I emulate different types of users?
Set Runtime Settings
1. Open the Run-Time settings.
2. Enable think time.
3. Enable logging.
4. Browser Emulation
5. Content Check
6. Pacing
-
8/7/2019 LoadRunner, Mercury
57/77
Running The Load Test
-
8/7/2019 LoadRunner, Mercury
58/77
Topics to be CoveredTopics 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?
-
8/7/2019 LoadRunner, Mercury
59/77
The Controller Run View at a Glance
-
8/7/2019 LoadRunner, Mercury
60/77
How do I run a load test scenario?
1. Open the Controller Run view.2. Start the scenario.
1.1. Set the path of the result directorySet the path of the result directory
2.2. Click on OK.Click on OK.
-
8/7/2019 LoadRunner, Mercury
61/77
How do I monitor the application under load?
1. Examine the Performance graphs.1. Running Vusers - Whole Scenario
2. Transaction Response Time - Whole Scenario
3. Hits per Second - Whole Scenario
2. Highlight individual measurements.1. Double click the graph to highlight the same
-
8/7/2019 LoadRunner, Mercury
62/77
How can I increase the load during the test?
1. Click the Vusers button. The Vusers windowopens.
-
8/7/2019 LoadRunner, Mercury
63/77
Did the application perform well under load?
1. Visualize the Transaction Response Time anddetermine whether the transaction was within
acceptable limit for the customer.
2. If the transaction response time degrades, lookfor bottlenecks.
-
8/7/2019 LoadRunner, Mercury
64/77
Analyzing Scenario
T i b C dT i b C d
-
8/7/2019 LoadRunner, Mercury
65/77
Topics to be CoveredTopics 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?
-
8/7/2019 LoadRunner, Mercury
66/77
How does an analysis session work?
1. Were the test expectations met? What was thetransaction response time on the users end under load?What was the average transaction response time of thetransactions?
2. What parts of the system could have contributed to thedecline in performance? What was the response time ofthe network and servers?
d l i i ?
-
8/7/2019 LoadRunner, Mercury
67/77
How do I start my analysis session?
1. Open Mercury LoadRunner.1. Choose Start > Programs > Mercury LoadRunner >
LoadRunner.
2. Open LoadRunner Analysis.
1. In the Load Testing tab, clickAnalyze Load Tests.
3. Open the analysis session file.1. File > Open.
2. From the \Tutorial folder, select
analysis_session and clickOpen.
Th A l i Wi d Gl
-
8/7/2019 LoadRunner, Mercury
68/77
The AnalysisWindow at a Glance
Did I h l ?
-
8/7/2019 LoadRunner, Mercury
69/77
Did I reachmy goals?
Check Transaction Summary Area
Did I h l ?
-
8/7/2019 LoadRunner, Mercury
70/77
Did I reachmy goals? Contd..
Check Transaction Summary Area
Open the Average Transaction Response Timegraph.
Click the check_itinerary transaction, in the Transaction Name column.
-
8/7/2019 LoadRunner, Mercury
71/77
Did my server perform well?
Study the behavior of the Vusers.
ClickRunning Vusers in the graph tree.
Filter the graph so that you see only the time slice when all the Vusers ran
simultaneously.
-
8/7/2019 LoadRunner, Mercury
72/77
Did my server perform well? 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 withlist, choose Average Transaction
Response Time.
In the Select type of merge area, select Correlate, and clickOK.
Analyze the correlated graph
-
8/7/2019 LoadRunner, Mercury
73/77
How can I pinpoint the source of the problem?
From the graph tree, select the Average Transaction Response Time graph.
Filter the Average Transaction Response Time graph to display only thecheck_itinerary transaction.
Right-click the graph, and choose Set Filter/Group by.
In the Transaction Name value box, select check_itinerary.
ClickOK.
-
8/7/2019 LoadRunner, Mercury
74/77
How can I pinpoint the source of the problem? Contd..
Auto-correlate the graph.
Right-click the graph, and choose Auto Correlate. Click OK.
-
8/7/2019 LoadRunner, Mercury
75/77
How can I pinpoint the source of the problem? Contd..
Rename the graph. Choose Rename Graph. Type Auto Correlated - check_itinerary and press ENTER
Analyze the auto-correlated graph. 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% withthe check_itinerary transaction.
-
8/7/2019 LoadRunner, Mercury
76/77
How can I publish my findings?
HTML Reports1. From the Reports menu, choose HTML
Report...
2. Select a file name for your report, and the pathwhere you want to save it. ClickSave.
-
8/7/2019 LoadRunner, Mercury
77/77