Performance testing with loadrunner by kc

Embed Size (px)

Citation preview

  • 1. LoadRunner- Simplified

2. Users looking for information on performance testing on web based applications using LoadRunner. Intended Readers 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. 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. 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. Performance Testing determines Speed Scalability Stability Confidence Why You need Performance testing ? 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. 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. 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. 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. 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 - LoadRunners graphs and reports are used to analyze the applications performance. Continued.. 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. 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. 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. An example How to create script using VuGen 16. 1. Click on Start Programs Mercury LoadRunner Applications Virtual User Generator The steps for creating scripts 17. 2. Click on the Load Testing Tab 3. Click on Create/Edit Script 18. 4. Click on File->New 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. 6. Select Web [HTTP/HTML] and click OK 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. 8. Click on Start Record button Start button. 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.