Sei sulla pagina 1di 157

LOAD RUNNER

Types of Performance Testing

Sampath Velupula

Performance Test Objectives

Sampath Velupula

Load Testing in the Product Life Cycle

Sampath Velupula

The LoadRunner Solution

Sampath Velupula

The LoadRunner Methodology

Sampath Velupula

LoadRunners Load Testing Components

Sampath Velupula

The LoadRunner Launch Screen

Sampath Velupula

Components
Accurate scripts form the foundation of an effective load test. Once planning is completed the next step is to move to scripting. Scripting is done in VuGen.

Vusers emulate the actions of human users working with your application. While a workstation accommodates only a single human user, many Vusers can run concurrently on a single workstation.

Sampath Velupula

Supported Protocols

Sampath Velupula

10

What is a Scenario?
A scenario is a file that defines the scripts to execute, the number of Vusers to run, the goals of the test, the computer that will host the Vusers, and the conditions under which the load test runs. Using LoadRunner, you divide your application performance testing requirements into scenarios. A scenario defines the events that occur during each testing session.

Sampath Velupula

11

What is the Controller?


You use the LoadRunner Controller to manage and maintain your scenarios. Using the Controller, you control all the Vusers in a scenario from a single workstation.

Sampath Velupula

12

LoadRunner Performance Monitoring

Sampath Velupula

13

LoadRunner Performance Monitors

Sampath Velupula

14

The Load Testing Process

Sampath Velupula

15

Quiz
What is LoadRunner? What are the versions of LoadRunner? What is VuGen? What is Controller? What is Analysis? What is a Load Generator? What is monitoring? What are performance objectives? What is planning in Load Testing?

Sampath Velupula

16

Planning

Sampath Velupula

17

Business Process
A business process is a set of actions or user steps performed within an application to accomplish a business goal. In the context of LoadRunner, it is a series of steps performed against the application under test. Just clicking a button is not a business process. It is only a step. A real business process consists of taking an actual action such as finding information, making a purchase, or changing an order. The individual tasks and functions performed by the users in the application are often called business processes. Heavy Throughput: Business processes that may not be mission-critical but are very popular.

Sampath Velupula

18

Business Process

Sampath Velupula

19

What is Think Time?


LoadRunner Think Time is a measurement of the time that a real user takes to pause between the execution of steps. Users interact with an application according to their experience level and objectives.
More technically proficient users may work very quickly. New users and those involved in certain kinds of business processes may proceed very slowly.

By estimating these navigation times, virtual users can be made to emulate their real world counterparts more accurately during a load test.

Sampath Velupula

20

What is a Concurrency?
A concurrency is a set of users acting upon an application in a similar manner at the same time. Concurrency occurs on three levels:
Application Level
How many users are active on the system? How many users are buying tickets? How many users are buying tickets now?

Business Process Level Transaction Level

Sampath Velupula

21

Application Concurrency

Sampath Velupula

22

Business Process Concurrency

Sampath Velupula

23

Transactional Concurrency
How many transactions will need to be run per minute if a load test has to be run for two hours with 5000 users, assuming an average length of five minutes? Determine how many transactions run per minute:
120 minutes / 5 minutes = 24 iterations for each user. 5000 users X 24 iterations = 120,000 transactions. 120,000 transactions / 120 minutes = 1000 transactions per minute.

Apply the transactional concurrency to the application (refer to the Application concurrency figures):
The test is run during the 10-12 AM time slot. The test should consist of 5000 users running 24 iterations. The system must be able to handle 1000 transactions per minute.

Sampath Velupula

24

User Profile

Sampath Velupula

25

Peak Load

Sampath Velupula

26

Where are Your Customers Located?

Sampath Velupula

27

Monitoring Application Components

Sampath Velupula

28

Components

Sampath Velupula

29

Where to Install Each Component


VuGen (Virtual User Generator) Allows you to create scripts. These scripts emulate human users on playback. Controller Allows you to design Scenarios, run and stop the load test. Scenario files have the .lrs extension. Load Generator When a scenario is running, the results are stored locally on each load generator machine by default. After the scenario stops running, the performance data from each load generator machine is sent to the results file that you have specified. Analysis Processes the gathered scenario results and generates graphs and reports. When you work with the Analysis tool, you work within a session that contains at least one set of scenario results contained in a file ending .lrr. After the results are processed by the Analysis tool, the file is saved as .lra.

