1 / 61

Welcome to Load Runner Training Program

By Satish Upadhyaya. Welcome to Load Runner Training Program. Agenda. Software performance testing Performance testing types Load testing Introduction to LoadRunner LoadRunner Architecture LoadRunner Basic Flow LoadRunner Usages. Software performance testing.

knegron
Download Presentation

Welcome to Load Runner Training Program

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. By Satish Upadhyaya Welcome toLoad Runner Training Program

  2. Agenda • Software performance testing • Performance testing types • Load testing • Introduction to LoadRunner • LoadRunner Architecture • LoadRunner Basic Flow • LoadRunner Usages

  3. Software performance testing • In software engineering, performance testing is in general testing performed to determine how a system performs in terms of responsiveness and stability under a particular workload.

  4. Performance testing types • Load testing: A load test is usually conducted to understand the behavior of the system under a specific expected load. • Stress testing: is normally used to understand the upper limits of capacity within the system. • Endurance testing (soak testing): is usually done to a determine if the system can sustain the continuous expected load. During endurance tests, memory utilization is monitored to detect potential leaks • Spike testing: Spike testing is done by suddenly increasing the number of, or load generated by, users by a very large amount and observing the behavior of the system. The goal is to determine whether performance will suffer, the system will fail, or it will be able to handle dramatic changes in load.

  5. Load testing • Load testing is the process of putting demand on a system or device and measuring its response. • Load testing is performed to determine a system’s behavior under both normal and anticipated peak load conditions • It helps to identify the maximum operating capacity of an application as well as any bottlenecks and determine which element is causing degradation

  6. Introduction to LoadRunner • HP LoadRunner is an automated performance and testing product from Hewlett-Packard for examining system behavior and performance, while generating actual load. • HP LoadRunner can simulate hundreds or thousands of concurrent users to put the application through the rigors of real-life user loads, while collecting information from key infrastructure components (Web servers, database servers etc.) • The results can then be analyzed in detail, to explore the reasons for particular behavior. Example Consider the client-side application for an automated teller machine (ATM).

  7. LoadRunner Architecture • Automation overcomes Resource Limitation • Replace Tester with “Virtual Users” • Runs many vusers on few machine • Controller manages the vusers • Meaningful results with analysis tools • Repeat test with scripted actions Monitoring & Analysis Tool Controller Web Server DB Server Vuser host Yahoo!!! Application Server DB Server System Under Test Load Generation

  8. Component of Load Runner

  9. LoadRunner Basic Flow Phase 1 Phase 2 Phase 3 Phase 4 Phase 5 Tune System Based on Analysis LoadRunner VUGen LoadRunner Controller & Analysis

  10. Load Runner- Definitions Virtual User: Load Runner emulates the environment in which thousands of users works with a client server system concurrently. Load runner creates or replaces human users with virtual users (Vuser). Virtual Scripts: The actions performed by the human users are recorded in the form of script. The script generated by the load runner is Vuser script. The script when replayed emulates the real user performing the business actions. The scripting language used is C, C++, Java, TSL. Actions: Actions are the set of transactions performed in an application to accomplish business tasks Each Virtual user scripts will always have 3 default actions. • Vuser_init (Used for Logon to the application ) • Actions ( Used For Business action that needs to be recorded) • Vuser_end (Used for Log off from the application )

  11. Introducing VUGen The Virtual User Generator, also known as VuGen, enables you to develop Vuser scripts for a variety of application types and communication protocols. VuGen not only records the Vuser scripts, but also runs them. To verify that the script runs correctly, you run it in stand- alone mode. When your scripts runs Correctly, you incorporate it into a LoadTR

  12. Script Development process Record the Script Replay and verify Enhance the script Replay and verify Configure the time settings Use for Load Scenario

  13. How recording is done in LR? VuGen does not record the activities performed by the client on the application. VuGen creates the script by recording the activity between the client and the server. VuGen Client running an application Server

  14. VuGen Hands On Lets Record a Script • Login it to Mercury Tool • Book a Flight • View Itenary • Sign-Out

  15. How to Start LR ?

  16. Load Runner

  17. HP Virtual User Generator(Start Page)

  18. Tree View & Script View

  19. Transaction Why Add LoadRunner Transaction ? • Only means measuring performance • Help to Identify performance problems • Breaks Complex problems into simpler • Measure high business risk transactions • Allows performance comparison between different load tests What LoadRunner Transactions Measure ? It measure the system performance resulting from one or more user actions Transaction 1 Measure the login actions Transaction 2 Measure everything that happens after the login Transaction 3 Measure the save order action

  20. Virtual User Playback Model Playback is to ensure that required business process has been recorded properly Logon (Recording optional) User Actions (Business Processes) This section may be iterated (repeated) during one test run Logoff (Recording Optional) Vuser_Init.c Action 1.c, Action2.c, etc (e.g. create order, ship order) Vuser_end.c

  21. Correlation

  22. Common Play back Problem Step 1: Change setting in mercury Tours Step 2: Re-record the script developed earlier in Training • Login in mercury Tours • Book a Flight • Very Itenary • Logout

  23. SCRIPT FAILS!!!! • The Script emulating the same business process that was working earlier fails now ??? • WHY ????

  24. Reason For Script Failure • Many applications use dynamic values that change each time you use the application. • Some service 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 differ from the recorded session ID and the script fails

  25. Client-Server Communication While Scripting ABC HARDCODED Give Session ID CLIENT SERVER Session ID ABC sent Start New session With ID ABC New Session Started

  26. Client-Server Communication While Replaying HARDCODED Session ID ABC Give Session ID CLIENT SERVER Session ID XYZ sent Start New session With ID ABC Session Failed. XYZ expected

  27. Client-Server Communication Solution SESSION ID PARSED Give Session ID CLIENT SERVER Session ID ZZZ sent Start New session With ID ZZZ Session Started.

  28. Solution • Parameterize the Session ID • Use the parameter value further communication instead of hard-coded value. • This is nothing but Correlation !!!

  29. Types of Correlation Techniques • Correlation can be done in 2 ways • Manual • Automatic

  30. Manual Correlation Types • Manual Coding • Snapshot Comparison • Vuser Comparison

  31. Vuser Comparision I have recorded and saved two scripts • Demo_11 • Demo_12 Which emulate the same business process • Login in mercury Tours • Book a Flight • Very Itenary • Logout

  32. Vuser comparison Steps Steps • Find the dynamic value to capture • Find the server’s response, containing the dynamic value • Capture the dynamic value in a parameter • Replace every occurrence of dynamic value with parameter • Check Changes

  33. Web_reg_save_param • In built function used for parsing • Syntax • Web_reg_save_param(“Parameter Name”, “LB”, “RB”, • LB= Left Boundary • RB= Right Boundary

  34. Automatic Correlation Steps • Replay the Script • Select values to correlate • Verify

  35. Parameterization

  36. Need for Parameterization • In our sample script, while booking flight we choose seating preference as Aisle. • In real life scenario , user will choose different preferences • To make our test as close as possible to a real life scenario we need parameterization

  37. Parameterization helps in • It provide the ability to test your script with different values • Reduce the size of script

  38. Steps in parameterization Steps require for parameterization • Replacing the constant value in the Vuser script with parameters • Setting the properties and data source for the parameters so different values can selected at run-time

  39. VuGen Parameters Vuser ID XML Unique Number Date/Time Random Number Type of Parameter File Load Generated Name Group Name Iteration Number

  40. VuGen Parameters cont..

  41. Group Name • Group Name replaces the parameter with the name of the Vuser Group. You specify the name of the Vuser Group when you create a scenario. When you run a script from VuGen, the Group name is always None. • To set properties for the Group Name parameter type: • Select one of the available formats or create a new one. You select a format to specify the length of the parameter string. For details, see Customizing Parameter Formats. • Click Close to accept the settings and close the Parameter Properties dialog box.

  42. VuGen Parameters cont.. Iteration Number Iteration Number replaces the parameter with the current iteration number. Load Generator Name Load Generator Name replaces the parameter with the name of the Vuser script's load generator. The load generator is the computer on which the Vuser is running. Random Number Random Number replaces the parameter with a random number. You set a range of numbers by specifying minimum and maximum values. You can use the Random Number parameter type to sample your system's behavior within a possible range of values. For example, to run a query for 50 employees, where employee ID numbers range from 1 through 1000, create 50 Vusers and set the minimum to 1 and maximum to 1000. Each Vuser receives a random number, from within the range of 1 to 1000.

  43. VuGen Parameters cont.. Unique Number Unique Number replaces the parameter with a unique number. When you create a Unique Number type parameter, you specify a start number and a block size. The block size indicates the size of the block of numbers assigned to each Vuser. Each Vuser begins at the bottom of its range and increments the parameter value for each iteration. For example, if you set the Start number at 1 with a block of 500, the first Vuser uses the value 1 and the next Vuser uses the value 501, in their first iterations. The number of digits in the unique number string together with the block size determine the number of iterations and Vusers. For example, if you are limited to five digits using a block size of 500, only 100,000 numbers (0-99,999) are available. It is therefore possible to run only 200 Vusers, with each Vuser running 500 iterations. Vuser ID Vuser ID replaces the parameter with the ID number assigned to the Vuser by the Controller during a scenario run. When you run a script from VuGen, the Vuser ID is always -1. Note: This parameter type applies primarily to LoadRunner users.

  44. Checkpoints

  45. Verification Checkpoints • Many a time while surfing the internet contents are not downloaded and displayed completely. • Display of data at client machine is integral part of the business process. • To ensure that all business processes have completed end to end, while the server handles concurrent requests, we need content checks. • Load runner provide two types of content checks • Text check • Image check • These check point can be added during or after recording a script. • Checkpoint added in a script stores the expected value, compares the actual value on the web page to the expected value during play back and report the comparison result status as either PASS or FAIL.

  46. Text Check • Lets create a text check to verify the text Flight Departing appears on client screen. Flight departing

  47. Controller • We use the HP LoadRunner Controller to manage and maintain the scenarios. • Using the Controller, we control all the Vusers in a scenario from a single Workstation. • Load Generator. • When we execute a scenario, the Controller distributes each Vuser in the scenario to a load generator. • The load generator is the machine that executes the Vuser script, enabling the Vuser to emulate the actions of a human user.

  48. Scenario Using HP LoadRunner, We divide our application performance testing requirements into scenarios. A scenario defines the events that occur during each testing session. Thus, for example, a scenario defines and controls the number of users to emulate, the actions that they perform, and the machines on which they run their emulations

  49. What Controller does ? • Before scenario execution • Create scenario • Sets up run-time configuration • During Scenario Execution • Runs many Vusers simultaneously • Control each Vuser (initialize, run, pause, stop) • Displays execution status for each Vuser • Displays message from each Vuser • Monitors server resources • After scenario execution • Collect and organizes performance data • Launches the Analysis tools

  50. Controller (Cont.)

More Related