Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
LoadRunner- Simplified
 Users looking for information on performance
testing on web based applications using
LoadRunner.
Intended Readers
 This presentation provides:
 For beginners -It gives an idea about performance testing
concepts and an overview of Load...
 What is Performance testing ?
 Why you need Performance testing ?
 What are the different types of Performance testing...
Performance Testing
Testing conducted to evaluate the compliance of a system
or component with specified performance requi...
 Performance Testing determines…
 Speed
 Scalability
 Stability
 Confidence
Why You need Performance testing
?
 Classic performance testing - which measures response times and
transaction rates
 Load testing - which measures the sy...
LoadRunner is the industry-standard load testing
solution for predicting the behavior and performance
of an application.
L...
 Virtual User Generator - Virtual User Generator (VuGen)
component is used to record a script. It enables you to develop
...
 Planning the test- Develop a clearly defined test plan to ensure the
test scenarios developed will accomplish load-testi...
 Monitoring the scenario - Scenario execution is monitored using
the LoadRunner online runtime, transaction, system resou...
 Correlation – Correlation is used to get data which are unique for each
run of the script . (Correlation concept is expl...
 Throughput – It is a measure of how many
requests/second, pages/second, or hits/second the application can
support.
 Re...
 vuser_init - It record a log in to the server (vuser initialize loaded).
 Action - Action is repeated for multiple iter...
 An example …
How to create script using VuGen
1. Click on Start  Programs  Mercury LoadRunner
 Applications  Virtual User Generator
The steps for creating scripts
2. Click on the Load Testing Tab
3. Click on Create/Edit Script
4. Click on File->New
5. Click on New Single Protocol Script
Note: If you want to record two or more protocols in a single recording
session , t...
6. Select Web [HTTP/HTML] and click OK
Recording Options
1. HTML-based script – It generates a separate step for each user action but does not
record all resourc...
8. Click on Start Record button
Start button.
9. Enter the URL of the application to test . Now select Action from the
dropdown menu “Record into Action”. Click Ok.
Wha...
10. Click on the stop button once the identified scenario is recorded .
Now we can proceed to Run-Time settings and make t...
Run-Time Settings
Run Logic:
The number of iterations to be performed for a particular run can be
specified here .
Pacing:
The flow in which...
Once you have run the script, we can view the results from
View->Test Results in the VuGen.
The results summary page shows...
Customizing the VuGen Script
Some useful L.R functions
Web_url() - for a URL in the Address field on the internet browser.
Web_submit_form() - for pres...
As discussed earlier, parameterization is generally done to test
with multiple set of data or records . A parameter replac...
What is correlation and how to correlate ?
 Problems & solutions section
(refer the document attached).
 Another
example...
Creating Load Test
 New Scenario window opens
Designing a scenario
1.Click on Start  Programs  Mercury LoadRunner  Applications 
Control...
Manual scenarios can distribute the total number of Vusers among
scripts based on the analyst-specified percentage (evenly...
Note : The selected script should be ‘checked’ under Scenario Groups  Group
Name
2. Click on Manual Scenario option butto...
3. Click on Generators button
Generators
button
The below screen will open.
4. Click on Connect button and wait until the status changes to Ready from Down.
5. In the Schedule scenario window, change the quantity of Vusers
as you want (default is 10). Now click on Start scenario...
The below figure shows the scenario status.
The below figure shows the status of Vusers which
you have run.
{
Understanding the schedule scenario
From the Schedule Scenario window in the run tab, click on the
edit schedule button.
Ramp Up Tab: Determines how to start the scenario.
(i.e., Start Vusers simultaneously by default) or specify the number of...
Analyzing the Load Test
From Controller menu, click on Results -> Analyze Results
Analysis Summary Page
The Analysis summary page generates information on the number of Vusers,
Hits per second, Throughput...
Questions ?
 LoadRunner User Guide
 www.mercury.com
References
Thank You !!!
Performance testing with loadrunner by kc
Upcoming SlideShare
Loading in …5
×

Performance testing with loadrunner by kc

1,056 views

Published on

Published in: Technology
  • Be the first to comment

Performance testing with loadrunner by kc

  1. 1. LoadRunner- Simplified
  2. 2.  Users looking for information on performance testing on web based applications using LoadRunner. Intended Readers
  3. 3.  This presentation provides:  For beginners -It gives an idea about performance testing concepts and an overview of LoadRunner (LoadRunner Components, creating scripts, analysis of results) .  Others- Those who have started using LoadRunner can use this presentation which will help them to identify the common type of errors they might encounter especially with correlation and parameterization. This presentation provides effective ways to solve these errors. Please refer the problems and solution section document for more details (slide number 33). Objective
  4. 4.  What is Performance testing ?  Why you need Performance testing ?  What are the different types of Performance testing?  Introduction to LoadRunner and its Components  Terms and Terminologies used  Most commonly used L.R functions  Getting started with Record and Playback(VuGen)  Running the Vuser script  Creating the load test and running the scenario.  Analysis of the test results.  Q & A session. A quick walkthrough on some of the concepts …
  5. 5. Performance Testing Testing conducted to evaluate the compliance of a system or component with specified performance requirements. In other words, testing conducted to measure several system characteristics such as processing speed, response time, resource consumption, throughput, system threshold limits and efficiency.
  6. 6.  Performance Testing determines…  Speed  Scalability  Stability  Confidence Why You need Performance testing ?
  7. 7.  Classic performance testing - which measures response times and transaction rates  Load testing - which measures the system's ability to handle varied workloads .Load test is conducted with anticipated loads.  Stress testing - which looks for errors produced by low resources or competition for resources  Volume testing - which subjects the software to larger and larger amounts of data to determine its point of failure  Fail-over testing - verifies the redundancy mechanism when the system is under load. In other words, Testing where a system is made to fail under load, to verify whether standby systems are correctly used to maintain service .  Endurance/Soak testing- Testing conducted over an extended period of time to reveal resource usage problems such as memory leaks . Different types of performance testing that can be done
  8. 8. LoadRunner is the industry-standard load testing solution for predicting the behavior and performance of an application. LoadRunner- An introduction With LoadRunner we can : a) Obtain an accurate picture of end-to-end system performance. b) Verify that new or upgraded applications meet specified performance requirements. c) Identify and eliminate performance bottlenecks during the development lifecycle.
  9. 9.  Virtual User Generator - Virtual User Generator (VuGen) component is used to record a script. It enables you to develop Vuser scripts for a variety of application types and communication protocols.  Controller - The Controller organizes, drives, manages, and monitors the load test. It also provides a suite of integrated performance monitors that can be used to monitor each component of a multi-tier system during load test .  Analysis – It helps us to view, divide, and compare the performance results of the data collected during the performance testing (Create result reports and graphs using Crystal Reports, MS Word or an HTML webpage browser). LoadRunner Components
  10. 10.  Planning the test- Develop a clearly defined test plan to ensure the test scenarios developed will accomplish load-testing objectives.  Creating Vusers - Create Vuser scripts using VuGen that contain tasks performed by each Vuser, tasks performed by Vusers as a whole, and tasks measured as transactions.  Creating the scenario. A scenario describes the events that occur during a testing session. It includes a list of machines, scripts, and Vusers that run during the scenario. We create scenarios using LoadRunner Controller. We can create manual scenarios as well as goal-oriented scenarios. In manual scenarios, we define the number of Vusers, the load generator machines, and percentage of Vusers to be assigned to each script. For web tests, we may create a goal-oriented scenario where we define the goal that our test has to achieve. LoadRunner automatically builds a scenario for us.  Running the scenario -We emulate load on the server by instructing multiple Vusers to perform tasks simultaneously. Before the testing, we set the scenario configuration and scheduling (via Controller). We can run the entire scenario, Vuser groups, or individual Vusers. Testing Process
  11. 11.  Monitoring the scenario - Scenario execution is monitored using the LoadRunner online runtime, transaction, system resource, Web resource, Web server resource, Web application server resource, database server resource, network delay, streaming media resource, firewall server resource, ERP server resource, and Java performance monitors  Analyzing test results - LoadRunner’s graphs and reports are used to analyze the application’s performance. Continued..
  12. 12.  Correlation – Correlation is used to get data which are unique for each run of the script . (Correlation concept is explained in detail in the document attached in the slide number 31).correlation example  Parameterization - Parameterization is generally done to test with multiple set of data or records . A parameter replaces a literal value in the script . (Please refer document attached in the slide number 31.)  Rendezvous point - Rendezvous point specifies Vusers to begin a transaction at precisely the same time. (I.e., It instruct Vusers to wait during test execution for multiple Vusers to arrive at a certain point, in order that they may simultaneously perform a task.  Scenario - A scenario defines the events that occur during each testing session. For ex: a scenario defines and controls the number of users to emulate, the actions to be performed, and the machines on which the virtual users run their emulations. Terms and Terminologies
  13. 13.  Throughput – It is a measure of how many requests/second, pages/second, or hits/second the application can support.  Response time - Response time is often defined as the interval from when a user initiates a request to the instant at which the first part of the response is received at by the application  Vuser- Vusers emulate the actions of human users working with your AUT.  Vuser script - The actions that a Vuser performs during the scenario are described in a Vuser script.  Transaction – A transaction represents end-user business processes that you are interested in measuring
  14. 14.  vuser_init - It record a log in to the server (vuser initialize loaded).  Action - Action is repeated for multiple iterations. It records the client activity .  vuser_end - It records log off into the server. Three Sections in a Vuser script Note: Refer slide number : 23 to see these three sections in VuGen.
  15. 15.  An example … How to create script using VuGen
  16. 16. 1. Click on Start  Programs  Mercury LoadRunner  Applications  Virtual User Generator The steps for creating scripts
  17. 17. 2. Click on the Load Testing Tab 3. Click on Create/Edit Script
  18. 18. 4. Click on File->New
  19. 19. 5. Click on New Single Protocol Script Note: If you want to record two or more protocols in a single recording session , then select Multi-protocol script.
  20. 20. 6. Select Web [HTTP/HTML] and click OK
  21. 21. Recording Options 1. HTML-based script – It generates a separate step for each user action but does not record all resources during the recording session, but downloads them during the replay . 2. URL-based script – Records all requests and resources from the server. 7. Select HTML-based script and click OK
  22. 22. 8. Click on Start Record button Start button.
  23. 23. 9. Enter the URL of the application to test . Now select Action from the dropdown menu “Record into Action”. Click Ok. What does these section indicate ? Refer slide number - 13 We assume that you have entered the URL as seen in the above figure. Now the page opens, Once you have entered the mailbox then click sign off. Now the recording starts.<<back
  24. 24. 10. Click on the stop button once the identified scenario is recorded . Now we can proceed to Run-Time settings and make the necessary changes before we run the script.
  25. 25. Run-Time Settings
  26. 26. Run Logic: The number of iterations to be performed for a particular run can be specified here . Pacing: The flow in which iteration should be performed can be set here. New iterations can be set to start from here. The options available are: o As soon as the previous iteration ends. o With a fixed delay after the previous iteration ends. o At fixed intervals of time. Think Time: Think time represents the amount of time the user takes to perform between actions. Think time is automatically added while recording the script. Runtime settings options for think time is used to create a more realistic scenario for load testing the application. 11. Click on the Run button to run the script. Please refer the link given to view the complete script (example) .
  27. 27. Once you have run the script, we can view the results from View->Test Results in the VuGen. The results summary page shows status of the script run. Here the iteration # indicates the number of iterations run with respect to the changes made in run time settings.
  28. 28. Customizing the VuGen Script
  29. 29. Some useful L.R functions Web_url() - for a URL in the Address field on the internet browser. Web_submit_form() - for pressing "submit" of a GET or PUT form obtained in the context of a previous operation — perhaps recorded by VuGen in HTML-based recording mode. Web_link() - for clicking a text link. Web_submit_data() - for pressing "submit" of a GET or PUT form without the context of a previous operation — perhaps recorded by VuGen in URL- based recording mode or in HTML-based recording mode with the "A script containing explicit URLs only" option checked. Web_reg_find() - verification function. Web_global_verification() – It searches for a text string in all subsequent requests. Note: Refer to the script attached to understand these functions in detail (slide 31).
  30. 30. As discussed earlier, parameterization is generally done to test with multiple set of data or records . A parameter replaces a literal value in the script. For example, consider the K-mart application or say login scenario in rediffmail/yahoo .How will we check for different user login. Here we need to parameterize the username and password. The attached document in the next slide shows parameterization . When to Parameterize and how ?
  31. 31. What is correlation and how to correlate ?  Problems & solutions section (refer the document attached).  Another example(rediffmail.com, explained earlier) which illustrates the use of correlation and parameterization in real time is given in the document attached. We go for correlation when we want to get data which are unique for each run of the script. For example, in most of the web applications, the server generates a unique session id to the Vuser, when we try to play back the script, it fails because the session is duplicated (let us take the scenario of an existing user logging into the rediff mail or yahoo mail ). Inorder to overcome this we need to correlate .As of here we need to correlate the ― sessionid‖. The below example demonstrates this. << back
  32. 32. Creating Load Test
  33. 33.  New Scenario window opens Designing a scenario 1.Click on Start  Programs  Mercury LoadRunner  Applications  Controller
  34. 34. Manual scenarios can distribute the total number of Vusers among scripts based on the analyst-specified percentage (evenly among load generators). Manual scenarios Goal Oriented scenarios are automatically created based on a specified transaction response time or number of hits/transactions-per-second (TPS). Goal Oriented scenarios Scenario Type :
  35. 35. Note : The selected script should be ‘checked’ under Scenario Groups  Group Name 2. Click on Manual Scenario option button and under available script choose the script and click OK .
  36. 36. 3. Click on Generators button Generators button
  37. 37. The below screen will open. 4. Click on Connect button and wait until the status changes to Ready from Down.
  38. 38. 5. In the Schedule scenario window, change the quantity of Vusers as you want (default is 10). Now click on Start scenario button. Start scenario button
  39. 39. The below figure shows the scenario status.
  40. 40. The below figure shows the status of Vusers which you have run.
  41. 41. { Understanding the schedule scenario From the Schedule Scenario window in the run tab, click on the edit schedule button.
  42. 42. Ramp Up Tab: Determines how to start the scenario. (i.e., Start Vusers simultaneously by default) or specify the number of Vusers to start at intervals second option) ) Duration Tab: Sets the duration of the scenario (i.e., set the duration for the Vusers to run). Ramp Down Tab: Determines how to stop the scenario (i.e., specifies how to stop Vusers).
  43. 43. Analyzing the Load Test
  44. 44. From Controller menu, click on Results -> Analyze Results
  45. 45. Analysis Summary Page The Analysis summary page generates information on the number of Vusers, Hits per second, Throughput, Average Transaction Response Time, etc . We can send these test results for analysis and using performance monitors to identify the bottlenecks in the application. Performance monitors are available for the network, application servers, Web servers and database servers.
  46. 46. Questions ?
  47. 47.  LoadRunner User Guide  www.mercury.com References
  48. 48. Thank You !!!

×