Sampath Velupula

30

WAN Emulation

Sampath Velupula

31

WAN Emulation
WAN emulation software mimics the WAN/Internet by slowing, dropping, and changing packets between client and server. Should be installed on all load generator machines (requires a separate install and license). Discover how certain elements affect the performance of your site when remote users connect.
Network latency Packet loss Packet duplication Packet fragmentation Bit error rates

Sampath Velupula

32

Quiz
Please give me the file extensions for each component in LoadRunner. Please tell me what is WAN Emulation.

Sampath Velupula

33

Vuser Generator

Sampath Velupula

34

Testing Process
Planning the Test

Creating Vuser scripts

Creating the scenario

Running the scenario

Monitoring the scenario

Analyzing Test Results

Sampath Velupula

35

Script Development
Record a basic Vuser script

Enhance and edit the script

Configure run-time settings

Run the Vuser script in stand-alone mode

Incorporate the Vuser script into a LoadRunner scenario

Sampath Velupula

36

Protocols

Sampath Velupula

37

Creating a script using Virtual User Generator


1. 2. 3. 4. 5. 6. Recording user actions Adding LoadRunner Transactions Parameterizing input data Adding verification checks Correlating reused data Verifying correct execution of the script

Sampath Velupula

38

What is a Script?
A Script emulates the steps of real users using the application. A VuGen script, also known as a Virtual User (vuser) or Transaction File, is the recorded user actions captured by Virtual User Generator. When played back, the file interacts with an application just like a real user. In a load test, data from this interaction is reported back to LoadRunner Analysis allowing for systematic diagnosis of the root cause problem. The script file itself is a ANSI-C script file that supports all programming conventions available to the C programming language, as well as functions specific to VuGen scripts.

Sampath Velupula

39

Recording
Monitor communication between client and server

Virtual User Generator

Browser (Client)

Proxy (Created by VuGen)

Server

Generate required function calls Insert generated function calls into Vuser script.

Sampath Velupula

40

Recording

Sampath Velupula

41

Recording Options
Use a threshold value for think time. If the recorded think time is less than the threshold. Selecting a recording level in VuGen lets you specify the information to be recorded and which functions to use when generating the script.
HTML-based script URL-based script.

For LoadRunner scripts, HTML level is a common choice. On very complex web applications, the entire script may need to be recorded at URL level.

Sampath Velupula

42

Recording Options
Setting the Recording Level:

Sampath Velupula

43

Recording Options
HTML is a higher level that records in "Browser" or "Context Sensitive" mode. This setting allows the Browser to determine which page resources (such as images or Flash content) should be downloaded depending on the HTML source that was downloaded during replay. HTML level will generate a web_submit_form statement URL is a lower level that records in "Analog" mode. This setting does not allow the browser to determine which page resources (such as images or flash) should be downloaded. Each resource is recorded in the script during the Recording session. This level will also record any hidden items, such as session information, sent to and from the server. URL Level will generate a web_submit_data statement

Sampath Velupula

44

Recording

Sampath Velupula

45

Vuser.usr

Sampath Velupula

46

default.cfg

Sampath Velupula

47

Script Details

Sampath Velupula

48

Exercise
Start Recording Stop Recording Recording Summary Work with Thumbnails View the Script in Tree view Understand snapshots Rename steps Return to workflow wizard Save script

Sampath Velupula

49

Recording Summary
Once the recording is completed, the workflow moves to the Recording Summary step. Thumbnails display the snapshot in HTML as they would appear in a browser, making it easier to select the correct step. Now the script is ready for further enhancement and editing. You can do so in
Workflow Wizard view Task View TREE VIEW SCRIPT VIEW.

Sampath Velupula

50

Tree View
URL: A URL icon is added to the script when you type in a URL or use a bookmark to access a specific web page. Link: A link icon is added to the script when you click a hypertext link while recording. Each link icon represents a web_link function in the script. Image: An image icon is added to the script when you click a hyperlink attached to an image while recording. Each image icon represents a web_image function in the script. Form/Data Submission: A Submit Form or Submit Data icon is added to the script when you submit a form while recording.

Sampath Velupula

51

Recording Snapshots
Page View: Displays the snapshot in HTML as it would appear in a browser. This button is available for both the Recording and Replay snapshots. Use this view to make sure you are viewing the correct snapshot. Server Response: Displays the server response HTML code of the snapshot. This button is available for both recorded and replayed snapshots. The HTML view also shows a tree hierarchy of the script in the left pane, with a breakdown of the document's components: Header and Body with the title, links, forms, etc. Client Request: Displays the client request HTML code of the snapshot. This button is available for both the recorded and replayed snapshots. The HTML view also shows a tree hierarchy of the script in the left pane, with a breakdown of the document's components: Header and Body and their subcomponents.
Sampath Velupula 52

Run-time Settings
Run-time settings define the way in which a script runs.
Stored in the default.cfg in the Vuser script directory. Applied to Vusers when the script is executed using VuGen or the Controller.

Configuring run-time settings enable you to emulate different kinds of user activity.

General run-time settings include:


Run Logic Number of times the action block of the script executes (iterations) Pacing the time between iterations. Log how much information is logged to the output. Think time emulates the time a real user waits between actions.

Sampath Velupula

53

Replay
After recording, always play back the script to verify that the script is running as intended. The goal is to perform a "sanity check" before the script is assigned in the Controller. Test the script with just one iteration to verify basic functionality. Configure RUN-TIME SETTINGS to test specific aspects of the script. It is strongly recommended that you re-run the script after any modifications or enhancement to verify the integrity of the script. Click the START REPLAY button to play back the script.

Sampath Velupula

54

Run-time Settings
Run Logic defines how to set iterations Log: During playback, scripts log information about themselves and their communication with the server.
These messages can be captured in the REPLAY LOG by checking (enabling) the Extended Log before playing back the script.

Proxy: A proxy server acts as an intermediary between a workstation and the Internet so that the enterprise can ensure security, administrative control and caching.

Sampath Velupula

55

Run-time Settings

Sampath Velupula

56

Run-time Settings

Sampath Velupula

57

General Settings
Animated run delay: Allows you to toggle between running a script in animated and non-animated modes.
When you run in animated mode, VuGen highlights the line of the script being executed at the current time.

Prompt for results directory: Prompts you for a results directory before running a script from VuGen. After replay show: Instructs VuGen how to proceed after the replay. Auto show function syntax: When you type the opening parenthesis of a function Auto complete word: When you type the first underscore of a function Display Tab: allows you to specify whether VuGen displays the run-time viewer

Sampath Velupula

58

REPLAY LOG
When script execution is complete, you examine the messages in the REPLAY LOG to see whether your script ran without errors. Various colors of text are used in the Replay Log:
Black: Standard output messages Red: Standard error messages Green: Literal strings that appear between quotation marks (e.g. URLs) Blue: Transaction Information (starting. ending. status and duration) Orange: The beginning and ending of iterations.

Sampath Velupula

59

Debugging Tools
Run-Time Viewer: The run-time viewer shows each web page as it is accessed by the script This is useful for debugging, as it allows you to check whether a script has accessed the correct web page or not. Replay Summary: When the script execution is complete, displays the summary of the script status. Test Results window: Summarizes the success or failure of each step of the playback web script Replay Log: When the script execution is complete, communications between the script and the server are listed in the REPLAY LOG. Snapshot Results window
Page View Server Response Client Request

Sampath Velupula

60

Example Script

Sampath Velupula

61

Transactions
Transactions are defined to measure the performance of the server. Each transaction measures the time it takes for the server to respond to specified Vuser requests. The Controller measures the time taken to perform each transaction during the execution of a performance test.

Sampath Velupula

62

Transactions
LoadRunner's means of measuring elapsed response time of one or more user steps Implemented by adding Start Transaction and End Transaction steps May overlap and may be nested May be added during or after recording Lr_start_transaction, lr_end_transaction Always use name as AppName_TransactionNumber_Process Automatic Transaction in Run-time settings Transactions help:
To measure mission-critical, heavy throughput and dynamic content business processes. In determining the nature of Application problems. In estimating which business process is failing by tracing the failed transactions With reporting the failed business process to Analysis graphs.

Sampath Velupula

63

Exercise
New Transaction Transaction Editor Transactions during recording

Sampath Velupula

64

Parameterization
Parameterizing the scripts eliminates problems that can cause errors in your testing or produce misleading load test results. When a script contains parameterized data, virtual users can make varied selections. This makes a test much more true to life, and therefore much more likely to create realistic results.

Sampath Velupula

65

When to Parameterize
Unique Constraint
While a virtual user is logged in with the 'jojo' username, any other user who tries to log in with the same username will get an error

Date Constraint
A date recorded into a script yesterday may be invalid today.

Data Dependency
Whenever the parameterized value for an object on the application determines what values are valid for another object on the application

Data Caching
Data caching problems will not cause your script to fail, but they may cause load test result to be misleading.

Sampath Velupula

66

Exercise
Parameterize Input Data Steps

Sampath Velupula

67

Parameter Types
Internal Data
Date/Time Random Number Unique Number Iteration Number Load Generator Name Vuser ID

File Parameter Types


Data files are data contained in a file - either an existing file or one that you create with VuGen. Data files hold data that a script accesses during execution. Data can be stored in local or global fi les

Table Parameter Types XML Parameter Types

Sampath Velupula

68

User-Defined Function Parameters


Data that is generated using a function from an external DLL. A user-defined function replaces the parameter with a value returned from a function located in an external DLL. __declspec(dllexport) char *<functionName>(char *, char *) When you create the library, we recommend that you use the default dynamic library path.

Sampath Velupula

69

Data Access Methods


Sequential Method Random Method Unique (by Row) Method Same Line as <parameter> Method

Runtime settings: Log -> Parameter Substitution

Sampath Velupula

70

Auto Correlation
Replay of Script Indicates Error Dynamic Value Recorded:
HTML pages often contain dynamic data, which is data that changes each time you access a site. Login string, Date/Time Stamp, Common Prefix

Sampath Velupula

71

Auto Correlation
Correlate the Script: VuGen correlation is the process of enhancing the VuGen script to process the dynamic data passed between the client (browser, or VuGen) and server, just like a live browser. Automatic correlation can be done during or after recording To work correctly, automatic correlation requires at least one playback. Correlation after recording uses a built-in comparison utility. Allows you to view the text or binary differences between the recording and playback snapshots VuGen inserts a web_reg_save_param function and a comment into your script indicating that a correlation was done for the parameter. Manually insert correlation functions

Sampath Velupula

72

Manual Correlation
Find the differences using Wdiff Locate the string and its details Identify Patterns using Boundaries Identify the string that is immediately to the left of the dynamic data. Identify the string that is immediately to the right of the dynamic data. web_reg_save_param_ex Identify Patterns using Xpaths web_reg_save_param_xpath
web_set_max_html_param_len("512"); web_reg_save_param("serverHost", "NOTFOUND=ERROR", "LB=<PARAM name=\"serverHost\" value=\"","RB=\">", LAST); web_reg_save_param("serverArgs", "NOTFOUND=ERROR", "LB=<PARAM name=\"serverArgs\" value=\"","RB=\">", LAST);

Sampath Velupula

73

Auto Correlation
Steps: Set General Options and play back the script. Review the Replay Summary. If dynamic values were detected, scan for dynamic values. Analyze the correlation results. Correlate the dynamic value by pressing the Correlate button. Verify correct execution.

Sampath Velupula

74

Verifications
A load test is always performed after functional testing. Attention should be paid to the functionality of the application while it is load tested to ensure that what worked correctly under low load still works correctly under heavier load. VuGen allows you to add Checkpoints for verification automatically and also programmatically. A text check is a search for a specified text string on a web page.
Adds web_reg_find registration function to the script. Registration means that it does not execute the search immediately, but performs the check while the page is being downloaded.

Once the Checkpoint is added, replay the script. To make sure that the text check passed view the Replay Log by clicking on the REPLAY LOG link in the Last Replay Summary View the success of the Checkpoint in the TEST RESULTS by clicking on the VIEW VISUAL TEST RESULTS link

Sampath Velupula

75

Actions
Action: In VuGen is a set of recorded user steps in a script that allow you to emulate a particular user task through script iteration. VuGen allows you to emulate user activities by grouping tasks sections called Actions There are three default Actions that a new script contains: vuser_init, Action and vuser_end. Example:
Log in recorded in Vuser_init Create New Order in Action Logout in Vuser_end

An Action is composed of steps (user or loadrunner steps)

Sampath Velupula

76

Why Record the Script with Multiple Actions?


Scripts can be divided into logical sections (Actions), like the main sections of a business process, or by specific business process. Multiple actions help you design more modular and efficient scripts. Example Actions:
Log in - VlIser_init Create New Order - Action Modify Order - Action Logout - Vuser_end

Sampath Velupula

77

Record Login In Vuser_init or Not?


Should each Vuser log in as a different user on each iteration? Should login be iterated frequently? Do you want to measure the response time for the login? Will you want to measure the ramp up effect on the login?

Sampath Velupula

78

Action Blocks
Action blocks are groups of actions within your script. When running scripts with multiple actions, blocks help you with grouping allowing you to iterate some actions more frequently than others. Open the RUN-TIME SETTING. Select the GENERAL: RUN LOGIC node. Add a new action block. Click INSERT BLOCK. VuGen inserts a new Action block at the insertion point with the next available index (BlockO. Block I, Block2). Add the desired actions to the block by Clicking INSERT ACTION and then by selecting the actions from the Actions list.

Sampath Velupula

79

Action Block Properties


Sequence: You can set the order of actions within your script. You can also indicate whether to perform actions SEQUENTlALLY or RANDOMLY. Iterations: In addition to setting the number of iterations for the entire Run section, you can set iterations for individual actions or action blocks. Weighting: For action blocks running their actions randomly, you can set the weight or percentage of each action within a block. Allows you to iterate some actions more frequently than others.

Sampath Velupula

80

Entering Steps or Function in the Script View


There are two ways to add new steps or functions to a script in the SCRIPT VIEW.
Use the INSERT ---7 NEW STEP command. Enter steps or functions manually.

Sampath Velupula

81

Rendezvous points
Rendezvous points are used to synchronize Vusers to perform a task at exactly the same moment to emulate heavy user load. When a Vuser arrives at a rendezvous point, it is held by the Controller until all Vusers participating in the rendezvous reach that point. You may only add rendezvous points in the Action section not to the init or end

Sampath Velupula

82

Rendezvous points

Sampath Velupula

83

Configuration Files
vuser_init.c Action.c vuser_end.c <protocol ID>.usr globals.h default.usp default.cfg

The C files are the initial script actions files added to a new script. default.usp is the default run logic. globals.h contains the include statement for this protocol's header and sometimes other declarations. The run-time settings configuration file, default.cfg, contains the default run-time settings. The <Protocol ID>.usr file contains the initial configuration for a new script.

Sampath Velupula

84

Template Files

The <LoadRunner installation>\merc_asl\< protocol id>.asl file lists the API functions of the protocol File <LoadRunner installation>\dat\mdrv\mdrv_<protocol id>.dat is the configuration file of the mdrv process. The <LoadRunner installation>\dat\<protocol name>_steps.dat file configures presentation of steps in the Insert Step dialog and elsewhere in the VuGen user interface. The <LoadRunner installation>\bin\vslick\builtins\<Protocol ID>RuntimesCpp.h file contains the formats of the API functions as they are displayed by IntelliSense, with a few comment lines for each function. The <LoadRunner installation>\bin\vslick\<Protocol ID>.vlx file contains the API function names and keywords. The file <LoadRunner installation>\dat\protocols\<protocol id>.lrp is the master configuration file for the protocol.

Sampath Velupula

85

Controller

Sampath Velupula

86

What is a Scenario

Sampath Velupula

87

The LoadRunner Controller


The Controller organizes and manages the scenario elements
Before scenario execution
used to design the scenario used to initiate the scenario run

During scenario execution


controls each Vuser (initialize, run, pause, stop) displays the execution status and messages of each Vuser monitors system and network resources

After scenario execution


collects and organizes performance data launches the Analysis tools (optional)

Sampath Velupula

88

Scenario Outline - Examples


number of Vusers pages per minute transaction per second transaction response time

Sampath Velupula

89

Creating a New Scenario

Sampath Velupula

90

Select Vuser Scripts

Sampath Velupula

91

Vuser Groups

Sampath Velupula

92

Adding a Vuser Group

Sampath Velupula

93

Manual vs. Goal-Oriented Scenarios

Sampath Velupula

94

Manual vs. Goal-Oriented Scenarios


Manual Scenario
Manual control over how many Vusers run and at what times. Add, start, and stop Vusers interactively during a scenario run.

Goal-Oriented Scenario
Goal may be throughput, response time or number of concurrent Vusers. LoadRunner manages Vusers automatically. Cannot add, start, or stop Vusers interactively during a scenario run.

Sampath Velupula

95

Which Scenario Type to Choose? Example

Sampath Velupula

96

Load Generators

Sampath Velupula

97

Adding a Load Generator

Sampath Velupula

98

Vuser Run-time Settings

Sampath Velupula

99

Vuser Run-time Settings


Run Logic
Is used to model more closely the way real users interact with the application.

Pacing
Controls the delay between iterations

Log Settings
Different types of information are logged depending on the options selected.

Think Time
LoadRunner Think Time is a measurement of the time that a real user takes to pause between the execution of steps in a business process

Additional Attributes
Additional attributes allows you to pass parameters to prepared scripts, enabling the testing and monitoring of servers with different client parameters.

Miscellaneous Settings

Sampath Velupula

100

Additional Settings for Web Vusers


Network
Configures bandwidth to emulate real-user behavior on the application.

Browser Emulation
Emulates different browsers to test user experience on response times and content availability.

Proxy
Configures Vusers to obtain proxy settings either from the default browser or to bypass proxy and make direct connections to the Internet.

Preferences
Generates analysis graphs by selecting options under Generate Web Performance Graphs.

Sampath Velupula

101

Running Scenarios
Load Generators at run time:
Results are stored locally on each load generator. After execution, results from all load generators are transferred to the Controllers results directory for analysis.

LoadRunner Controller at run time:


Saves transactions and performance monitor data. Synchronizes Vusers via rendezvous function (optional). Collects error and notification messages generated by Vusers.

Sampath Velupula

102

Rendezvous Point
An intersection point in a business process A Rendezvous is a step added during script creation and defined in VuGen. To use a Rendezvous, it must be configured in the Controller. When a Rendezvous is present in a script, transaction times become meaningless. A Rendezvous policy may be defined in three ways
Percentage of all users (What if everybody tried to log in now?) Percentage of all running Vusers (50% of users arrive between 8AMand 9AM) Number of users (What if 10 clients try to log in now?)

When using Rendezvous - why does transaction time become meaningless?

Sampath Velupula

103

Executing Scenarios as a Team is Recommended

Sampath Velupula

104

Top Time Transaction


A LoadRunner transaction that requires significantly longer to complete than other transactions or takes significantly longer than established goals under relatively small load. Isolating top time transactions run helps us to understand the applications responsiveness and allows us to focus on major problem areas.

Sampath Velupula

105

Scenario Executions
Debug Run
Shows the responsiveness of the site under low stress.

Isolate Top Time Transactions


The isolate top time transactions run helps us to understand the applications responsiveness and allows us to focus on major problem areas.

Full Load
The entire expected load is applied using a slow ramp up.

Scalability Test
Determine whether your system is scalable for increased load.

Sampath Velupula

106

Vuser Status - Under Controller Run Tab

Sampath Velupula

107

Initializing Vuser Groups

Sampath Velupula

108

Understanding Vuser Status

Sampath Velupula

109

Vuser Window and Vuser Log

Sampath Velupula

110

Scenario Status - Controller Run Tab


Common Run Time Errors
TIMEOUT HTTP 500

Sampath Velupula

111

Scheduling Scenarios
Enables the repetition of important usage patterns throughout load testing for the defined duration of the load test.

Sampath Velupula

112

Configure Schedule Settings


Configure Scenario Start Time Schedule by Scenario Schedule by Group Ramp Up Ramp Down Scenario Duration
Run until completion Run for Run indefinitely

Sampath Velupula

113

The Value of Performance Monitors


Performance monitors may detect such things as:
Web server memory usage is at the maximum Low activity is registered by the database server Underutilization of the application server

Sampath Velupula

114

LoadRunner Performance Monitors

Sampath Velupula

115

Set Monitoring Options

Sampath Velupula

116

Configure Monitors

Sampath Velupula

117

Monitor Measurements

Sampath Velupula

118

Analysis

Sampath Velupula

119

Root Cause Analysis


Performing root cause analysis means drilling down from the most general reports to localized metrics
Compare results against goals - confirm performance has not met expectations. Identify potential bottlenecks - list all the pieces of the system which might have caused that slowdown. Correlate results - determine the most likely culprit by correlating transaction times and backend monitor metrics.

Sampath Velupula

120

Did You Meet Your Goals

Sampath Velupula

121

Average Transaction Response Time


Details transaction response throughout the test. Identifies problematic transactions. Identifies problematic points in the test. Response time exceeded the goal at about 20+ minutes into the test.

Sampath Velupula

122

Average Transaction Response Time Under Load


Details transaction response time as a function of load. Identifies under what load conditions transaction times begin to degrade. By looking at the Average Transaction Response Time Under Load, we can see response time degrades above ~70 users.

Sampath Velupula

123

Transaction Response Time Percentile


Details transaction response time as a service level. Identifies percentage of transactions complete over time. The project manager has defined the Service Level Agreement as 99.9% (or greater!).

Sampath Velupula

124

Transaction Response Time Distribution


Details transaction response time as a distribution count. Identifies number of transactions complete over time. By drilling down on a transaction (Credit), we can see that most of the customers seem to be within the Service Level.

Sampath Velupula

125

Isolating Network Issues


Network Delay Time shows spikes in latency, indicating network issues. Network Sub-Path Time shows a hop with spikes, confirming network issues.

Sampath Velupula

126

Time to First Buffer Breakdown


Time to First Buffer is the period between a browser request and the first reply. Provides high level Server vs. Network determination. it is useful to isolate Server vs. Network in an effort to quantify where a majority of the time is spent.

Sampath Velupula

127

Page Download Time Breakdown


Identifies Web pages that take the most time and isolates where time is spent. Helps isolate DNS resolution issues, SSL issues, and connection issues.

Sampath Velupula

128

Auto Correlation
Auto Correlation
Allows automatic selection of graphs to correlate in order to find the metrics that most influence the transaction response time Automatically correlates the transaction graph with all performance metrics and displays the ones that show the highest match in their behavior; this allows you to disregard irrelevant metrics Visually displays correlated metrics closely correlated to the transaction response time, which speeds identification of the likely causes of performance bottlenecks

Auto Correlation lets you correlate a measurement in a graph with other monitor measurements during a specific time range of the scenario. This enables you to view similar measurement trends.

Sampath Velupula

129

Auto Correlate - Time Range


Details transaction response time as a distribution count. Identifies number of transactions complete over time. By drilling down on a transaction (Credit), we can see that most of the customers seem to be within the Service Level.

Sampath Velupula

130

Quiz

Sampath Velupula

131

Report Metrics
Load size: The number of concurrent Virtual Clients trying to access the site. Throughput: The average number of bytes per second transmitted from the ABT (Application being tested) to the Virtual Clients running this Agenda during the last reporting interval Round Time: It is the average time it took the virtual clients to finish one complete iteration of the agenda during the last reporting interval. Transaction Time: The time it takes to complete a successful request, in seconds. (For a web-based application, each request for each gif, jpeg, html file, etc. is a single transaction.) The time of a transaction is the sum of the Connect Time, Send Time, Response Time, and Process Time Connect Time: The Time it takes for a Virtual client to connect to the Application Being Tested.
Sampath Velupula 132

Report Metrics
Send Time: The time it takes the Virtual Clients to write a request to the ABT (Application being tested), in seconds. Response Time: The time it takes the ABT(Application being tested) to send the object of a request back to a Virtual Client, in seconds. In other words, the time from the end of the request until the Virtual Client has received the complete item it requested. Process Time: The time it takes to parse a response from the ABT (Application being tested) and then populate the document-object model (the DOM), in seconds. Wait Time (Average Latency): The time it takes from when a request is sent until the first byte is received. Receive Time: The elapsed time between receiving the first byte and the last byte.
Sampath Velupula 133

Functions

Sampath Velupula

134

Common Functions
Message functions
lr_error_message and lr_output_message Send messages to the output, indicating an error or a warning.

Transaction Functions
lr_start_transaction and lr_end_transaction Add transactions and synchronization points to a script. For example, the lr_start_transaction function marks the beginning of a transaction, and the lr end transaction function marks the end of a transaction.

Run-Time Functions
lr_think_time and lr_exit

Parameter Functions
lr_save_date time, lr_advance param, lr eval string, lr_save string and lr get attrib_string

Sampath Velupula

135

Common Functions
Ir_abort
Aborts the execution of a script. It stops the execution of the Actions section, executes the vuser_end section, and ends the execution:

Ir exit
lr exit (int continuation_option, int exit status); lr_exit(LR_EXIT VUSER, LR_FAIL); Exits from the script, action, or iteration:

Ir_save_string
Assigns the specified null-tenninated string to a parameter: lr_save_string(canst char *param_value, canst char *param_name); This function is useful in correlating queries. lr_save_string(777, emp_id);

Sampath Velupula

136

Common Functions
Ir_save_date_time
Saves the date and time into a parameter: lr save_date_time(const char *format, int offset, canst char *name};

Ir_advance_param
Advances to the next available value in the parameter data file: lr_advance_param (const char * param);

Ir_eval_string
Returns the value of the parameter as a string. lr eval string("(parameter name)");

Ir_get_attrib_string
Assigns the specified null-tem1inated string to a parameter lr_get_attrib string (canst char * argument); lr_save_string(lr_get_attrib_string("URL"),"TescURL";

Sampath Velupula

137

Common Functions
Web_reg_save_param
Saves dynamic data information to a parameter: web_reg_save_param(const char *ParamName,LB,RB,ORD,SaveLen,SaveOffset, LAST); web_reg_save_param("tlight_name","LB=Select your departure",rtRB="U,LAST);

Web_reg_find
Registers a search for a text string for the next Action function: Web_reg find("Text=Welcome", SaveCount, LAST); web reg_find ("SaveCount=booked_count", "Text=our \n""itinerary has been booked", LAST);

Sampath Velupula

138

Command & Informational

SAMPATH VELUPULA

139

Message and Runtime

SAMPATH VELUPULA

140

String

SAMPATH VELUPULA

141

Transactions

SAMPATH VELUPULA

142

Web Action and Search Functions

SAMPATH VELUPULA

143

Web Correlation and Header

SAMPATH VELUPULA

144

Web Cookie, Authentication & Replay

SAMPATH VELUPULA

145

Web Misc

SAMPATH VELUPULA

146

Citrix Connection, Mouse, Keyboard

SAMPATH VELUPULA

147

Citrix Selection & Synchronization

SAMPATH VELUPULA

148

Citrix Informational & General

SAMPATH VELUPULA

149

ANSI C in VuGen
Variable
A variable is a named entity which may represent different values at different times.

Constant
A constant is a named entity which always represents the same value. lr save datetime("Tomorrow is %B %d %Y", DATE NOW + ONE DAY, "next ") ; Another example: if (event == GENERAL ERROR) lr set transaction status(LR FAIL); lr end transaction("tl", LR AUTO);

Sampath Velupula

150

Branching Statement

Sampath Velupula

151

Loop Statement

Sampath Velupula

152

C Language Functions

SAMPATH VELUPULA

153

C Language Functions

SAMPATH VELUPULA

154

C Language Functions

SAMPATH VELUPULA

155

Quiz

SAMPATH VELUPULA

156

THANK YOU
SAMPATH VELUPULA

Potrebbero piacerti anche