HP LoadRunner
for the Windows operating system
Software Version: 11.50
User Guide
Document Release Date: June 2012
Software Release Date: June 2012
User Guide
Legal Notices
Warranty
The only warranties for HP products and services are set forth in the express warranty statements accompanying such products and services. Nothing herein should be construed as constituting an additional warranty. HP shall not be liable for technical or editorial errors or omissions contained herein.
The information contained herein is subject to change without notice.
Restricted Rights Legend
Confidential computer software. Valid license from HP required for possession, use or copying.
Consistent with FAR 12.211 and 12.212, Commercial Computer Software, Computer Software
Documentation, and Technical Data for Commercial Items are licensed to the U.S. Government under vendor's standard commercial license.
Copyright Notice
© Copyright 1993-2012 Hewlett-Packard Development Company, L.P.
Trademark Notices
Adobe™ is a trademark of Adobe Systems Incorporated.
Microsoft® and Windows® are U.S. registered trademarks of Microsoft Corporation.
Oracle and Java are registered trademarks of Oracle and/or its affiliates.
UNIX® is a registered trademark of The Open Group.
Page 2 of 1812 HP LoadRunner (11.50)
User Guide
Documentation Updates
The title page of this document contains the following identifying information: l
Software Version number, which indicates the software version.
l
Document Release Date, which changes each time the document is updated.
l
Software Release Date, which indicates the release date of this version of the software.
To check for recent updates or to verify that you are using the most recent edition of a document, go to:
http://h20230.www2.hp.com/selfsolve/manuals
This site requires that you register for an HP Passport and sign in. To register for an HP Passport
ID, go to:
http://h20229.www2.hp.com/passport-registration.html
Or click the New users - please register link on the HP Passport login page.
You will also receive updated or new editions if you subscribe to the appropriate product support service. Contact your HP sales representative for details.
Page 3 of 1812 HP LoadRunner (11.50)
User Guide
Support
Visit the HP Software Support Online web site at:
http://www.hp.com/go/hpsoftwaresupport
This web site provides contact information and details about the products, services, and support that HP Software offers.
HP Software online support provides customer self-solve capabilities. It provides a fast and efficient way to access interactive technical support tools needed to manage your business. As a valued support customer, you can benefit by using the support web site to: l
Search for knowledge documents of interest l
Submit and track support cases and enhancement requests l
Download software patches l
Manage support contracts l
Look up HP support contacts l
Review information about available services l
Enter into discussions with other software customers l
Research and register for software training
Most of the support areas require that you register as an HP Passport user and sign in. Many also require a support contract. To register for an HP Passport ID, go to:
http://h20229.www2.hp.com/passport-registration.html
To find more information about access levels, go to:
http://h20230.www2.hp.com/new_access_levels.jsp
Page 4 of 1812 HP LoadRunner (11.50)
User Guide
Disclaimer for PDF Version of Online Help
This document is a PDF version of the online help. This PDF file is provided so you can easily print multiple topics from the help information or read the online help in PDF format.
Note: Some topics do not convert properly to PDF, causing format problems. Some elements of online help are completely removed from the PDF version. Those problem topics can be successfully printed from within the online help.
Page 5 of 1812 HP LoadRunner (11.50)
Contents
User Guide
Contents
Welcome To LoadRunner User Guide
Documentation Library
Topic Types
Additional Online Resources
What's New
VuGen
Working with VuGen
Overview
VuGen Overview
Vuser Overview
Vuser Types
Keyboard Shortcuts
Online Resources
Main VuGen User Interface
VuGen Main User Interface - Overview
Performing Common Tasks in the New VuGen Interface
VuGen Layouts - Overview
Solution Explorer - Overview
Editor - Overview
Snapshot Pane - Overview
Snapshots that Have an XML View
How to Work with Snapshots
How to Add a Text Check From the XML View in the Snapshot Pane
How to Create a Business Process Report
How to Create a Vuser Script - Workflow
Page 6 of 1812
59
61
65
74
78
79
70
73
74
81
82
65
65
65
65
67
90
91
92
85
87
88
58
58
58
1
6
HP LoadRunner (11.50)
User Guide
Contents
How to Compare Scripts Side by Side
How to Modify the VuGen Layout
How to Work with Custom VuGen Layouts
Options Overview
General Options
Editor Options
Scripting Options
Search and Replace Dialog Boxes
Editor
Business Process Report Dialog Box
Steps Toolbox Pane
Solution Explorer Pane
Output Pane
Snapshot Pane
Bookmarks Pane
Step Navigator Pane
Errors Pane
Task Pane
Breakpoints Pane
Watch Pane
Call Stack Pane
Troubleshooting and Limitations
Protocol Advisor
How to use the Protocol Advisor
Protocol Advisor Dialog Box
Troubleshooting and Limitations
Recording
Vuser Script Templates
Notes and Limitations
Script Sections
Script Directory Files
Multiple Protocol Scripts
Page 7 of 1812
126
127
127
128
128
130
131
131
114
118
119
121
122
123
124
125
131
132
132
135
135
103
107
109
96
97
99
111
112
93
93
95
HP LoadRunner (11.50)
User Guide
Contents
Providing Authentication Information
Generating a web_set_user function
How to Record a Vuser Script
How to Create and Open Vuser Script Templates
Notes and Limitations
How to Work with .zip Files
How to Import Code from a Script
How to Regenerate a Vuser Script
How to Create or Open a Vuser Script
Record Dialog Box
Floating Recording Toolbar
Files Generated During Recording
Create a New Script Dialog Box
Replaying and Debugging Vuser Scripts
Replay Overview
Debugging Features
Error Handling
Bookmarks Overview
Additional Debugging Information
Working with Breakpoints
Watching Expressions and Variables
Debugging Web Vuser Scripts
How to Replay a Vuser Script
How to Run a Vuser Script from a Command Prompt
How to Run a Vuser Script from a Linux command line
How to Debug Scripts with Breakpoints
How to Use Bookmarks
Files Generated During Replay
Correlation/Async Studio
Correlation Studio
Correlation Overview
Correlation Studio Overview
Page 8 of 1812 HP LoadRunner (11.50)
151
151
153
153
153
154
156
157
144
145
147
147
147
149
150
150
158
159
159
159
159
135
136
137
137
138
138
138
139
139
140
142
User Guide
Contents
Page 9 of 1812
Determining Which Values to Correlate
Modifying Saved Parameters
Correlation vs. Parameterization
Wdiff Correlation Utility
How to Correlate Scripts Using Design Studio
How To Manually Correlate Scripts
Correlating Winsock Scripts
How to Correlate Scripts - Winsock (Manually)
How to Correlate Scripts - Web (Manually)
How to Correlate Scripts - Tuxedo Protocol
How to Correlate Scripts - Siebel Protocol
How to Correlate Scripts - Oracle NCA
How to Correlate Scripts - Microsoft .NET
How to Correlate Scripts - Java Scripts - Serialization
How to Correlate Scripts - Java
How to Correlate Scripts - XPath Correlation in Flex Vuser Scripts
How to Correlate Scripts - Database Protocols
How to Correlate Scripts - COM Protocol
How to Search for Values that Need Correlation
Correlation Functions - Database Vuser Scripts
Correlation Functions - Java Vuser Scripts
Web_reg_save_param function details
Correlation Functions - C Vuser Scripts
Correlation Studio Dialog Box
Async Studio
Synchronous and Asynchronous Concepts
Types of Asynchronous Communication
An Introduction to LoadRunner Support for Asynchronous Communication
How to Create an Asynchronous Vuser Script
Asynchronous Communication API
How Asynchronous Functions Differ from Synchronous Functions
How VuGen Modifies a Vuser Script for Asynchronous Communication
187
188
189
190
190
193
193
194
177
179
180
183
185
186
186
186
197
198
200
201
202
161
162
162
162
163
164
164
165
166
168
172
HP LoadRunner (11.50)
User Guide
Contents
Defining the Start of an Asynchronous Conversation
Defining the End of an Asynchronous Conversation
Using Asynchronous Request Thresholds
Fine-Tuning the End of an Asynchronous Conversation
Correlating Asynchronous Vuser Scripts
Implementing Callbacks
Modifying Callbacks
Parsing URLs
Async Rules
Enabling Asynchronous Scripts to Run
Async Tab [Design Studio]
Asynchronous Request Thresholds Dialog Box
Asynchronous Example - Poll
Asynchronous Example - Push
Asynchronous Example - Long-Poll
Preparing Scripts for Load Testing
General Vuser Functions
Protocol-Specific Vuser Functions
Password Encoding
Encrypting Text
Transaction Overview
Rendezvous Points
How to Encrypt/Decrypt Text
How to Encode a Password
How to Create a Controller Scenario from VuGen
How to Insert Transactions
How to Display Transactions
How to Prepare a Script for Load Testing
How to Insert Steps into a Script
Useful VuGen Functions
Create Controller Scenario Dialog Box
Password Encoder Dialog Box
Page 10 of 1812 HP LoadRunner (11.50)
225
225
226
226
226
227
227
228
216
217
219
221
223
223
224
225
228
230
231
233
234
204
205
206
207
207
208
210
212
214
214
215
User Guide
Contents
Viewing Test Results
Test Results Overview
Customizing the Test Results Display
234
235
235
Connecting to Application Lifecycle Management from the Test Results Window
235
How to Send Custom Information to the Report
How to Configure the Appearance of the Test Results Window
236
236
How to Open the Test Results of a Specific Run
How to Find Steps in the Test Results
236
237
Test Results Window
Filters Dialog Box
Print Dialog Box
Print Preview Dialog Box
Export to HTML File Dialog Box
Working with Application Lifecycle Management
Managing Scripts Using ALM Overview
ALM Version Control Overview
How to Work with Scripts in ALM Projects
Connect to ALM
How to Submit Defects to ALM
How to Work with Version Controlled Scripts in ALM Projects
How to Save VuGen Scripts to ALM Projects
How to View/Modify Previous Versions of a Script
HP ALM Connection Dialog Box
Upload Script Dialog Box
Parameters
Parameter Overview
Parameter Types
Data Assignment Methods for File/Table/XML Parameters
Data Assignment and Update Methods for File/Table/ XML Parameters
Vuser Behavior in the Controller (LoadRunner Only)
Tuxedo and PeopleSoft Parameters
247
247
249
250
251
253
253
243
243
244
244
245
245
246
247
237
239
240
240
241
242
242
243
Page 11 of 1812 HP LoadRunner (11.50)
User Guide
Contents
XML Parameters
How to Create a Parameter
How to Create an XML Parameter from a Web Service Call
How to Create XML Parameters - Standard Method
How to Define XML Value Sets
How to Set an Assignment Method
How to Modify XML Parameter Properties
How to Work with Existing Parameters
How to Import Parameter Data from a Database
Select or Create Parameter Dialog Box
Parameter Properties Dialog Box
Parameter Simulation Dialog Box
Parameter List Dialog Box
Database Query Wizard
Create Parameter Dialog Box (Winsock)
Parameter Original Value Dialog Box
Recording Options
Port Mapping Overview
Port Mapping Auto Detection
EUC-Encoding (Japanese Windows only)
Script Generation Preference Overview
Script Language Options
Recording Levels Overview
Serialization Overview
Tips for Working with Event Listening and Recording
Example of Click & Script Out of Context Recording
Protocol Compatibility Table
Citrix > Configuration Node
Citrix > Code Generation
Citrix > Login Node
Citrix > Recorder Node
COM/DCOM > Filter Node
Page 12 of 1812 HP LoadRunner (11.50)
277
278
278
279
281
281
281
282
270
273
275
275
276
276
276
276
285
286
286
288
288
253
254
255
256
256
260
260
261
261
262
263
User Guide
Contents
Page 13 of 1812
COM/DCOM > Options Node
Correlations > Configuration
Correlations > Rules
New Rule Pane
Advanced Correlation Properties Dialog Box
Token Substitution Testpad Dialog Box
Database > Database Node
Database > Advanced Recording Options Dialog Box
Data Format Extension > Chain Configuration Node
Add Prefix/Postfix to Chain Dialog Box
Add Data Format Extension
Data Format Extension > Code Generation Node
EJB > Code Generation Options Node
Flex > RTMP Node
Flex > Configuration Node (Recording)
Flex Code Generation Node
Flex > Externalizable Objects Node (Recording)
General > Protocol Node
General > Code Generation
General > Recording Node
Advanced URL Dialog Box
Advanced HTML Dialog Box
General > Script Node
GUI Properties > Web Event Configuration Node
Custom Web Event Recording Configuration Dialog Box
HTTP > Advanced Node
Headers Dialog Box
Content Type Filters Dialog Box
Non-Resources Dialog Box
Java > Classpath Node
Java > VM Node
.NET > Filters Node
307
307
308
309
311
312
314
315
301
303
303
304
304
305
306
306
316
316
317
318
318
290
291
293
295
296
296
297
297
298
300
301
HP LoadRunner (11.50)
User Guide
Contents
Create a New Filter Dialog Box [.NET Protocol]
Filter Manager [.NET Protocol]
Add Reference Dialog Box [.NET Protocol]
GUI Properties > Advanced Node
.NET > Recording - Recording Node
Remote Objects Property
.NET > Shared DLLs
Mobile TruClient Properties > Mobile Device Node
Network > Port Mapping Node
Server Entry Dialog Box
Advanced Port Mapping Settings Dialog Box
RDP > Code Generation > Advanced Node
RDP > Code Generation > Agent Node
RDP >Code Generation > Basic Node
RDP > Client Startup Node
Recording Properties > Corba Options Node
Recording Properties > Correlation Options Node
Recording Properties > Log Options Node
Recording Properties > Recorder Options Node
Recording Properties > Serialization Options Node
RTE > Configuration Node
RTE > RTE Node
SAPGUI > Auto Logon Node
SAPGUI > Code Generation Node
SAPGUI > General Node
Silverlight > Services Node
Add / Edit Services Dialog Box
Connection Settings Dialog Box
Protocol and Security Scenario Data Dialog Box
Traffic Analysis > Traffic Filter
WinSock Node
Run-Time Settings
Page 14 of 1812
338
338
339
340
340
340
341
342
331
332
332
334
334
335
336
336
342
343
344
345
346
319
319
322
322
323
325
326
327
327
328
331
HP LoadRunner (11.50)
User Guide
Contents
Page 15 of 1812
Run-Time Settings Overview
Content Checking Overview
Multithreading
Protocol Compatibility Table
Browser > Browser Emulation Node
Citrix > Configuration Node
Citrix > Synchronization Node
COM/DCOM > Options Node
Data Format Extension > Code Generation Node
Flex > Configuration Node (Run-Time Settings)
Flex > Externalizable Objects Node (Run-Time Settings)
Flex > RTMP Node
General > Additional Attributes Node
General > Log Node
General > Log Node (TruClient)
General > Advanced Settings (TruClient)
Load > Browser Settings Node (TruClient)
Load > Other Settings (TruClient)
General > Replay Node
General > Miscellaneous Node
General > Pacing Node
General > Run Logic Node
General > Think Time Node
Internet Protocol > ContentCheck Node
Internet Protocol > Download Filters Node
Internet Protocol > Preferences Node
Advanced Options Dialog Box
Internet Protocol > Proxy Node
Java Environment Settings > Java Classpath Node
Java Environment Settings > Java VM Node
JMS > Advanced Node
MMS > Server and Protocol Node
368
369
369
370
371
372
372
374
358
359
359
360
361
362
364
364
380
381
381
382
383
346
346
347
347
352
354
355
355
356
357
357
HP LoadRunner (11.50)
User Guide
Contents
Mobile TruClient Properties > Mobile Device Node
.NET > .NET Environment Node
.NET > Shared DLLs
Network > Speed Simulation Node
Oracle NCA > Client Emulation Node
RDP > Advanced Node
RDP > Configuration Node
RDP > RDP Agent Node
RDP > Synchronization Node
RTE > RTE Node
SAPGUI > General Node
Silverlight > Services Node
VBA > VBA Node
WAP > Gateway Node
WAP > Radius Node
Protocols
AJAX - Click & Script Protocol
AJAX - Click & Script - Protocol Overview
AJAX - Click & Script - Supported Frameworks
Ajax - Click & Script - Example Script
Click & Script - Recording Tips
Click & Script - Replay Tips
Click & Script - Miscellaneous Tips
Click and Script - Troubleshooting and Limitations
Firefox is not supported
Application behaves differently while being recorded
Certain Click and Script steps do not generate properly
Dynamic menu navigation was not recorded
Certain user actions were not recorded
GUI object not found
Replay failure
Out of memory error in JavaScript
Page 16 of 1812
397
398
399
400
401
401
401
401
393
393
394
396
396
396
397
397
402
402
402
403
404
384
385
386
386
387
388
389
389
390
391
392
HP LoadRunner (11.50)
User Guide
Contents
VuGen displays JavaScript errors
Problems following parameterization
Problems with applications that utilize styling actions
Ajax TruClient Protocol
Ajax TruClient Protocol Overview
TruClient Snapshots - Overview
TruClient Alternative Steps
TruClient Script Levels
TruClient Global Event Handlers
Global Firefox Browser Settings
TruClient Functions and Function Libraries
Firefox Private Browsing
Considerations for Working With Ajax TruClient Scripts
Where is JavaScript Supported
How Can I Learn More about JavaScript
Script Debugging Tips
General Tips Regarding Successful Interactive Replay
General Tips Regarding Successful Recording
Resolving Step Timeouts
Using Regular Expressions
How to Record Ajax TruClient Scripts
How to Debug Ajax TruClient Scripts
How to Resolve Object Identification Issues
How to Insert and Modify Loops
How to Insert Custom JavaScript and C Code into Ajax TruClient Scripts
How to Enhance Ajax TruClient Scripts
How To Use The Global Events Handler
How To Create and Use Function and Libraries
TruClient Step Arguments
TruClient Functions
TruClient Properties
TruClient Home Tab
413
414
415
416
421
422
422
424
411
412
412
412
412
413
413
413
426
427
431
435
436
404
404
404
405
405
407
408
408
409
411
411
Page 17 of 1812 HP LoadRunner (11.50)
User Guide
Contents
TruClient Edit Tab
Ajax TruClient General Settings Dialog Box
TruClient Events Handler Editor Dialog Box
TruClient Toolbox
TruClient Step Structure
TruClient Browser for IE
Create New Function Dialog Box
Transaction Editor Dialog Box
Troubleshooting Object Identification Issues
Troubleshooting TruClient Scripts
Troubleshooting Load Mode for TruClient Scripts
TruClient General Troubleshooting and Limitations
Troubleshooting Communication between VuGen and TruClient
Word Verification Function in the Business Process
Citrix Protocol
Citrix Protocol - Overview
Citrix Recording Tips
Citrix Replaying Tips
Citrix Synchronization
Citrix- Automatic Synchronization
Citrix Alternate Synchronization
Agent for Citrix Presentation Server Overview
Troubleshooting Xenapp 5.0
How to Configure the Citrix Client and Server
How to Synchronize Citrix Scripts Manually
How to Install and Uninstall the Citrix Agent
Citrix Functions
Citrix - Understanding ICA Files
Failed Bitmap Synchronization Dialog Box
Troubleshooting and Limitations
Single Client Installation
Add Breakpoints
Page 18 of 1812 HP LoadRunner (11.50)
457
458
460
462
463
464
464
465
453
453
454
454
454
455
456
457
465
466
467
468
468
438
439
441
443
444
447
448
448
449
450
452
User Guide
Contents
Synchronize Your Script
Continuing on Error
Extended Log
Snapshot Bitmap
Show Vusers
COM Protocol
COM Protocol Overview
COM Technology Overview
COM Vuser Script Structure
COM Sample Vuser Scripts
Selecting COM Objects to Record
Database Protocols
Database Protocols Overview
VuGen Database Recording Technology
Database Grids
Oracle Applications
Handling Database Errors
Debugging Database Applications
Troubleshooting and Limitations
IE crashes when recording Oracle NCA/11i scripts
Evaluating Error Codes
ORA-20001 and ORA-06512
Modified code:
Working with large numbers
ORA-00960
ORA-2002
Wrong Client Version
Enterprise Java Beans (EJB) Protocol
EJB Testing Overview
EJB Detector Output and Log Files
How to Create an EJB Vuser Script
How to Run an EJB Vuser Script
Page 19 of 1812 HP LoadRunner (11.50)
483
483
487
488
489
489
490
490
477
477
477
478
479
480
481
482
491
491
492
492
496
468
468
469
469
469
470
470
470
471
472
475
User Guide
Contents
How to Install and Run the EJB Detector
How to Run the EJB Detector from the command line
How to Run the EJB Detector from a batch file
How to Set and Verify the Java Environment
Generate EJB Script Dialog Box
EJB Vuser Script Examples
Locating the EJB Home Using JNDI
Creating an Instance
Invoking the EJB Methods
Flex (RTMP/AMF) Protocol
Flex Overview
Flex Correlations
Code Generation Notification
Parsing Responses in Flex Scripts
RTMP Tunneled
Externalizable Objects in Flex Scripts
How to Query an XML Tree
How to Serialize Using External Java Serializer
Notes and Limitations for the Java Serializer
How to Serialize Scripts with the LoadRunner Serializer
Flex AMF Example Scripts
Setting the Flex Recording Mode
Example
Flex Functions and Examples
Java Protocol
Java Protocol Recording Overview
Java Vuser Script Overview
RMI over IIOP Overview
Corba Recording Options
CORBA Application Vendor Classes
Recording RMI
Recording a Jacada Vuser
Page 20 of 1812 HP LoadRunner (11.50)
513
513
514
514
515
517
517
518
505
506
506
506
509
510
512
513
518
519
519
519
519
496
497
497
498
500
501
501
502
503
504
504
User Guide
Contents
Working with CORBA
Working with RMI
Working with Jacada
Java Custom Filters - Overview
Java Custom Filters - Determining which Elements to Include
How to Record a Java Vuser Script
How to Record Java Scripts Using Windows XP and 2000 Server
How to Run a Script as Part of a Package
How to Manually Insert Java Methods
How to Manually Configure Script Generation Settings
How to Create a Custom Java Filter
Hook File Structure
Java Icon Reference List
Java Protocol - Manually Programming Scripts
Manually Programming Java Scripts - Overview
Java Protocol Programming Tips
Running Java Vuser Scripts
Compiling and Running a Script as Part of a Package
How to Manually Create a Java Script
How to Enhance a Java Script
Java over HTTP Protocol
Java over HTTP Protocol Overview
Viewing Responses and Requests in XML Format
How to Record with Java over HTTP
How to Debug Java over HTTP scripts
How to Insert Parameters into Java over HTTP Scripts
Troubleshooting and Limitations
LDAP Protocol
LDAP Protocol Overview
LDAP Protocol Example Script
Defining Distinguished Name Entries
LDAP Connection Options
Page 21 of 1812 HP LoadRunner (11.50)
538
541
541
542
542
543
544
544
530
532
532
533
533
534
535
535
545
545
546
547
548
520
521
522
523
523
524
525
525
525
527
529
User Guide
Contents
Mailing Service Protocols
Mailing Service Protocols Overview
IMAP Protocol Overview
MAPI Protocol Overview
POP3 Protocol Overview
SMTP Protocol Overview
Mobile Protocols Overview
Protocol Options for Mobile
Network Speed Simulation
Network > Speed Simulation Node
Recording Methods
Recording Traffic Into A Capture (Sniffer) File
Analyzing Traffic
Recording with Emulation
How to Create a Script by Analyzing Traffic
How to Record and Analyze a Script for Mobile Applications
Recording Wizard
Recording Method Dialog Box
Analyze Traffic Dialog Box
Configure and Record Dialog Box
Record Emulation Dialog Box
Mobile TruClient Protocol
565
565
566
How to Record a Script with Mobile TruClient 566
How to Add, Remove, and Import Mobile Device Settings for Mobile TruClient
567
554
559
560
561
562
563
564
564
Mobile TruClient Device Manager Dialog Box
.NET Protocol
.NET Protocol Overview
Viewing Data Sets and Grids
Recording WCF Duplex Communication
Replacement of the Callback in the Script
Asynchronous Calls
567
568
568
568
569
572
573
549
549
549
550
550
551
552
552
552
553
554
Page 22 of 1812 HP LoadRunner (11.50)
User Guide
Contents
Recording Dual HTTP Bindings
Connection Pooling
Debugging .NET Vuser Scripts
.NET Filters Overview
.NET Filters - Advanced
Guidelines for Setting .NET Filters
How to Configure Application Security and Permissions
Troubleshooting and Limitations
Oracle NCA Protocol
Oracle NCA Protocol Overview
Oracle NCA Protocol Example Scripts
Oracle NCA Record and Replay Tips
Pragma Mode
How to Enable the Recording of Objects by Name
How to Launch Oracle Applications via the Personal Home Page
Troubleshooting and Limitations
RDP Protocol
RDP Protocol - Overview
RDP Recording Tips
Working with Clipboard Data (RDP Protocol)
Correlating Clipboard Parameters
RDP Snapshots - Overview
Image Synchronization Overview
Image Synchronization Tips (RDP Protocol)
Image Synchronization - Shifted Coordinates (RDP Protocol)
RDP Agent (Agent for Microsoft Terminal Server) Overview
How to Install / Uninstall the RDP Agent
How to Add Image Synchronization Points to a Script
Failed Image Synchronization Dialog Box (RDP Protocol)
Troubleshooting and Limitations
RTE Protocol
RTE Protocol Overview
Page 23 of 1812 HP LoadRunner (11.50)
592
593
593
594
595
596
596
598
584
585
586
588
589
591
591
591
599
599
600
601
601
574
574
575
576
577
578
581
582
582
582
583
User Guide
Contents
Working with Ericom Terminal Emulation
SSL and SSH Support for Ericom
Typing Input into a Terminal Emulator
Setting the Timeout Value for TE_type
Allowing a Vuser to Type Ahead
Generating Unique Device Names
Setting the Field Demarcation Characters
Reading Text from the Terminal Screen
RTE Synchronization Overview
Synchronizing Block-Mode (IBM) Terminals
Synchronizing Character-Mode (VT) Terminals
How to Map Terminal Keys to PC Keyboard Keys
How to Record RTE Scripts
How to Implement Continue on Error
SAP Protocols
Selecting an SAP Protocol Type
SAP GUI Protocol
SAP Web Protocol
SAP (Click & Script) Protocol
Replaying SAP GUI Optional Windows
How to Configure the SAP Environment
How to Record SAP GUI Scripts
How to Replay SAP GUI Scripts
How to Run SAP GUI Scripts in a Scenario
How to Enhance SAP GUI Scripts
Additional SAP Resources
Troubleshooting and Limitations
Siebel Web Protocol
Siebel Web Protocol Overview
Siebel Web Recording Options and Run-Time Settings
How to Record Transaction Breakdown Information
Troubleshooting and Limitations
Page 24 of 1812 HP LoadRunner (11.50)
622
622
627
628
629
630
634
634
613
614
616
616
616
617
620
621
635
635
636
636
637
602
602
603
604
604
605
606
607
608
608
610
User Guide
Contents
SilverLight Protocol
Silverlight Protocol Overview
How to Import WSDL Files
Troubleshooting and Limitations
Tuxedo Protocols
Tuxedo Protocol - Overview
Notes About Working with Tuxedo Scripts
Defining Environment Settings for Tuxedo Vusers
Tuxedo Buffer Data
Troubleshooting and Limitations
Web (Click & Script) Protocol
Web (Click & Script) Protocol
Web (Click & Script) Enhancements
Web (Click & Script) Example Script
Web (Click & Script) API Notes
Ordinals
Empty Strings
Click & Script - Recording Tips
Click & Script - Replay Tips
Click & Script - Miscellaneous Tips
Click and Script - Troubleshooting and Limitations
Firefox is not supported
Application behaves differently while being recorded
Certain Click and Script steps do not generate properly
Dynamic menu navigation was not recorded
Certain user actions were not recorded
GUI object not found
Replay failure
Out of memory error in JavaScript
VuGen displays JavaScript errors
Problems following parameterization
Problems with applications that utilize styling actions
Page 25 of 1812 HP LoadRunner (11.50)
651
651
651
652
652
652
652
653
644
644
647
647
648
648
648
650
654
654
655
655
655
639
639
639
640
640
640
641
641
642
643
644
User Guide
Contents
Web Protocols
Web Protocols Overview
Web Vuser Technology
Web Vuser Types
Working with Cache Data
Text and Image Verification
Understanding Web Check Functions
Data Format Extensions
Google Web Toolkit - Data Format Extension (GWT-DFE) - Overview
Web Snapshots - Overview
XML Pages
How to Add Text Checks and Image Checks
How to Convert Web Vuser Scripts into Java
How to Insert Caching Functions
How to Create or Modify Chains of Data Format Extensions
How to Apply Chains to Sections of the HTTP Message
How to use GWT-DFE
Data Format Extension List
Web Services
Web Services - Adding Script Content
Web Service Testing Overview
Adding Web Service Script Content Overview
Script Integration
Web Service Call Attachments
Special Argument Types
Server Traffic Scripts Overview
Capture Files
Filtering Traffic
Data on Secure Servers
How to Add Content
How to Assign Values to XML Elements
How to Generate a Test Automatically
Page 26 of 1812 HP LoadRunner (11.50)
670
670
670
672
672
673
675
676
663
664
665
666
667
668
669
670
677
678
678
680
681
655
655
656
656
658
659
660
661
661
662
663
User Guide
Contents
Page 27 of 1812
How to Create a Script by Analyzing Traffic
Specify Services Screen
Specify Application to Record Dialog Box
Import SOAP Dialog Box
New Web Service Call Dialog Box
Add Input Attachment Dialog Box
Add Array Elements Dialog Box
Process Base64 Data - Simple Data Dialog Box
Process Base64 Data - Complex Data Dialog Box
Aspects List
Specify Services Screen
Specify Traffic Information Screen
SSL Configuration Dialog Box
Web Services - Preparing Scripts for Replay
Preparing for Replay Overview
Testing Web Service Transport Layers Overview
Sending Messages over HTTP/HTTPS
JMS Transport Overview
JMS Script Functions
JMS Message Structure
Asynchronous Messages Overview
Sending Asynchronous Calls with HTTP/HTTPS
WS-Addressing
Database Integration Overview
Connecting to a Database
Using Data Retrieved from SQL Queries
Validating Database Values after a Web Service Call
Checking Returned Values Through a Database
Performing Actions on Datasets
Customizing Overview
User Handlers
Custom Configuration Files
699
700
700
700
702
702
702
704
696
696
697
697
697
697
698
698
706
707
707
708
710
681
683
683
684
685
691
692
692
693
694
695
HP LoadRunner (11.50)
User Guide
Contents
Page 28 of 1812
User Handler Examples
How to Prepare Scripts for Replay
How to Send Messages over JMS
How to Send Messages over HTTP/S
How to Define a Testing Method
How to Add a Database Connection
How to Create a User Handler
How to Customize Configuration Files
Tree View Tabs
Web Services Snapshots - Overview
Database Connection Dialog Box
Connection String Generator Dialog Box
Web Services - Managing Services
Managing Services Overview
Importing Services
Comparison Reports
Web Reference Analyzer
XML Editing
XML Validation Overview
XSD Schema Validation
Checkpoints and the Expected Response
Validation Results
REST Services and XML Validation
XML Queries
How to Add and Manage Services
How to Analyze WSDL Dependencies
How to Validate the XML
How to Edit the Schema
How to Edit Values in the XML Grid
How to Build an XML Query
Manage Services Dialog Box
Connection Settings Dialog Box
729
730
733
735
735
736
737
737
722
723
723
726
726
727
727
729
738
740
741
742
744
710
712
714
715
716
717
718
720
721
721
722
HP LoadRunner (11.50)
User Guide
Contents
Page 29 of 1812
Import Service Dialog Box
Search for Service in UDDI Dialog Box
XML/WSDL Comparison Dialog Box
Validate XML Dialog Box
WSDL Reference Analyzer Dialog Box
XML Editor Dialog Box
Find XML Dialog Box
Web Services - Security
Setting Security Overview
Security Tokens and Encryption
SAML Security Options
Security Scenarios Overview
Choosing a Security Model
Private, Imported, and Shared Scenarios
Scenario Categories
WCF Scenario Settings
The WsHttpBinding Scenario
The Federation Scenario
The Custom Binding Scenarios
Advanced Scenario Setting
WCF Extensibility
Preparing Security Scenarios for Running
Parameterizing Security Elements
Protecting Custom Headers
Emulating Users with Iterations
How to Add Security to a Web Service Script
How to Add SAML Security
How to Create and Manage Security Scenarios
How to Parameterize Security Elements
Set Security Properties Dialog Box
Security Scenario Editor Dialog Box
Select Certificate Dialog Box
762
765
767
767
767
768
768
769
755
755
755
756
758
758
760
760
770
772
772
777
778
745
746
747
747
749
749
750
750
751
751
754
HP LoadRunner (11.50)
User Guide
Contents
Web Services Security Examples
Web Services - Service Emulation
Service Emulation Report Wizard
Host Configuration Dialog Box
Host Name Pane
New Emulated Service Dialog Box
Clear Service Call Log Dialog Box
New Label Dialog Box
Windows Sockets Protocol
Recording Windows Sockets - Overview
Translation Tables
Windows Sockets Data
Windows Sockets Snapshots - Overview
Data Navigation Tools
Buffer Data Editing
How to Record a Windows Sockets Script
How to View and Modify Windows Sockets Buffers
Data Buffers
Go To Offset Dialog Box
Wireless Protocols
WAP Protocol Overview
WAP Toolkits
Push and Pull Technology
VuGen Push Support
MMS (Multimedia Messaging Service) Protocol Overview
How to Run an MMS Scenario in the Controller
Advanced Topics
Manually Programming a Script using the VuGen Editor
Manually Programming Scripts - Overview
JavaScript Vusers
C Vuser Scripts
VBScript Vusers
Page 30 of 1812
795
795
796
797
797
798
799
799
786
787
789
789
790
791
794
795
799
799
800
800
801
779
781
781
783
784
784
785
785
785
786
786
HP LoadRunner (11.50)
User Guide
Contents
Java Vusers
VB Vusers
.NET Vusers
Creating Scripts with Visual Studio
Creating Vuser Scripts in Visual Studio - Overview
How to Create a Vuser Script with Visual C
How to Create a Vuser Script with Visual Basic or Visual C#
How to Configure Run-Time Settings and Parameters
Language Support
Language Support - Overview
Page Request Header Language
How to Convert Encoding Format of a String
How to Convert Encoding Format of Parameter Files
How to Record Web Pages with Foreign Languages
Troubleshooting and Limitations
SMTP Protocol
Script Name Length
Advanced Topics
Calling External Functions in DLLs
Logging CtLib Server Messages
Recording OLE Servers
Using CmdLine
CmdLine Environment Variables
Running a Vuser from the Linux Command Line
Specifying the Vuser Behavior
Command Line Parameters
How to Create a New Vuser Type
How to Load a DLL locally
How to Load a DLL Globally
.dat Files
Creating and Running Scripts in Linux
Creating and Running Scripts in Linux - Overview
Page 31 of 1812 HP LoadRunner (11.50)
811
812
812
813
813
814
814
815
808
809
810
810
811
811
811
811
818
819
819
820
820
802
802
803
804
804
804
805
807
807
807
807
User Guide
Contents
Programming Vuser Actions
How to Create a Template
How to Configure Run-Time Settings Manually
How to Define Transaction and Insert Rendezvous Points Manually
How to Compile Scripts Manually
Programming with the XML API
Programming with the XML API - Overview
Using XML Functions
Specifying XML Function Parameters
XML Attributes
Structuring XML Scripts
Enhancing a Recorded Session with XML
How to Use Result Parameters
Troubleshooting and Limitations
Controller
Understanding LoadRunner
Application Load Testing Overview
The HP LoadRunner Solution
HP LoadRunner Terminology
The HP LoadRunner Testing Process - Overview
HP LoadRunner Vuser Technology
HP LoadRunner Vuser Types
Vuser Technology
Controller Window
License Utility
LoadRunner License Utility
LoadRunner License Utility - New License
How to Install a New License
Additional Information About VUD Licenses
Designing Load Test Scenarios
Planning Load Test Scenarios
Load Test Planning Overview
Page 32 of 1812
820
821
822
825
825
826
826
826
828
830
830
831
834
836
838
838
841
842
843
846
846
838
838
839
840
841
849
850
851
852
852
852
HP LoadRunner (11.50)
User Guide
Contents
Load Testing Objectives
How to Plan a Load Test
How to Analyze the Application
How to Define the Load Test Objectives
How to Plan the LoadRunner Implementation
Examining Load Testing Objectives
Designing Scenarios
Load Test Scenarios Overview
Manual Scenarios
Changing Scenario Modes
Goals Types for Goal-Oriented Scenarios
How to Design a Goal-Oriented Scenario
How to Design a Manual Scenario
How to Change the Scenario Mode (Manual Scenario)
How to View/Modify Scripts in the Scenario
Relative Paths for Scripts
Vuser Statuses
Add Group Dialog Box
Add Script Dialog Box
Add Vusers Dialog Box
Design Tab
Edit Scenario Goal Dialog Box
Group Information Dialog Box
Multiple Run-Time Settings Mode Dialog Box
New Scenario Dialog Box
Scenario Goal Pane
Scenario Groups/Scripts Pane - Manual Scenarios
Scenario Scripts Pane - Goal-Oriented Scenarios
Scenario Start Time Dialog Box
Script Information Dialog Box
Vuser Information Dialog Box
Vusers Dialog Box
Page 33 of 1812 HP LoadRunner (11.50)
875
876
879
880
882
883
884
885
866
868
869
870
872
873
873
874
888
889
889
891
892
852
854
855
857
858
861
863
863
864
864
865
User Guide
Contents
Load Generators
Load Generators Overview
Load Balancing
How to Connect to a Linux Load Generator Without Using RSH
To stop the agent daemon:
How to Add Load Generators to a Scenario
How to Modify Load Generator Details
How to Connect/Disconnect a Load Generator
Linux Environment Variables
Add Load Generator/Load Generator Information Dialog Box
Load Generator Configuration > Connection Log Tab
Load Generator Configuration > Run-Time File Storage Tab
Load Generator Configuration > Run-Time Quota Tab
Load Generator Configuration > Security Tab
Load Generator Configuration > Status Tab
Load Generator Configuration > Terminal Services Tab
Load Generator Configuration > Linux Environment Tab
Load Generator Configuration > Vuser Limits Tab
Load Generator Configuration > Vuser Status Tab
Load Generator Configuration > WAN Emulation Tab
Load Generators Dialog Box
Scheduling Manual Scenarios
Scheduling Manual Scenarios Overview
Scheduling by Scenario or Group
Schedule Run Modes
How to Define a Schedule for the Scenario - Workflow
How to Add Actions to the Scenario Schedule
How to Edit Schedule Actions
Schedule Actions
Add Action Dialog Box
Edit Action Dialog Box
Scenario Schedule Pane
Page 34 of 1812 HP LoadRunner (11.50)
906
907
909
909
909
910
911
914
899
900
901
902
902
903
905
905
917
918
920
921
922
893
893
894
894
895
895
895
896
896
896
898
User Guide
Contents
Service Level Agreements
Service Level Agreements Overview
Tracking Period
How to Define Service Level Agreements
How to Define Service Level Agreements - Use-Case Scenario
Advanced Options Dialog Box
Goal Details Dialog Box
Service Level Agreement Pane
Service Level Agreement Wizard
Select a Measurement Page
Select Transactions Page
Set Load Criteria Page
Set Percentile Threshold Values Page
Set Threshold Values Page (Goal Per Time Interval)
Set Threshold Values Page (Goal Per Whole Run)
Multiple IP Addresses
Multiple IP Addresses Overview
How to Add IP Addresses to a Load Generator
IP Wizard
Configuring Terminal Services Settings
Terminal Services Overview
About Terminal Services
How to Use the Terminal Services Manager
How to Configure Terminal Sessions Over a Firewall
Configuring WAN Emulation Settings
WAN Emulation Overview
Typical Network Emulation Settings
Latency
Packet Loss
Bandwidth
Emulated Locations Overview
Viewing WAN Emulation Monitors
Page 35 of 1812 HP LoadRunner (11.50)
939
939
939
940
941
941
941
942
932
933
934
935
935
935
936
937
942
942
942
942
942
923
923
924
924
925
928
929
929
930
930
931
User Guide
Contents
Excluding Machines from WAN Emulation
How to Integrate WAN Emulation Into Your Scenario
WAN Emulation Best Practices
Limitations
Running Load Test Scenarios
Online Monitor Graphs
Online Monitor Graphs Overview
About Online Monitor Graphs
Viewing Monitor Data Offline
How to Display Online Monitor Graphs
How to Customize Online Graph and Measurement Settings
How to Manage Online Graphs
Graph Configuration Dialog Box
Measurement Configuration Dialog Box
Open a New Graph Dialog Box
Overlay Graphs Dialog Box
Available Graphs Tree
Configuring Scenario Options
Configuring Scenario Options Overview
Expert Mode
Run-Time File Storage Locations
Path Translation
How to Configure Scenario Options
Path Translation Table
Options Dialog Box
Options > Debug Information Tab
Options > Execution Tab
Options > General Tab
Options > Monitors Tab
Options > Output Tab
Options > Path Translation Tab
Options > Run-Time File Storage Tab
Page 36 of 1812
958
958
959
960
961
962
963
964
949
950
951
952
953
954
957
957
965
966
967
968
968
943
943
944
945
945
945
945
945
945
946
947
HP LoadRunner (11.50)
User Guide
Contents
Options > Run-Time Settings Tab
Options > Timeout Tab
Before Running Your Scenario
How to Prepare a Scenario to Run
Set Results Directory Dialog Box
Summary Information Dialog Box
Running Scenarios
Running Scenarios Overview
Start of run
During run
End of run
How to Run a Scenario
Initialize, Run, or Stop Vuser Groups - Use-Case Scenario
Control Vusers During a Scenario Run - Use-Case Scenario
977
978
980
Run/Stop Individual Vusers, or Add New Vusers - Use-Case Scenario 981
Initialize/Run Additional Vusers or Stop Running Vusers - Use-Case Scenario 985
Execution Notes Dialog Box 990
Output Window
Filtered Tab
991
991
Summary Tab
Run Tab
Run/Stop Vusers Dialog Box
Scenario Groups Pane
Scenario Status Pane
Transactions Dialog Box
Vuser Script Log
Rendezvous Points
993
995
996
998
999
1000
1001
1002
Rendezvous Points Overview
How to Set Up a Rendezvous in a Scenario
Rendezvous Information Dialog Box
After the Scenario Run
Post Scenario Run Procedures - Overview
1002
1003
1003
1005
1005
969
970
972
972
974
976
976
976
976
976
977
Page 37 of 1812 HP LoadRunner (11.50)
User Guide
Contents
Collating Run Data
How to Collate Scenario Run Results
Results Folder File Structure
1005
1005
1006
Collate Results Dialog Box
Using QuickTest or Unified Functional Testing Scripts in LoadRunner
1008
1009
Using QuickTest or Unified Functional Testing Scripts in LoadRunner - Overview
1009
About GUI Vuser Scripts
Understanding GUI Vuser Technology
Guidelines for Using QuickTest or Unified Functional Testing Scripts in
LoadRunner
How to Add a QuickTest or Unified Functional Testing Script to a Load Test
Scenario
1009
1010
1011
1012
Managing Scenarios Using Application Lifecycle Management
Managing Scenarios Using Application Lifecycle Management Overview
How to Work with Scenarios in ALM Projects
Connect to ALM
How to Save Scenarios to ALM Projects
How to Add Vuser Scripts from a Application Lifecycle Management Project
HP ALM Connection Dialog Box
Upload Scenario Dialog Box
Working with Firewalls in LoadRunner
Monitors Over a Firewall
How to Set Up Your System to Use Firewalls
1016
1016
1016
How to Configure the Over-Firewall System
How to Configure the System to Monitor Servers Over a Firewall
1018
1020
How to Configure the LoadRunner Agent on Each Monitor Over Firewall Machine 1021
How to Configure Monitors Over a Firewall
Agent Configuration Dialog Box
1023
1024
1012
1012
1012
1013
1013
1013
1014
1016
Agent Configuration Settings Dialog Box
Monitors Over a Firewall
MI Listener Configuration Dialog Box
Monitor Configuration Dialog Box
1024
1026
1026
1027
Page 38 of 1812 HP LoadRunner (11.50)
User Guide
Contents
Troubleshooting and Limitations
Working with Diagnostics
LoadRunner ERP/CRM Diagnostics Modules
ERP/CRM Diagnostics Modules Overview
ERP/CRM Diagnostics Modules Architecture
Connecting the Mediator to a Remote Server
Connecting to a Remote Windows Server
Connecting to a Remote Linux Server
How to Enable and Disable Logging on the Siebel Server
How to Enable Logging on the Oracle Server
How to Set and Disable the Oracle Server Diagnostics Password
How to View Diagnostics Results
Diagnostics Distribution Dialog Box
Troubleshooting and Limitations
Configuring J2EE/.NET Diagnostics
J2EE/.NET Diagnostics Overview
Monitoring Server Requests
How to Specify J2EE/.NET Diagnostics Server Details
How to Configure a LoadRunner Scenario to use J2EE/.NET Diagnostics
How to View J2EE/.NET Diagnostics Data in LoadRunner During a Scenario
Run
How to View Offline J2EE/.NET Diagnostics Results
Diagnostics for J2EE/.NET Setup Dialog Box
J2EE/.NET Configuration Dialog Box
Monitoring Load Test Scenarios
Working with LoadRunner Online Monitors
Monitoring Process Overview
How to Set Up the Monitoring Environment – Workflow
Monitor Types
Add Machine Dialog Box
<Monitor> Configuration Dialog Box
<monitor name> Dialog Box
1043
1043
1044
1046
1048
1049
1050
1040
1041
1041
1042
1043
1029
1031
1031
1031
1031
1032
1032
1033
1034
1035
1036
1036
1037
1038
1039
1039
1039
1039
1040
Page 39 of 1812 HP LoadRunner (11.50)
User Guide
Contents
Web Resource Monitors
Web Resource Monitoring Overview
HTTP Status Codes
Run-Time and Transaction Monitoring
Run-Time Graphs Overview
Transaction Monitor Graphs Overview
System Resource Monitoring
System Resource Monitors Overview
Windows Resource Monitoring
Linux Resource Monitoring
Server Resource Monitoring
SNMP Resource Monitoring
SiteScope Resource Monitoring
How to Set up the Linux Monitoring Environment
Server Resources Performance Counters
Linux Resources Performance Counters
Add Windows Resources Measurements Dialog Box
Web Server Resource Monitoring
Web Server Resource Monitoring Overview
How to change the Apache default server properties
HTTP Status Codes
Microsoft IIS Performance Counters
Apache Performance Counters
Network Delay Monitoring
Network Monitoring Overview
How to Set Up the Network Monitoring Environment
How to Configure the Linux Source Machine for Network Monitoring
Adding Destination Machines for Network Delay Monitoring Dialog Box
Network Delay Time Dialog Box
Network Delay Time Graph
Network Monitor Settings for Defined Path Dialog Box
Troubleshooting and Limitations
Page 40 of 1812 HP LoadRunner (11.50)
1061
1062
1063
1063
1064
1064
1065
1066
1058
1058
1058
1059
1060
1060
1061
1061
1067
1068
1069
1069
1070
1050
1050
1053
1054
1054
1056
1056
1056
1057
1057
1057
User Guide
Contents
Web Application Server Resource Monitoring
Web Application Server Resource Monitoring Overview
How to Set Up the WebLogic (SNMP) Monitoring Environment
MS Active Server Pages Performance Counters
WebLogic (SNMP) Performance Counters
WebLogic (SNMP) Resources Dialog Box
Microsoft Active Server Pages Dialog Box
Database Resource Monitoring
Database Resource Monitoring Overview
How to Set Up the DB2 Monitoring Environment
How to Set Up the Oracle Monitoring Environment
DB2 Performance Counters
Oracle Performance Counters
SQL Server Performance Counters
Configuring Oracle JDBC Monitor Dialog Box
Streaming Media Monitoring
Streaming Media Monitoring Overview
RealPlayer Client Performance Counters
Media Player Client Performance Counters
ERP/CRM Server Resource Monitoring
ERP/CRM Server Resource Monitoring Overview
How to Set Up the PeopleSoft (Tuxedo) Resource Monitor
How to Set Up the SAPGUI Server Resource Monitor
PeopleSoft (Tuxedo) Performance Counters
SAPGUI Performance Counters
Siebel Server Manager Performance Counters
Add Measurements Dialog Box
PeopleSoft (Tuxedo) Logon Dialog Box
SAPGUI Logon Dialog Box
Siebel Server Manager Configuration Dialog Box
Troubleshooting and Limitations
Application Component Monitoring
Page 41 of 1812 HP LoadRunner (11.50)
1094
1095
1095
1096
1097
1098
1099
1101
1079
1089
1090
1091
1092
1092
1093
1094
1101
1102
1103
1103
1104
1071
1071
1072
1072
1073
1074
1075
1075
1075
1076
1077
User Guide
Contents
Application Component Monitoring Overview
Setting up the Monitoring Environment
Configuring the Microsoft COM+ Monitor Over a Firewall
Microsoft COM+ Performance Counters
Application Deployment Solution Monitoring
Application Deployment Solution Monitoring Overview
How to Set up the Citrix Monitoring Environment
Citrix MetaFrame Performance Counters
Citrix Monitor Dialog Box
Middleware Performance Monitoring
Middleware Performance Monitoring Overview
How to Set Up the Tuxedo Monitor
How to Set Up the IBM WebSphere MQ Monitor
IBM WebSphere MQ Performance Counters
IBM WebSphere MQ Queue Attributes
Tuxedo Performance Counters
Tuxedo tpinit.ini File
MQ Monitor Add Measurements Dialog Box
Tuxedo Logon Dialog Box
Infrastructure Resources Monitoring
Infrastructure Resources Monitoring Overview
Network Client Performance Counters
Service Virtualization Integration
HP Service Virtualization Integration - Overview
Virtual Service Locks
Service Virtualization Monitoring Overview
How to Use Service Virtualization when Designing Scenarios
Service Virtualization User Interface
Appendixes
Add Tuxedo Measurements Dialog Box
Secure Host Communication
Secure Host Communication Overview
Page 42 of 1812
1122
1122
1123
1123
1123
1125
1125
1127
1113
1114
1115
1117
1118
1120
1120
1121
1129
1130
1130
1131
1131
1104
1104
1104
1105
1107
1107
1107
1108
1112
1113
1113
HP LoadRunner (11.50)
User Guide
Contents
Host Security Configuration
Remote Security Configuration
Host Security Best Practices
How to Configure Security Settings Locally on Hosts
How to Register Hosts in Host Security Manager
How to Update Host Security Settings Remotely
Add Hosts Dialog Box
Host Security Manager Window
Host Security Setup Dialog Box
Update Security Key Dialog Box
Update Security Mode Dialog Box
Troubleshooting and Limitations
Troubleshooting
Troubleshooting
Controller Command Line Arguments
Controller Command Line Arguments Overview
Invoke the Controller from the Command Line
Command Line Arguments - Rules
Application Lifecycle Management Arguments
Run Time Arguments
Working with Digital Certificates
Digital Certificates Overview
Using Digital Certificates with Firewalls
Create and Use Digital Certificates
Analysis
Introduction to Analysis
Working with Analysis
Analysis Overview
Analysis Basics
Analysis Graphs
Analysis API
WAN Emulation
Page 43 of 1812
1147
1148
1148
1150
1152
1154
1156
1158
1143
1143
1143
1144
1144
1140
1141
1141
1141
1141
1141
1142
1142
1132
1132
1134
1134
1135
1136
1137
1137
1139
1139
1140
HP LoadRunner (11.50)
User Guide
Contents
How to Customize the Layout of Analysis Windows
Analysis Toolbars
Session Explorer Window
Open a New Graphs Dialog Box
Print Graphs or Reports
Configuring Analysis
Summary Data Versus Complete Data
Importing Data Directly from the Analysis Machine
How to Configure Settings for Analyzing Load Test Results
Advanced Options Dialog Box (Database Tab)
Data Aggregation Configuration Dialog Box (Result Collection Tab)
Database Tab (Options Dialog Box)
General Tab (Options Dialog Box)
Result Collection Tab (Options Dialog Box)
Session Information Dialog Box (Options Dialog Box)
Web Page Diagnostics Tab (Options Dialog Box)
Configuring Graph Display
Sorting Graph Data Overview
How to Customize the Analysis Display
Display Options Dialog Box
Editing MainChart Dialog Box (Display Options Dialog Box)
Chart Tab (Editing MainChart Dialog Box)
Series Tab (Editing MainChart Dialog Box)
Legend Window
Measurement Description Dialog Box
Measurement Options Dialog Box
Legend Columns Options Dialog Box
Template Dialog Box
Filtering and Sorting Graph Data
Filtering Graph Data Overview
Sorting Graph Data Overview
Filter Conditions
Page 44 of 1812 HP LoadRunner (11.50)
1198
1200
1202
1204
1206
1208
1210
1212
1180
1184
1186
1190
1192
1192
1194
1196
1214
1215
1216
1218
1220
1160
1162
1164
1166
1168
1168
1170
1172
1174
1176
1178
User Guide
Contents
Custom Filter Dialog Box
Filter Dialog Boxes
Hierarchical Path Dialog Box
Scenario Elapsed Time Dialog Box
Set Dimension Information Dialog Box
Vuser ID Dialog Box
Working with Analysis Graph Data
Determining a Point's Coordinates
Drilling Down in a Graph
Changing the Granularity of the Data
Viewing Measurement Trends
Auto Correlating Measurements
Viewing Raw Data
How to Manage Graph Data
Drill Down Options Dialog Box
Auto Correlate Dialog Box
Graph Data View Table
Graph Properties Window
Viewing Load Test Scenario Information
Viewing Load Test Scenario Information
How to Configure Controller Output Messages Settings
Controller Output Messages Window
Summary Tab
Filtered Tab
Scenario Run Time Settings Dialog Box
Cross Result and Merged Graphs
Cross Result and Merged Graphs Overview
Cross Result Graphs Overview
Merging Types Overview
How to Generate Cross Results Graphs
How to Generate Merged Graphs
Merge Graphs Dialog Box
Page 45 of 1812 HP LoadRunner (11.50)
1268
1270
1272
1274
1276
1278
1280
1282
1250
1252
1254
1256
1258
1262
1264
1266
1284
1286
1288
1290
1292
1230
1232
1234
1236
1238
1240
1240
1242
1244
1246
1248
User Guide
Contents
Defining Service Level Agreements
Service Level Agreements Overview
Tracking Period
How to Define Service Level Agreements
How to Define Service Level Agreements - Use-Case Scenario
Service Level Agreement Pane
Advanced Options Dialog Box (Service Level Agreement Pane)
Goal Details Dialog Box (Service Level Agreement Pane)
Service Level Agreement Wizard
Select a Measurement Page
Select Transactions Page
Set Load Criteria Page
Set Percentile Threshold Values Page
Set Threshold Values Page (Goal Per Time Interval)
Set Threshold Values Page (Goal Per Whole Run)
Working with Application Lifecycle Management
Managing Results Using ALM Overview
How to Connect to ALM
How to Work with Results in ALM - Without Performance Center
How to Work with Results in ALM - With Performance Center
How to Upload a Report to ALM
HP ALM Connection Dialog Box
Upload Report to Test Lab Dialog Box
Importing External Data
Import Data Tool Overview
How to Use the Import Data Tool
How to Define Custom File Formats
Supported File Types
Advanced Settings Dialog Box (Import Data Dialog Box)
Define External Format Dialog Box
Import Data Dialog Box
Analysis Graphs
Page 46 of 1812
1334
1338
1340
1342
1344
1346
1348
1350
1318
1320
1322
1324
1326
1328
1330
1332
1352
1354
1356
1358
1359
1294
1296
1298
1300
1302
1306
1308
1310
1312
1314
1316
HP LoadRunner (11.50)
User Guide
Contents
Transaction Graphs
Transaction Graphs Overview
Average Transaction Response Time Graph
Example
Total Transactions per Second Graph
Example
Transaction Breakdown Tree
Transactions per Second Graph
Example
Transaction Performance Summary Graph
Example
Transaction Response Time (Distribution) Graph
Example
Transaction Response Time (Percentile) Graph
Example
Transaction Response Time (Under Load) Graph
Example
Transaction Summary Graph
Example
Flex Graphs
Flex RTMP Throughput Graph
Example
Flex RTMP Other Statistics Graph
Example
Flex RTMP Connections Graph
Example
Service Virtualization
Service Virtualization Monitoring Overview
Vuser Graphs
Vuser Graphs Overview
Rendezvous Graph (Vuser Graphs)
Example
Page 47 of 1812
1382
1384
1384
1386
1386
1388
1388
1390
1374
1374
1376
1376
1378
1378
1380
1380
1392
1394
1396
1398
1398
1360
1362
1364
1365
1366
1366
1368
1370
1370
1372
1372
HP LoadRunner (11.50)
User Guide
Contents
Running Vusers Graph
Example
Vuser Summary Graph
Example
Error Graphs
Error Graphs Overview
Errors per Second (by Description) Graph
Example
Errors per Second Graph
Example
Error Statistics (by Description) Graph
Example
Error Statistics Graph
Example
Total Errors per Second Graph
Example
Web Resources Graphs
Web Resources Graphs Overview
HTTP Status Codes
Connections Graph
Connections per Second Graph
Hits per Second Graph
Example
HTTP Responses per Second Graph
Example
HTTP Status Code Summary Graph
Example
Pages Downloaded per Second Graph
Example1
Example 2
Retries per Second Graph
Example
Page 48 of 1812
1424
1426
1428
1428
1430
1430
1432
1432
1412
1414
1414
1416
1416
1418
1420
1422
1434
1434
1435
1436
1436
1400
1400
1402
1402
1404
1406
1408
1408
1410
1410
1412
HP LoadRunner (11.50)
User Guide
Contents
Retries Summary Graph
Example
SSLs per Second Graph
Example
Throughput Graph
Example
User-Defined Data Point Graphs
User-Defined Data Point Graphs Overview
Data Points (Average) Graph
Example
Data Points (Sum) Graph
Example
Network Monitor Graphs
Network Monitor Graphs Overview
Network Delay Time Graph
Example
Network Segment Delay Graph
Example
Network Sub-Path Time Graph
Example
Web Page Diagnostics Graphs
Web Page Diagnostics Tree View Overview
Web Page Diagnostics Graphs Overview
How to View the Breakdown of a Transaction
Web Page Diagnostics Content Icons
Downloaded Component Size Graph
Example
Example
Page Component Breakdown Graph
Example
Example
Page Component Breakdown (Over Time) Graph
Page 49 of 1812
1460
1462
1464
1466
1468
1470
1472
1472
1450
1452
1454
1456
1456
1458
1458
1460
1472
1474
1474
1474
1476
1438
1438
1440
1441
1442
1442
1444
1446
1448
1448
1450
HP LoadRunner (11.50)
User Guide
Contents
Example
Example
Page Download Time Breakdown Graph
Example
Example
Page Download Time Breakdown Graph Breakdown Options
Time to First Buffer Breakdown Graph
Example
Example
Time to First Buffer Breakdown (Over Time) Graph
Example
System Resource Graphs
System Resource Graphs Overview
Server Resources Performance Counters
Linux Resources Default Measurements
Windows Resources Default Measurements
Server Resources Graph
Example
SiteScope Graph
Example
SNMP Resources Graph
Example
Linux Resources Graph
Example
Windows Resources Graph
Example
Firewall Server Monitor Graphs
Firewall Server Monitor Graphs Overview
Check Point FireWall-1 Server Measurements
Check Point FireWall-1 Server Graph
Example
Web Server Resource Graphs
Page 50 of 1812 HP LoadRunner (11.50)
1500
1502
1502
1504
1504
1506
1506
1508
1488
1490
1492
1494
1496
1498
1498
1500
1510
1512
1514
1514
1516
1476
1476
1478
1478
1479
1480
1482
1482
1483
1484
1485
User Guide
Contents
Web Server Resource Graphs Overview
Apache Server Measurements
IIS Server Measurements
Apache Server Graph
Example
Microsoft Information Internet Server (IIS) Graph
Example
Web Application Server Resource Graphs
Web Application Server Resource Graphs Overview
Web Application Server Resource Graphs Measurements
Microsoft Active Server Pages (ASP) Graph
Oracle9iAS HTTP Server Graph
WebLogic (SNMP) Graph
WebSphere Application Server Graph
Database Server Resource Graphs
Database Server Resource Graphs Overview
DB2 Database Manager Counters
DB2 Database Counters
DB2 Application Counters
Oracle Server Monitoring Measurements
SQL Server Default Counters
Sybase Server Monitoring Measurements
DB2 Graph
Oracle Graph
Example
SQL Server Graph
Example
Sybase Graph
Streaming Media Graphs
Streaming Media Graphs Overview
Media Player Client Monitoring Measurements
RealPlayer Client Monitoring Measurements
Page 51 of 1812 HP LoadRunner (11.50)
1566
1568
1570
1574
1576
1576
1578
1578
1542
1544
1546
1548
1550
1552
1554
1560
1580
1582
1584
1586
1588
1518
1520
1522
1524
1524
1526
1526
1528
1530
1532
1540
User Guide
Contents
RealPlayer Server Monitoring Measurements
Windows Media Server Default Measurements
Media Player Client Graph
Example
Real Client Graph
Example
Real Server Graph
Example
Windows Media Server Graph
ERP/CRM Server Resource Graphs
ERP/CRM Server Resource Graphs Overview
ERP/CRM Server Resources Graphs Measurements
PeopleSoft (Tuxedo) Graph
Example
SAP Graph
SAPGUI Graph
SAP CCMS Graph
SAP Portal Graph
Siebel Server Manager Graph
Siebel Web Server Graph
Application Component Graphs
Microsoft COM+ Performance Graphs Overview
Microsoft .NET CLR Performance Graphs Overview
COM+ Average Response Time Graph
COM+ Breakdown Graph
COM+ Call Count Distribution Graph
COM+ Call Count Graph
COM+ Call Count Per Second Graph
COM+ Total Operation Time Distribution Graph
COM+ Total Operation Time Graph
Microsoft COM+ Graph
.NET Average Response Time Graph
Page 52 of 1812 HP LoadRunner (11.50)
1626
1628
1630
1632
1634
1636
1638
1640
1606
1614
1614
1616
1618
1620
1622
1624
1642
1644
1646
1648
1652
1590
1592
1594
1594
1596
1596
1598
1598
1600
1602
1604
User Guide
Contents
.NET Breakdown Graph
.NET Call Count Distribution Graph
.NET Call Count Graph
.NET Call Count per Second Graph
.NET Resources Graph
.NET Total Operation Time Distribution Graph
.NET Total Operation Time Graph
Application Deployment Solutions Graphs
Application Deployment Solutions Graph Overview
Citrix Measurements
Citrix MetaFrame XP Graph
Middleware Performance Graphs
Middleware Performance Graphs Overview
IBM WebSphere MQ Counters
Tuxedo Resources Graph Measurements
IBM WebSphere MQ Graph
Tuxedo Resources Graph
Infrastructure Resources Graphs
Infrastructure Resources Graphs Overview
Network Client Measurements
Network Client Graph
Analysis Reports
Understanding Analysis Reports
Analysis Reports Overview
Report Templates Overview
Analysis Reports Overview
Analyze Transaction Settings Dialog Box
Analyze Transactions Dialog Box
HTML Report
New Report Dialog Box
Report <Templates> Window
Report Templates General Tab
Page 53 of 1812
1698
1700
1702
1704
1706
1708
1710
1712
1682
1684
1686
1688
1690
1692
1694
1696
1714
1716
1718
1720
1722
1654
1656
1658
1660
1662
1666
1668
1670
1672
1674
1680
HP LoadRunner (11.50)
User Guide
Contents
Report Templates Format Tab
Report Templates Content Tab
SLA Reports
Summary Report
Transaction Analysis Report
Working with Diagnostics
Siebel Diagnostics Graphs
Siebel Diagnostics Graphs Overview
How to Enable Siebel Diagnostics
Call Stack Statistics Window
Chain of Calls Window
Siebel Area Average Response Time Graph
Example
Siebel Area Call Count Graph
Siebel Area Total Response Time Graph
Example
Siebel Breakdown Levels
Siebel Diagnostics Graphs Summary Report
Siebel Request Average Response Time Graph
Example
Siebel Transaction Average Response Time Graph
Example
Siebel DB Diagnostics Graphs
Siebel DB Diagnostics Graphs Overview
How to Enable Siebel DB Diagnostics
How to Synchronize Siebel Clock Settings
Measurement Description Dialog Box
Siebel Database Breakdown Levels
Siebel Database Diagnostics Options Dialog Box
Siebel DB Side Transactions Graph
Siebel DB Side Transactions by SQL Stage Graph
Siebel SQL Average Execution Time Graph
Page 54 of 1812
1750
1751
1751
1752
1752
1753
1753
1754
1743
1744
1744
1745
1746
1746
1749
1749
1755
1757
1758
1759
1759
1724
1726
1730
1732
1736
1738
1738
1738
1739
1739
1741
HP LoadRunner (11.50)
User Guide
Contents
Oracle 11i Diagnostics Graphs
Oracle 11i Diagnostics Graphs Overview
How to Enable Oracle 11i Diagnostics
Measurement Description Dialog Box
Oracle Breakdown Levels
Oracle 11iDB Side Transactions Graph
Oracle 11iDB Side Transactions by SQL Stage Graph
Oracle 11i SQL Average Execution Time Graph
SAP Diagnostics Graphs
How to Enable SAP Diagnostics
How to Configure SAP Alerts
SAP Diagnostics - Guided Flow Tab
Application Flow
Dialog Steps per Second Graph
Example
OS Monitor Graph
Example
SAP Alerts Configuration Dialog box
SAP Alerts Window
SAP Application Processing Time Breakdown Graph
Example
SAP Primary Graphs
SAP Average Dialog Step Response Time Breakdown Graph
Example
SAP Average Transaction Response Time Graph
SAP Breakdown Task Pane
SAP Server Time Breakdown (Dialog Steps) Graphs
Example
SAP Server Time Breakdown Graph
Example
SAP Database Time Breakdown Graph
Example
Page 55 of 1812 HP LoadRunner (11.50)
1773
1773
1773
1773
1774
1774
1775
1777
1767
1769
1770
1770
1770
1771
1771
1772
1778
1778
1779
1779
1779
1760
1760
1761
1761
1762
1764
1765
1765
1766
1766
1766
User Guide
Contents
SAP Diagnostics Summary Report
SAP Interface Time Breakdown Graph
Example
SAP System Time Breakdown Graph
Example
SAP Secondary Graphs
Work Processes Graph
Example
J2EE & .NET Diagnostics Graphs
J2EE & .NET Diagnostics Graphs Overview
How to Enable Diagnostics for J2EE & .NET
Viewing J2EE to SAP R3 Remote Calls
J2EE & .NET Diagnostics Data
Example Transaction Breakdown
Using the J2EE & .NET Breakdown Options
Viewing Chain of Calls and Call Stack Statistics
The Chain of Calls Windows
Understanding the Chain of Calls Window
Graph Filter Properties
J2EE/.NET - Average Method Response Time in Transactions Graph
Example
J2EE/.NET - Average Number of Exceptions in Transactions Graph
Example
J2EE/.NET - Average Number of Exceptions on Server Graph
Example
J2EE/.NET - Average Number of Timeouts in Transactions Graph
Example
J2EE/.NET - Average Number of Timeouts on Server Graph
Example
J2EE/.NET - Average Server Method Response Time Graph
Example
J2EE/.NET - Method Calls per Second in Transactions Graph
Page 56 of 1812 HP LoadRunner (11.50)
1796
1797
1797
1798
1798
1799
1799
1800
1784
1785
1785
1790
1792
1792
1793
1796
1800
1800
1801
1801
1801
1780
1781
1781
1781
1782
1782
1782
1783
1783
1783
1783
User Guide
Contents
Example
J2EE/.NET - Probes Metrics Graph
Example
J2EE/.NET - Server Methods Calls per Second Graph
Example
J2EE/.NET - Server Requests per Second Graph
Example
J2EE/.NET - Server Request Response Time Graph
Example
J2EE/.NET - Server Request Time Spent in Element Graph
Example
J2EE/.NET - Transactions per Second Graph
Example
J2EE/.NET - Transaction Response Time Server Side Graph
Example
J2EE/.NET - Transaction Time Spent in Element Graph
Example
1802
1802
1803
1804
1804
1804
1805
1805
1806
1806
1807
1808
1808
1808
1809
1809
1810
Page 57 of 1812 HP LoadRunner (11.50)
User Guide
Welcome To LoadRunner User Guide
Welcome To LoadRunner User Guide
Welcome to LoadRunner, the HP solution for application performance testing. LoadRunner stresses your entire application to isolate and identify potential client, network, and server bottlenecks.
LoadRunner includes: l
VuGen. HP's tool for creating Vuser scripts. You use VuGen to develop a Vuser script by recording a user performing typical business processes. The scripts let you emulate real-life situations.
l
Controller. Allows you to easily and effectively control all the Vusers from a single point of control and monitor the scenario performance during test execution.
l
Analysis. You use Analysis after running a load test scenario in the HP LoadRunner Controller or HP Performance Center. The Analysis graphs help you determine system performance and provide information about transactions and Vusers. You can compare multiple graphs by combining results from several load test scenarios or merging several graphs into one.
Documentation Library
The Documentation Library is an online help system that describes how to use LoadRunner. You can access the Documentation Library in the following ways: l
Click Documentation Library in the LoadRunner Help menu to open the Documentation Library home page. The home page provides quick links to the main help topics.
l
Click F1 on any window or dialog box to open the Documentation Library to the topic that describes the currently displayed screen.
Topic Types
The content in the above mentioned LoadRunner guides is organized by topics. Three main topic types are in use: Concepts, Tasks, and Reference. The topic types are differentiated visually using icons.
Topic Type
Concepts
Tasks
Description
Background, descriptive, or conceptual information.
Instructional Tasks. Step-by-step guidance to help you work with the application and accomplish your goals.
Task steps can be with or without numbering: l
Numbered steps. Tasks that are
Usage
Learn general information about what a feature does.
l
Learn about the overall workflow of a task.
l
Follow the steps listed in a numbered task to complete a task.
l
Perform independent operations by completing
Page 58 of 1812 HP LoadRunner (11.50)
User Guide
Welcome To LoadRunner User Guide
Topic Type
Reference
Description
performed by following each step in consecutive order.
l
Non-numbered steps. A list of selfcontained operations that you can perform in any order.
Use-case Scenario Tasks. Examples of how to perform a task for a specific situation.
General Reference. Detailed lists and explanations of reference-oriented material.
User Interface Reference. Specialized reference topics that describe a particular user interface in detail. Selecting Help on this page from the Help menu in the product generally open the user interface topics.
Troubleshooting and Limitations
Troubleshooting and Limitations.
Specialized reference topics that describe commonly encountered problems and their solutions, and list limitations of a feature or product area.
Usage
steps in a non-numbered task.
Learn how a task could be performed in a realistic scenario.
Look up a specific piece of reference information relevant to a particular context.
Look up specific information about what to enter or how to use one or more specific user interface elements, such as a window, dialog box, or wizard.
Increase your awareness of important issues before working with a feature, or if you encounter usability problems in the software.
Additional Online Resources
The following additional online resources are available from the LoadRunner Help menu:
Resource Description
Troubleshooting
& Knowledge
Base
Opens the Troubleshooting page on the HP Software Support Web site where you can search the Self-solve knowledge base. Choose Help >
Troubleshooting & Knowledge Base. The URL for this Web site is http://h20230.www2.hp.com/troubleshooting.jsp
.
HP Software
Support
Opens the HP Software Support Web site. This site enables you to browse the Self-solve knowledge base. You can also post to and search user discussion forums, submit support requests, download patches and updated
Page 59 of 1812 l
Most of the support areas require that you register as an HP Passport user and sign in. Many also require a support contract.
l
To find more information about access levels, go to: http://h20230.www2.hp.com/new_access_levels.jsp
l
To register for an HP Passport user ID, go to: http://h20229.www2.hp.com/passport-registration.html
HP LoadRunner (11.50)
User Guide
Welcome To LoadRunner User Guide
Resource
HP Software
Web site
Add-ins Page
Description
. The URL for this Web site www.hp.com/go/hpsoftwaresupport .
l
Most of the support areas require that you register as an HP Passport user and sign in. Many also require a support contract.
l
To find more information about access levels, go to: http://h20230.www2.hp.com/new_access_levels.jsp
l
To register for an HP Passport user ID, go to: http://h20229.www2.hp.com/passport-registration.html
Opens the HP Software Web site. This site provides you with the most up-todate information on HP Software products. This includes new software releases, seminars and trade shows, customer support, and more. Choose
Help > HP Software Web site. The URL for this Web site is www.hp.com/go/software
Opens the LoadRunner Add-ins Page, which offers integration and synchronization solutions with HP and third-party tools.
Page 60 of 1812 HP LoadRunner (11.50)
User Guide
What's New
What's New
Improved VuGen
The VuGen user interface has been improved and enhanced to provide a more flexible and customizable user experience. An all new IDE makes LoadRunner scripting easier and more productive.
Enhancements include:
l
New look and feel – Flexible panes, layouts, and more l
Solution Explorer – An easier way to group multiple scripts, access script items, and perform script-related operations.
l
Snapshots – Multiple views, improved performance, snapshot synchronization, and search functionality.
l
Improved editor – Context-sensitive support, code completion support, and provides enhanced coloring and formatting.
l
Debugger – Real C language debugger.
l
Search and replace – New capabilities include search in log and snapshots.
l
Step navigator – The new Step Navigator replaces the tree view, providing a single view of the script with easy filtering and search mechanisms.
l
New panes – Errors, Tasks, and Bookmarks panes display all errors, messages, and tags in simple, easy to locate views.
l
Join the Community – Community integration provides easy access to conversations and threads in the HP Software Community.
For details, see
"VuGen Main User Interface - Overview" on page 74
Ajax TruClient Firefox Enhancements
This ground breaking protocol has been enhanced to support the latest technologies, and includes many usability improvements in response to customer needs.
The Ajax TruClient Firefox protocol has been improved with the following enhancements:
l
Moving to Firefox 8 for improved performance.
l
HTML5 support.
l
Create functions to easily reuse and share code.
l
Think-time recording.
l
Event handlers to support asynchronous behavior.
l
API for URL filtering.
l
API for setting HTTP headers.
l
Automatic transactions per step.
For details, see
"Ajax TruClient Protocol Overview" on page 405
Page 61 of 1812 HP LoadRunner (11.50)
User Guide
What's New
Ajax TruClient Internet Explorer
A new protocol that brings TruClient capabilities to Internet Explorer 9. This new addition to the Ajax
TruClient family expands support to Internet Explorer (IE) based applications.
For details, see
"Ajax TruClient Protocol Overview" on page 405
Web Protocol Asynchronous Support
Support for asynchronous behavior has been added. This new capability enables recording of Poll,
Long Poll, and Push interactions.
Advanced Web applications contain a lot of asynchronous communication designed to keep information current and up to date. Applications such as chat, messaging, stock tickers, and news updates all use various asynchronous mechanisms such Poll, Long Poll, and Push to maintain data. Support for these mechanisms has been added to Web (HTTP/HTML) Vuser scripts, and web-based functions inside Flex, Silverlight, and Web Services Vuser scripts. These unique communication patterns are recognized automatically and the recorded script is updated accordingly.
For details, see
"An Introduction to LoadRunner Support for Asynchronous Communication" on page 197
Improved Correlations
A new response correlation capability has been added so correlation is easier and faster.
Correlations can now be found based on server responses during recording, in many cases eliminating the need to replay iteratively to find dynamic values. Coupling this with the new
Correlation Studio interface and new APIs for locating parameters based on XPath and Regular
Expressions, makes scripting easier and faster.
For details, see
"Correlation Studio Overview" on page 159
Flex Enhancements
Various enhancements have been added to better support this important environment.
Flex enhancements include:
l
Using Web correlation mechanisms (rules, studio, response based correlation, web correlation
APIs).
l
Supporting Web requests.
l
Adobe Flex platform jars bundled in the product so application jars are not needed for message serialization.
l
RTMP FMS streaming support.
l
RTMPT & RTMPS support.
l
GraniteDS support.
For details, see
"Flex (RTMP/AMF) Protocol" on page 504
Mobile Protocols
New protocols enabling you to develop scripts for mobile applications. Traffic based analysis is used for native applications and Ajax TruClient technology is used for browser based mobile
Page 62 of 1812 HP LoadRunner (11.50)
User Guide
What's New applications.
For details, see
"Mobile Protocols Overview" on page 552
Data Format Extension (DFE) for Google Web Toolkit (GWT)
Web protocol includes a built-in DFE to support decoding and encoding of GWT information exchanged as part of GWT remote procedure calls. This facilitates easy correlation and parameterization of GWT based Web applications. The DFE feature is designed to help ease scripting of applications that exchange formatted data. By turning the formatted data into a more readable format the script can be easily correlated and parameterized. GWT DFE is the latest addition to the already supported formats of Base64, JSON, URLEncoding, XML, and Prefix-
Postfix.
GWT support includes:
l
Format the GWT RPC data into readable and correlate-able content.
l
Expose more data, such as object field names.
l
Enable simple parameterization.
l
Solve specific correlations for GWT.
For details, see
"Google Web Toolkit - Data Format Extension (GWT-DFE) - Overview" on page
661
.NET4 Support
The .NET protocol now supports .NET4 framework.
.NET4 support has been added to the existing support for .NET frameworks 2-3.5.
Web Services Enhancements
The Web Services protocol includes new features for better security support, improved handling of
WCF, as well as additional improvements based on customer feedback.
The Web Services protocol includes the following enhancements:
l
Improved interface for security settings, including addressing versions.
l
Easier certificate selection.
l
Flexible definition of signature and encryption algorithms. Also includes the option to exclude timestamps.
l
Support of custom extensions to WCF.
l
Support of LoadRunner HTTP capabilities for WCF.
For details, see
"Set Security Properties Dialog Box " on page 772
and
"WCF Extensibility" on page
765
Integrating Virtualized Services
Integrate with HP Service Virtualization, and use simulated services, to facilitate load testing business processes that contain services that are not readily available or too costly. As part of your performance test, you may want to test applications that depend on other services which are a part of your business scenario. Instead of loading actual services, you can use simulated services in
Page 63 of 1812 HP LoadRunner (11.50)
User Guide
What's New your test run. The virtualized services are a simulation of actual services. To facilitate performance testing business processes that contain services that are not available, Performance Center integrates with HP Service Virtualization. Using simulated services in your test is helpful if using actual services involves an additional cost or requires the service of an application that is under development or inaccessible at the time when you run your performance test.
For details, see
"HP Service Virtualization Integration - Overview" on page 1123
Recording 64bit Applications
Recording of 64bit applications has been added to the existing support for 64bit operating systems.
64bit applications can usually be recognized when the ‘*32’ suffix is not displayed in the Windows
Task Manager for their process. Replay is in 32bit.
IPv6 support
IPv6 based applications can be tested in addition to IPv4 based ones. Support includes IP
Spoofing.
Note: Internal LoadRunner communication, such as Controller Load Generator, is still IPv4 based.
Page 64 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
VuGen
Welcome to the HP Virtual User Generator, VuGen, HP's tool for creating Vuser scripts. You use
VuGen to develop a Vuser script by recording a user performing typical business processes. The scripts let you emulate real-life situations.
You use the scripts created with VuGen in conjunction with other products— HP LoadRunner, HP
Performance Center, and HP Business Availability Center.
HP LoadRunner, a tool for performance testing, stresses your entire application to isolate and identify potential client, network, and server bottlenecks.
HP Performance Center implements the capabilities of LoadRunner on an enterprise level.
HP Business Availability Center helps you optimize the management and availability of business applications and systems in production.
Working with VuGen
Overview
VuGen Overview
When testing or monitoring an environment, you need to emulate the true behavior of users on your system. HP testing tools emulate an environment in which users concurrently work on, or access your system.
To do this emulation, the human was replaced with a virtual user, or a Vuser. The actions that a
Vuser performs are described in a Vuser script. The primary tool for creating Vuser scripts is the
Virtual User Generator, VuGen.
VuGen not only records Vuser scripts, but also runs them. Running scripts from VuGen is useful for debugging. It enables you to emulate how a Vuser script will run when executed as part of a larger test.
When you record a Vuser script, VuGen generates various functions that define the actions that you perform during the recording session. VuGen inserts these functions into the VuGen editor to create a basic Vuser script.
VuGen records Vuser scripts on Windows platforms only. However, a recorded Vuser script can be run on both Windows and Linux platforms.
Vuser Overview
Vusers emulate the actions of human users by performing typical business processes in your application. The actions that a Vuser performs during the recording session are described in a Vuser
script.
HP's tool for creating Vuser scripts is the Virtual User Generator, VuGen. You use VuGen to develop a Vuser script by recording a user performing typical business processes on a client application. VuGen records the actions that you perform during the recording session, recording
Page 65 of 1812 HP LoadRunner (11.50)
User Guide
VuGen only the activity between the client and the server. Instead of having to manually program the application's API function calls to the server, VuGen automatically generates functions that model and emulate real world situations.
During recording VuGen monitors the client end of the database and traces all the requests sent by the user and received from the user, to the server.
During playback, Vuser scripts communicate directly with the server by executing calls to the server API. When a Vuser communicates directly with a server, system resources are not required for the client interface. This lets you run a large number of Vusers simultaneously on a single workstation, and enables you to use only a few testing machines to emulate large server loads.
In addition, since Vuser scripts do not rely on client software, you can use Vusers to check server performance even before the user interface of the client software has been fully developed.
Using VuGen, you can run scripts as standalone tests. Running scripts from VuGen is useful for debugging as it enables you to see how a Vuser will behave and which enhancements need to be made.
VuGen enables you to record a variety of Vuser types, each suited to a particular load testing environment or topology and results in a specific type of Vuser script. For example, you use Web
Vuser Scripts to emulate users operating Web browsers. You use FTP Vusers to emulate an FTP session. The various Vuser technologies can be used alone or together, to create effective load tests or HP Business Process Monitor configurations.
While running the Vusers, you gather information about the system's response. Afterwards, you can view this information with the Analysis tool. For example, you can observe how a server behaved when one hundred Vusers simultaneously withdrew cash from a bank's ATM.
VuGen records Vuser scripts on Windows platforms only. However, a recorded Vuser script can be run on both Windows and Linux platforms.
Page 66 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Vuser Types
The following table lists the Vuser types, descriptions, and categories:
Protocol Description
AJAX (Click &
Script)
An acronym for Asynchronous JavaScript and XML. AJAX uses asynchronous HTTP requests, allowing Web pages to request small bits of information instead of whole pages.
Ajax TruClient An advanced protocol for modern JavaScript based applications
(including Ajax) emulating user activity within a web browser.
Scripts are developed interactively in Mozilla Firefox.
C Vuser
Citrix_ICA
A generic virtual user which uses the standard C library.
A remote access tool, allowing users to run specific applications on external machines.
Protocol
Category
E-Business
E-Business
COM/DCOM Component Object Model (COM) - a technology for developing reusable software components.
DB2 CLI The IBM Call Level SQL Interface to the DB2 family of databases.
Custom
Application
Deployment
Solution
Distributed
Components
Client/Server
Domain Name
Resolution
(DNS)
The DNS protocol is a low-level protocol that allows you to emulate the actions of a user working against a DNS server.
The DNS protocol emulates a user accessing a Domain Name
Server to resolve a host name with its IP address. Only replay is supported for this protocol—you need to manually add the functions to your script.
EJB Testing Enterprise Java Beans - an architecture for the development and deployment of Java-server components.
Flex
(RTMP/AMF)
File Transfer
Protocol
(FTP) i-mode
Informix
NTT DoCoMo's technology for accessing the Internet on a mobile phone system.
An IBM Informix database using a standard client/server
Client/Server
Enterprise
Java Beans
Flex is an application development solution for creating Rich
Internet Applications (RIAs) within the enterprise and across the
Web. Action Message Format (AMF), is a Macromedia proprietary protocol that allows Flash Remoting binary data to be exchanged between a Flash application and an application server over HTTP.
File Transfer Protocol - a system which transfers files from one location to another over a network.
The FTP protocol is a low-level protocol that allows you to emulate the actions of a user working against an FTP server.
E-Business
E-Business
Mobile
Client/Server
Page 67 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Internet
Messaging
(IMAP)
Java over
HTTP architecture
Internet Message Application - a protocol which enables clients to read email from a mail server.
Designed to record java-based applications and applets. It produces a Java language script using web functions. This protocol is distinguished from other Java protocols in that it can record and replay Java remote calls over HTTP.
Java Record
Replay
Java template Java programming language with protocol level support.
A scripting language used to develop Internet applications.
Javascript
Vuser
Listing
Directory
Service
(LDAP)
Media Player
(MMS)
An Internet protocol designed to allow email applications to look up contact information from a server.
Streaming data from a media server using Microsoft's MMS protocol.
Important: In order to replay Media Player functions, you must place a file called wmload.asf on the Windows Media server machine. The VuGen machine must be able to access using
mms://<servername>/wmload.asf. This ASF file can be any media file renamed to wmload.asf.
Mailing
Services
Custom
Custom
E-Business
Streaming
Microsoft
.NET
Supports the recording of Microsoft .NET client-server technologies.
Microsoft
Remote
Desktop
Protocol
(RDP)
A remote access tool using the Microsoft Remote Desktop
Connection to run applications on an external machine.
MS Exchange
(MAPI)
Messaging Application Programming Interface designed to allow applications to send and receive email messages.
Microsoft's SQL Server using the Dblib interface.
MS SQL
Server
Multimedia
Messaging
Service
(MMS)
A messaging service used for sending MMS messages between mobile devices.
Client/Server,
Distributed
Components,
E-Business
Application
Deployment
Solution
Mailing
Services
Client/Server
Wireless
Page 68 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
ODBC Open Database Connectivity - a protocol providing a common interface for accessing databases.
Oracle (2-Tier) Oracle database using a standard 2-tier client/server architecture.
Oracle NCA Oracle 3-tier architecture database consisting of Java client,
Web server and database.
Oracle Web
Applications
11i
Peoplesoft
Enterprise
Peoplesoft-
Tuxedo
Post Office
Protocol
(POP3)
Real
SAP (Click &
Script)
SAP GUI
The Oracle Applications interface that performs actions over the
Web. This Vuser type detects actions on both the Mercury API and Javascript levels.
An Enterprise Resource Planning system based on the
PeopleSoft 8 enterprise tools.
An Enterprise Resource Planning system based on the Tuxedo
Transaction Processing Monitor, including automatic correlation.
ERP/CRM
A protocol designed to allow single computers to retrieve email from a mail server.
Mailing
Services
A protocol used to transfer streaming data from a media server.
An Enterprise Resource Planning system to integrate key business and management processes using the SAP GUI client for Windows.
Client/Server
Client/Server
ERP/CRM
ERP/CRM
ERP/CRM
Streaming
Emulation of communication between a browser and SAP server on a GUI or user-action level.
ERP/CRM
ERP/CRM
SAP - Web An Enterprise Resource Planning system to integrate key business and management processes using the SAP Portal or
Workplace clients.
Siebel - Web A Customer Relationship Management Application.
Silverlight
ERP/CRM
ERP/CRM
A protocol for Silverlight based applications emulating user activity at the transport level. Allows generating high level scripts by automatically importing and configuring WSDL files used by the application.
E-Business
Simple Mail
Protocol
(SMTP)
Simple Mail Transfer Protocol - a system for distributing mail to a particular machine.
Sybase Ctlib A client/server architecture database called via the Ctlib interface.
Mailing
Services
Client/Server
Sybase Dblib A client/server architecture database called via the Dblib interface.
Terminal
Emulation
Emulation of users who submit input to, and receive output from, character-based applications.
Client/Server
Legacy
Page 69 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
(RTE)
Tuxedo Tuxedo Transaction Processing Monitors.
Visual Basic Scripting Edition language - used for programming documents displayed in Web browsers.
Vuser scripts written in Visual Basic language.
Middleware
Custom VB Script
Vuser
Visual Basic template
WAP
Web
Services/SOA
Web Services are a programmatic interface for applications to communicate with one another over the World Wide Web.
Windows
Sockets
The standard network programming interface for the Windows platform.
Custom
Web (Click &
Script)
Wireless Application Protocol - used for Web-based, wireless communication between mobile devices and content providers.
Emulation of communication between a browser and Web server on a GUI or user-action level.
Wireless
E-Business
Web
(HTTP/HTML)
Emulation of communication between a browser and Web server on an HTTP or HTML level.
E-Business
E-Business
Client/Server
Note: In order to run the various protocols, you must have either a global license or licenses for the desired protocols. To check your Vuser licensing limitations, open the LoadRunner License
Utility by selecting Start > All Programs > HP Software > HP LoadRunner > License >
LoadRunner License Utility.
Keyboard Shortcuts
The following tables describe the keyboard shortcuts available for the menus in the Virtual User
Generator:
File Menu
New > Script and Solution
Open > Script\Solution
Add > New Script
Add > Existing Script
Close > Document
Close > Solution
Save Script
Ctrl+N
Ctrl+O
Ctrl+Shift+A
Alt+Shift+A
Ctrl+F4
Ctrl+Shift+F4
Ctrl+S
Page 70 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Save All Scripts
Reload File
Print
Exit
Edit Menu
Undo
Redo
Cut
Copy
Paste
Delete
Select All
Insert > Insert new GUID
Format > Surround with
Format > Increase Indent
Format > Decrease Indent
Folding > Toggle fold
Folding > Toggle all folds
Folding > Show definitions only
Show Function Syntax
Complete Word
View Menu
Solution Explorer
Search Results
Bookmarks
Steps Toolbox
Snapshot
Steps Navigator
Ctrl+Shift+S
Ctrl+Shift+U
Ctrl+P
Alt+F4
Ctrl+Z
Ctrl+Y
Ctrl+X
Ctrl+C
Ctrl+V
Del
Ctrl+A
Ctrl+Shift+G
Ctrl+J
Tab
Shift+Tab
Ctrl+Shift+M
Ctrl+Shift+L
Ctrl+Shift+P
Ctrl+Shift+Space
Ctrl+Space
Ctrl+Alt+L
Ctrl+Alt+R
Ctrl+Alt+K
Ctrl+Alt+B
Ctrl+Alt+P
Ctrl+Alt+S
Page 71 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Thumbnail Explorer
Properties
Output
Full Screen
Search Menu
Quick Find
Find Next
Find Next Selected
Find in Files
Quick Replace
Replace in Files
Incremental Search
Reverse Incremental Search
Bookmarks > Toggle Bookmark
Bookmarks > Prev Bookmark
Bookmarks > Next Bookmark
Design Menu
Action > Delete Action
Action > Rename Action
Insert in Script > New Step
Insert in Script > Comment
Parameters > Parameters List
Record Menu
Record
Regenerate Script
Recording Options
Replay Menu
Run
Ctrl+Alt+T
Ctrl+Alt+F4
Ctrl+Alt+O
Alt+Shift+Return
Ctrl+F
F3
Ctrl+F3
Ctrl+Shift+F
Ctrl+H
Ctrl+Shift+H
Ctrl+E
Ctrl+Shift+E
Ctrl+F2
Shift+F2
F2
Delete
F2
Alt+Insert
Ctrl+Alt+C
Ctrl+L
Ctrl+R
Ctrl+Shift+R
Ctrl+F7
F5
Page 72 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Stop
Compile
Toggle Breakpoint
Continue Debugging
Run Step by Step
Step into
Step Out
Run-Time Settings
ALM
ALM Connection
Windows Menu
Next Window
Prev Window
Ctrl+F5
Shift+F5
F9
F5
F10
F8
Shift+F8
F4
Ctrl+Q
Ctrl+Tab
Ctrl+Shift+Tab
Online Resources
VuGen includes the following online tools: l
Readme. Provides last-minute news and information about VuGen. (Start menu).
l
Documentation Library. Displays the complete documentation set in PDF format. Online books can be read and printed using Adobe Acrobat Reader (see www.adobe.com). Check HP's
Customer Support Web site for updates to the VuGen online book. (Help menu).
l
Function Reference. Gives you online access to all of the API functions that you can use when creating Vuser scripts, including examples of how to use them. Check HP's Customer Support
Web site for updates to the Function Reference (Help menu).
l
Context Sensitive Help. Provides immediate answers to questions that arise as you work with
VuGen. It describes dialog boxes, and shows you how to perform standard tasks. To activate this help, click in a window and press F1.
l
Technical Support Online. Uses your default Web browser to open HP's Customer Support
Web site. This site enables you to browse the knowledge base and add your own articles, post to and search user discussion forums, submit support requests, download patches and updated documentation, and more. The URL for this Web site is http://support.hp.com.
l
Support Information. Presents the locations of HP's Customer Support Web site and home page, the email address for sending information requests, and a list of HP's offices around the world. (Help menu).
l
HP on the Web. Uses your default Web browser to open HP's home page
Page 73 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
(http://www.hp.com). This site enables you to browse the knowledge base and add your own articles, post to and search user discussion forums, submit support requests, download patches and updated documentation, and more.
l
LoadRunner Tutorial. Guides you through the process of creating a load test script for a Web application.
Main VuGen User Interface
VuGen Main User Interface - Overview
The VuGen Main User Interface is comprised of several zones, each of which can display a variety of panes. You can modify the layout of these zones and panes to enhance recording and debugging of your Vuser scripts. For details, see
"VuGen Layouts - Overview" on page 79 .
The following table describes each pane and provides a short use case scenario.
Pane
Bookmarks
Errors
Snapshot
Purpose
Bookmarks allow you to specify a location in a script so that you can easily find it later on for editing.
For details, see
"Bookmarks
Pane" on page 121
.
Use Case Scenario
Displays script errors, warnings and messages generated from script replay.
Additionally, you can create custom filters for error messages.
For details, see
on page 123 .
"Errors Pane"
Error Filter from the output log
After every test process, such as code generation and replay, you can check the error pane for the error log. You can also view other types such as warning and message.
Community search is available with context menu on highlighted error.
In addition, you can double click the message to jump to the location in the script.
A snapshot displays server and client data associated with a specific step in a script. The format of the data is dependent
Use the snapshot pane to understand all data that the steps contain.
You can perform certain tasks
Page 74 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Pane
Data Grid
Solution Explorer
Step Navigator
Purpose
on the protocol used for creating the script.
For Snapshot details, see
"Snapshot Pane" on page 119
.
Use Case Scenario
such as search for correlations, compare record versus replay snapshots and search for the specific values using the standard search operation.
Simplified view of all the recordsets associated with the script. Valid for specific protocols such as MSSQL.
The Solution Explorer enables you to organize and manage multiple scripts in a named solution.
This pane provides easy access and manipulation of solutions such as script assets, parameters, runtime settings, and replay runs.
You can double-click an asset to activate it in the editor area or right-click to examine quick operations available for that asset.
For details, see
"Solution
Explorer Pane" on page 114 .
Enables you to navigate to a selected step in your script. If your script contains many steps, you can use the search box to search for matching text in the different parts of the steps.
For details, see
" Step
Navigator Pane" on page 122 .
The data pane contains either sent or received data. The data is displayed in an easy formatted table and you perform operations such as parameterization, and other data manipulations.
You can now bundle scripts in a solution. For example you can bundle scripts related to one business process.
For the present, the solution entity is limited in the following ways: l l
The solution entity is limited to local script development such as save all or open.
The solution entity can not be imported into any of the existing management tools such as ALM or Controller.
Table view of all LR API steps that exist. The step navigator replaces the tree view in previous versions of VuGen.
l
Dynamic filter on various step properties such as step arguments.
l
You can view the script in either action or script scope.
l
Every step that has a snapshot is marked with an icon. When hovering over a step that has an associated
Page 75 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Pane
Tasks
Editor
Purpose Use Case Scenario
thumbnail it is presented as a tooltip.
l
Double clicking a step, takes you to the corresponding location in the script and synchronizes all other panes.
l
Various operations can be done from the context menu such as copy stop.
l
Step Navigation is synchronized based on the validity of the script. You can check the status of the pane during script editing.
You can add, edit or search for tasks related to a script or solution.
Centralized Task
Management
For details, see
"Task Pane" on page 124 .
During script development, comments tasks enable you to embed tasks in the script. For example in a C based languge script,
// TODO Add
Parameter
User tasks enable you to add tasks, assign ownership and track completion of tasks related to the overall script process. For example, Add
Load Test Scenario using
newly created script.
The editor area contains all open assets such as script actions, extra files,report summary enables you to edit script actions.
In addition you can open community search, help documentation, and browser pages.
For details, see
"Editor " on page 109 .
You can view script actions simultaneously from different scripts within a solution.
l
You can insert comment blocks.
l
You can customize the color scheme.
l
You can enlarge the fonts.
l
Auto-completion options using
CTRL + SPACE.
Page 76 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Pane
Thumbnail
Output
Breakpoints
Watch
Page 77 of 1812
Purpose
Enables you to visually follow the business process that the script has recorded.
Event log from different operations in VuGen such as code generation, replay, and recording.
For details,
page 118
"Output Pane" on
l
The thumbnail generation is configurable in Tools >
Options.
l
You can enlarge the thumbnail to full size by double clicking.
l
Additional operations are available from the context menu such as Go to Step.
The output pane displays all logs created during script development phases such as code generation, replay, and recording.
l
You can perform quick searches from the pane or access full search with
CTRL+F l
You can save the logs.
VuGen lets you include breakpoints in you Vuser scripts to help you to debug the scripts.
For details, see
"Breakpoints
Pane" on page 125
.
Enables you to set and manage breakpoints to help analyze the effects of the script on your application at pre-determined points during script execution.
The Watch pane enables you to monitor variables and expressions while a script runs, and is in the Paused state.
For details, see
"Watch Pane" on page 126 .
Use Case Scenario
l
All supportive data in the panes is synchronized as you navigate through the script.
l
The script support full debug capability can be managed within the script such as toggle breakpoints.
l
Community search is available on highlighted text in the script.
HP LoadRunner (11.50)
User Guide
VuGen
Pane Purpose Use Case Scenario
Call Stack
This debug pane enables you to view information about the methods and functions that are currently on the call stack of your script, or the context in which the run session was paused.
For details, see
"Call Stack
Pane" on page 127
.
For a quick summary, see
"Performing Common Tasks in the New VuGen Interface" below .
Performing Common Tasks in the New VuGen Interface
VuGen’s user interface has been updated for version 11.50. Some tasks are not performed in the same way as they were in earlier versions and some new tasks have been added. The table below helps you find the new way of performing tasks that have changed. For more details, see the linked topics. For a full description of the new interface, see
"VuGen Main User Interface - Overview" on page 74 .
Feature/Function Old VuGen
Solution
Script naming
Script location
Access to Run time settings
Access to parameters
Tree view
Scripts were independent of each other and needed to be combined manually.
New VuGen
Scripts can now be combined in a solution.
Links
"Solution
Explorer -
Overview " on page 81
New scripts were kept in a temporary directory and only had to be named when saving them.
New scripts are created directly in the provided path and should be named when creating them.
The default script location has changed. It is now
C:\Users\<UserName>\Documents\
VuGen\Scripts.
Run time settings were accessed from the toolbar and menus.
Run time settings are now accessed from the Solution Explorer pane.
"Solution
Explorer
Pane" on page 114
Parameters were accessed from the toolbar and menus.
Parameters are now accessed from the Solution Explorer pane.
"Parameter
List Dialog
Box" on page 273
The tree view enabled you The tree view has been replaced by
" Step
Page 78 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Feature/Function Old VuGen
to view the structure of the steps in your script.
New VuGen
the Step Navigator.
Links
Navigator
Pane" on page 122
Snapshots
Open script directory
Script directories were opened from a context menu within the script.
You can now see Snapshots together with the relevant script in a multi-pane window.
Script directories are now opened from a context menu on the Script tab.
"Snapshot
Pane" on page 119
"Script
Directory
Files" on page 135
"Editor " on page 109
Open multiple script files
Only one script file could be opened to be viewed. If you viewed a new script file, the previous script file would close.
Multiple script files can be opened and viewed simultaneously
Compare scripts To compare scripts you selected Tools >
Compare with Script
and a select dialog box opened directly to the script directory.
To compare scripts you now select
Tools > Compare > Compare with
external object. A dialog box opens and you navigate to the appropriate directory.
"How to
Compare
Scripts
Side by
Side" on page 93
Inserting new steps
To insert new steps in a script you selected Insert
> New Step and a popup opened to enable you to insert your new step.
To insert a new script you now select
Design > Insert in Script > New
Step. The Steps Toolbox pane opens with steps for you to select.
"How to
Insert
Steps into a Script" on page
230
Multiple layouts
Debugger
You can now choose from a number of layouts depending on the task you are performing. You can also customize your layout to suit your needs.
"VuGen
Layouts -
Overview" below
New options have been added to
Debug: Watch and Call Stack.
"Watch
Pane" on page 126
"Call Stack
Pane" on page 127
VuGen Layouts - Overview
The VuGen window is composed of a number of zones. Each zone can contain a variety of panes, such as the Errors pane or the Snapshots pane. The panes appear as tabs within the zones. The
Page 79 of 1812 HP LoadRunner (11.50)
User Guide
VuGen figure below shows a zone that contains four tabbed panes: Output, Tasks, Errors, and Run Time
Data. The Output pane is currently visible.
The specific configuration of the zones and the panes contained within the zones is called a layout.
VuGen is supplied with a set of standard layouts: Default, Debug, Plain, Record, Replay, and
Snapshot. Each layout is designed to enhance a specific phase of the Vuser script development process. For example, the Replay layout includes the panes that are most useful when you run a
Vuser script: Errors, Call Stack, Watch, Breakpoints, Output, and Run Time Data. VuGen automatically uses specific layouts during specific phases of the script development process. For example, the Record layout is used while you record a script, and the Replay layout is used when you replay a script.
The VuGen toolbar displays the layout that is currently used . To change the layout, click the Layout drop down and select the required layout from the list of layouts.
You cannot add or delete a standard layout. However, you can modify most of VuGen's standard layouts to meet your specific requirements. When you modify a layout, you can add, move and resize zones, select which panes to include in each zone, and specify which of these panes is displayed by default. For task related details, see
"How to Modify the VuGen Layout" on page 93
.
After you modify a standard layout, VuGen maintains that layout until you change the layout again or reset the default layouts.
Note: VuGen does not save any changes that you make to the Plain layout.
Page 80 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Restoring the layout defaults
On the VuGen toolbar, click the Layout drop-down, and select Reset to Defaults. VuGen resets all standard layouts to their default settings. Custom layouts are not affected when you reset the layout defaults.
Using custom layouts
In addition to modifying a standard layout, you can create your own custom layouts. For example, you could create the My_Replay layout which is based on the standard Replay layout but that has a larger zone to display the replay-related panes. When you reset the layout defaults, custom layouts are not affected - only the standard layouts are reset. For details on creating your own custom layouts, see
"How to Work with Custom VuGen Layouts" on page 95 .
Solution Explorer - Overview
The Solution Explorer enables you to easily organize and navigate through script entities, enhancing the recording, replay and debug process. You can create a solution containing multiple scripts of different protocols related to a full-cycle business process. Each script entity includes extra files (such as header files), run-time settings, parameters, and replay runs.
The following graphic illustrates the Solution Explorer structure:
Solution
When you create a new script, you can name the solution that contains the script. For example, you can use the business process as the solution name. If you do not specify a name, the default name
Page 81 of 1812 HP LoadRunner (11.50)
User Guide
VuGen is "Untitled".
Scripts
Your solution can contain multiple scripts. Single-click a script, or one of its assets, to change focus to that script. When a script in a solution is in focus, it changes the behavior of Vugen. For example, when you click replay, the script in focus runs. In addition, menus options, toolbars buttons, and panes display functionality relevant to the script's protocol. For example, the script in focus is recorded in Web HTTP/HTML , the Recording Options button is displayed on the toolbar.
However, if the script in focus is recorded in Ajax TruClient, the Develop Script button is displayed on the toolbar.
Double-click the script's action to open it in the Editor.
Extra files
Additional files that are called by the script, are contained in the Extra Files node under Solution
Explorer > <ScriptName>. When you include files in the Extra Files node, these files will automatically be included in a Load Generation Scenario.
The information contained in extra files can include: l
Common utility functions used by the script (for example, code) l
Definition of constants and variables used by the script (for example, code) l
Special assets used during script execution (such as .jpeg files) l
Data files manipulated by script code during script execution
The following are examples of file types that can be added as extra files:
.ws,.h,.c.,dat,.ini,.vba,.vbs,.java,.js,.txt,.tux,.rec,.msc,.vdf,.xml,.xsl,.dtd,.html,.htm
You can edit extra files in the editor if the file type is included in Tools > Options > Script
Management > List of file types that can be edited in the Editor. Double click the extra file to open it in the Editor. For details on how to modify the list, see
"Scripting Options" on page 103
Run-time Settings
You can access run-time settings for a specific script from the Run-time Settings node in the
Solution Explorer > <Script> > Run-Time Settings. For details, see
Run-Time Settings.
Parameters
You can access parameters for a specific script from the Parameters node in the Solution
Explorer > <Script> > Parameters. For details, see
"Parameter Overview" on page 247
.
Replay Runs
This node enables you to access the Replay Summary Reports for each iteration in the replay.
For details, see
"Solution Explorer Pane" on page 114
.
Editor - Overview
VuGen's Editor enables you to edit recorded scripts and other supplementary files such as header files. You can open multiple files simultaneously, easily navigating tab by tab.
The Editor facilitates editing by providing the following features:
Page 82 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Tab View
The tab view in the Editor allows you to organize and edit several script assets simultaneously. You can do the following in the Editor: l
Double-clicking on a script or extra files in the Solution Explorer will open the file in Editor area as a tab. The tab name is <script name>:<filename> l
Drag tabs to reorder them.
Support of Multiple Programming Languages
Recorded scripts are generated in C, which has full language and parsing support in VuGen. You can enhance your Vuser scripts by adding standard ANSI C functions. ANSI C functions allow you to add comments, control flow statements, conditional statements to your Vuser scripts. You can add standard ANSI C functions to any type of Vuser script. For details, see
"C Vuser Scripts" on page 800 .
In addition, the VuGen Editor enables you to write manual scripts with the following programing languages: l
VB Script
For details, see
"VBScript Vusers" on page 801 .
l
Java
For details, see
"Java Vusers" on page 802 .
l
JavaScript
For details, see
"JavaScript Vusers" on page 800
.
l
C#
For details, see
".NET Vusers" on page 803
.
l
VB.NET
For details, see
"How to Create a Vuser Script with Visual Basic or Visual C#" on page 805 .
Code Completion and Tooltips for C Scripts
Code completion enables you to quickly and accurately write code by providing a list of code items from which you can select . Press
CTRL + SPACE
to activate statement completion when your cursor is in the Editor. Tooltips, containing context information, appear when your mouse hovers over a code element. The following table describes available code completion items, scope, identifying icon, and tooltip context:
Code
Completion
Item Scope
ANSI C
Keywords and Types
All possible standard C keywords.
Icon The Tooltip Displays
Function type, name, and parameters.
Page 83 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Code
Completion
Item Scope
All steps in the script.
LR API
Functions
LR API
Constants
User
Functions
Used to delimit groups of parameters in steps. For example, ENDITEM
All the functions that you have defined in action files.
Icon The Tooltip Displays
LR API Step.
LR API Constant.
• Function type, name and parameters.
• When Using Functions (Method Insight)
The required arguments, highlighting each argument as you define it moving to the next argument when you enter the delimiter.
Type and name.
Variables
Local variables – visible only in the function where they have been defined.
Global variables – defined outside of any function body.
Available everywhere in the script.
Parameters
Available only in the function body where they have been defined.
• Parameter type and name
• When Using parameters (Method
Insight)
The required arguments, highlighting each argument as you define it moving to the next argument when you enter the delimiter.
By default, VuGen uses code completion globally. To disable code completion, select Tools > Text
Editor > Code Completion. Clear the Enable code completion features check box.
Script Code-Coloring for C Scripts
To facilitate script writing and debugging, code item types are colored by an identifying background and foreground. The colored text enables you to easily read scripts and scan for syntax errors.
Below is a table that provides examples of code item types and their assigned colors.
Code Type
Comments
Keywords
Method Parameter Name
Color Example
/* comment */ // comment if (a) { } else { } foo( " parameter =value"
)
Page 84 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Code Type Color Example
LoadRunner API
Method Call
String web_url foo
( ) char * text = "Hello, World!"
In addition, you can customize code item types to suit your needs by selecting Tools > Options >
Text Editor > Highlighting.
Script Folding for C Scripts
Script folding enables you to selectively hide and display sections of a script, making it easier to manage large scripts by viewing only those sections that you are currently editing. For details, see
"
Editor Options" on page 99
.
Community Search
You can perform Web searches from the VuGen toolbar, which opens a browser tab in the Editor.
The default Web site is the LoadRunner Forum which enables you to search topics, post questions, or blog about your expertise. You can add additional search sites by selecting Tools > Options >
General > Community. For details on adding additional sites, see
"General Options" on page 97 .
Snapshot Pane - Overview
Snapshots contain information about the status of various steps in a Vuser script. VuGen displays snapshots in the Snapshot pane. The snapshots are displayed in various formats, depending on the protocol of the Vuser scripts. For example, snapshots for RDP Vusers are displayed as graphic images of the remote screen. In contrast, snapshots for Winsock Vusers are displayed as textual representations of the data buffers that are transferred while the Vuser script is recorded and replayed.
Note that the Snapshot pane is not available for all Vuser protocols - only specific Vuser protocols give you access to the Snapshot pane.
Snapshots are taken both when a script is recorded and when the script is replayed. The Snapshot pane enables you to display the record and replay snapshots. By default, the Snapshot pane shows just a single snapshot. To enable you to compare snapshots, you can split the Snapshot pane to show two snapshots simultaneously. You can split the Snapshot pane either vertically or horizontally. Each section of the split Snapshot pane can show either a record snapshot or a replay snapshot. Typically, you would show a record snapshot together with its corresponding replay snapshot. This enables you to compare the record snapshot with the replay snapshot.
l
For details on working with the Snapshot pane, see
"How to Work with Snapshots" on page 88
.
l
For details on the Snapshot pane UI, see
"Snapshot Pane" on page 119 .
Basic Snapshot pane functionality
The Snapshot pane that is displayed for all Vuser protocols includes the same basic functionality.
This basic functionality includes the ability to:
Page 85 of 1812 HP LoadRunner (11.50)
User Guide
VuGen l
Show one snapshot, or split the Snapshot pane to show two snapshots. You can split the
Snapshot pane either horizontally or vertically.
l
Show record and replay snapshots.
For details on how to use the basic Snapshot pane functionality, see
"How to Work with
Snapshots" on page 88 .
Synchronizing snapshots
The Snapshot pane that is displayed for some Vuser protocols improves your ability to compare snapshots by “synchronizing” the two snapshots that are displayed in the Snapshot pane. For example, when synchronizing graphic snapshots, if you place the mouse cursor over a specific location in one of the snapshots, VuGen displays a marker at the corresponding location in the other snapshot. In addition, as you move one snapshot vertically or horizontally within the Snapshot pane, VuGen moves the other snapshot accordingly, ensuring that the same section of each snapshot is displayed.
Note that snapshot synchronization is available for only specific Vuser protocols, and for only specific views within these protocols.
Copying snapshots to the clipboard
You can copy an image-based snapshot to the clipboard. This enables you to import the image into a graphics application, where you can analyze and modify the graphic.
For details on how to copy a snapshot to the clipboard, see
"How to Work with Snapshots" on page
88 .
Note that the "copy snapshot to the clipboard" functionality is available for only RDP, Citrix, and
SAP protocols.
Copying snapshot text to the clipboard
You can copy text from a snapshot to the clipboard. You can then paste the text from the clipboard into another application.
For details on how to copy snapshot text to the clipboard, see
"How to Work with Snapshots" on page 88 .
Note that the "copy snapshot text to the clipboard" functionality is available for only Ajax (Click &
Script) and Web (Click & Script) protocols.
Customized Snapshot pane functionality
In addition to the basic Snapshot pane functionality, the Snapshot panes for some Vuser protocols include customized functionality. For example, the Snapshot pane for RDP Vuser scripts lets you display snapshots in either Full or Image modes; the Snapshot pane for Winsock Vuser scripts lets you display snapshots in either Text or Hex modes. The controls for the customized functionality can be found in the Snapshot pane toolbars.
Snapshot on error
In addition to showing record and replay snapshots, the Snapshot pane can display snapshots of errors that occurred during the replay of a script. The "snapshot on error" functionality is available for only specific Vuser protocols.
Page 86 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
You can generate and display snapshots of errors only if the "snapshot on error" functionality is activated. For details on how to activate the snapshot-on-error functionality, see
"How to Work with
Snapshots" on next page .
Snapshots that Have an XML View
VuGen's Snapshot pane shows various snapshots that were recorded while a Vuser script was recorded or replayed. For specific Vuser protocols only, the Snapshot pane can show XML views of the snapshot. The XML views are displayed in the XML View tab. The XML View tab appears inside the Response Body and Request Body tabs only. The XML view includes its own set of controls and functionality.
The XML view is divided into two areas. On the left is the tree view of the snapshot data, and on the right is the text view.
The two XML views are synchronized. If you select an entry in the tree view, VuGen highlights the corresponding element, attribute, or value in the text view. Alternatively, if you double-click an element, attribute, or value in the text view, VuGen opens the tree view as required, and highlights the corresponding entry.
The splitter controls between the tree view and text view enable you to set the proportion of the available space that is occupied by each of the views.
Controls to the left of the text view enable you to expand and collapse elements within the text view. Click an Expand icon to expand an element in the view, and click a Collapse icon to collapse an element in the view. Note that you can place the mouse cursor inside an element in the text view and then press the <+> key to expand the element or the <-> key to collapse the element, as appropriate.
Page 87 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Toggle controls [ ] above the tree view enable you to define whether or not attributes and values will be visible in the tree view. If both attributes and values are hidden, the tree view shows only the XML elements.
After recoding a Vuser script, you can use the XML View in the Snapshot pane to add a text check to the script. For details, see
"How to Add a Text Check From the XML View in the Snapshot Pane" on page 90 .
How to Work with Snapshots
This topic describes how to use the basic Snapshot pane functionality. For an overview of the snapshot functionality, see
"Snapshot Pane - Overview" on page 85
.
How to show the Snapshot pane
To show the Snapshot pane, do one of the following options: l
Select View > Snapshot.
l
Click the Snapshot button on the VuGen toolbar.
l
In the Editor, click inside a step that contains a reference to a snapshot.
l
In the Step Navigator, double-click a step that contains a reference to a snapshot. Note that in the Step Navigator, each step that contains a snapshot displays a Snapshot icon . You can
Page 88 of 1812 HP LoadRunner (11.50)
User Guide
VuGen place your mouse cursor over the snapshot icon to see a thumbnail view of the snapshot.
How to show a record snapshot in the Snapshot pane
Click the Recording Snapshot button on the Snapshot pane toolbar.
How to show a replay snapshot in the Snapshot pane
Click the Replay Snapshot button on the Snapshot pane toolbar. If more than one replay snapshot exists for the step, click Iteration and select the required iteration number.
How to split the Snapshot pane to show two snapshots
If the Snapshot pane displays only one snapshot, click the Split Snapshot Pane button on the Snapshot pane toolbar.
How to show only one snapshot in the Snapshot pane
If the Snapshot pane displays two snapshots, click the Single button pane toolbar.
on the Snapshot
How to toggle between a horizontal split and a vertical split of the Snapshot pane
If the Snapshot pane displays two snapshots: on the Snapshot pane toolbar to show two l
Click the Horizontal Split button snapshots side-by-side.
l
Click the Vertical Split button snapshots, one above the other.
on the Snapshot pane toolbar to show two
Page 89 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
How to synchronize the display of two snapshots when the Snapshot pane is split
1. Make sure that the Snapshot pane is split to show two snapshots.
2. On the Snapshot pane toolbar, click the Synchronization button .
Note that snapshot synchronization is available for only specific Vuser protocols, and for only specific views within these protocols.
How to copy a snapshot to the clipboard
1. Display the snapshot in the Snapshot pane.
2. Right-click on the snapshot, and then select Copy Image to the Clipboard.
Note that the "copy snapshot to the clipboard" functionality is available for only RDP, Citrix, and
SAP Vuser scripts.
How to copy snapshot text to the clipboard
1. Display the snapshot in the Snapshot pane.
2. Select the text that you want to copy.
3. Right-click in the selected text, and select Copy Selection.
How to activate the snapshot-on-error functionality
1. Click Replay > Run-Time Settings. The Run-Time Settings dialog box opens.
2. Under General, click Miscellaneous.
3. Under Error Handling, select the Generate snapshot on error checkbox.
How to Add a Text Check From the XML View in the Snapshot Pane
After recording a Vuser script, you can add a text check from the XML view in the Snapshot pane.
For details on the XML view in the Snapshot pane, see
"Snapshots that Have an XML View" on page 87 .
How to add a text check from the XML view in the Snapshot pane:
1. Click View > Snapshot, or click the Snapshot button on the VuGen toolbar.
2. In the Snapshot pane, display a snapshot that contains the text you want to verify.
3. On the right-side of the Snapshot pane, click the XML View tab.
4. In the Snapshot pane, click the Response Body tab.
5. In either the tree view or the text view, locate and select the text string that you want to verify.
6. Right-click inside the selection, and select Add Text Check Step. The Find Text dialog box opens.
7. Modify the options in the Find Text dialog box. For details on the dialog box options, press F1 when in the dialog box to open the Function Reference.
8. Click OK to insert a web_reg_find step into the Vuser script.
Page 90 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
How to Create a Business Process Report
At the final stage of script creation, you can create a report that describes your business process.
VuGen exports the script information to one of the following formats: l
Microsoft Word l
Acrobat PDF l
HTML
You can use a pre-designed template or one provided with VuGen, to create reports with summary information about your test run. The VuGen template is available in Microsoft Word 2007 (docx) format. You can edit or update the template according to your requirements.
VuGen lets you customize the contents of the report by indicating what type of information you want to include.
Note: Business Process Reports are available for the following protocols only: AJAX (Click &
Script), Ajax TruClient, Citrix_ICA, Oracle NCA, Oracle Web Applications 11i, PeopleSoft
Enterprise, RDP, SAP (Click & Script), SAP GUI, SAP - Web, Web (Click & Script), Web
(HTTP/HTML), and Web Services.
1. Create a business process report
Select Tools > Create Business Process Report and complete the dialog box. For user interface details, see
"Business Process Report Dialog Box" on page 111
.
2. Configure additional options
To modify additional report options such as the table of contents, snapshots, and the document template, click the More button. For user interface details, see
"Business Process Report
Dialog Box" on page 111 .
Page 91 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
How to Create a Vuser Script - Workflow
The following diagram outlines the process of developing a Vuser script:
The process of creating a Vuser script is as follows:
1. Record a basic script using VuGen. If you are testing Windows-based GUI applications or complex Web environments such as applets and Flash, you may need to use HP's GUI-based tools such as QuickTest or Unified Functional Testing.
2. Enhance the basic script by adding control-flow statements and other LoadRunner API functions into the script.
3. Configure the run-time settings. These settings include iteration, log, and timing information, and define the Vuser behavior during a script run.
Page 92 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
4. Verify the script's functionality, run it in standalone mode.
5. After you verify that the script is functional, you integrate it into your environment: a
LoadRunner scenario, Performance Center load test, or Business Process Monitor profile. For more information, see the Function Reference.
How to Compare Scripts Side by Side
Vuser scripts can be compared and displayed side by side using the comparison tool.
Compare Vuser scripts
1. Right click on the primary script in Solution Explorer and select Set as first comparing
object.
2. Right click on secondary script in the Solution Explorer and select Compare which will run the compare functionality.
or
3. Right click and select Compare with external object...
You can compare an asset to a file outside of the solution. This option sets the highlighted asset as the primary asset and opens Windows Explorer to enable you to select the secondary asset.
Note: You can change the comparison tool from Options > Scripting> Comparison For more information, see
"Scripting Options" on page 103
.
How to Modify the VuGen Layout
The VuGen window is composed of a number of zones. Each zone can contain a variety of panes, such as the Errors pane and the Snapshot pane. When more than one pane is included in a zone, the panes appear as tabs within the zone. This section describes how to customize and modify the zones and panes that appear in the VuGen window.
Moving a pane to a new zone
You can move any VuGen pane to a new zone. The new zone can be either a portion of an existing zone, or it can occupy the entire left, right, top, or bottom of the VuGen window.
In the VuGen window, drag the title bar or tab of the pane that you want to move. (If the required pane is not displayed in the VuGen window, you can select it from the View menu.) As you drag the pane over the zones in the VuGen window, a complex marker is displayed in the center of the active zone and a simple marker appears on each edge of the VuGen window.
Note that if you drag the title bar of a zone that contains multiple tabbed panes, then all the panes in the zone are moved to the new zone.
Page 93 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Marker Type
Complex marker -
Current zone
Simple marker -
VuGen window
Marker Description
Positions the selected pane in a new zone. The new zone is created in the top, bottom, left, or right of the active zone, according to the arrow marker selected when you release the mouse button.
Positions the selected pane in a new zone. The new zone is created in the top, bottom, left, or right of the VuGen window, according to the arrow marker selected when you release the mouse button.
Moving a pane to an existing zone
You can move any VuGen pane from one zone to another. When more than one pane is included in a zone, the panes appear as tabs within the zone.
1. In the VuGen window, drag the title bar or tab of the pane you want to move. (If the required pane is not displayed in the VuGen window, you can select it from the View menu). As you drag the pane over the zones in the VuGen window, a complex marker is displayed in the center of the active zone.
2. Locate the cursor over the center button of the complex marker. When you release the mouse button, the selected pane is added as a tabbed pane to the selected zone.
3. Repeat this procedure for each pane you want to move.
Note that if you drag the title bar of a zone that contains multiple tabbed panes, then all the panes in the zone are moved to the selected zone.
Floating and docking panes
Docked panes are fixed in a set position within the VuGen window. For example, when you move a pane to a position indicated by a marker, the pane is docked in that position.
Floating panes are displayed on top of all other windows. Floating panes can be dragged to any position on your screen, even outside the VuGen window. Floating panes have their own title bars.
Page 94 of 1812 HP LoadRunner (11.50)
User Guide
VuGen l
To float a pane, right-click the title bar, and click Float. The pane opens on top of all the other windows and panes, with its own title bar.
l
To dock a pane, double-click the title bar, or right-click the title bar and select Dock as tabbed
document. The pane returns to its previous position in the VuGen window.
How to Work with Custom VuGen Layouts
VuGen is supplied with a set of standard layouts. For an introduction to VuGen layouts, see
"VuGen
Layouts - Overview" on page 79 . VuGen lets you create your own custom layouts. For example,
you could create the My_Replay layout which is based on the standard Replay layout but that has a larger zone to display the replay-related panes.
To create a new custom VuGen layout:
1. Open VuGen.
2. On the VuGen toolbar, click the Layout drop-down, and select Edit. The Edit Layouts dialog box opens.
3. In the Edit the list of user-defined layouts box, enter a name for the new layout, and click
Add Layout. VuGen adds the new layout to the list of custom layouts. The new layout has the same settings as the default settings of the Default layout.
4. Click OK. The new layout will be included in the list of layouts in the Layout drop-down on the
VuGen toolbar.
5. On the VuGen toolbar, from the list of layouts, select the new custom layout.
6. Modify the new layout as required: Move and resize the zones, select which panes to include in each zone, and specify which of these panes is displayed by default. For details, see
"How to
Modify the VuGen Layout" on page 93
. VuGen maintains the modified layout until you change the layout again.
To modify an existing custom VuGen layout:
1. Open VuGen.
2. On the VuGen toolbar, click the Layout drop-down, and select the required custom layout.
3. Modify the VuGen layout as required: Move and resize the zones, select which panes to include in each zone, and specify which of these panes is displayed by default. For details, see
"How to Modify the VuGen Layout" on page 93
. VuGen maintains the modified layout until you change the layout again.
To delete a custom VuGen layout:
1. Open VuGen.
2. On the VuGen toolbar, click the Layout drop-down, and select Edit. The Edit Layouts dialog box opens.
3. From the List box, select the layout that you want to delete. The selected layout appears in the
Edit the list of user-defined layouts box.
Page 95 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
4. Click Delete. The selected layout is deleted.
Options Overview
The Options dialog box is comprised of VuGen application settings. The settings are common to all protocols available in VuGen.
Specific details of each of the settings are described in the topic of the relevant category topic.
The following table includes a list of the categories and related sections from the Options dialog box.
General
l
Task List enables you to add, update and delete comment tags.
l
Projects and Solutions enables you to configure project settings.
l
File Options enables you to configure save and delete file settings.
l
Community enables you to add, update and delete Community Search Sites.
For details, see
"General Options" on next page
.
Scripting
l
Recording UI enables you to configure the settings related to the recording user interface, for example the floating toolbar used when recording.
l
Replay enables you to configure the settings related to replay of the script.
l
Script Management enables you to edit the list of file extensions.
l
Comparison enables you to enter the location of the comparing application.
l
Step Navigator enables you to select the background and foreground colors for the Step Navigator pane.
l
Thumbnails enables you to configure the Thumbnail Explorer.
l
Output Pane enables you to configure the appearance of the Output Pane.
l
Snapshot enables you to configure appearance of snapshots in your script.
l
Parameters enables you to define the delimiter to use for parameter braces throughout a script.
l
Parser enables C language parser.
For details, see
"Scripting Options" on page 103 .
Editor
l
General enables you to configure font and other general options.
l
Markers and Rulers enables you to configure markers and rulers for text used in a script.
Page 96 of 1812 HP LoadRunner (11.50)
User Guide
VuGen l
Behavior enables you to configure settings related to tabs, keystrokes and mouse behavior.
l
Code Color enables you to configure the font settings for each heading, control and text type for each language type.
l
Code Completion enables you to configure the settings for code completion.
For details, see
" Editor Options" on page 99
.
General Options
This pane enables you to configure user interface options.
Task List
To access
Tools > Options > General > Task List
UI
Element Description
Comment
Tags
This pane enables you to add, delete or modify tags names that you can use to label comment tasks in your scripts.
Tags. List of available tags.
Name. Displays the name of the highlighted tags in the token list. This area enables you to modify, add or delete the current tag.
Add. Enables you to add a tag to the token list.
Edit. Enables you to modify the name of tag from the token list.
Delete. Enables you to delete a tag from the token list.
Scripts and Solutions
To access Tools > Options > General > Scripts and Solutions
UI
Element
Settings
Description
Default project location
Enables you to specify a path to your saved projects. Default location =
C:\Users\<username>\Documents\SharpDevelop Projects
Load previous solution on startup
Enables you to automatically load the previous solution.
By default this option is enabled.
Page 97 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Start Page
Settings
Display Start Page on startup
By default this option is enabled.
Close Start Page after script loads
By default this option is enabled.
File Options
To access Tools > Options > General > File Options
UI Element Description
Save
Delete
Use temporary file for saving
Temporarily saves files with a .bak extension until save operation is successful.
By default this option is enabled.
Use recycle bin when deleting files
By default this option is disabled.
Community
To access
Tools > Options > General > Community
See also
For details, see Community Search in the
"Editor - Overview" on page 82 .
UI
Element Description
Community Search Site
Add a new search site to the list of Community search sites.
l
Name: Enables you to specify a name of the search site that is displayed on the
VuGen toolbar.
l
URL: Enables you to specify the URL of the search site.
Example URLs http://www.bing.com/search?q=%QUERY% http://www.google.com/search?q=%QUERY% http://www.google.de/search?q=%QUERY% (localized google site, e.g. de for Germany) http://en.wikipedia.org/wiki/%QUERY%
Page 98 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Enables you to edit the properties of the custom search site.
Delete the search site from the list of available sites.
Move the search site lower down on the list of available sites.
Move the search site higher up on the list of available sites.
Editor Options
This pane enables you to configure the text editor options.
General
To access
UI Element
Text Font
Size
Word wrap
Show
Class/Function
Browser
Show Line numbers
Enable working
URL hypertext links in the Editor
Tools > Options > Editor > General
Description
Font
Enables you to select the font.
Enables you to select the font size.
General Options
Automatically wraps text to the next line.
By default this option is disabled.
Show or hide the Class/Function Browser. When enabled, you can navigate quickly to a specific class or function in your script by selecting it from the drop down list in the browser.
By default this option is enabled.
Enable line numbering of script in the Editor.
By default this option is enabled.
Enable URLs in scripts to function as hypertext links. Disabling this option may increase performance.
By default this option is enabled.
Markers and Rulers
Tools > Options > Editor > Markers and Rulers To access
UI
Description
Page 99 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Element
Show spaces
Markers and Rulers
Enable markers that indicate where spaces exists.
By default this option is disabled.
Show tabs
Enable markers that indicate where tabs exists.
By default this option is disabled.
Show end-ofline makers
Enable markers that indicate where line ends.
By default this option is disabled.
Underline errors
Enable underlining of errors.
By default this option is enabled.
Highlight matching brackets
Enable highlighting of matching brackets.
By default this option is enabled.
Highlight symbols
When this option is enabled, you can select a non-keyword in your script and the Editor will highlight all other occurrences in your script.
Page 100 of 1812
By default this option is enabled.
HP LoadRunner (11.50)
User Guide
VuGen
Behavior
To access
UI Element
Indentation
Tools > Options > Editor > Behavior
Description
Tabs
Enables you to set the spacing for tab indentation.
Default indentation is four spaces.
Convert tabs to spaces
Converts tabs to spaces.
By default this option is disabled.
Use smart indentation
Automatically applies the indentation format from the previous line.
By default this option is enabled.
Enable zoom with mouse wheel
Cut or Copy entire line when nothing is selected
Use Ctrl + Click for
"Go to Definition"
Behavior
Enables you to use the mouse wheel to zoom.
By default this option is enabled.
When this option is enabled and the cursor is located in a line of code, you can cut or copy the entire line without highlighting.
By default this option is enabled.
Enable shortcut for "Go To Definition". This shortcut enables you to move the cursor to the definition of a function you have highlighted in the Editor.
By default this option is enabled.
Code Color
To access
Important information
UI Element
<Language
Selection>
<Element
Selection>
Tools > Options > Editor > Highlighting
Highlighting options enable you to customize the color of script elements.
Description
Drop-down list of script languages for which you can customize appearance including: l
C# l
HTML l
VuGen C l
XML
List of code elements whose appearance you can customize.
Page 101 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Foreground color
Background color
Enables you to select a color from the pallet. The select color is applied to the foreground of the code element.
Enables you to select a color from the pallet. The select color is applied to background of the code element.
Code Completion
To access
UI Element
Tools > Options > Editor > Code Completion
Description
Enable code completion features
Code completion features are enabled. For details on code completion, see
"Editor - Overview" on page 82
.
By default this option is enabled.
Enable syntax tooltip
Enables tooltips that display function arguments. Each argument is highlighted as you are defining it, moving to the subsequent argument when the delimiter is entered.
By default this option is enabled.
Show tooltips when mouse pointer stops over an identifier
When this option is enabled, a description of the code elements is displayed when the mouse hovers over the identifier. This option is disabled when Show tooltips in debug mode only is enabled.
By default this option is enabled.
Show tooltips in debug mode only
Tooltips are displayed in debug mode only.
By default this option is disabled.
ANSI C keywords
LoadRunner API
Steps
Include in the code completion list
Enables you to include ANSI C keywords in code completion list.
By default this option is enabled.
Enables you to include LoadRunner API Steps in the code completion list.
By default this option is enabled.
Page 102 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
LoadRunner API
Constants
User-defined functions
Enables you to include LoadRunner API Constants in the code completion list.
By default this option is disabled.
Enables you to include user-defined functions in the code completion list.
By default this option is enabled.
Function parameters, local and global variables
Enables you to include function parameters, local, and global variables in the code completion list.
By default this option is enabled.
Folding
To access
UI Element
Enable Folding Features
Enable Steps folding
When step length is more than
[ ] characters
When step consists of more than [ ] lines
Tools > Options > Editor> Folding
Description
This option enables expanding and collapsing of script sections.
By default this option is enabled.
This option enables expanding and collapsing of script steps.
By default this option is disabled.
Enables you define the number of characters in a step before implementing folding.
By default this option is disabled.
Enables you to define the number of lines to a step before implementing folding.
By default this option is disabled.
Scripting Options
This pane enables you to configure options related to recording, replaying and debugging scripts.
Recording UI
To access
UI Element
Enable Recording Floating
Toolbar transparency mode
Tools > Options > Scripting > Recording UI
Description
Display a transparent floating recording toolbar. When you click or hover on the toolbar it becomes opaque.
By default this option is disabled.
Page 103 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Show Start Recording
Dialog Box after new script is created
Automatically close transactions
Automatically open the Start Recording Dialog Box after a new script is created.
By default this option is disabled.
Enable this function if you want VuGen to insert an end transaction step for open transactions before recording a subsequent action.
By default this option is disabled.
Replay
To access
Tools > Options > Scripting > Replay
UI
Element Description
Animated
Run
Animated Run
You can run a Vuser script in animated mode or non-animated mode. When you run in animated mode, VuGen highlights the line that is running in the Vuser script.
When you run in non-animated mode, VuGen executes the Vuser script, but does not indicate the line being executed.
By default this option is enabled.
Animated Run Delay
You can set a delay of the highlighting in the animated run, allowing you to better view the effects of each step. You set the delay in milliseconds.
By default this option is disabled.
Animate Functions in Action sections only
Animates the content of the Action sections only, not the init or end sections.
By default this option is enabled.
Page 104 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Results
Enable result of replay summary to be saved to a named folder after each script run
When this option is enabled the dialog box prompts you to name a results file before running a script in VuGen. When not enabled, VuGen automatically names the directory 'result1'. Subsequent script runs will automatically overwrite previous results files unless you specify a different name.
Note: Results are stored in a subdirectory of the script.
After replay
By default this option is disabled.
Generate report during script execution
By default this option is disabled.
After replay show
Instructs VuGen how to proceed after the replay: l
Script. Show script in the Editor.
l
Replay summary. Go directly to the Replay Summary window in the Editor.
(Default)
Script Management
To access
UI Element
List of file types, by extension, that can be edited in the Editor
Tools > Options > Scripting > Script
Management
Description
Enables you to modify the list of valid file extensions that can be edited in the Editor.
Comparison
To access Tools > Options > Scripting > Comparison
UI Element
Description
Path to comparing tool
You can select a comparison tool to be used when comparing two scripts. VuGen is installed with a default comparison tool (Wdiff).
Click the browse button to locate a third-party comparison tool that is installed on your local machine.
Command line arguments
This option contains the mandatory default arguments %1 and %2 for the two files you want to compare, which should not be modified. You can add additional arguments, as needed, for your comparison tool.
Step Navigator
To access Tools > Options > Scripting > Step Navigator
Page 105 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
UI Element
Enable Editor highlighting
Background color
Description
This option enables you to highlight filtered steps in your script.
Border color
Enables you to select a background color to apply to the filtered steps in your script.
Enables you to select a border color to apply to the filtered steps in your script.
Thumbnails
To access
UI Element
Enable Thumbnail
Explorer
Cache thumbnails to script folder
Tools > Options > Scripting > Thumbnails
Description
Enables slide view of generated thumbnails in the Thumbnail Explorer.
Double clicking thumbnail sets the cursor at the associated step in the script.
By default, this option is disabled.
Optimize VuGen's performance by saving rendered thumbnails to a cache file. Thumbnails are loaded from the cache file after the initial generation.
Clear thumbnail cache
Highlight the thumbnail associated with a step
Show important thumbnails
Enables you to empty the cache file of generated thumbnails.
Sync the display of the Thumbnail Explorer while scrolling through steps in the Editor.
VuGen displays thumbnails directly related to the business process.
Output Pane
To access
UI Element
Format
Font
Tools > Options > Scripting > Output
Description
Word wrap
Enables word wrapping in Output pane.
Text Font
Enables you to select a font.
Size
Enables you to select a font size.
Page 106 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Parameters
To access
UI Element
Left parameter delimiter
Right parameter delimiter
Restore Default
Tools > Options > Scripting > Parameters
Description
Enables you to specify a left parameter delimiter.
The following characters are valid: !, #, $, %, &, (, ), [, ], {,
}, |, ~, `, <, >, ?
Enables you to specify a right parameter delimiter.
The following characters are valid: !, #, $, %, &, (, ), [, ], {,
}, |, ~, `, <, >, ?
Resets both the left and right parameter delimiters to their default values.
C Parser
To access Tools > Options > Scripting > C Parser
UI Element Description
Enable C
Language
Parser
Disabling the C language parser may improve application performance when you are working with very large scripts. However, the following features will be disabled: l
Editing step arguments in the Editor l
Statement completion l
Snapshots l
Tasks, l
Thumbnails l
Additional step-related functionality
This option is enabled by default.
Search and Replace Dialog Boxes
These dialog boxes enable you to find and replace text strings in Vuser scripts and solutions.
Search Dialog Box
To access
l
Search > Quick Find
l
Search > Find in Files
Page 107 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Note
Some of the UI elements in the table below appear in the Quick Find dialog box only and some appear in the Find in Files dialog box only.
User interface elements are described below (unlabeled elements are shown in angle brackets):
UI Element Description
<Searchtype dropdown>
Find text
Enables you to specify the type of search to perform: Quick Find or Find in
Files. Note that the UI of the Search dialog box changes depending on the selection.
Specify the text to search for.
Regular
Expression
Shows the Regular Expression Builder. The Regular Expression Builder enables you to build a regular expression in the Find text box.
Select Regular Expression to indicate that the Find text string is a regular expression.
Scope
Specify the files in which to search.
Match case
Distinguishes between uppercase and lowercase characters during the search.
Match whole word
Searches for occurrences that are whole words, and not part of a larger word.
Search up
Include in search
Performs the searches upwards.
Enables you to select which entities are included in the search.
Directory
Options
Find Next
Find All
Specify the folder that contains the files that will be searched during a "Find in
Files" search.
Enables you to specify options when performing a "Find in Files" search.
Finds the next occurrence of the text or regular expression in the Find text box.
Finds all occurrences of the text or regular expression in the Find text box.
Replace Dialog Box
To access Search > Quick Replace
User interface elements are described below:
UI Element Description
Find text
Specify the text to search for.
Shows the Regular Expression Builder. The Regular Expression Builder enables you to build a regular expression in the Find text box.
Page 108 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Regular
Expression
Select Regular Expression to indicate that the Find text string is a regular expression.
Replace with
Specify the text that will replace the Find text.
Scope
Options
Specify the files in which to search.
Enables you to specify options when performing the search.
Match case
Distinguishes between uppercase and lowercase characters during the search.
Searches for occurrences that are whole words, and not part of a larger word.
Match whole word
Search up
Performs the searches upwards.
Find Next
Finds the next occurrence of the text or regular expression in the Find text box.
Replace
Replace
All
Replaces the selected text with the text in the Replace with box.
Replaces all found occurrences of the text or regular expression in the Find text box with the text in the Replace with box.
Editor
This pane enables you to edit scripts and other related script files. In addition you can open a browser session to search sites, such as the LoadRunner Forum.
To access
Important information
See Also
The Editor is opened when VuGen is loaded.
l
The Editor is automatically displayed as part of the default layout.
l
Press
Ctlr + Tab to display a list of tabs and panes. Highlight and click to switch tabs in the Editor.
l
Other main interface panes such as Output, Error, and Snapshot synchronize their displays based on your location in the Editor.
l
You can double-click an asset in the Solution Explorer to open it in the Editor.
l
Script modifications are displayed as highlighted text in the editor. The following are examples: n
Script has been modified but not saved.
n
Script has been modified and saved.
n
Breakpoint has been inserted.
l
For details, see
"Editor - Overview" on page 82
l
For details on Editor options, see
" Editor Options" on page 99
Page 109 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
User interface elements are described below (unlabeled elements are shown in angle brackets):
UI Element
<Gutter>
Description
The Editor gutter enables you to add toggle functionality including: l
Breakpoints
For details, see
"Breakpoints Pane" on page 125 or "Breakpoints Pane" on page 125
.
l
Bookmarks
For details, see
"How to Use Bookmarks" on page 157
.
Class/Function
Browser
When enabled, you can navigate quickly to a specific class or function in your script by selecting it from the drop down list in the browser.
Line numbers
Display of line numbers in the script.
Context Menu
Enables you to comment out highlighted script lines.
Comment region
Indent
Indent the selected line or lines of your script.
Show the snapshot associated with the highlighted script step.
Show
Snapshot
Correlate
Selection
Insert
Opens Design Studio and scans for dynamic values to be correlated in the selected script section.
Insert a Start Transaction step into your script.
For details, see
"Transaction Overview" on page 225 .
Insert an End Transaction step into your script.
For details, see
"Transaction Overview" on page 225 .
Insert a Rendezvous point step into your script.
For details, see "Rendezvous Points" on page 226 .
Insert comments into your script.
into
Breakpoints
Search
Community
Log
Message
Insert a your script.
Toggle Breakpoint.
Opens the default Community Search browser.
Page 110 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Business Process Report Dialog Box
This dialog box enables you to create a business process report.
To access
Relevant tasks
Tools > Create Business Process Report
"How to Create a Business Process Report" on page 91
User interface elements are described below:
UI Element
Title
Author
Comment
Location
Description
The title of the report.
Your name.
Any additional comments you want to appear in the report.
The path where you want the report to be saved.
Default value: script folder.
Page 111 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Expands the Business Process Report dialog box to display more options.
Table of contents
A table of contents generates for your report. If you disable an option, it will not appear in the table of contents.
Default value: enabled.
A summary of the recording session as it appears when you click the Recording
Summary link in the Tasks list.
Recording summary
Default value: enabled.
Transactions and
Rendezvous lists
A list of all of the transactions and rendezvous points that were defined in the script.
Default value: enabled.
Parameters list
A list of all the parameters that were defined in the script. This list corresponds to the parameters listed in the Parameter List dialog box Design > Parameter
List.
Default value: enabled.
Thumbnails
An actual snapshot of the recorded step, adjacent to the step name and description.
Default value: enabled.
Step descriptions
A short description of each step.
Default value: enabled.
Script name
The .usr file name of the script.
Output format
Document template
Creates the report in the selected format. The following formats are available: l
Microsoft Word l
Adobe PDF l
HTML
The path and file name of the template to use for the report. The default template is stored in the LoadRunner's dat folder.
To change the report template, click the browse button and specify new template with a .docx extension. If you want to create a new template, we recommend that you use an existing template as a basis for the new one. This will make sure that the required bookmarks and styles are maintained within the new template.
Steps Toolbox Pane
This pane enables you to drag and drop API functions into your script.
Page 112 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
UI example
To access
Important information
Use one of the following: l
Design > Insert in Script > New Step
l
Right click in the script in Editor > Insert > New Step l
Press
Ctrl+Alt+B l
A step's associated parameter dialog box opens when you add the step to the script.
l
You can drag and drop steps into your script.
l
You cannot drag and drop a step into a step from the Steps Toolbox but you can manually add a step parameter within a step.
l
If you insert a step into the incorrect location in your script, the script may fail.
"How to Insert Steps into a Script" on page 230
.
Relevant tasks
User interface elements are described below (unlabeled elements are shown in angle brackets):
Page 113 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
UI Element
<Function List>
Description
Displays a list of available functions divided into the following categories: l
Common l
Web checks l
Services l
XML l
Web JS l
Async
Search. Enables you to perform an incremental search in the function list by entering text. For example, if you type "web" into the search box, the function list will display only those function that include the letters "web".
Add. Add the highlighted step to the current location in your script.
Expand/Collapse. Expand or collapse the step categories.
Solution Explorer Pane
This pane enables you to navigate through a solution which contains script assets, parameters, runtime settings, and replay runs.
Page 114 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
UI example
To access
Do one of the following: l
View > Solution Explorer
l
Press
Ctrl + Alt + L
Important information
l
Solution Explorer is automatically displayed as part of the default layout.
l
You can move this pane to different areas of the Main User Interface. For details, see
"VuGen Layouts - Overview" on page 79
.
l
Other main interface panes such as Output, Error and Snapshot synchronize their displays based on your location in the Solution Explorer.
l
You can double-click an asset to activate it in the editor area or right-click to examine quick operations available for that asset.
See also
l
"VuGen Main User Interface - Overview" on page 74
l
"Solution Explorer - Overview " on page 81
l
"VuGen Layouts - Overview" on page 79
UI Element Description
Page 115 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
<Solution>
Container for scripts.
l
Default solution name is Untitled.
Context menu options l
Add New Script
For details, see
"Create a New Script Dialog Box" on page 145
.
l
Add Existing Script l
Save All Scripts l
Close Solution l
Save Solution As...
<Script>
Container for script assets including scripts actions, extra files, run-time settings and parameters.
Context menu options l
Save Script
Select to save script l
Save Script As...
Save script with new name or to a new location, such as ALM.
l
Export to Template....
You can save scripts as templates. For details, see
"How to Create and Open
Vuser Script Templates" on page 137
.
l
Remove Script
Enables you to delete a script from the solution or select checkbox to delete from file directory.
l
Set as first comparing object
You can compare one asset to another. This option selects the highlighted asset as the primary asset.
l
Compare
Runs the compare functionality l
Compare with external object...
You can compare an asset to a file outside of the solution. This option sets the highlighted asset as the primary asset and opens Windows Explorer to enable you to select the secondary asset.
l
Open Script Folder
While you record, VuGen creates a series of configuration, data, and source
Page 116 of 1812 HP LoadRunner (11.50)
User Guide
VuGen code files. These files contain Vuser run-time and setup information. VuGen saves these files together with the script.
You can open the folder on the local disk where the script is saved. For scripts that are saved on a different storage location (such as ALM), this option opens the temporary folder on the local disk.
<Actions>
Container for individual actions including the default actions: l vuser_int l action l vuser_end
Context menu options l
Create New Action
Enables you to add a new script action block to your script.
l
Import Action
Enables you to import an action from an existing script.
Extra Files
Container for extra files associated with your script.
Context menu options l
Add files to script
Enables you to add extra files to the Extra Files node of your script.
l
Add files from folders and sub-folders
Enables you to add the contents from folders or sub-folder to the Extra Files node of your script.
Run-Time
Setting
Opens the run-time settings dialog box.
For details, see
"Run-Time Settings Overview" on page 346 .
Parameters
Enables you to create, edit, and list parameters associated with your script. For details, see
"Parameters" on page 247 .
Context menu options l
Parameters list l
Create new parameter l
Edit parameter l
Configure parameter delimiter
Replay
Runs
Enables you to display the Replay Summary for a selected iteration.
Context menu options
Page 117 of 1812 HP LoadRunner (11.50)
User Guide
VuGen l
<Select run iteration> l
Open Replay Summary
Enables you to open the Replay Summary in the Editor for selected iteration.
l
Open Test Results
Enables you to open the Test Results in the Editor for selected iteration.
Output Pane
The Output Pane displays messages created during the recording, compilation and replaying of your script.
To access
Important information
Relevant tasks
See also
Select View > Output, or click the Show Output Pane button on the VuGen toolbar.
You can move this pane to different areas of the Main User
Interface. For details, see
"VuGen Layouts - Overview" on page
79
.
"How to Work with Custom VuGen Layouts" on page 95
"VuGen Main User Interface - Overview" on page 74
User interface elements are described below (unlabeled elements are shown in angle brackets):
UI Element
<Show output from>
Locate
Description
The type of ouput to display. The following types are available: l
Replay. Displays the messages generated by the script replay.
l
Compilation. Displays the compilation messages.
l
Code Generation. Displays the code generated during the recording.
l
Recording. Displays the messages generated during the recording.
l
Recorded Events. Displays events that occurred during recording.
Clear All Lines Clears all of the messages from the message list.
Toggle Word Wrap When selected, wraps the text of each message onto the next line.
Jumps to the location in the source document relevant to the
Page 118 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
UI Element
Options
Description
selected output message.
<Find box> The text string you want to find. You can refine your search by selecting one of the Options described below.
Press ENTER to begin the search.
Find Previous / Find Next Highlights the next or previous string that matches the text you entered in the Find box.
Only available after you enter text in the Find box.
Enables you to refine your search with the following options: l
Match Case Distinguishes between upper-case and lower-case characters in the search.
l
Match Whole Word Searches for occurrences that are only whole words and not part of longer words.
l
Use Regular Expression Treats the specified text string as a regular expression.
Note: Extended regular expressions and multi-line searches are not supported.
Save Output to a Text File Opens the Save As dialog box, enabling you to save the contents of the message list as a text file.
Snapshot Pane
To access
Important information
See also
Select View > Snapshot, or click the Show Snapshot Pane button
VuGen toolbar.
on the l
The appearance and functionality of the Snapshot pane vary depending on the protocol of the current Vuser script.
l
You can move this pane to different areas of the Main User Interface. For details see,
"VuGen Layouts - Overview" on page 79
.
"Snapshot Pane - Overview" on page 85
"How to Work with Snapshots" on page 88
Standard Snapshot Pane Controls
The Snapshot pane displays the following standard controls:
UI Element Description
Page 119 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Splits the Snapshot pane to show two snapshots.
Displays two snapshots in the Snapshot pane - one to the side of the other.
Displays two snapshots in the Snapshot pane - one above the other.
Shows a single snapshot in the Snapshot pane.
Shows the record snapshot in the Snapshot pane.
Shows the replay snapshot in the Snapshot pane.
Select the iteration number of the replay snapshot to display.
Synchronizes the display of the two snapshots if the Snapshot pane is split.
Note that snapshot synchronization is available for only specific Vuser protocols, and for only specific views within the protocols.
In addition to the standard controls, the Snapshot pane may display controls that are specific to the current Vuser protocol.
Citrix, RDP, and SAP protocols
User interface elements are described below:
UI
Element
Description
Displays the next record snapshot that was appended during script replay.
Displays the previous record snapshot that was appended during script replay.
Image
Full
Displays a graphical representation of the snapshot. You can synchronize the display of two snapshots in the Snapshot pane. Snapshots display faster when the Image view is used than when the Full view is used.
Displays a graphical representation of the snapshot. You cannot synchronize the display of two snapshots in the Snapshot pane. Snapshots display slower when the
Full view is used than when the Image view is used.
Windows Sockets protocol
User interface elements are described below:
Page 120 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
UI
Element
Hex
Text
Go To
Description
Displays the buffer data in hexadecimal.
Displays the buffer data as text.
Open the Go To Offset dialog box that enables you to navigate within the data buffer.
Ajax (Click & Script) and Web (Click & Script) protocols
User interface elements are described below:
UI Element
Page View
Page Source
Description
Displays a graphic view of the Web page.
Displays the HTTP source code of the Web page.
Web (HTTP/HTML) Protocol
User interface elements are described below:
UI
Element
Description
Displays step data in HTML format.
Displays step data in HTTP format. This enables you to view in-depth information about the step, including request data, response data, cookies, and headers. For more information, see
"Web Snapshots - Overview" on page 662 .
(HTTP Data view only) Displays the HTTP flow data in a list format.
(HTTP Data view only) Displays the HTTP flow data in a tree structure.
Bookmarks Pane
The Bookmarks pane displays a list of the bookmarks in your Vuser script. You can navigate between the bookmarks to help analyze and debug your code.
To access
Important information
View > Bookmarks
l
All bookmarks added to a Vuser script are maintained after you close and reopen the Bookmarks pane.
l
You can move this pane to different areas of the Main User Interface. For details, see
"VuGen Layouts - Overview" on page 79
.
Page 121 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Relevant tasks
"How to Use Bookmarks" on page 157
"How to Work with Custom VuGen Layouts" on page 95
"VuGen Main User Interface - Overview" on page 74
See also
User interface elements are described below (unlabeled elements are shown in angle brackets):
UI Element Description
<Bookmarks list>
Displays a list of all bookmarks that are defined in the Vuser script. You can double-click any bookmark line to navigate directly to the relevant line in the
Vuser script.
Toggles the status of the selected bookmark.
Navigates to previous bookmark in the pane.
Navigates to next bookmark in the pane.
Deletes the selected bookmark.
Deletes all bookmarks.
Step Navigator Pane
The Step Navigator pane enables you to navigate to a selected step in your script. If your script contains many steps, you can use the search box to search for matching text in the different parts of the steps.
To access
Important information
View > Steps l
You can search within an action or script but not across multiple scripts in a solution.
l
You can move this pane to different areas of the Main User Interface. For details, see
"VuGen Layouts - Overview" on page 79
.
User interface elements are described below:
Page 122 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
UI
Element
Search box
Line
Name
Step
/
Description
You can search different parts of the steps for matching text. The following parts of the steps can be searched: l
All. (Default) All parts of the step (name, step, arguments).
l
Name. The name of the step.
l
Step. The description of the step (for example, web_url, web_custom_request) l
Arguments. The arguments for the step.
Enter the text you want to search for in your steps, in the search edit box and select the part of the steps you want to search. The Steps pane displays only those steps that match your search criteria.
The number of the step in the script.
A step name.
The step type.
File parser indicator. A green symbol indicates that parsing succeeded and a red symbol indicates that parsing failed.
Action
The action into which the step was created.
# steps displayed
Displays the total number of steps in the script or in the action.
Errors Pane
The Errors pane lists the replay and syntax errors found in your script, and enables you to locate each error so that you can resolve it.
To access
Important information
Relevant tasks
See also
View > Errors
You can move this pane to different areas of the Main User
Interface. For details, see
"VuGen Layouts - Overview" on page 79 .
"How to Work with Custom VuGen Layouts" on page 95
"VuGen Main User Interface - Overview" on page 74
User interface elements are described below (unlabeled elements are shown in angle brackets):
UI Element Description
<Define Available Categories>
Filters the error list by the source of the error.
Shows or hides syntax errors.
Page 123 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
! <Exclamation Point>
Line
Description
File
Shows or hides warnings detected during the run.
Shows or hides informational messages detected during the run.
Jumps to the line in the Editor that contains the error.
Message type: l
Error l
Warning l
Informational message
The line containing the error.
Description of the error, warning or message and advice on how to fix the problem. For example, a syntax error is displayed if you opened a conditional block with an If statement but did not close it with an End If statement, the description is Expected Expression. Note: If the description does not fit within the Description column, a tooltip displays the full description when you hover the cursor over the column. In certain cases, VuGen is unable to identify the exact error and displays a number of possible error conditions, for example: Expected 'End Sub', or 'End
Function', or 'End Property'. Check the statement at the specified line to clarify which error is relevant in your case.
The name of the file that contains the problematic statement.
Path
Testing Project
The full path of the file that generated the error.
The name of the relevant script.
Task Pane
This pane enables you to add, edit and track tasks associated with an individual script or the overall goals of the project.
To access
Important information
Relevant tasks
See also
View > Task Pane
You can move this pane to different areas of the Main User Interface. For details see,
"VuGen Layouts - Overview" on page 79 .
"How to Work with Custom VuGen Layouts" on page 95
"VuGen Main User Interface - Overview" on page 74
User interface elements are described below (unlabeled elements are shown in angle brackets):
Page 124 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
UI Element Description
Comments tab
Comment tasks are added directly into your script using the comment syntax of your scripting language and include a keyword such as TODO or FIXME. For example, in C a comment script would look like this:
// TODO Add Parameter
The Task Pane displays the following information about each task: l
!: Task Type l
Line: What line the task is located. Double-clicking the task jumps to that location in the script.
l
Description: The Keyword and the task contents.
l
File: Action l
Path: File location of the action.
User tab
You can add, edit, delete user tasks:
Click to add a task with the Task Editor .
<Task
Filter>
Click to edit a task with the Task Editor .
Click to delete a task.
You can filter tasks associated with a particular script or see all the tasks associated with the solution.
Breakpoints Pane
The Breakpoints pane enables you to set and manage breakpoints to help analyze the effects of the script on your application at pre-determined points during script execution.
To access
Important information
Page 125 of 1812
View > Debug > Breakpoints
You can move this pane to different areas of the Main User
Interface. For details, see
"VuGen Layouts - Overview" on
HP LoadRunner (11.50)
User Guide
VuGen
Relevant tasks
page 79 .
"How to Debug Scripts with Breakpoints" on page 156
User interface elements are described below (unlabeled elements are shown in angle brackets):
UI Element Description
Removes the selected breakpoint.
Removes all breakpoints.
<Breakpoints Grid>
Enabled
Name
Script
Function Name
Locates the cursor in the Vuser script at the line that contains the selected breakpoint.
Disables the selected breakpoint if it is enabled, and enables the selected breakpoint if it is disabled.
A list of the breakpoints and their locations in the script. To enable a breakpoint, select the Enable check box next to that breakpoint. To disable a breakpoint, clear the Enable check box.
A checkbox that specifies whether the breakpoint is enabled or disabled, and enables you to enable or disable the adjacent breakpoint.
The name of the file that contains the breakpoint, and the line number within the file that contains the breakpoint.
The name of the Vuser script that contains the breakpoint.
The name of the function within the Vuser script that contains the breakpoint.
Watch Pane
The Watch pane enables you to monitor variables while a script runs.
To access
Important information
View > Debug > Watch
l
This pane is relevant only when a run session is paused.
l
You can move this pane to different areas of the Main User Interface. For details, see
"VuGen Layouts - Overview" on page 79
.
User interface elements are described below:
UI Element Description
Enables you to add a variable to the watch list.
Page 126 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Enables you to edit the selected variable in the watch list.
Deletes the selected variable from the watch list.
Deletes all the variables from the watch list.
Expression
The variable whose value you want to watch.
Value
The current value of the variable. The evaluated value is displayed only when a run session is paused.
Type name
The type of the variable's value after it is evaluated (for example, Integer or Char).
If an variable cannot be evaluated in the current context, the type displayed is
Incorrrect expression.
Call Stack Pane
This debug pane enables you to view information about the functions that are currently on the call stack of your script.
To access
Important information
View > Debug> Call Stack
l
This pane is relevant only when a run session is paused.
l
You can double-click any element in the Call Stack pane to navigate to the beginning of the relevant function/action.
l
This pane is read-only.
l
You can move this pane to different areas of the Main User Interface. For details, see
"VuGen Layouts - Overview" on page 79
.
"How to Work with Custom VuGen Layouts" on page 95
Relevant tasks
See also
"VuGen Main User Interface - Overview" on page 74
User interface elements are described below:
UI Element
Function name
File name
Line #
Description
The name of the function currently called.
The name of the file containing the called function.
The line number on which the function definition begins.
Troubleshooting and Limitations
This section describes troubleshooting and limitations for the VuGen main user interface.
Page 127 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Troubleshooting Snapshots
If you encounter a step without a snapshot, follow these guidelines to determine why it is not available. Note that not all steps are associated with snapshots—only steps with screen operations or for Web, showing browser window content, have snapshots.
Several protocols allow you to disable the capturing of snapshots during recording using the
Recording options.
If there is no Record snapshot displayed for the selected step, it may be due to one of the following reasons: l
The script was recorded with a VuGen version 6.02 or earlier.
l
Snapshots are not generated for certain types of steps.
l
The imported actions do not contain snapshots.
If there is no Replay snapshot displayed for the selected step, it may be due to one of the following reasons: l
The script was recorded with VuGen version 6.02 or earlier.
l
The imported actions do not contain snapshots.
l
The Vuser files are stored in a read-only folder, and VuGen could not save the replay snapshots.
l
The step represents navigation to a resource.
Protocol Advisor
You use the Protocol Advisor to help you determine an appropriate protocol for recording a Vuser script. The Protocol Advisor scans your application for elements of different protocols and displays a list of the detected protocols. These protocols should be used as guidelines and as a starting point for finding the optimal protocol for your application.
In most cases, more than one protocol is suggested and displayed, along with combinations of protocols. For guidelines on how to use the list of suggested protocols, see
"How to use the
Protocol Advisor" below
.
How to use the Protocol Advisor
This task describes a typical workflow for finding the optimal protocol to record your application using the Protocol Advisor.
1.
Start the Protocol Advisor
From the start page, select Record > Protocol Advisor > Analyze Application
If you are analyzing a web application, you will need to specify: n
Program to analyze n
URL Address n
Working Directory
If you are analyzing a Windows application, you will need to specify:
Page 128 of 1812 HP LoadRunner (11.50)
User Guide
VuGen n
Program to analyze n
Program arguments, if any n
Working Directory
For details, see
"Protocol Advisor Dialog Box" on next page
2. Perform typical business processes
Perform typical business processes in your application. Try to walk through a variety of business processes to make sure that your results are comprehensive. Click Stop Analyzing to end the analysis and display the results.
3. Save the results
Select Record > Protocol Advisor > Save Results or click Save Results from the toolbar at the top of the report. Enter a name and select the folder.
To display a previous report, select Record > Protocol Advisor > Recent reports. VuGen will maintain a history of the last sixteen Protocol Advisor reports generated. To clear the history, select Record > Protocol Advisor > Clear Recent Reports.
4. Select a protocol and create a new Vuser script
Select one of the protocols using the following order of priority and create a Vuser script using that protocol: n
Multi/Combination protocol n
The highest level application protocol n
The first protocol on the list
5. Enhance, debug, and verify replay
Enhance and debug your script until you can replay it successfully. If, after enhancing and debugging the Vuser script, you cannot replay it successfully, proceed to the next step.
6. If unsuccessful replay, select a different protocol and repeat n
For all non Web-based protocols: Return to the Protocol Advisor Results page and select the next protocol on the list and repeat previous steps. If there are no more protocols listed, contact HP Customer Support.
n
For Web-based protocols: The following diagram illustrates the Web-based protocols arranged according to their application level. The arrows indicate the order in which you should attempt a new protocol. For example, if the first protocol you used was Oracle Web
Applications 11i and it failed to successfully replay, you would then try the Oracle NCA protocol.
Page 129 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Protocol Advisor Dialog Box
This dialog box enables you to analyze your application to determine the appropriate VuGen protocols to use for recording.
To access
Important information
Relevant tasks
Do one of the following: l
Record > Protocol Advisor > Analyze Application
l
File > New Script and Solution > Protocol Advisor
The options in this dialog box change according to the selection you make for Application type.
"How to use the Protocol Advisor" on page 128
User interface elements are described below:
UI Element Description
Application type
Windows or Web application.
Program arguments
Specify command line arguments for the executable specified above. For example, if you specify plus32.exe with the command line options
Page 130 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
(Win32
Applications only)
peter@neptune
, it connects the user Peter to the server Neptune when starting plus32.exe. This option is displayed only for Windows applications.
Program to analyze
Select the browser, Web application, or Windows application to analyze.
URL
Address
(Internet
Applications only)
The starting URL address. This option is displayed only for Web applications.
Working directory
The working directory for your application, if needed.
Troubleshooting and Limitations
This section describes troubleshooting and limitations for the Protocol Advisor.
l
This feature will only detect protocols supported by LoadRunner.
l
Some Web protocols are detected based on the URL. For example, the URL may contain keywords such as SAP. Therefore, if you use a different URL or a different application with the same URL, the results may differ.
l
The following protocols are frequently detected but are not always appropriate for use. You should only use them if there are no other detected protocols.
n
COM/DCOM n
Java n
.NET
n
WinSock n
LDAP
Recording
Vuser Script Templates
The User-Defined Template enables you to save a script with a specific configuration as a template. You can then use this template as a basis for creating future scripts.
The template supports the following files and data: l
Run-Time Settings l
Parameters l
Extra files
Page 131 of 1812 HP LoadRunner (11.50)
User Guide
VuGen l
Actions l
Snapshots
Recording and General options are not supported as they are generic settings and are not relevant to a specific script.
Notes and Limitations
l
Once you have configured a script for a specific protocol and then save the script as a template, further scripts based on that template will only work with that same protocol. For example, if you configured your script for the Web (Click & Script) protocol, then created a template from that script, the template can only be used with Web (Click & Script).
l
Once you have created your template, you cannot edit it directly in VuGen. To make any changes, you open the template and save it again with another name or overwrite the existing template.
l
If you regenerate an original script from a template, you will lose all of your manual changes.
Script Sections
Each Vuser script contains at least three sections: vuser_init, one or more Actions, and vuser_end.
Before and during recording, you can select the section of the script into which VuGen will insert the recorded functions. The following table shows what to record into each section, and when each section is executed:
Script Section
vuser_init
Actions vuser_end
Used when recording...
a login to a server client activity a logoff procedure
Is executed when...
the Vuser is initialized (loaded) the Vuser is in Running status the Vuser finishes or is stopped
When you run multiple iterations of a Vuser script, only the Actions sections of the script are repeated—the vuser_init and vuser_end sections are not repeated. For more information on the iteration settings, see
"General > Run Logic Node" on page 369 .
You use the VuGen script editor to display and edit the contents of each of the script sections. You can display the contents of only a single section at a time. To display a section, highlight its name in the left pane.
When working with Vuser scripts that use Java classes, you place all your code in the Actions class. The Actions class contains three methods: init, action, and end. These methods correspond to the sections of scripts developed using other protocols—you insert initialization routines into the init method, client actions into the action method, and log off procedures in the end method.
For more information, see
"Java Protocol - Manually Programming Scripts" on page 532
.
public class Actions{
public int init() {
return 0;}
public int action() {
Page 132 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
return 0;}
public int end() {
return 0;}
}
Note: Transaction Breakdown for Oracle DB is not available for actions recorded in the vuser_ init
Script Section Structure Example
Every Vuser script contains three sections: vuser_init, Run (Actions), and vuser_end. You can instruct a Vuser to repeat the Run section when you run the script. Each repetition is known as an
iteration.
The vuser_init and vuser_end sections of a Vuser script are not repeated when you run multiple iterations.
When you run scripts with multiple actions, you can indicate how to execute the actions, and how the Vuser executes them:
In the following example, Block0 performs a deposit, Block1 performs a transfer, and Block2 submits a balance request. The Login and Logout actions are common to the three blocks.
Sequence. You can set the order of actions within your script. You can also indicate whether to perform actions sequentially 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. This is useful, for example, in emulating a commercial site where you perform many queries to locate a product, but only one purchase.
Weighting. For action blocks running their actions randomly, you can set the weight or percentage of each action within a block.
Page 133 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
In most cases, the name of the header file corresponds to the prefix of the protocol. For example,
Database functions that begin with an lrd prefix, are listed in the lrd.h file.
Header Files
Header files commonly contain forward declarations of classes, subroutines, variables, and other identifiers. In most cases, the name of the header file corresponds to the prefix of the protocol. For example, Database functions that begin with an lrd prefix, are listed in the lrd.h file.
The following table lists the header files associated with the most commonly used protocols:
Protocol
AJAX (Click and Script)
Citrix
COM/DCOM
Database
FTP
General C function
IMAP
LDAP
MAPI
Oracle NCA
POP3
RDP
SAP GUI
SAP (Click and Script)
Siebel
SMTP
Terminal Emulator
WAP
Web (HTML\HTTP)
Web (Click and Script)
Web Services
Windows Sockets
File web_ajax.h
ctrxfuncs.h
lrc.h
lrd.h
mic_ftp.h
lrun.h
mic_imap.h
mic_mldap.h
mic_mapi.h
orafuncs.h
mic_pop3.h
lrrdp.h
as_sapgui.h
sap_api.h
lrdsiebel.h
mic_smtp.h
lrrte.h
as_wap.h
as_web.h
web_api.h
wssoap.h
lrs.h
Page 134 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Script Directory Files
While you record, VuGen creates a series of configuration, data, and source code files. These files contain Vuser run-time and setup information. VuGen saves these files together with the script. To open the script folder, right click on the script name in Solution Explorer and select Open Script
Folder.
Multiple Protocol Scripts
When you record a single protocol, VuGen records only the specified protocol. When you record in multi-protocol mode, VuGen records the actions in several protocols. Multi-protocol scripts are supported for the following protocols: COM, FTP, IMAP, Oracle NCA, POP3, Window Sockets
(raw), SMTP, and Web.
Another variation between Vuser types is multiple-action support. Most protocols support more than one action section. Currently, the following protocols support multi-actions: Oracle NCA, Web,
RTE, General (C Vusers), WAP, i-Mode, and VoiceXML.
For most Vuser types, you create a new Vuser script each time you record—you cannot record into an existing script. However, when recording a Java, Web, WAP, i-mode, Oracle NCA, or RTE
Vuser script, you can also record within an existing script.
Since VuGen supports a large variety of protocols, some of the recording steps that follow apply only to specific protocols.
For all Java language Vusers (CORBA, RMI, Jacada, and EJB) see
"Java Protocol" on page 517 .
Providing Authentication Information
The following section only applies to multi-protocol scripts.
When recording a Web session that uses NTLM authentication, your server may require you to enter details such as a user name and password.
Initially, IE (Internet Explorer) tries to use the NT authentication information of the current user: l
If IE succeeds in logging in using this information and you record a script —then, at the end of the recording VuGen prompts you to enter a password. VuGen retrieves the user name and domain information automatically. If necessary, you can also edit the user name in the Web
Recorder NTLM authentication dialog box.
Page 135 of 1812 HP LoadRunner (11.50)
User Guide
VuGen l
If IE is unable to log in with the current user's information, it prompts you to enter a user name and password using the standard browser authentication dialog box.
Generating a web_set_user function
When performing NTLM authentication, VuGen adds a web_set_user function to the script.
l
If the authentication succeeds, VuGen generates a web_set_user function with your user name, encrypted password, and host.
web_set_user("domain1\\dashwood",
lr_decrypt("4042e3e7c8bbbcfde0f737f91f"),
"sussex:8080"); l
If you cancel the Web Recorder NTLM Authentication dialog box without entering information,
VuGen generates a web_set_user function for you to edit manually.
web_set_user("domain1\\dashwood,
"
Enter NTLM Password Here",
"sussex:8080");
Page 136 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Note: If you enter a password manually, it will appear in the script as-is, presenting a security issue. To encrypt the password, right-click the password and select Encrypt string. VuGen encrypts the string and generates an lr_decrypt function, used to decode the password during replay. For more information about encrypting strings, see
"Encrypting Text" on page 225
.
How to Record a Vuser Script
This task describes how to record a Vuser script.
1. Configure the recording options - optional
The recording options contain many different options that affect your script during the recording and generation stages of creating a script. For concept and user interface details, see
"Recording Options" on page 276 .
2. Initialize the recording session
When creating a new script, this occurs automatically. To start recording manually, click the
Start Record button in the toolbar and complete the Start Recording dialog box. For user interface details, see
"Record Dialog Box" on page 140
.
3. Perform a business process on your application
VuGen will automatically open your application as well as a floating toolbar and begin recording your actions. Perform the desired business processes that you wish to record. The toolbar allows you to insert transactions, rendezvous points, comments, as well as determine which section of the script to record in while recording your application. For user interface details,
"VuGen Main User Interface - Overview" on page 74
.
Click the Stop button on the floating toolbar when you are finished.
How to Create and Open Vuser Script Templates
This task describes how to create, create from, and rename Vuser script templates.
Create a Vuser Script Template
Open a script in VuGen, select File > User-Defined Templates > Export toTemplate and enter a name for the template.
Create a Vuser Script From a Template
Select File > New Script and Solution > VuGen > User Templates and select the template file.
Rename a Template
1. Select File > User-Defined Templates > Manage from Explorer
2. In the Explorer dialog box: a. Rename the content file (.zip) b. Rename the description file (.xpt)
3. Using a text editor, modify the following tags in the .xpt file:
Page 137 of 1812 HP LoadRunner (11.50)
User Guide
VuGen a. Name tag: <Name>NewName </Name> b. File tag src property: <File name="template_temp.zip" src="NewName.zip" binary="True" />
Notes and Limitations
l
Once you have configured a script for a specific protocol and then save the script as a template, further scripts based on that template will only work with that same protocol. For example, if you configured your script for the Web (Click & Script) protocol, then created a template from that script, the template can only be used with Web (Click & Script).
l
Once you have created your template, you cannot edit it directly in VuGen. To make any changes, you open the template and save it again with another name or overwrite the existing template.
How to Work with .zip Files
VuGen allows you to work with .zip file in several ways. The advantages of working with .zip files is that you conserve disk space, and it allows your scripts to be portable. Instead of copying many files from machine to machine, you only need to copy one .zip file.
Import from a Zip File
To open a script stored in a .zip file, select File > Manage Zip Files > Import from Zip File. After you select a .zip file, VuGen prompts you for a location at which to store the unzipped files.
Export to Zip File
To save the entire script folder as a .zip file, select File > Manage Zip Files > Export to Zip File.
You can indicate whether to save all files or only runtime and specify the compression ratio.
Zip and Email
To create a .zip file and send it as an email attachment, select File > Manage Zip Files > Zip and
Email. When you click OK in the Zip and Email dialog box, VuGen compresses the file according to your settings and opens an email compose form with the .zip file as an attachment.
Edit Script in Zip File
To work from a .zip file, while not expanding or saving the script files, select File > Manage Zip
Files > Edit Script in Zip File.... When you modify the script and save it, the changes are stored directly in the .zip file.
How to Import Code from a Script
For Vuser types that support multiple actions, you can import actions into your script from another
Vuser script. You can only import actions from Vusers of the same type. Note that any parameters associated with the imported action, will be merged with the script. The following steps describe how to import actions into the current script.
Page 138 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
1. Select Design > Action > Import Action. The Import Action into VuGen Script dialog box opens.
2. Click Browse to select a Vuser script. A list of the script's actions appears in the Actions to
Import section.
3. Highlight an action and click Import. The action appears in your script.
How to Regenerate a Vuser Script
If you need to revert back to your originally recorded script, you can regenerate it. This feature is ideal for debugging, or fixing a corrupted script. When you regenerate a script, VuGen removes all of the manually added enhancements to the recorded actions. If you added parameters to your script,
VuGen restores the original values. The parameter list, however, is not deleted; you can reinsert parameters that you created earlier. Note that regeneration only cleans up the recorded actions, but not those that were manually added.
This task describes how to regenerate a Vuser script.
1. Initialize the regeneration
Select Record > Regenerate Script. VuGen issues a warning indicating that all manual changes will be overwritten.
2. Modify regenerate options - optional
Click Options to open the Regenerate Options dialog box.
In a multiple protocol script, you can modify which protocols you want to record when the script is regenerated from the General > Protocols node. For user interface details, see
"General >
Protocol Node" on page 306
.
To change the Script options, select the General > Script node and select or clear the appropriate check box. For user interface details, see
"General > Script Node" on page 309 .
Note that if a Flex, Silverlight, or Java over HTTP Vuser script encounters errors during the code generation phase, VuGen will show the errors in the Error pane. This Error pane displays details about each error, as well as recommended actions. Follow the recommended actions and regenerate the script.
How to Create or Open a Vuser Script
This task describes various ways to create a new Vuser script or open an existing Vuser script.
Note: Do not name scripts init, run or end, since these names are used by VuGen.
Use the protocol advisor to select a script type
You can use the protocol advisor to produce a list of relevant types of Vuser scripts based on your application. For details, see Protocol Advisor .
Create a new single protocol script
Select File > New > New Single Protocol Script and select the type of protocol. For user interface details, see
"Create a New Script Dialog Box" on page 145
.
Page 139 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Create a new multiple protocol script
Select File > New > New Multiple Protocol Script and move the desired protocols from the
Available Protocols list to the Selected Protocols list. For user interface details, see
"Create a
New Script Dialog Box" on page 145 .
Create or open a script from a template
For task details, see
"How to Create and Open Vuser Script Templates" on page 137
.
Open a regular script
To open a script stored on your local machine or a network drive, select File > Open.
Open or work with a .zip script
You can unzip or work with a script in .zip format. For task details, see
"How to Work with .zip
Files" on page 138
.
Open a script stored in Application Lifecycle Management
You can store scripts on HP ALM and modify them in VuGen. For more information, see
"Working with Application Lifecycle Management" on page 242 .
Record Dialog Box
This dialog box enables you to record your business process.
To access
The Start Recording dialog can be opened from the following locations: l
Record > Record
l
Start Recording button l
Enter Ctrl + R
Important information
This dialog box is dynamic and changes according to the options you select as well as the protocol you are using.
Relevant tasks
l
"How to Record a Vuser Script" on page 137
l
"Scripting Options" on page 103
User interface elements are described below:
All Protocols (except Java)
UI Element Description
Collapse. Collapses the Start Recording dialog box. The following settings are displayed: l
Application type l
Recorded application l
Record into action l
URL address (Web) or Program arguments (Windows)
The Start Recording dialog box appears collapsed when you re-record
Page 140 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Record into action
Working directory
Start Recording button
a script.
Expand. Expands the Start Recording dialog.
The Start Recording dialog box appears expanded when you record a new script.
The section into which you want to record.
You can add your own action. Type the action name in the Record
into action field and click Add. The new action is added to the script.
Application type
The application type used to record your business process.
You can record: l
Web. For example Web and Oracle NCA record web applications.
l
Windows. For example, Windows Socket Vusers records a windows application.
Recorded application
Select the path of the browser application, or windows application to record.
The following browsers are supported: l
Internet Explorer l
Firefox
URL address
Program arguments
(Windows applications only)
The starting URL address. This option is only displayed for internet applications.
Specify the command line argument for the executable specified in
Recorded application. For example, if you specify plus32.exe
(recorded application) with the command line options peter@neptune
, it connects the user Peter to the server Neptune when starting plus32.exe.
Start Recording
You can record your business process either: l
Immediately - Recording starts as soon as you click the Start
Recording button.
l
In delayed mode - In the following instances, it may not be advisable to record immediately: n
If you are recording multiple actions, in which case you only need to perform the startup in one action.
n
In cases where you want to navigate to a specific point in the application before starting to record.
n
If you are recording into an existing script.
For applications that require you to specify a working directory.
Opens the Recording Options dialog box. For user interface details,
"Recording Options" on page 276
Instantly begin to record your business process.
Page 141 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Delayed Start button
You can browse or go to the point where you would like to begin recording your business process and then select record.
Java Protocols
UI Element
Working directory
Record into action
URL
Parameters
Description
Opens the Recording Options dialog box. For user interface details, see
"Recording Options" on page 276
A working directory is necessary only if your application must know the location of the working directory (for example, reading property files or writing log files).
The section into which you want to record.
The URL to start recording.
Any additional parameters that your application requires.
Main Class
This option is only present for Java Application type applications.
Internet Explorer path
This option is only present for Internet Explorer type applications.
Executable\Batch
Netscape path
Application type
This option is only present for Executable\Batch type applications.
This option is only present for Netscape type applications.
l
Java applet to record a Java applet through Sun's applet viewer.
l
Java application to record a Java application.
l
Netscape or Internet Explorer to record an applet within a browser.
l
Executable/Batch to record an applet or application that is launched from within a batch file or the name of an executable file.
l
Listener to instruct VuGen to wait for the batch file that initializes the configuration and runs an application before recording. This mode requires you to define the system variable _JAVA_
OPTIONS as --Xrunjdkhook using jdk1.2.x and higher. (For JDK
1.1.x, define the environment variable _classload_
hook=JDKhook. For JDK 1.6 set _JAVA_OPTIONS as -
agentlib:jdhook.)
Floating Recording Toolbar
The floating recording toolbar enables you to control the recording of your script and provides easy access to common script commands.
Page 142 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
UI example
To access
Important information
Relevant tasks
The floating recording toolbar automatically displays when script recording begins.
l
The floating recording toolbar is dockable. For details, see
"VuGen
Layouts - Overview" on page 79
l
You can pin the toolbar with the button.
l
You can expand or collapse the toolbar with the button.
"How to Create or Open a Vuser Script" on page 139
User interface elements are described below:
UI Element Description
Continue recording the script after recording has been paused.
Stop recording the script.
Pause recording.
Select an action to record into.
Page 143 of 1812
Create a new action to record into.
Insert a Start Transaction step into your script.
For details, see
"Transaction Overview" on page 225
Insert a End Transaction step into your script.
For details, see
"Transaction Overview" on page 225
Insert a Rendezvous point step into your script.
For details, see
"Rendezvous Points" on page 226
Insert comments into your script.
Insert a Text Check step into your script.
For details, see
"Text and Image Verification" on page
659
HP LoadRunner (11.50)
User Guide
VuGen
UI Element Description
The title bar includes the following information and commands: l
How many events have been recorded into your script.
l
The time elapsed since recording began excluding time the script was paused.
l
Click the docking button toolbar to pin or unpin the l
Click the Collapse/Expand button command icons.
to display
Files Generated During Recording
Assuming that the recorded test has been given the name vuser and is stored under c:\tmp. The following is a list of the more important files that are generated after recording:
File Name Details vuser.usr
Contains information about the virtual user: type, AUT, action files, and so forth.
vuser.bak
A copy of Vuser.usr before the last save operation.
default.cfg
Contains a listing of all run-time settings as defined in the VuGen application (think time, iterations, log, web).
vuser.asc
The original recorded API calls.
vuser.grd
Contains the column headers for grids in database scripts.
default.usp
Contains the script's run logic, including how the actions sections run.
init.c
Exact copy of the Vuser_init function as seen in the VuGen main window.
run.c
end.c
vdf.h
\Data
Exact copy of the Action function as seen in the VuGen main window.
Exact copy of the Vuser_end function as seen in the VuGen main window.
A header file of C variable definitions used in the script.
The Data folder stores all of the recorded data used primarily as a backup. Once the data is in this folder, it is not touched or used. For example, Vuser.c is a copy of run.c.
Example of Vuser.usr File
[General]
Type=Oracle_NCA
DefaultCfg=default.cfg
Page 144 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
AppName=C:\PROGRA~1\Netscape\COMMUN~1\Program\netscape.exe
BuildTarget=
ParamRightBrace=>
ParamLeftBrace=<
NewFunctionHeader=0
MajorVersion=5
MinorVersion=0
ParameterFile=nca_test3.prm
GlobalParameterFile=
[Transactions]
Connect=
[Actions] vuser_init=init.c
Actions=run.c
vuser_end=end.c
Example of default.cfg File
[General]
XlBridgeTimeout=120
[ThinkTime]
Options=NOTHINK
Factor=1
LimitFlag=0
Limit=1
[Iterations]
NumOfIterations=1
IterationPace=IterationASAP
StartEvery=60
RandomMin=60
RandomMax=90
[Log]
LogOptions=LogBrief
MsgClassData=0
MsgClassParameters=0
MsgClassFull=0
Create a New Script Dialog Box
This dialog box enables you to create a new Vuser script.
To access
Do one of the following: l
File > New Script and Solution
l
File > Add > New Script
Relevant tasks
l
Click the button on the VuGen toolbar.
l
"How to Create or Open a Vuser Script" on page 139
l
"How to Record a Vuser Script" on page 137
Page 145 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
User interface elements are described below:
UI Element
Category
Protocol
Description
The category identifies the type of script you would like to create:
Multiple Protocols: Create a script using multiple protocols.
Single Protocol: Create a script using the selected protocol. Single Protocol is the default category.
The Protocol list displays protocols based on the category you select.
Category
Multiple
Protocols
Protocol List displays...
A list of protocols with a check box to the left of each protocol.
Select a check box to include the protocol in the Vuser script.
Single Protocol
A list of protocols.
You can select one protocol.
Filter
Enables you to filter the Protocol list by entering text. For example, if you type
"Java" into the Filter box, the Protocol list will display only those protocols that include the word Java.
Script Name
Enables you to specify the name of your script.
Location
Solution
Name
Enables you specify the file location of your script. You can use the browse button to navigate to a location on your file system.
Tools > General > Projects and Solutions enables you to specify a default location.
This option is displayed only when a solution is not open in the Solution Explorer.
You can specify a name for the solution. If you leave it blank, the default name is
'Untitled'.
Create a folder for this solution
Enables you to create a folder for your solution.
Displays the file path of the solution.
Solution
Target
Protocol
Advisor
Enables you to access the Protocol Advisor dialog box. For details, see
"Protocol Advisor Dialog Box" on page 130
Displays the protocols in list view.
Displays the protocols in icon view.
Page 146 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Replaying and Debugging Vuser Scripts
Replay Overview
After creating a Vuser script, you replay it in standalone mode, directly from the VuGen interface.
This tests the basic functionality, as well as helps you to uncover any errors or issues that need to be addressed, such as dynamic values which need parameterization. When the replay is successful, you are ready to integrate the script into a LoadRunner scenario.
Think Time
The time that a user waits between performing successive actions is known as the think time.
Vusers use the lr_think_time function to emulate user think time. When you record a Vuser script,
VuGen records the actual think times and inserts appropriate lr_think_time statements into the
Vuser script. You can edit the recorded lr_think_time statements, and manually add more lr_
think_time statements to a Vuser script. For task details, see
"How to Insert Steps into a Script" on page 230 .
Note: When you record a Java Vuser script, lr_think_time statements are not generated in the
Vuser script.
You can use the run-time settings to influence how the lr_think_time statements operate when you execute a Vuser script. For user interface details, see
"General > Think Time Node" on page 370
.
Debugging Features
After creating a Vuser script, you can check to see if the script runs properly. Using VuGen's debug panes, you can debug your scripts using VuGen's debugging capabilities.VuGen contains a number of features to help debug your Vuser scripts. You can access most of these script debugging features from the VuGen toolbar.
Note: The debugging features are available for C-based Vuser protocols. The features are not available for VBscript and VB Application type Vuser protocols.
Running a Vuser script
To run a Vuser script until the end of the script or until the next breakpoint, perform one of the following: l
Select Replay > Run.
l
Click the Run button l
Press F5.
on the Vuser toolbar.
Note that the status of the Vuser script execution appears in the lower left corner of VuGen. The script execution status may be Ready, Running, or Paused.
Page 147 of 1812 HP LoadRunner (11.50)
User Guide
VuGen l
To stop a script that is running, click the Stop Replay l
To pause a script that is running, click the Pause button on the VuGen toolbar.
button on the VuGen toolbar.
l
To continue running a script that is paused, click the Continue button on the VuGen toolbar.
The Run Step by Step Command
The Run Step by Step command runs the script one line at a time. This enables you to follow the script execution. The Run Step by Step command starts the script replay, and then and pauses it on the first line of the script, usually in the vuser_init() action.
To run the script step by step, perform one of the following: l
Select Replay > Run Step by Step.
l
Click the Run Step by Step button l
Press F10.
on the VuGen toolbar.
Note that the Run Step by Step button is available only while a script is being replayed.
Animated Run
You can run a Vuser script in animated mode or non-animated mode. When you run in animated mode, VuGen highlights the line that is running in the Vuser script. When you run in non-animated mode, VuGen executes the Vuser script, but does not indicate the line being executed.
To toggle between the animated mode and the non-animated mode: l
Click the Animated Run button on the VuGen toolbar.
l
Click Replay > Animated Run.
Note that the Animated Run button is available only while a script is being replayed.
For details on how to set the run mode using VuGen options, see
"Scripting Options" on page 103 .
Breakpoints
Breakpoints pause script execution at specified points in the script. This enables you to examine the effects of the script on your application at pre-determined points during script execution.
l
For concept details on breakpoints, see
"Working with Breakpoints" on page 151
.
l
For task details, see
"How to Debug Scripts with Breakpoints" on page 156 .
Bookmarks
When working in Script view, VuGen lets you place bookmarks at various locations within your script. You can navigate between the bookmarks to help analyze and debug your code.
l
For task details, see
"How to Use Bookmarks" on page 157 .
Page 148 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Watching variables
The Watch pane enables you to monitor variables and expressions while a script runs. You can monitor variables and expressions only when execution of a Vuser script is in the Paused state. To display the Watch pane, click View > Debug > Watch. For details on using the Watch pane, see
"Watching Expressions and Variables" on page 151 .
Go To Commands
l
To navigate around a script using breakpoints, you can use the Go To Source command. For details, see
"How to Debug Scripts with Breakpoints" on page 156
.
l
To navigate around a script using bookmarks, you can use the Next Bookmark and Previous
Bookmark commands. For details, see
"How to Use Bookmarks" on page 157
.
If you want to examine the Replay log messages for a specific step or function, right-click the step in the Editor and select Go To Step in Replay Log. VuGen places the cursor at the start of the corresponding step in the Output pane's Replay log.
Error Handling
You can specify how a Vuser handles errors during script execution. By default, when a Vuser detects an error, the Vuser stops executing the script. You can instruct a Vuser to continue with the next iteration when an error occurs using one of the following methods: l
Using run-time settings. You can specify the Continue on Error run-time setting. The
Continue on Error run-time setting applies to the entire Vuser script. You can use the lr_
continue_on_error function to override the Continue on Error run-time setting for a portion of a script.
l
Using the lr_continue_on_error function. The lr_continue_on_error function enables you to control error handling for a specific segment of a Vuser script. To mark the segment, enclose it with lr_continue_on_error(1); and lr_continue_on_error(0); statements. The new error settings apply to the enclosed Vuser script segment. See the paragraphs below for details.
For example, if you enable the Continue on Error run-time setting and a Vuser encounters an error during replay of the following script segment, the Vuser continues executing the script:
web_link("EBOOKS",
"Text=EBOOKS",
"Snapshot=t2.inf",
LAST);
web_link("Find Rocket eBooks",
"Text=Find Rocket eBooks",
"Snapshot=t3.inf",
LAST);
To instruct the Vuser to continue on error for a specific segment of the script, enclose the segment with the appropriate lr_continue_on_error statements: lr_continue_on_error(1);
web_link("EBOOKS",
"Text=EBOOKS",
"Snapshot=t2.inf",
Page 149 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
LAST);
web_link("Find Rocket eBooks",
"Text=Find Rocket eBooks",
"Snapshot=t3.inf",
LAST); lr_continue_on_error(0);
Bookmarks Overview
When you edit a Vuser script, you can use bookmarks to navigate between sections of the script.
When you add a bookmark, a bookmark icon is added to the left of the selected line in your script.
The Bookmarks pane displays a list of all bookmarks that exist in the Vuser script. Using the
Bookmarks pane, you can: l
Navigate to the location of the bookmark in your script.
l
Navigate between consecutive bookmarks in the pane.
l
Delete an individual bookmark.
l
Clear all bookmarks.
For task details, see
"How to Use Bookmarks" on page 157
.
Additional Debugging Information
General Debugging Tip
VuGen can be used as a regular text editor. You can open any text file in it and edit it. When an error message is displayed during replay in the output window below, you can double click on it and
VuGen jumps the cursor to the line of the test that caused the problem. You can also place the cursor on the error code and press F1 to view the online help explanation for the error code.
Using C Functions for Tracing
You can use the C interpreter trace option (in version 230 or higher) to debug your Vuser scripts.
The ci_set_debug statement allows trace and debug to be turned on and off at specific points in the script.
ci_set_debug(ci_this_context, int debug, int trace);
For example, you could add the following statements to your script: ci_set_debug(ci_this_context, 1, 1) /* turn ON trace =; debug */ ci_set_debug(ci_this_context, 0, 0) /* turn OFF trace =; debug */
Additional C Language Keywords
When you run a C script in VuGen, its parser uses the built-in C interpreter to parse the functions in the script. You can add keywords that are not part of the standard parser's library. By default, several common C++ keywords are added during installation, such as size_t and DWORD. You can edit the list and add additional keywords for your environment.
Page 150 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Add additional keywords
1. Open the vugen_extra_keywords.ini file, located in your machine's <Windows> or
<Windows>/System directory.
2. In the EXTRA_KEYWORDS_C section, add the desired keywords for the C interpreter.
The file has the following format:
[EXTRA_KEYWORDS_C]
FILE= size_t=
WORD=
DWORD=
LPCSTR=
Examining Replay Output
Look at the replay output (either from within VuGen, or the file output.txt representing the output of the VuGen driver). You may also change the run-time settings options in VuGen to select more extensive logging in order to obtain a more detailed log output of the replayed test.
Working with Breakpoints
VuGen lets you include breakpoints in you Vuser scripts to help you to debug the scripts.
Breakpoints pause script execution at specified points in the script. This enables you to analyze the effects of the script on your application at pre-determined points during script execution. For task details, see
"How to Debug Scripts with Breakpoints" on page 156
. A breakpoint symbol ( ) in the left margin of the script indicates the presence of a breakpoint. In addition, VuGen highlights the line in the script.
You can disable a breakpoint if the breakpoint is temporarily not required. A white dot inside the
Breakpoint symbol indicates a disabled breakpoint . When a breakpoint is disabled, script execution continues at the disabled breakpoint and is paused at the following enabled breakpoint.
You use the Breakpoints pane to enable and disable breakpoints. In addition, the breakpoints pane enables you to delete an existing breakpoint or delete all existing breakpoints. To display the
Breakpoints pane, click View > Debug > Breakpoints.
To run a script with breakpoints, begin running the script as usual. VuGen pauses script execution when it reaches a breakpoint. You can examine the effects of the script run up to the breakpoint, make any necessary changes, and then restart the script from the breakpoint.
To resume execution, select Replay > Run. Once restarted, the script continues until it encounters another breakpoint or the end of the script.
Watching Expressions and Variables
VuGen's Watch pane enables you to monitor variables while a script runs. The list of variables that you want to watch is known as the watch list, and is displayed in the watch pane. To display the
Watch pane, click View > Debug > Watch. You can add only variables to the watch list - you cannot add expressions to the watch list. You can add, edit, or remove variables within the watch list by using the Watch pane's toolbar buttons. You can sort the columns in the watch pane by expression, value, or type name by clicking the column headers. For details on other debugging features in VuGen, see
"Debugging Features" on page 147 .
Page 151 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Note: You can monitor variables only when execution of a Vuser script is in the Paused state.
Adding a new watch to the watch list
Note: You can add a new watch expression only when execution of a Vuser script is in the Paused state.
To add a new watch:
1. Click View > Debug > Watch to open the Watch pane.
2. Click the Add Watch button . The Add New Watch dialog box opens.
3. In the Expression field, enter the variable that you want to watch, and then click OK. VuGen adds the variable to the list of expressions in the watch list.
Note: You can add only variables to the watch list - you cannot add expressions to the watch list.
Editing a watch expression
Note: You can edit a watch expression only when execution of a Vuser script is in the Paused state.
To edit a watch expression:
1. Click View > Debug > Watch to open the Watch pane.
2. In the watch list, select the expression that you want to edit, and then click the Edit Watch
Expression button . The Edit Watch dialog box opens.
3. In the Expression field, modify the existing variable as required, and then click OK. VuGen displays the modified variable in the list of variables in the watch list.
Deleting a watch expression
Note: You can delete a watch expression only when execution of a Vuser script is in the Paused state.
To delete a watch expression:
1. Click View > Debug > Watch to open the Watch pane.
2. In the Watch pane, select the expression that you want to delete, and then click the Delete
Watch button watch list.
. VuGen deletes the selected expression from the list of expressions in the
Deleting all watch expressions from the watch list
Note: You can delete watch expressions only when execution of a Vuser script is in the Paused state.
To delete all watch expressions from the watch list:
Page 152 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
1. Click View > Debug > Watch to open the Watch pane.
2. Click the Delete All Watches button list.
. VuGen deletes all the expressions from the watch
Debugging Web Vuser Scripts
VuGen provides an additional tool to help you debug Web Vuser scripts—the Results Summary report.
You can specify whether or not a Web Vuser generates a Results Summary report during script execution. The Results Summary report summarizes the success or failure of each step in the Web
Vuser scripts and allows you to view the Web page returned by each step. For additional details on working with the Results Summary report, select Replay > Test Results and click F1 to open the online help.
For more user interface information, see
"Scripting Options" on page 103
.
Note: Transaction times may be increased when a Vuser generates a Results Summary report. Vusers can generate Results Summary reports only when run from VuGen. When you run a script from the Controller or Business Process Monitor, Vusers do not generate reports.
How to Replay a Vuser Script
This task describes how to replay a Vuser script.
1. Configure the run-time settings and replay options
Specify the desired options in Scripting pane of the Options dialog box. For user interface details, see
Scripting Options
.
2. Replay the script
Select Replay > Run to replay the script.
3. View the logs for detailed information
You can view detailed information about how your script behaved during the recording and replay stages in the output window. For user interface details, see Output Window .
How to Run a Vuser Script from a Command Prompt
This task describes how to test a Vuser script from a command prompt or from the Windows Run dialog box—without the VuGen user interface
Run a script from a command line or the Run dialog box
1. Select Start > Programs > Command Prompt to open a Command Prompt window, or select Start > Run to open the Run dialog box.
2. Type the following and press Enter:
<installation_dir>/bin/mdrv.exe -usr <script_name> -vugen_win 0
Page 153 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
script_name is the full path to the .usr script file, for example, c:\temp\mytest\mytest.usr.
The mdrv program runs a single instance of the script without the user interface. Check the output files for run-time information.
3. You can specify arguments to pass to your script by using the following format: script_name -argument argument_value -argument argument_value
4. You can specify the load generator, as well as indicate the number of times to run the script as indicated by the following example: script1 -host pc4 -loop 5
For more information on the command line parsing functions, or for details on including arguments on a command line, see the Function Reference (Help > Function Reference).
How to Run a Vuser Script from a Linux command line
When using VuGen to develop Linux-based Vusers, you must check that the recorded script runs on the Linux platform. This task describes how to perform this check and run a Vuser script from a
Linux command.
1. Verify that the script replays in VuGen
Replay the script in VuGen to verify that the script works in windows before attempting to run it in Linux. This is recommended because it is easier to edit and debug the script in VuGen. For task details, see
"How to Replay a Vuser Script" on previous page
.
2. Copy the script files to the Linux server
Transfer the script files to the Linux server
3. Check the Vuser setup on the Linux machine by using verify_generator.
If you intend to run all of the Vusers on one host, type: verify_generator
The verify_generator either returns OK when the setting is correct, or Failed and a suggestion on how to correct the setup.
For detailed information about the verify checks type: verify_generator [-v]
The verify utility checks the local host for its communication parameters and its compatibility with all types of Vusers. It checks the following items in the Vuser environment: n at least 128 file descriptors n proper .rhost permissions: -rw-r--r-- n the host can be contacted using rsh to the host. If not, checks for the host name in .rhosts n
M_LROOT is defined n
.cshrc defines the correct M_LROOT
Page 154 of 1812 HP LoadRunner (11.50)
User Guide
VuGen n
.cshrc exists in the home directory n the current user is the owner of the .cshrc n a LoadRunner installation exists in $M_LROOT n the executables have executable permissions n
PATH contains $M_LROOT/bin, and /usr/bin n the rstatd daemon exists and is running
4. Run the script
Run the script in standalone mode from the Vuser script folder, using the run_db_vuser shell script: run_db_vuser.sh <commands>
script_name.usr
The run_db_vuser shell script has the following command line options:
Command Description
--help
Display the available options. (This option must be preceded by two dashes.)
-cpp_only
Run cpp only (pre-processing) on the script.
-cci_only
Run cci only (pre-compiling) on the script to create a file with a .ci extension.
You can run cci only after a successful cpp.
-driver
driver_ path
Use a specific driver program. Each database has its own driver program located in the /bin folder. For example, the driver for CtLib located in the /bin folder, is mdrv. This option lets you specify an external driver.
-exec_ only
Execute the Vuser .ci file. This option is available only when a valid .ci file exists.
-ci ci_file_
name
Execute a specific .ci file.
-out
output_ path
Place the results in a specific folder.
By default, run_db_vuser.sh runs cpp, cci, and execute in verbose mode. It uses the driver in the VuGen installation\bin folder, and saves the results to an output file in the Vuser script folder. You must always specify a .usr file. If you are not in the script folder, specify the full path of the .usr file.
For example, the following command line executes a Vuser script called test1, and places the output file in a folder called results1. The results folder must be an existing folder—it will not be created automatically: run_db_vuser.sh-out /u/joe/results1 test1.usr
Page 155 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
How to Debug Scripts with Breakpoints
The following steps describe how to work with breakpoints. For concept details, see
"Working with
Breakpoints" on page 151
.
Add a breakpoint
To add a breakpoint:
Locate the cursor in the script where you want to insert the breakpoint and then: l
Select Replay > Toggle Breakpoint.
l
Press F9.
l
Click in the left margin if the script, adjacent to where you want to insert the breakpoint.
The Breakpoint symbol ( ) appears in the left margin of the script, and VuGen highlights the line in the script.
Delete a breakpoint
To delete a breakpoint:
Locate the cursor in the script where you want to delete the breakpoint and then: l
Select Replay > Toggle Breakpoint.
l
Press F9.
l
Click the breakpoint symbol left margin if the script.
The Breakpoint symbol ( ) is removed from the left margin of the script.
Enable/Disable a breakpoint
To disable a breakpoint:
Click View > Debug > Breakpoints to display the Breakpoints pane.
l
Select the appropriate Enable check box to enable a breakpoint. The Breakpoint symbol ( ) appears in the left margin of the script.
l
Clear the appropriate Enable check box to disable a breakpoint. The Disabled Breakpoint symbol ( ) appears in the left margin of the script.
When a breakpoint is disabled, script execution continues at the disabled breakpoint and is paused at the following enabled breakpoint.
Manage breakpoints
The Breakpoints pane allows you to remove, enable, and disable breakpoints in a Vuser script. For user interface details, see
"Breakpoints Pane" on page 125 .
Navigate to a specific breakpoint in a Vuser script
To navigate to a specific breakpoint in a Vuser script, perform one of the following:
Page 156 of 1812 HP LoadRunner (11.50)
User Guide
VuGen l
In the Breakpoints pane, select the specific breakpoint to which you want to navigate, and then click the Go to source button .
l
In the Breakpoints pane, double-click the breakpoint to which you want to navigate.
The cursor flashes in the Editor at the start of the line containing the breakpoint.
Run a script with breakpoints
Begin running the script as usual. VuGen pauses script execution when it reaches a breakpoint.
You can examine the effects of the script run up to the breakpoint, make any necessary changes, and then restart the script from the breakpoint.
To resume execution, select Replay > Run. Once restarted, the script continues until it encounters another breakpoint or the end of the script.
How to Use Bookmarks
When working in the Editor, VuGen lets you place bookmarks at various locations within your script. You can navigate between the bookmarks to analyze and debug your code. The following steps describe how to work with bookmarks. Most of the bookmark functionality is available from
VuGen's Bookmarks pane. To access the Bookmarks pane, click View > Bookmarks.
Create a bookmark
In the Editor, place the cursor at the desired location and press Ctrl + F2. VuGen places a bookmark icon in the left margin of the script.
Remove a bookmark
To remove a bookmark, perform one of the following: l
In the Editor, click in the line that contains the bookmark and press Ctrl + F2.
l
In the Bookmark pane, select the bookmark that you want to delete and click the Delete
Bookmark button .
VuGen removes the bookmark icon from the left margin.
Navigate between bookmarks
Click View > Bookmarks to display the Bookmarks pane.
l
To move to the next bookmark, click the Next Bookmark button or press F2.
l
To return to the previous bookmark, click the Previous Bookmark button
F2.
or press Shift +
You can navigate between bookmarks in the current action only . To navigate to a bookmark in another action, select that action in the left pane and then press F2.
Navigate to a specific bookmark in a Vuser script
In the Bookmarks pane, double-click the specific bookmark to which you want to navigate. The cursor flashes in the Editor at the start of the line containing the bookmark.
Page 157 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Files Generated During Replay
This section describes what occurs when the Vuser is replayed.
1. The options.txt file is created which includes command line parameters to the preprocessor.
2. The file Vuser.c is created which contains 'includes' to all the relevant .c and .h files.
3. The c preprocessor cpp.exe is invoked in order to 'fill in' any macro definitions, precompiler directives, and so on, from the development files.
The following command line is used: cpp -foptions.txt
4. The file pre_cci.c is created which is also a C file (pre_cci.c is defined in the options.txt file).
The file logfile.log (also defined in options.txt) is created containing any output of this process. This file should be empty if there are no problems with the preprocessing stage. If the file is not empty then its almost certain that the next stage of compilation will fail due to a fatal error.
5. The cci.exe C compiler is now invoked to create a platform-dependent pseudo-binary file (.ci) to be used by the virtual user driver program that will interpret it at run-time. The cci takes the
pre_cci.c file as input.
6. The file pre_cci.ci is created as follows: cci -errout c:\tmp\Vuser\logfile.log -c pre_cci.c
7. The file logfile.log is the log file containing output of the compilation.
8. The file pre_cci.ci is now renamed to Vuser.ci.
Since the compilation can contain both warnings and errors, and since the driver does not know the results of this process, the driver first checks if there are entries in the logfile.log file. If there are, it then checks if the file Vuser.ci has been built. If the file size is not zero, it means that the cci has succeeded to compile - if not then compilation has failed and an error message will be given.
9. The relevant driver is now run taking both the .usr file and the Vuser.ci file as input. For example: mdrv.exe
-usr c:\tmp\Vuser\Vuser.usr
c:\tmp\Vuser\Vuser.ci
-out c:\tmp\Vuser -file
The .usr file is needed since it tells the driver program which database is being used. From here it can then know which libraries need to be loaded for the run.
10. The output.txt file is created (in the path defined by the 'out' variable) containing all the output messages of the run. This is the same output as seen in both the VuGen runtime output window and the VuGen main lower window.
Example of options.txt file
-DCCI
-D_IDA_XL
Page 158 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
-DWINNT
-Ic:\tmp\Vuser (name and location of Vuser include files)
-IE:\LRUN45B2\include (name and location of include files)
-ec:\tmp\Vuser\logfile.log (name and location of output logfile) c:\tmp\Vuser\VUSER.c (name and location of file to be processed)
Example of Vuser.c file
#include "E:\LRUN45B2\include\lrun.h"
#include "c:\tmp\web\init.c"
#include "c:\tmp\web\run.c"
#include "c:\tmp\web\end.c"
Correlation/Async Studio
Correlation Studio
Correlation Overview
Correlation is used when a recorded script includes a dynamic value (such as a session ID) and therefore cannot be successfully replayed. To resolve this, you convert the dynamic value into a variable—thereby enabling your script to replay successfully.
For example, many applications and Web sites use the current date and time to identify a session.
If you try to replay a script that was recorded on such a site, the script may fail because the current time is different from the recorded time. Correlating the data enables you to save the dynamic data and use it throughout the scenario run.
When a correlation is created, VuGen adds a function that extracts the dynamic value to a parameter. Appropriate occurrences of the original value are replaced with a parameter.
Correlation Studio Overview
Correlation Studio enables you to correlate and manage dynamic values in your web-based Vuser scripts. To learn more about correlation concepts, see
"Correlation Overview" above .
With Correlation Studio you can: l
Scan for correlations using rules, record based, and replay based engines l
Correlate both raw and formatted data l
Add and edit rules l
Undo correlations l
Review details pertaining to a specific dynamic value in a snapshot
Page 159 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
When you record a script using a web-based protocol, many of the values change dynamically each time a request is sent to the server. An example of a dynamic value is a sessionID which may include a date and time stamp of when the web session was opened.
The following flow chart illustrates the process for correlating values in your script using Correlation
Studio:
As you can see from the flow chart, Correlation Studio scans for dynamic values using different processes.
Correlation Types
Correlation Studio uses three processes to automatically find dynamic values that may need to be correlated.
l
Rules
Correlation Studio first scans for dynamic values that are defined by rules, if the rules scan has been enabled. To learn more, see
"Correlation Rules" on next page
l
Record
Correlation Studio scans for dynamic values after code generation. This method can find a significant percentage of dynamic values in your script.
l
Replay
Page 160 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Correlation Studio scans for dynamic values after replay. This method may need to be repeated several times.
You can select which scan types Correlation Studio should use by configuring Recording Option
> Correlations > Configuration. In general, it is recommended to enable all scan types.
The following table explains the expected behavior at various script states:
Script State when opening Correlation
Studio
Script contains recorded data.
Behavior in Correlation Studio
(All scan types enabled)
When the Correlation Studio is opened, it will scan for rule and record based correlations.
You can then replay and scan for replay based correlations. Repeat this process until Correlation Studio no longer finds new correlations.
Script contains recorded data and has been replayed.
When Correlation Studio is opened, it will scan for all correlation types.
You can then replay and scan for additional replay based correlations.
Repeat this process until Correlation Studio no longer finds new correlations.
Correlation Rules
If you know the dynamic values that need to be correlated before recording, you can create correlation rules that will automatically identify those values while you record. If "Automatically
apply correlation rules" is selected in the Recording Options > Correlations > Configuration node, values found based on rules will automatically be correlated. Additionally, there are some correlation rules that come pre-defined in VuGen for supported application servers. You can enable or disable rules in
"Correlations > Rules " on page 293
.
Snapshot Details and Occurrences
Correlation Studio provides details on each snapshot step that contains dynamic values. These details can help you determine which values to correlate in your script. In addition to the snapshot details, Correlation Studio, displays all occurrences of the dynamic value in your script. You can select specific occurrences to correlate or correlate all. For details, see
"Correlation Studio Dialog
Box" on page 190
Determining Which Values to Correlate
Once you generate a list of differences, you need to determine which ones to correlate. If you mistakenly correlate a difference that did not require correlation, your replay may be adversely affected.
The following strings most probably require correlation: l
Login string. A login string with dynamic data such as a session ID or a timestamp.
l
Date/Time Stamp. Any string using a date or time stamp, or other user credentials.
l
Common Prefix. A common prefix, such as SessionID or CustomerID, followed by a string of
Page 161 of 1812 HP LoadRunner (11.50)
User Guide
VuGen characters.
If you are in doubt whether a difference should be correlated, correlate only that difference and then run your script. Check the Replay log to see if the issue was resolved.
You should also correlate differences in which some of the recorded and replayed strings are identical, but others differ. For example, SessionID strings with identical prefixes and suffixes, but different characters in between, should be correlated.
Modifying Saved Parameters
After you save a value to a parameter, you may need to modify it before using it in your script. If you need to perform arithmetical operations on a parameter, you must change it from a string to an integer using the atoi or atol C functions. After you modify the value as an integer, you must convert it back to a string to use the new variable in your script.
In the following WinSock example, the data at offset 67 was saved to the parameter, param1.
Using atol, VuGen converted the string to a long integer. After increasing the value of param1 by one, VuGen converted it back to a string using sprintf and saved it as a new string, new_param1.
The value of the parameter is displayed using lr_output_message. This new value may be used at a later point in the script.
lrs_receive("socket2", "buf47", LrsLastArg);lrs_save_param("socket2",
NULL, "param1", 67, 5); lr_output_message ("param1: %s", lr_eval_string("<param1>")); sprintf(new_param1, "value=%ld",
atol(lr_eval_string("<param1>")) +
1); lr_output_message("ID Number:"%s" lr_eval_string("new_param1"));
Correlation vs. Parameterization
Parameterization is used when you want to take a value and turn it into a variable in order to make your script more realistic. For example, if you are filling out a form on a website, you may want to vary the value entered for a particular field.
Correlation is used when a recorded script includes a dynamic value (such as a session ID) and cannot replay. To resolve this, you make the dynamic value into a variable thereby enabling your script to replay successfully.
Wdiff Correlation Utility
The Wdiff Utility lets you compare recorded Vuser scripts and replay results to determine which values need to be correlated.
To use WDiff effectively, you record the identical operation twice, and compare the scripts (or data files for Tuxedo, WinSock, and Jolt). WDiff displays differences in yellow. Note that not all differences indicate a value to correlate. For example, certain receive buffers that indicate the time of execution do not require correlation.
For task details, see
"How to Search for Values that Need Correlation" on page 186
.
Page 162 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
How to Correlate Scripts Using Design Studio
This topic describes how to use Correlation Studio to correlate Vuser scripts.
Prerequisites
1. Record a script using one of the following protocols: n
Web HTTP/HTML n
Flex n
Citrix n
SAP Web
2. Verify that Record > Recording Options > Correlations > Configuration has all scan types enabled.
Using Correlation Studio
1. Initial Scan: Click the Design Studio button. This will open the Design Studio dialog box which will scan for response (or record based) correlations and apply correlation rules. The progress bar in the dialog box indicates if the initial scan was successful.
For details on Correlation Studio, see
"Correlation Studio Overview" on page 159
.
2. You can select which values you would like to correlate by highlighting the value in the grid and clicking the Correlate button.
When a value is correlated, VuGen adds a web_reg_save_param_* function, and saves the original value in a comment in the script.
You can examine the details of the correlation by expanding the Details Chevron in the dialog box. For details, see
"Correlation Studio Dialog Box" on page 190 .
For details on Correlation Studio, see
"Correlation Studio Overview" on page 159
.
3. You can click the Add as Rule button to add a rule type . In addition, you can click the Edit
rule button to view and edit the corresponding rule if the dynamic value was correlated by a rule. For details, see Recording Options > Correlation > Rules .
4. Replay and Scan: After you have correlated the values, click the Replay and Scan button.
The Correlation Studio progress bar indicates if additional correlations have been found. Again, you can select which values you would like to correlate by highlighting the value in the grid and clicking the Correlate button. You may need to repeat this step several times.
5. Design Studio Scan Complete: When Design Studio no longer finds new correlations, the
Page 163 of 1812 HP LoadRunner (11.50)
User Guide
VuGen progress bar will display "Design Studio Scan Complete".
Tip: If Correlation Studio does not resolve all correlation-based errors, try to resolve them using manual correlation. For details, see
"How To Manually Correlate Scripts" below
.
How To Manually Correlate Scripts
Manual Correlation
If the scan for correlation did not resolve all correlation-based errors in your script, you can attempt to manually correlate your script as follows:
1. Search for values that need correlation manually. There are a number of ways to manually search for values that need correlation. For details, see
"How to Search for Values that Need
Correlation" on page 186 .
2. Correlate the value.
Select one of the following methods: n
Correlate from snapshots. Highlight the value to correlate, right-click, and select Create
Correlation.
n
Manually add correlation functions. Manually insert the relevant correlation functions into your script. For details, see
"How to Correlate Scripts - Web (Manually)" on page 166 .
Correlating Winsock Scripts
VuGen's Design Studio provides a user interface for correlating Vuser scripts. Correlation is required when working with dynamic data. A common issue with Winsock Vuser scripts is dynamic ports—ports whose numbers are assigned dynamically. While certain applications always use the same port, others use the next available port. If you try to replay a script and the recorded port is no longer available, your script will fail to replay. To overcome this issue, you must perform correlation—save the actual run-time values and use them within the script.
VuGen uses lrs_save_param and lrs_save_searched_string functions correlate Winsock scripts.
This means that it stores the data that is received for use in a later point within the script. Since correlation stores the received data, it applies only to Receive buffers and not to Send buffers. The recommended procedure is to select a string of dynamic data within the Receive buffer that you want to correlate. Use that same parameter in a subsequent Send buffer.
Correlating a Winsock script
You use the Snapshot pane to begin correlating Winsock Vuser scripts. Both the Text and the Hex tabs in the Snapshot pane have the correlating functionality.
1. In the Snapshot pane, select the data that you want to correlate.
2. Right-click in the selection, and select Create Correlation or Create Boundary Correlation.
The Design Studio opens and displays the Correlation tab.
Page 164 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Note that you can click the number of occurrences in the Replace/Found column to enable you to choose the exact occurrences that you want to correlate.
3. Click the Details bar to display details about the correlation.
4. Make sure that the Original Snapshot Step tab is visible. Notice that the type is either Data
Range or Boundary Based.
5. Click Correlate to perform the correlation of the Vuser script.
6. Click Close to close the Design Studio. Notice that VuGen has inserted the appropriate correlation functions and comments into the script.
For further details on how to use the Design Studio, see
"Correlation Studio Overview" on page 159
.
Parameterization vs Correlation
This type of correlation should not be confused with simple parameterization. Simple parameterization (Design > Parameters > Create New Parameter) applies only to data within
Send buffers. You set up a parameter and assign it several values. VuGen uses the different values in each of the script runs or iterations. For further details, see
"Correlation vs. Parameterization" on page 162 .
For details on how to manually correlate a Winsock Vuser script, see
"How to Correlate Scripts -
Winsock (Manually)" below .
How to Correlate Scripts - Winsock (Manually)
This topic describes how to use the Editor to manually correlate a Winsock Vuser script.
1. Insert the lrs_save_param_ex statement into your script at the point where you want to save the buffer contents. You can save user, static, or received type buffers.
lrs_save_param_ex (socket, type, buffer, offset, length, encoding, parameter);
2. View the buffer contents by selecting data.ws in the Action Pane of the main VuGen window
(displayed by default in the Editor). Locate the data that you want to replace with the contents of the saved buffer. Replace all instances of the value with the parameter name in parameter braces. The default parameter braces are brackets (< > or ()). You can modify the parameter braces in the Tools > Options > Scripting > Parameters tab.
In the following example, a user performed a telnet session. The user used a ps command to determine the process ID (PID), and killed an application based on that PID.
frodo:/u/jay>ps
PID TTY TIME CMD
14602 pts/18 0:00 clock
14569 pts/18 0:03 tcsh frodo:/u/jay>kill 14602
[3] Exit 1 frodo:/u/jay> clock
During execution, the PID of the procedure is different (Linux assigns unique PIDs for every execution), so killing the recorded PID will be ineffective. To overcome this problem, use lrs_
Page 165 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
save_param_ex to save the current PID to a parameter. Replace the constant with the parameter.
3. In the data.ws file, determine the buffer in which the data was received, buf47.
recv buf47 98
"\r"
"\x00"
"\r\n"
" PID TTY
" 14602 pts/18
.
.
" 14569 pts/18
"frodo:/u/jay>"
.
send buf58
"kill 14602"
TIME CMD\r\n"
0:00 clock\r\n"
0:02 tcsh\r\n"
4. In the Actions section, determine the socket used by buf47. In this example it is socket1.
lrs_receive("socket1", "buf47", LrsLastArg);
5. Determine the offset and length of the data string to save. The offset of the PID is 11 and its length is 5 bytes. For additional information about displaying the data, see
"Data Buffers" on page 794 .
6. Insert an lrs_save_param_ex function in the Action section, after the lrs_receive for the relevant buffer. In this instance, the buffer is buf47. The PID is saved to a parameter called param1. Print the parameter to the output using lr_output_message.
lrs_receive("socket1", "buf79", LrsLastArg);
lrs_save_param("socket1", "user", buf47, 11, 5, ascii, param1); lr_output_message ("param1: %s", lr_eval_string("<param1>"));
lr_think_time(10); lrs_send("socket1", "buf80", LrsLastArg);
7. In the data file, data.ws, determine the data that needs to be replaced with a parameter, the
PID.
send buf58
"kill 14602"
8. Replace the value with the parameter, enclosed in angle brackets.
send buf58
"kill
<param1>"
How to Correlate Scripts - Web (Manually)
This task describes how to correlate web scripts manually by modifying the code.
1. Locate the string and its details
Page 166 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Identify the statement that contains dynamic data and the patterns that characterize the locations of the data. These patterns may be boundaries or xpaths.
a. Identify Patterns using Boundaries
Use these guidelines to determine and set the boundaries of the dynamic data: o
Analyze the location of the dynamic data within the HTTP response.
o
Identify the string that is immediately to the left of the dynamic data. This string defines the left boundary of the dynamic data.
o
Identify the string that is immediately to the right of the dynamic data. This string defines the right boundary of the dynamic data.
o
The right and left boundaries should be as unique as possible to better locate the strings.
o
web_reg_save_param_ex looks for the characters between (but not including) the specified boundaries and saves the information beginning one byte after the left boundary and ending one byte before the right boundary. web_reg_save_param_ex does not support embedded boundary characters.
For example, if the input buffer is {a{b{c} and "{" is specified as a left boundary, and
"}" as a right boundary, the first instance is c and there are no further instances—it found the right and left boundaries but it does not allow embedded boundaries, so "c" is the only valid match.
By default, the maximum length of any boundary string is 256 characters. Include a web_
set_max_html_param_len function in your script to increase the maximum permitted length. For example, the following function increases the maximum length to 1024 characters:
These length restrictions do not apply where either the left or right boundaries are blank.
b. Identify Patterns using Xpaths
Use the snapshot pane to manually search for the xpath of the desired string.
By default, the maximum length of any boundary string is 256 characters Include a web_
set_max_html_param_len function in your script to increase the maximum permitted length. For example, the following function increases the maximum length to 1024 characters:
These length restrictions do not apply where either the left or right boundaries are blank.
2. Add web_reg_save_param_* function
Add a web_reg_save_param_ex or web_reg_save_param_xpath function into the script before the statement that contains the dynamic data.
a. web_reg_save_param_ex
This function searches server responses in web steps for the left boundary following by the string and the right boundary and saves the string to a parameter named in the function's argument. After finding the specified number of occurrences, web_reg_save_param_ex does not search any more responses. For more information, see the Function Reference
(Help > Function Reference).
Page 167 of 1812 HP LoadRunner (11.50)
User Guide
VuGen b. web_reg_save_param_xpath
This function searches server responses in web steps for a specified xpath. The string located in specified xpath is saved to a parameter named in the function's argument. For more information, see the Function Reference (Help > Function Reference).
3. Replace data with parameter
Select Edit > Replace from the VuGen main window to display the Search and Replace dialog box. Search the entire script for the dynamic data and replace it with a parameter. Give the parameter any name and enclose it with braces: {param_name}. You can include a maximum of 64 parameters per script.
How to Correlate Scripts - Tuxedo Protocol
The following steps describe how to correlate Tuxedo Vuser scripts.
To correlate statements, you modify your recorded script within the VuGen editor using one of the following LRT functions: l
lrt_save[32]_fld_val. Saves the current value of an FML or FML32 buffer (a string in the form
"name=<NAME>" or "id=<ID>") to a parameter.
l
lrt_save_parm. Saves a portion of a character array (such as a STRING or CARRAY buffer) to a parameter.
l
lrt_save_searched_string. Searches for an occurrence of a string in a buffer and saves a portion of the buffer, relative to the string occurrence, to a parameter.
For additional information about the syntax of these functions, see the Function Reference (Help >
Function Reference).
Determine values that need correlation
When working with CARRAY buffers, VuGen generates log files during recording (with the .rec extension) and during replay (with the .out extension) which you can compare using the Wdiff utility. You can look at the differences between the recording and replay logs to determine which portions of CARRAY buffers require correlation. The following steps describe how to compare the log files.
1. Select View > Output to display the execution log and recording log for your script.
2. Examine the Replay Log tab.
The error message should be followed by a statement beginning with the phrase: Use wdiff to
compare.
Page 168 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
3. Double-click on the statement in the execution log to start the Wdiff utility.
For more information, see Wdiff Utility .
Correlate for FML/FML32 buffers
Use lrt_save_fld_val or lrt_save32_fld_val to save the contents of the FML or FML32 buffer. The following steps describe how to correlate statements using lrt_save_fld_val.
1. Insert the lrt_save_fld_val statement in your script where you want to save the contents of the current FML (or FML32) buffer.
Example:
lrt_save_fld_val (fbfr, "name", occurrence, "param_name");
2. Locate the lrt statements with the recorded values that you want to replace with the contents of the saved buffer. Replace all instances of the recorded values with the parameter name in curly brackets.
Example:
In the following example, a bank account was opened and the account number was stored to a parameter, account_id.
/* Fill the data_0 buffer with new account information*/ data_0 = lrt_tpalloc("FML", "", 512); lrt_Finitialize((FBFR*)data_0); lrt_Fadd_fld((FBFR*)data_0, "name=BRANCH_ID", "value=1", LRT_
END_OF_PARMS); lrt_Fadd_fld((FBFR*)data_0, "name=ACCT_TYPE", "value=S", LRT_
END_OF_PARMS);
...
LRT_END_OF_PARMS); lrt_Fadd_fld((FBFR*)data_0, "name=LAST_NAME", "value=Doe", ...); lrt_Fadd_fld((FBFR*)data_0, "name=FIRST_NAME", "value=John",
...); lrt_Fadd_fld((FBFR*)data_0, "name=SAMOUNT", "value=234.12",
...);
Page 169 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
/* Open a new account and save the new account number*/ tpresult_int = lrt_tpcall("OPEN_ACCT", data_0, 0, &data_0,
&olen_2, 0); lrt_abort_on_error(); lrt_save_fld_val((FBFR*)data_0, "name=ACCOUNT_ID", 0, "
account_
id");
/* Use result from first query to fill buffer for the deposit*/ lrt_Finitialize((FBFR*)data_0); lrt_Fadd_fld((FBFR*)data_0, "name=ACCOUNT_ID", "value=
{account_
id}", LRT_END_OF_PARMS); lrt_Fadd_fld((FBFR*)data_0, "name=SAMOUNT", "value=200.11",
...);
In the above example, the account ID was represented by a field name, ACCOUNT_ID.
Some systems represent a field by an ID number rather than a field name during recording.
You can correlate by field ID as follows: lrt_save_fld_val((FBFR*)data_0, "id=8302", 0, "account_id");
Correlate based on buffer location
This task describes how to correlate a string in a Tuxedo script by using the lrt_save_parm function. This function creates a correlation based on the location of a string within the buffer.
1. Insert an lrt_save_parm statement in your script at the point where you want to save the contents of the current buffer.
2. In the replay.vdf file, locate the buffer data that you want to replace with the contents of the saved buffer.
View the buffer contents by selecting replay.vdf in the Action Pane of the main VuGen window
(displayed by default in Script View).
3. Replace all instances of the value with the parameter name in curly brackets.
Example:
In the following example, an employee ID from a CARRAY buffer must be saved for later use. The recorded value was "G001" as shown in the output.
lrt_tpcall:227, PprLoad, 1782
Reply Buffer received.
...
123 "G001"
126 "..."
134 "Claudia"
Insert lrt_save_parm using the offset, 123, immediately after the request buffer that sends
"PprLoad" and 227 bytes.
Page 170 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
/* Request CARRAY buffer 57 */
lrt_memcpy(data_0, buf_143, 227);
tpresult_int = lrt_tpcall("PprLoad",
data_0, 227, &data_1, &olen, TPSIGRSTRT);
lrt_save_parm(data_1, 123, 9, "empid");
In the replay.vdf file, replace the recorded value, "G001", with the parameter, empid.
char buf_143[] =
"\xf5\x0\x0\x0\x4\x3\x2\x1\x1\x0\x0\x0\xbc\x2\x0\x0\x0\x0\x0\x0"
"X"
"\x89\x0\x0\x0\xb\x0"
"SPprLoadReq"
"\xff\x0\x10\x0\x0\x4\x3\x6"
"
{empid}" // G001
"\x7"
"Claudia"
"\xe"
"LAST_NAME_SRCH"
...
This function can also be used to save a portion of a character array within an FML buffer.
In the following example, the phone number is a character array, and the area code is the first three characters. First, the lrt_save_fld_val statement saves the phone number to a parameter, phone_num. The lrt_save_parm statement uses lr_eval_string to turn the phone number into a character array and then saves the area code into a parameter called
area_code.
lrt_save_fld_val((FBFR*)data_0, "name=PHONE", 0, "phone_num"); lrt_save_parm(lr_eval_string("{phone_num}"), 0, 3, "area_code"); lr_log_message("The area code is %s\n", lr_eval_string("{area_ code}"));
Correlate based on delimiter
This task describes how to correlate a string in a Tuxedo script by using the lrt_save_searched_
string function. This function creates a correlation based on the location of a delimiter in the buffer
(e.g. correlate the string immediately after the first { ). This function is recommended for PeopleSoft scripts because the reply buffers returned from the PeopleSoft server often differ in size during replay from what was seen during recording.
1. Insert an lrt_save_searched_string statement in your script where you want to save a portion of the current buffer.
Note that the offset is the offset from the beginning of the string.
2. In the replay.vdf file, locate the buffer data that you want to replace with the contents of the saved buffer.
View the buffer contents by selecting replay.vdf in the Action Pane of the main VuGen window
(displayed by default in Script View).
Page 171 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
3. Replace all instances of the value with the parameter name in curly brackets.
Example:
In the following example, a Certificate is saved to a parameter for a later use. The lrt_save_
searched_string function saves 16 bytes from the specified olen buffer, to the parameter cert1.
The saved string location in the buffer, is 9 bytes past the first occurrence of the string
"SCertRep".
This application is useful when the buffer's header information is different depending on the recording environment.
The certificate will come 9 bytes past the first occurrence of "SCertRep", but the length of the information before this string varies.
/* Request CARRAY buffer 1 */ lrt_memcpy(data_0, sbuf_1, 41); lrt_display_buffer("sbuf_1", data_0, 41, 41); data_1 = lrt_tpalloc("CARRAY", "", 8192); tpresult_int = lrt_tpcall("GetCertificate",
data_0,
41,
&data_1,
&olen,
TPSIGRSTRT);
/* Reply CARRAY buffer 1 */ lrt_display_buffer("rbuf_1", data_1, olen, 51); lrt_abort_on_error();
lrt_save_searched_string(data_1, olen, 0, "SCertRep", 9, 16,
"cert1");
How to Correlate Scripts - Siebel Protocol
The following steps describe how to correlate Siebel Web Vuser scripts.
l
Correlation library l
Correlation rules l
Correlate SWECount parameters l
Correlate ROWID parameters l
Correlate SWET (timestamp) parameters
Correlation library
To assist you with correlation, Siebel has released a correlation library file as part of the Siebel
Application Server version 7.7. This library is available only through Siebel. The library file,
ssdtcorr.dll, is located under the siebsrvr\bin folder for Windows and under siebsrvr/lib for Linux installations.
The library file, ssdtcorr.dll, must be available to all machines where a Load Generator or
Controller reside. Support for this library requires VuGen 8.0 and higher. The following steps describe how to enable correlation with this library.
Page 172 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
1. Copy the DLL file into the bin folder of the product installation.
2. Open a multi-protocol script using the Siebel-Web Vuser type.
3. Enable UTF-8 support in the Recording Options > HTTP Properties > Advanced node.
4. Open the recording option's Correlation node and click Import. Import the rules file,
WebSiebel77Correlation.cor, from the \dat\webrulesdefaultsetting folder. If you are prompted with warnings, click Override.
To revert to the default correlation, delete all of the Siebel rules and click Use Defaults.
When using the Siebel correlation library, verify that the SWE count rules (where the left boundary contains the SWEC string) are not disabled.
Correlation rules
VuGen's native built-in rules for the Siebel server detect the Siebel server variables and strings, automatically saving them for use at a later point within the script. The rules list the boundary criteria that are unique for Siebel server strings.
When VuGen detects a match using the boundary criteria, it saves the value between the boundaries to a parameter. The value can be a simple variable or a public function.
In normal situations, you do not need to disable any rules. In some cases, however, you may want to disable rules that do not apply. For example, disable Japanese content check rules when testing
English-only applications.
Another reason to disable a rule is if the Controller explicitly requires an error condition to be generated. View the rule properties in the recording options and determine the conditions necessary for your application.
Simple Variable Correlation
In the following example, the left boundary criteria is _sn=. For every instance of _sn= in the left boundary and ; in the right, VuGen creates a parameter with the Siebel_sn_cookie prefix.
In the following example, VuGen detected the _sn boundary. It saved the parameter to Siebel_sn_ cookie6 and used it in the web_url function.
Page 173 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
/* Registering parameter(s) from source web_reg_save_param(" Siebel_sn_cookie6",
"LB/IC=_sn=",
"RB/IC=;",
"Ord=1",
"Search=headers",
"RelFrameId=1",
LAST);
...
web_url("start.swe_3",
"URL=http://cannon.hplab.com/callcenter_ enu/start.swe?SWECmd=GotoPostedAction=;SWEDIC=true=;_sn={
Siebel_sn_
cookie6}=;SWEC={Siebel_SWECount}=;SWEFrame=top._
sweclient=;SWECS=true",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=http://cannon.hplab.com/callcenter_ enu/start.swe?SWECmd=GetCachedFrame=;_sn={
Siebel_sn_
cookie6}=;SWEC={Siebel_SWECount}=;SWEFrame=top._swe",
"Snapshot=t4.inf",
"Mode=HTML",
LAST);
Function Correlation
In certain instances, the boundary match is a function. Functions generally use an array to store the run-time values. In order to correlate these values, VuGen parses the array and saves each argument to a separate parameter using the following format:
<parameter_name> = <recorded_value> (display_name)
The display name is the text that appears next to the value, in the Siebel Application.
VuGen inserts a comment block with all of the parameter definitions.
/* Registering parameter(s) from source task id 159
// {Siebel_Star_Array_Op33_7} = ""
// {Siebel_Star_Array_Op33_6} = "1-231"
// {Siebel_Star_Array_Op33_2} = ""
// {Siebel_Star_Array_Op33_8} = "Opportunity"
// {Siebel_Star_Array_Op33_5} = "06/26/2003 19:55:23"
// {Siebel_Star_Array_Op33_4} = "06/26/2003 19:55:23"
// {Siebel_Star_Array_Op33_3} = ""
// {Siebel_Star_Array_Op33_1} = "test camp"
// {Siebel_Star_Array_Op33_9} = ""
// {Siebel_Star_Array_Op33_rowid} = "1-6F"
// */
In addition, when encountering a function, VuGen generates a new parameter for web_reg_save_
param, AutoCorrelationFunction. VuGen also determines the prefix of the parameters and uses it as the parameter name. In the following example, the prefix is Siebel_Star_Array_Op33.
Page 174 of 1812 HP LoadRunner (11.50)
User Guide
VuGen web_reg_save_param("
Siebel_Star_Array_Op33",
"LB/IC=`v`",
"RB/IC=`",
"Ord=1",
"Search=Body",
"RelFrameId=1",
"
AutoCorrelationFunction=flCorrelationCallbackParseStarArray",
LAST);
VuGen uses the parameters at a later point within the script. In the following example, the parameter is called in web_submit_data.
web_submit_data("start.swe_14", "Action=http://cannon.hplab.com/callcenter_enu/start.swe",
"Method=POST", "RecContentType=text/html", "Referer=", "Snapshot=t15.inf", "Mode=HTML",
ITEMDATA, "Name=SWECLK", "Value=1", ENDITEM, "Name=SWEField", "Value=s_2_1_13_
0", ENDITEM, "Name=SWER", "Value=0", ENDITEM, "Name=SWESP", "Value=false",
ENDITEM, "Name=s_2_2_29_0", "Value={Siebel_Star_Array_Op33_1}", ENDITEM, "Name=s_
2_2_30_0", "Value={Siebel_Star_Array_Op33_2}", ENDITEM, "Name=s_2_2_36_0",
"Value={Siebel_Star_Array_Op33_3}", ENDITEM, ...
During replay, Vusers do a callback to the public function, using the array elements that were saved as parameters.
Note: Correlation for the SWEC parameter is not done through the correlation rules. VuGen handles it automatically with a built-in detection mechanism. For more information, see SWEC
Correlation .
SWEC Correlation
SWEC is a parameter used by Siebel servers representing the number of user clicks. The SWEC parameter usually appears as an argument of a URL or a POST statement. For example:
GET /callcenter_enu/start.swe?SWECmd=GetCachedFrame=;_sn=2mOTFXHWBAAGb5Xzv9Ls2Z45QvxGQnOnPVtX6vnfUU_=;
SWEC=1=;SWEFrame=top._
swe._sweapp HTTP/1.1
or
POST /callcenter_enu/start.swe HTTP/1.1
...
\r\n\r\n
SWERPC=1=;
SWEC=0=;_sn=2-mOTFXHWBAAGb5Xzv9Ls2Z45QvxGQnOnPVtX6vnfUU_
=;SWECmd=InvokeMethod...
VuGen handles the changes of the SWEC by incrementing a counter before each relevant step.
VuGen stores the current value of the SWEC in a separate variable (Siebel_SWECount_var).
Before each step, VuGen saves the counter's value to a VuGen parameter (Siebel_SWECount).
In the following example, web_submit_data uses the dynamic value of the SWEC parameter,
Siebel_SWECount.
Siebel_SWECount_var += 1; lr_save_int(Siebel_SWECount_var, "Siebel_SWECount");
Page 175 of 1812 HP LoadRunner (11.50)
User Guide
VuGen web_submit_data("start.swe_8",
"Action=http://cannon.hplab.com/callcenter_enu/start.swe",
"Method=POST",
"TargetFrame=",
"RecContentType=text/html",
"Referer=",
"Snapshot=t9.inf",
"Mode=HTML",
"EncodeAtSign=YES",
ITEMDATA,
"Name=SWERPC", "Value=1", ENDITEM,
"Name=SWEC", "Value={
Siebel_SWECount}", ENDITEM,
"Name=SWECmd", "Value=InvokeMethod", ENDITEM,
"Name=SWEService", "Value=SWE Command Manager", ENDITEM,
"Name=SWEMethod", "Value=BatchCanInvoke", ENDITEM,
"Name=SWEIPS",...
LAST);
Note that the SWEC parameter may also appear in the referrer URL. However, its value in the referrer URL usually differs from its value in the requested URL. VuGen handles this automatically.
Correlate SWECount parameters
The SWECount parameter value is usually a small number consisting of one or two digits. It is often difficult to determine where to replace the recorded value with a parameter.
In the web_submit_data function, VuGen only replaces it in the SWEC field.
In URLs, VuGen only replaces the value when it appears after the strings "SWEC=" or "SWEC`".
The parameter name for all the SWECount correlations is the same.
Correlate ROWID parameters
In certain cases, the rowid is preceded by its length, encoded in hexadecimal format. Since this length can change, this value must be correlated.
For example, the following string is comprised of a length value and RowID, xxx6_1-4ABCyyy, where 6 is the length, and 1-4ABC is the RowID.
If you define parameters to correlate the string as xxx{rowid_Length}_{rowid}yyy then using this enhanced correlation, VuGen generates the following function before the string: web_save_param_length("rowid", LAST);
This function gets the value of rowid, and saves its length into the parameter rowid_length in hexadecimal format.
Correlate SWET (timestamp) parameters
The SWETS value in the script, is the number of milliseconds since midnight January 1st, 1970.
VuGen replaces all non-empty timestamps in the script, with the parameter {SiebelTimeStamp}.
Before saving a value to this parameter, VuGen generates the following function:
Page 176 of 1812 HP LoadRunner (11.50)
User Guide
VuGen web_save_timestamp_param("SiebelTimeStamp", LAST);
This function saves the current timestamp to the SiebelTimeStamp parameter.
How to Correlate Scripts - Oracle NCA
The following steps describe different items in Oracle NCA scripts that may need correlation.
Correlate statements for load balancing
VuGen supports load balancing for multiple application servers. You correlate the HTTP return values with the nca_connect_server parameters. The Vuser then connects to the relevant server during test execution, applying load balancing. The following steps describe how to correlate statements for load balancing.
1. Record a multi-protocol script.
Record a multi-protocol script for Oracle NCA and Web Protocols. Perform the desired actions and save the script.
2. Define parameters for host and host arguments.
Define two variables, serverHost and serverArgs, for parameterization: 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);
3. Assign values to serverHost and serverArgs:
web_url("step_name", "URL=http://server1.acme.com/test.htm", LAST);
4. Modify the nca_connect_server statement from:
nca_connect_ server("199.203.78.170", 9000"/*version=107*/,
"module=e:\\appsnca...fndnam=apps ");
to: nca_connect_server("{ serverHost }", "9000"/*version=107*/,
"{serverArgs}");
The script should now look like this: 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);
web_url("step_name", "URL=http://server1.acme/test.htm", LAST); nca_connect_ server("{serverHost}","9000"/*version=107*/,"{serverArgs}");
Correlate the icx_ticket variable
The icx_ticket variable, is part of the information sent in the web_url and nca_connect_server
Page 177 of 1812 HP LoadRunner (11.50)
User Guide
VuGen functions: web_url("fnd_icx_launch.runforms",
"URL=http://ABC-123:8002/pls/VIS/fnd_icx_launch.runforms\?ICX_
TICKET=
5843A55058947ED3=;RESP_APP=AR=;RESP_KEY=RECEIVABLES_
MANAGER=;SECGRP_KEY=STANDARD", LAST);
This icx_ticket value is different for each recording. It contains cookie information sent by the client. To correlate your recording, add web_reg_save_param before the first occurrence of the recorded icx_ticket value: web_reg_save_param("icx_ticket", "LB=TICKET=", "RB==;RES", LAST);
...
web_url("fnd_icx_launch.runforms",
"URL=http://ABC-123:8002/pls/VIS/fnd_icx_launch.runforms\?ICX_
TICKET=
{icx_ticket}=;RESP_APP=AR=;RESP_KEY=RECEIVABLES_
MANAGER=;SECGRP_KEY=STANDARD", LAST);
Note: The left and right boundaries of web_reg_save_param may differ depending on your application setup.
Correlate the JServSessionldroot values
The JServSessionIdroot value is a cookie that the application sets to store the session ID. In most cases, VuGen automatically correlates this value and inserts a web_reg_save_param function. If VuGen did not add this function automatically, you add it manually, replacing all of its occurrences with the parameter name.
To identify the value that you need to correlate, open the Execution log (View > Output Window) and locate the response body.
vuser_init.c(8): path=/\r\n vuser_init.c(8): vuser_init.c(8):
Set-Cookie: JServSessionIdroot=my1sanw2n1.JS4;
Content-Length: 79\r\n
Content-Type: text/plain\r\n vuser_init.c(8): \r\n vuser_init.c(8): 81-byte response body for "http://ABC-
123/servlet/oracle.forms.servlet.ListenerServlet?ifcmd=getinfo=;ifhost=mercury=;ifip=123.45.789.12"
(RelFrameId=1) vuser_init.c(8):
/servlet/oracle.forms.servlet.ListenerServlet?JServSessionIdroot=my1sanw2n1.JS4\r\n
To correlate this dynamic value, insert a web_reg_save_param function before the first occurrence and then replace the variable value with the parameter name throughout the script. In this example, the right and left boundaries are \r and \n, but you should check your specific environment to determine the exact boundaries in your environment.
web_reg_save_ param("NCAJServSessionId","LB=\r\n\r\n","RB=\r","ORD=1",LAST);
web_url("f60servlet",
"URL= http://ABC-
"123/servlet/oracle.forms.servlet.ListenerServlet?ifcmd=getinfo=;"
"ifhost=mercury=;ifip=123.45.789.12", LAST);
Page 178 of 1812 HP LoadRunner (11.50)
User Guide
VuGen web_url("oracle.forms.servlet.ListenerSer",
"URL=http://ABC-123 {NCAJServSessionId}?ifcmd=getinfo=;"
"ifhost=mercury=;ifip=123.45.789.12", LAST);
How to Correlate Scripts - Microsoft .NET
This task describes how to correlate Microsoft .NET Vuser scripts.
Correlate scripts using ADO.net environments
1. Locate the dataset in your script.
Display the Vuser script in the Editor and expand the applicable DATASET_XML statement.
Click View > Snapshot.
2. Locate the value.
Locate the value you want to correlate. To search for a value in a data grid, display the data grid in the Snapshot pane, and click Search > Quick Find to open the Search dialog box.
In the Search dialog box, click Include in Search, and then select the Snapshots check box.
3. Create a correlation.
Right-click on the value in the grid that you want to correlate and select Create Correlation.
The Create a correlation dialog box opens.
4. Specify a parameter name.
Specify a parameter name, identical to the variable you defined earlier. Click OK. VuGen prompts you if you want to search for all occurrences. Click OK.
VuGen adds an lr.save_string function before each dataset. For example: lr.save_string("MyCustomerID", CustomerAndOrdersDataSet_
3.Tables["Customers"].Rows[0]["CompanyName"].ToString());
5. Reference the parameter at a later point in the script.
Select the value you want to replace with a parameter and select Replace with a parameter from the right-click menu. Insert the saved variable name in the Parameter name box. Click OK.
VuGen prompts you to replace all of the values with a parameter, using the lr.eval_string function to evaluate the string's value.
lr.message("The customer ID is""+ lr.eval_string("{MyCustomerID}") +
");
Page 179 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Unlike other protocols, the script includes direct calls to the application or framework method.
Therefore, you cannot replace the string value with the {paramName}—instead you must use
lr.eval_string to evaluate the parameter's value.
Correlate with output parameters
For primitive values, you should generate the script with output parameter values and examine the output parameters for correlations.
1. Select Recording > Recording Options, and select the General > Script node.
2. Select the Insert output parameter values check box. Click OK to close the Recording
Options dialog box.
3. Select Record > Regenerate Script to regenerate the script.
4. Search the commented output primitive values for correlations.
For more information about using correlation functions, see the Function Reference (Help >
Function Reference).
How to Correlate Scripts - Java Scripts - Serialization
In RMI, and some cases of CORBA, the client AUT creates a new instance of a Java object using the java.io.serializable interface. It passes this instance as a parameter for a server invocation. In the following segment, the instance p is created and passed as a parameter.
// AUT code: java.awt.Point p = new java.awt.Point(3,7); map.set_point(p);
:
The automatic correlation mechanism is ineffective here, since the object did not return from any previous call. In this case, VuGen activates the serialization mechanism and stores the object being passed as a parameter. It saves the information to a binary data file under the user folder.
Additional parameters are saved as new binary data files, numbered sequentially. VuGen generates the following code: public class Actions {
// Public function: init public int init() throws Throwable { java.awt.Point p = (java.awt.Point)lr.deserialize(0, false); map.set_point(p);
}
Page 180 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
:
}
The integer passed to lr.deserialize represents the number of binary data files in the Vuser folder.
To parameterize the recorded value, use the public setLocation method (for information, see the
JDK function reference). The following example uses the setLocation method to set the value of the object, p.
:
} public class Actions {
// Public function: init public int init() throws Throwable { java.awt.Point p = (java.awt.Point)lr.deserialize(0, false); p.setLocation(2,9); map.set_point(p);
}
:
In certain instances the public method of setLocation is not applicable. As an alternative, you can use the API of your class that incorporate get or set accessor methods. If you are working with AUT classes that do not have get/set methods or use private methods, or if you are unfamiliar with the classes' API, you can use VuGen's built-in serialization mechanism. This mechanism allows you to expand objects in their ASCII representation and manually parameterize the script. You enable this mechanism in the Recording Options dialog box. For details, see
"Recording Properties >
Serialization Options Node" on page 338 .
VuGen generates an lr.deserialize method thatdeserializes the data or displays complex data structures as serial strings. Once the structure is broken down to its components, it is easier to parameterize. The lr.deserialize method receives two arguments, a string and an integer. The string is the parameter's value that is to be substituted during replay. The integer is the index number of binary file to load.
If you choose not to expand objects in your script by clearing the Unfold Serialized Objects check box, you can control the serialization mechanism by passing arguments to the lr.deserialize
method. The first argument is an integer indicating the number of binary files to load. The second integer is a boolean value:
true
Use VuGen's serialization mechanism.
false
Use the standard Java serialization mechanism.
The following segment shows a generated script in which the serialization mechanism was enabled.
public class Actions {
// Public function: init public int init() throws Throwable {
_string = "java.awt.Point __CURRENT_OBJECT = {" +
"int x = "#5#" +
"int y = "#8#" +
"}";
Page 181 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
:
} java.awt.Point p = (java.awt.Point)
lr.deserialize(_
string,0); map.set_point(p);
}
The string values are placed between delimiters. The default delimiter is "#". You can change the delimiter in the Serialization tab of the recording options. Delimiters are used to speed up the parsing of the string during replay.
When modifying the string, you must maintain the following rules: l
Order of lines may not be changed. The parser reads the values one-by-one—not the member names.
l
Only values between two delimiters may be modified.
l
Object references may not be modified. Object references are indicated only to maintain internal consistency.
l
"_NULL_" can appear as a value, representing the Java null constant. You can replace it with string type values only.
l
Objects may be deserialized anywhere in the script. For example, you can deserialize all objects in the init method and use the values in the action method.
l
Maintain internal consistency for the objects. For example, if a member of a vector is element
count and you add an element, you must modify the element count.
In the following segment, a vector contains two elements:
:
} public class Actions {
// Public function: init public int init() throws Throwable {
_string = "java.util.Vector CURRENTOBJECT = {" +
"int capacityIncrement = "#0#" +
"int elementCount = #2#" +
"java/lang/Object elementData[] = {" +
"elementData[0] = #First Element#" +
....
"elementData[9] = _NULL_" +
"}" +
"elementData[1] = #Second Element#" +
"elementData[2] = _NULL_" +
"}";
_vector = (java.util.Vector)lr.deserialize(_string,0); map.set_vector(_vector);
}
In the following example, one of the vector's elements was changed—a "_NULL_" value was changed to "Third element". In coordination with the addition of the new element, the
elementCount member was modified to 3.
Page 182 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
:
} public class Actions {
// Public function: init public int init() throws Throwable {
_string = "java.util.Vector CURRENTOBJECT = {" +
"int capacityIncrement = "#0#" +
"int elementCount = #3# " +
"java/lang/Object elementData[] = {" +
"elementData[0] = #First Element#" +
"elementData[1] = #Second Element#" +
"elementData[2] = #Third Element#" +
....
"elementData[9] = _NULL_" +
"}" +
"}";
_vector = (java.util.Vector)lr.deserialize(_string,0); map.set_vector(_vector);
}
Due to the complexity of the serialization mechanism, which opens up the objects to ASCII representation, opening large objects while recording may increase the time required for script generation. To decrease this time, you can specify flags which will improve the performance of the serialization mechanism.
When adding lr.deserialize to your script, we recommend that you add it to the init method—not the action method. This will improve performance since VuGen will only deserialize the strings once. If it appears in the action method, VuGen will deserialize strings for every iteration.
How to Correlate Scripts - Java
VuGen's Java recorder attempts to automatically correlate statements in the generated script. It performs correlation on Java objects only. When it encounters a Java primitive (byte, character, boolean, integer, float, double, short, and long) during recording, the argument values appear in the script without association to variables. VuGen automatically correlates all objects, arrays of objects, and arrays of primitives. Note that Java arrays and strings are also considered objects.
VuGen employs several levels of correlation: Standard, Enhanced, Strings. You enable or disable correlation from the Recording options. An additional method of Serialization can be used to handle scripts where none of the former methods can be applied.
Standard Correlation
Standard correlation refers to the automatic correlation performed during recording for simple objects, excluding object arrays, vectors, and container constructs.
When the recorded application invokes a method that returns an object, VuGen's correlation mechanism records these objects. When you run the script, VuGen compares the generated objects to the recorded objects. If the objects match, the same object is used. The following example shows two CORBA objects my_bank and my_account. The first object, my_bank, is
Page 183 of 1812 HP LoadRunner (11.50)
User Guide
VuGen invoked; the second object, my_account, is correlated and passed as a parameter in final line of the segment: public class Actions {
// Public function: init
:
} public int init() throws Throwable {
Bank my_bank = bankHelper.bind("bank", "shunra");
Account
my_account = accountHelper.bind("account","shunra");
my_bank.remove_account(
my_account);
}
Advanced Correlation
Advanced or deep correlation refers to the automatic correlation performed during recording for complex objects, such as object arrays and CORBA container constructs.
The deep correlation mechanism handles CORBA constructs (structures, unions, sequences, arrays, holders, `any's) as containers. This allows it to reference inner members of containers, additional objects, or different containers. Whenever an object is invoked or passed as a parameter, it is also compared against the inner members of the containers.
In the following example, VuGen performs deep correlation by referencing an element of an array.
The remove_account object receives an account object as a parameter. During recording, the correlation mechanism searches the returned array my_accounts and determines that its sixth element should be passed as a parameter.
public class Actions {
// Public function: init
public int init() throws Throwable {
my_banks[] = bankHelper.bind("banks", "shunra");
my_accounts[] = accountHelper.bind("accounts","shunra");
my_banks[2].remove_account(my_accounts[6]);
}
:
}
The following segment further illustrates enhanced correlation. The script invokes the send_letter object that received an address type argument. The correlation mechanism retrieves the inner member, address, in the sixth element of the my_accounts array.
public class Actions {
:
}
// Public function: init
public int init() throws Throwable {
my_banks = bankHelper.bind("bank", "shunra");
my_accounts = accountHelper.bind("account", "shunra");
my_banks[2].send_letter(my_accounts[6].address);
}
String Correlation
String correlation refers to the representation of a recorded value as an actual string or a variable.
Page 184 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
When you disable string correlation (the default setting), the actual recorded value of the string is indicated explicitly within the script. When you enable string correlation, it creates a variable for each string, allowing you to use it at a later point in the script.
In the following segment, string correlation is enabled—you store the value returned from the get_id method in a string type variable for use later on in the script.
public class Actions {
// Public function: init
public int init() throws Throwable {
my_bank = bankHelper.bind("bank", "shunra");
my_account1 = accountHelper.bind("account1", "shunra");
:
}
my_account2 = accountHelper.bind("account2", "shunra");
string = my_account1.get_id();
string2 = my_account2.get_id();
my_bank.transfer_money(
string, string2);
}
How to Correlate Scripts - XPath Correlation in Flex Vuser Scripts
This topic describes how to use XPath correlation in Flex Vuser scripts. You use the XML View inside the Snapshot pane to perform the correlation. Before you can successfully implement XPath correlation, you must first configure the recording options.
For details on how to use regular correlation in Flex Vuser scripts, see
"How to Correlate Scripts
Using Design Studio" on page 163
.
1. Configure the recording options.
a. Select Record > Recording Options.
b. Under Flex, click Externalizable Objects.
c. Click Serialize objects using, and select Custom Java Classes.
d. Click the Add jar or zip file button .
e. On the LiveCycle installation discs, locate the following three files, and add them to the
Classpath Entries list: i. flex.jar ii. flex-messaging-common.jar iii. flex-messaging-core.jar
Ensure that the added files exist in the same location on all load generator machines.
2. Record the Vuser script.
3. In the Editor, click inside the flex_amf_call step that contains the data you want to correlate, or in the Step Navigator, double-click the flex_amf_call step that contains the data you want to correlate.
Page 185 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
4. Click View > Snapshot or click the Snapshot button
5. In the Snapshot pane, click the Response Body tab.
on the VuGen toolbar.
6. On the right-side of the Snapshot pane, click the XML View tab.
7. In the XML View, locate and select the entire string that contains the dynamic data that requires correlation.
8. Right-click inside the selection, and select Create Correlation. The Correlation Studio opens.
For details on how to use the Correlation Studio, see
"Correlation Studio Overview" on page
159 .
When the correlation is complete, VuGen adds a web_reg_save_parm_xpath step to the Vuser script.
How to Correlate Scripts - Database Protocols
You can correlate dynamic values in your script using the Snapshot Pane.
How to Correlate Scripts - COM Protocol
You can correlate dynamic values in your script using the Snapshot Pane.
How to Search for Values that Need Correlation
The following steps describe different ways to search for values that need correlation.
Search by comparing scripts
1. Record a script and save it.
2. Create a new script and record the identical operations. Save the script.
3. Select Tools > Compare with Vuser to compare the scripts. For more details, see
"How to
Compare Scripts Side by Side" on page 93 .
4. Differences in the script are highlighted. Review the differences to determine which ones may require correlation.
Page 186 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Note: WDiff is the default utility, but you can specify a custom comparison tool. For more information, see
"How to Compare Scripts Side by Side" on page 93
.
Replay log search
1. Scan the script in script view for strings that may need correlation such as hash strings, random strings, session ID's, and so on.
2. Search the generation log for the first time that the string appears (this is the response from the server).
3. Search the extended replay log for the same response. Check to see if this response contains a different string within the same boundaries as the original suspected string. If yes, this string requires correlation.
Correlation Functions - Database Vuser Scripts
When working with Database Vuser scripts, (DbLib, CtLib, Oracle, Informix, and so forth) you can use VuGen's automated correlation feature to insert the appropriate functions into your script. The correlating functions are: l
lrd_save_col saves a query result appearing in a grid, to a parameter. This function is placed before fetching the data. It assigns the value retrieved by the subsequent lrd_fetch to the specified parameter.
(lrd_ora8_save_col for Oracle 8 and higher) l
lrd_save_value saves the current value of a placeholder descriptor to a parameter. It is used with database functions that set output placeholders (such as certain stored procedures under
Oracle).
l
lrd_save_ret_param saves a stored procedure's return value to a parameter. It is used primarily with database procedures stored in DbLib that generate return values.
Note: VuGen does not apply correlation if the saved value is invalid or NULL (no rows
Page 187 of 1812 HP LoadRunner (11.50)
User Guide
VuGen returned).
For more information about these functions and their arguments, see the Function Reference (Help
> Function Reference).
Correlation Functions - Java Vuser Scripts
To correlate statements for Java Vusers, you can use the Java Vuser correlation functions. These functions may be used for all Java type Vusers, to save a string to a parameter and retrieve it when required.
lr.eval_string
Replaces a parameter with its current value.
lr.eval_data
lr.eval_int
lr.eval_string
lr.save_data
Replaces a parameter with a byte value.
Replaces a parameter with an integer value.
Replaces a parameter with a string.
Saves a byte as a parameter.
lr.save_int
Saves an integer as a parameter.
lr.save_string
Saves a null-terminated string to a parameter.
When recording a CORBA or RMI session, VuGen performs correlation internally. For more information, see
"How to Correlate Scripts - Java" on page 183 .
Using the Java String Functions
When programming Java Vuser scripts, you can use the Java Vuser string functions to correlate your scripts. In the following example, lr.eval_int substitutes the variable ID_num with its value, defined at an earlier point in the script.
lr.message(" Track Stock: " + lr.eval_int(ID_num));
In the following example, lr.save_string assigns John Doe to the parameter Student. This parameter is then used in an output message.
lr.save_string("John Doe", "
Student");
// ...
lr.message("Get report card for " + lr.eval_string("
<Student>")); classroom.getReportCard
Page 188 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Web_reg_save_param function details
When you run a script, the web_reg_save_param function scans the subsequent HTML page that is accessed. You specify a left and/or right boundary and VuGen searches for text between those boundaries. When VuGen finds the text, it assigns it to a parameter.
The function's syntax is as follows: int
web_reg_save_param (const char *mpszParamName, <List of
Attributes>, LAST);
The following table lists the available attributes. Note that the attribute value strings (for example,
Search=all) are not case sensitive.
NotFound
LB
RB
The handling method when a boundary is not found and an empty string is generated. "ERROR," the default, indicates that VuGen should issue an error when a boundary is not found. When set to "EMPTY," no error message is issued and script execution continues. Note that if Continue on Error is enabled for the script, then even when NOTFOUND is set to "ERROR," the script continues when the boundary is not found, but it writes an error message to the Extended log file.
The left boundary of the parameter or the dynamic data. This parameter must be a non-empty, null-terminated character string. Boundary parameters are case sensitive; to ignore the case, add "/IC" after the boundary. Specify "/BIN" after the boundary to specify binary data.
The right boundary of the parameter or the dynamic data. This parameter must be a non-empty, null-terminated character string. Boundary parameters are case sensitive; to ignore the case, add "/IC" after the boundary. Specify "/BIN" after the boundary to specify binary data.
RelFrameID
The hierarchy level of the HTML page relative to the requested URL. The possible values are ALL or a number.
Search
The scope of the search—where to search for the delimited data. The possible values are Headers (search only the headers), Body (search only body data, not headers), or ALL (search body and headers). The default value is ALL.
ORD
This optional parameter indicates the ordinal or occurrence number of the match.
The default ordinal is 1. If you specify "All," it saves the parameter values in an array.
SaveOffset
The offset of a sub-string of the found value, to save to the parameter. The default is 0. The offset value must be non-negative.
Savelen
The length of a sub-string of the found value, from the specified offset, to save to the parameter. The default is -1, indicating until the end of the string.
Convert
The conversion method to apply to the data:
HTML_TO_URL: convert HTML-encoded data to a URL-encoded data format
HTML_TO_TEXT: convert HTML-encoded data to plain text format
Page 189 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Correlation Functions - C Vuser Scripts
To correlate statements for protocols that do not have specific functions, you can use the C Vuser correlation functions. These functions can be used for all C-type Vusers, to save a string to a parameter and retrieve it when required.
lr_eval_string lr_save_string lr_save_var
Replaces all occurrences of a parameter with its current value.
Saves a null-terminated string to a parameter.
Saves a variable length string to a parameter.
For additional information about the syntax of these functions, see the Function Reference (Help >
Function Reference).
Using lr_eval_string
In the following example, lr_eval_string replaces the parameter row_cnt with its current value. This value is sent to the Output window using lr_output_message.
lrd_stmt(Csr1, "select count(*) from employee", -1, 1 /*Deferred*/,
...); lrd_bind_col(Csr1, 1, =;COUNT_D1, 0, 0); lrd_exec(Csr1, 0, 0, 0, 0, 0); lrd_save_col(Csr1, 1, 1, 0, "row_cnt"); lrd_fetch(Csr1, 1, 1, 0, PrintRow2, 0); lr_output_message("value: %s" , lr_eval_string("The row count is:
<row_cnt>"));
Using lr_save_string
To save a NULL terminated string to a parameter, use lr_save_string. To save a variable length string, use lr_save_var and specify the length of the string to save.
In the following example, lr_save_string assigns 777 to a parameter emp_id. This parameter is then used in another query or for further processing.
lrd_stmt(Csr1, "select id from employees where name='John'",...); lrd_bind_col(Csr1,1,=;ID_D1,...); lrd_exec(Csr1, ...); lrd_fetch(Csr1, 1, ...);
/* GRID showing returned value "777" */
lr_save_string("777", "emp_id");
Correlation Studio Dialog Box
This dialog box enables you to scan for, correlate, and view information about dynamic values in your script.
To access
Click the Studio button on the VuGen toolbar.
Page 190 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
The button is enabled only when you have a recorded script in the Solution
Explorer.
"Correlation Studio Overview" on page 159
Important information
Relevant tasks
"How to Correlate Scripts Using Design Studio" on page 163
User interface elements are described below (unlabeled elements are shown in angle brackets):
UI Element
<Progress bar>
Replay and
Scan
Correlate
Add as Rule
Undo
Correlation
Filter
Description
Correlation Studio Tab
The status on the progress bar enables you to understand how far along your script is in the correlation process. The three main milestones are:
Initial Scan: Correlation Studio has scanned for record (or replay) values that require correlation and has identified correlations defined by rules.
Replay and Scan: Correlation Studio has replayed and found more values to be correlated. You may repeat this process.
Studio Scan Complete: Correlation Studio has not found any new values that require correlation.
Correlation studio scans for dynamic values using all enabled types: rule, record, and replay.
Replace a dynamic value in the script with a correlation parameter.
Add dynamic value definition as a rule. For details, see
"Correlations > Rules " on page 293 .
Replace the correlation parameter with the original dynamic value.
Type
Enables you to filter values found for correlation by the following types: l
All l
New l
Correlated
Correlation Grid
Displays details about each dynamic value in the script
Displays which engine found the dynamic value for correlations: l
Record l
Rules l
Replay l
Manual
Page 191 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
UI Element Description
Replace/Found
Displays information about the number of dynamic values found with the same definitions. Since you can perform partial correlation, meaning you can replace specific occurrences, the information displayed depends on if you have correlated the value or not.
l
Before you correlate
Number of values that can be replaced/ Number of values found l
After you correlate
Number of values that have been replaced/Number of values found.
Status
Displays correlation status of the dynamic value from the script: l
New l
Correlated
Displays the string of the dynamic value from the script.
Text in
Response
Correlation
Parameter
Displays the correlation parameter name of the dynamic value.
Correlation Details Chevron
Displays details about the dynamic value in the snapshot/script
Original Snapshot Step Tab
Step in Script Details
Name
Displays the step name in the script where the dynamic value was found.
Line
Action Name
Displays the line of the script where the dynamic value was found.
Displays the name of action from the script where the dynamic value was found.
Displays a description of the step.
Description
Correlation Definition Details
Type
Display API function that will be used to correlate the value.
Regular expression: web_reg_save_param_regexp
Boundary based: web_reg_save_param_ex
Page 192 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
UI Element
Definition
Apply
Definition
Description
Displays the definition of the dynamic value.
l
Regular Expression. Dynamic value correlation is defined by a regular expression. A regular expression is a special text string for describing a search pattern.
l
Boundary based. Dynamic value correlation is defined by left and right boundary text strings.
Enables you to select which definition to apply to the dynamic value. You can scroll through the definition of the dynamic value in Occurrences in
Snapshot by clicking Prev or Next buttons.
Correlation Occurrences Tab
Occurrences in
Snapshot
Displays all the occurrences of the dynamic value in the response snapshot.
You can scroll to view each occurrence in the snapshot.
Occurrences in
Script
Displays the occurrences of the dynamic value in your script. You can correlate all the values or select individual values to correlate by selecting the check box adjacent to the occurrence.
Options
Opens the Recording Options dialog box.
For details, see:
"Correlations > Configuration" on page 291
"Correlations > Rules " on page 293
Async Studio
Synchronous and Asynchronous Concepts
This topic applies to Web (HTTP/HTML) protocol actions inside Web (HTTP/HTML), Flex,
Silverlight, and Web Services Vuser scripts.
Original web applications functioned with what is known as a synchronous nature. A typical synchronous conversation includes the following steps:
1. The user interacts with an application that is presented in a web browser.
2. Based on the user input, the browser submits a request to the web server.
Page 193 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
3. The server sends a response to the request, and the application in the browser is updated.
Synchronous applications have a number of limitations. One limitation involves the updating of the data that is displayed in the application inside the browser. For example, consider an application that displays stock prices of a number of shares. Ideally, the application should be able to update the display of the stock prices as soon as the prices are updated on the web-server. A synchronous application would be able to update the prices on a fixed time interval. For example, every 10 seconds, the browser could sent a request to the server for the most up-to-date stock prices. One limitation of this solution is that the displayed stock prices may be out-of-date for a period of time before the refresh interval is reached. Although this may not be critical in our share portfolio scenario, the scenario illustrates the limitation of a synchronous application to timeously update information.
Where necessary, synchronous applications are being replaced with what are known as
asynchronous applications. Asynchronous applications enable a client to be notified whenever an event occurs on the server side. Asynchronous applications are therefore better able to update information as required.
In order to enable asynchronous behavior, asynchronous communication occurs in parallel
(simultaneously) with the main, synchronous flow of the business processes. This fact makes asynchronous applications harder to accurately emulate using traditional synchronous Vuser scripts.
Although there are numerous types of asynchronous applications, there are three primary types:
push, poll, and long-poll. For details, see
"Types of Asynchronous Communication" below .
For an introduction to using asynchronous communication in Vuser scripts, see
"An Introduction to
LoadRunner Support for Asynchronous Communication" on page 197
.
Types of Asynchronous Communication
This topic applies to Web (HTTP/HTML) protocol actions inside Web (HTTP/HTML), Flex,
Silverlight, and Web Services Vuser scripts.
Asynchronous request and response sequences
Asynchronous communication is comprised of various request and response sequences. Such request and response sequences can be classified as one of three types of asynchronous communication: poll, push, and long-poll. When you develop a Vuser script, it is often useful to know the types of asynchronous communication that are implemented when the required business processes are performed.
Polling Asynchronous Communication
The browser sends HTTP requests to the server at regular intervals, for example, every 5 seconds.
The server responds with updates. This enables the system to intermittently update the application interface inside the browser. If the server has no update, it informs the application that there is no update, based on the application protocol.
Page 194 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Long-Polling Asynchronous Communication
The client generates an HTTP request to a known address on the server. Whenever the server has an update, it responds with an HTTP response. Immediately after receiving the server response, the client issues another request.
Page 195 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Push Asynchronous Communication
The client opens a connection with the server by sending a single HTTP request to a known address on the server. The server then sends a response that appears to never end, so that the client never closes the connection. Whenever necessary, the server sends a “sub message” update to the client over the open connection. The server may or may not terminate this connection. During the time the connection is open, if the server has no real update to send, it sends "ping" messages to the client to prevent the client from closing the connection for timeout reasons.
Page 196 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
An Introduction to LoadRunner Support for Asynchronous
Communication
This topic applies to Web (HTTP/HTML) protocol actions inside Web (HTTP/HTML), Flex,
Silverlight, and Web Services Vuser scripts.
Web-based applications can exhibit synchronous behavior, asynchronous behavior, or a combination of both. For an introduction to these behavior types, see
"Synchronous and
Asynchronous Concepts" on page 193
. LoadRunner enables you to build and run Vuser scripts that emulate user activity for both synchronous and asynchronous applications. To build a Vuser script for a synchronous application, follow the typical LoadRunner Vuser script building process.
However, to build a script for an asynchronous application, you must perform some additional tasks
- beyond the typical LoadRunner Vuser script building process. If you record and generate a script for an application that performs asynchronous behavior - without performing the additional asynchronous-related tasks, the script may not run successfully.
Building a Vuser script for an asynchronous application begins with recording the business processes that produce the asynchronous communication. After the business processes are recorded and the Vuser script is generated, VuGen scans the generated Vuser script and attempts to locate the asynchronous communication. If asynchronous communication is detected, VuGen modifies the script - inserting the appropriate asynchronous API functions.
Page 197 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Identifying asynchronous conversations
In order for VuGen to be able to successfully identify the asynchronous behavior in a Vuser script, the asynchronous communication must contain at least the required minimum number of request and response sequences.
l
Identifying a poll-type conversation
To enable VuGen to successfully identify a poll conversation, the recorded Vuser script must contain at least 3 sequences with matching URLs and similar polling intervals.
l
Identifying a long-poll type conversation
To enable VuGen to successfully identify a long-poll conversation, the recorded Vuser script must contain at least 3 sequences with matching URLs.
Note that VuGen will scan a script for asynchronous communication only if the Asyn Scan recording option is selected. For details, see
"How to Create an Asynchronous Vuser Script" below .
In some scenarios, the modifications that VuGen makes to the Vuser script are sufficient to enable the script to run and emulate the required asynchronous behavior. In other scenarios, additional
"manual" modifications are required. For details, see
"How VuGen Modifies a Vuser Script for
Asynchronous Communication" on page 202 .
Note that the modifications that must be made to a generated Vuser script to enable the script to emulate asynchronous behavior are dependent on the type of the asynchronous behavior:
push, polling, or long-polling. For details, see
"Types of Asynchronous Communication" on page 194 .
Asynchronous communication in a Vuser script is divided into one or more conversations. The individual asynchronous conversations that VuGen detects in a Vuser script are listed in the Async tab of the Design Studio. Use this list of asynchronous conversations to systematically analyze the modifications that VuGen made to the Vuser script to make sure that VuGen has correctly identified the asynchronous behavior, and correctly modified the Vuser script to emulate the required asynchronous behavior. For details on the Async tab of the Design Studio, see
"Async
Tab [Design Studio]" on page 215 .
After modifying a Vuser script to enable it to emulate asynchronous communication, it may be necessary to perform correlation activities on the modified script. For details about correlation, see
"Correlating Asynchronous Vuser Scripts" on page 207
.
For details on how to build a Vuser script for an application that utilizes asynchronous communication, see
"How to Create an Asynchronous Vuser Script" below
.
How to Create an Asynchronous Vuser Script
This topic applies to Web (HTTP/HTML) protocol actions inside Web (HTTP/HTML), Flex,
Silverlight, and Web Services Vuser scripts.
To build a Vuser script for an asynchronous application, perform the following steps:
Page 198 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Create a new Vuser script
1. Click the New Script button on the VuGen toolbar.
2. Select Web - HTTP/HTML and click Create. VuGen creates a basic Vuser script.
Enable Async Scan
1. Select Record > Recording Options.
2. Under General, select Code Generation.
3. Make sure that the Async Scan check box is selected. This instructs VuGen to scan the
Vuser script after recording, locate asynchronous communication, and insert the appropriate asynchronous functionality.
Record the business processes using the typical VuGen recording process
1. Click Record on the VuGen toolbar.
2. Enter the required information in the Start Recording dialog box, and then click Start
Recording.
3. Perform the business processes that the Vuser will emulate, and then click Stop Recording on the floating toolbar.
Note that in order for VuGen to be able to successfully identify the asynchronous behavior in a
Vuser script, the asynchronous communication must contain at least the required minimum number of client requests and server responses. For details, see
"Types of Asynchronous
Communication" on page 194
.
Generate, scan, and modify the Vuser script
1. After you click Stop Recording, VuGen generates the Vuser script.
2. After generating the script, VuGen scans the generated script to locate instances of asynchronous communication.
3. If VuGen locates any instances of asynchronous communication, VuGen will modify the script to enable the script to run and emulate the asynchronous behavior. For details, see
"How
VuGen Modifies a Vuser Script for Asynchronous Communication" on page 202 .
4. The Design Studio opens. Click the Async tab. The Async tab displays a list of all instances of asynchronous communication that VuGen located in the Vuser script.
Review the modifications that VuGen made to the script
For each asynchronous conversation that appears in the Async tab of the Design Studio, perform the following tasks:
1. Open the Vuser script in the Editor.
2. Locate the web_reg_async_attributes step that starts the asynchronous conversation.
Ensure that the web_reg_async_attributes step is located at the start of the asynchronous conversation.
3. Make sure that the URL parameter in the web_reg_async_attributes step is the same as one
Page 199 of 1812 HP LoadRunner (11.50)
User Guide
VuGen of the URLs that are specified in the action step that follows the web_reg_async_attributes step.
For details on the web_reg_async_attributes step, see
"Defining the Start of an
Asynchronous Conversation" on page 204
.
4. Notice that the step comment before the web_reg_async_attributes step contains a TODO token. The TODO token indicates that you should check the relevant callback implementations in the AsyncCallbacks.c extra file.
5. Locate the web_stop_async step that ends the asynchronous conversation. Ensure that the
web_stop_async step is located at the end of the asynchronous conversation.
6. Make sure that the web_stop_async step runs as required. For details, see
"Fine-Tuning the
End of an Asynchronous Conversation" on page 207
.
For details on the web_stop_async step, see
"Defining the End of an Asynchronous
Conversation" on page 205 .
7. Review the callback implementation and make modifications to the script as required. For details, see
"Implementing Callbacks" on page 208 .
8. Make sure that all counter and complex string parameters are set correctly. Notice that for each such parameter, a TODO comment exists and has a matching task in the Tasks pane.
For details, see
"Parsing URLs " on page 212
.
9. Check the Tasks pane for specific actions that are required in order to complete the script development process. Such actions may include verifying callback implementations, or verifying the implementation of specific parameters.
10. Once all parameters are initialized correctly, run the script to make sure that the asynchronous conversation runs as expected.
Once you have reviewed the modified script and made sure that the asynchronous communication has been implemented correctly, run the script. For details, see
"Enabling Asynchronous Scripts to
Run" on page 214 .
Asynchronous Communication API
This topic applies to Web (HTTP/HTML) protocol actions inside Web (HTTP/HTML), Flex,
Silverlight, and Web Services Vuser scripts.
The LoadRunner API includes several functions that enable Vuser scripts to emulate asynchronous communication. These asynchronous communication functions are:
web_reg_async_attributes
This function registers the next action function as the beginning of an asynchronous conversation, and defines the behavior of the asynchronous communication.
web_stop_async
This function cancels the specified asynchronous conversation, including all its active and future tasks.
Page 200 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
web_sync
This function suspends the Vuser script execution until the specified parameter is defined.
web_util_set_request_url
This function sets the specified string to be the request URL for the next request sent in the conversation. This is applicable only when called from a callback.
web_util_set_request_body
This function sets the specified string to be the request body for the next request sent in the conversation. This is applicable only when called from a callback.
For details on the asynchronous API functions, see the Function Reference (Help > Function
Reference).
The web_reg_async_attributes function should be called before the step that starts the asynchronous conversation. The web_reg_async_attributes function receives a number of arguments that define the asynchronous conversation. One of these arguments is the URL of the asynchronous conversation. As soon as the replay engine downloads this URL in the step that follows the web_reg_async_attributes function, the asynchronous conversation begins. The callbacks that are registered in the web_reg_async_attributes function enable the script developer to control some of the characteristics of the asynchronous conversation (for example, to change the
URL). The asynchronous conversation continues until the web_stop_async step, or until the end of the iteration. In a push-type conversation, the server may close the connection and thereby end the conversation.
For details on how the asynchronous functions differ from synchronous functions, see
"How
Asynchronous Functions Differ from Synchronous Functions" below .
How Asynchronous Functions Differ from Synchronous Functions
This topic applies to Web (HTTP/HTML) protocol actions inside Web (HTTP/HTML), Flex,
Silverlight, and Web Services Vuser scripts.
The LoadRunner API includes several functions that enable Vuser scripts to emulate asynchronous communication. These asynchronous functions differ from the other API functions in the following ways:
1. The network traffic that the asynchronous functions generate runs in parallel – simultaneously
– with the main flow in the Vuser script. This means that the asynchronous communication can continue even when the synchronous steps end.
2. The asynchronous communication continues even during execution of non-web functions (e.g.
lr_think_time).
3. Some of the asynchronous communication API functions use callback functions. The user needs to specify callbacks that are scheduled by the replay engine when a predefined event occurs. For details on using callbacks with asynchronous functions, see
"Implementing
Callbacks" on page 208
.
Page 201 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
How VuGen Modifies a Vuser Script for Asynchronous
Communication
This topic applies to Web (HTTP/HTML) protocol actions inside Web (HTTP/HTML), Flex,
Silverlight, and Web Services Vuser scripts.
After you create a Vuser script and record the required business processes, VuGen generates the
Vuser script. VuGen then scans the generated script to locate instances of asynchronous communication. This process is called an Async scan. If VuGen locates any instances of asynchronous communication in the Vuser script, VuGen modifies the script to enable the script to run and emulate the required asynchronous behavior.
Note: VuGen will scan a script for asynchronous communication only if the Asyn Scan recording option is selected. For details, see
"How to Create an Asynchronous Vuser Script" on page 198 .
Asynchronous communication in a Vuser script is divided into one or more conversations. The individual asynchronous conversations that VuGen detects in a Vuser script are listed in the Async tab of the Design Studio. Use this list of asynchronous conversations to systematically analyze the modifications that VuGen made to the Vuser script during the Async scan. Make sure that
VuGen has correctly identified the asynchronous behavior in the Vuser script, and correctly modified the Vuser script to emulate the required asynchronous behavior. For details on the Async tab of the Design Studio, see
"Async Tab [Design Studio]" on page 215 .
Note: After modifying a Vuser script to enable it to emulate asynchronous communication, it may be necessary to perform correlation activities on the modified script. For details about correlation, see
"Correlating Asynchronous Vuser Scripts" on page 207 .
How does VuGen modify a Vuser script?
Asynchronous behavior in a Vuser script is divided into one or more asynchronous conversations.
For each asynchronous conversation, VuGen performs the following tasks:
1. VuGen inserts a web_reg_async_attributes step before the start of the asynchronous conversation. The web_reg_async_attributes step includes an ID for the asynchronous conversation. This ID is used by a subsequent web_stop_async step to indicate the end of the asynchronous conversation. The Pattern argument indicates the type of the asynchronous behavior: push, poll, or long-poll.
Page 202 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
For details on how a web_reg_async_attributes step is used at the start of an asynchronous conversation, see
"Defining the Start of an Asynchronous Conversation" on next page
.
For details on the web_reg_async_attributes function, see the Function Reference (Help >
Function Reference).
For details on the types of asynchronous behavior that are supported by LoadRunner, see
"Types of Asynchronous Communication" on page 194
.
2. VuGen adds a comment before the inserted web_reg_async_attributes step. The comment includes details about the asynchronous conversation, including: a. The ID of the asynchronous conversation.
b. The URLs that are included in the conversation.
c. Suggested implementations for the callback functions that are declared in the web_reg_
async_attributes step. These implementations are added in AsyncCallbacks.c, one of the script’s extra files.
3. For push conversations, VuGen inserts asynchronous API functions into the Vuser script, but does not remove any of the recorded code from the Vuser script. For polling and long-polling conversations, VuGen may remove steps or step parameters from the generated Vuser script.
VuGen removes steps or step parameters in cases where the relevant URLs will be requested by running the inserted asynchronous functions - and not by running the original steps that have been removed.
Note: Removed steps are not deleted – they are commented out. You can "uncomment" these steps if required.
4. When relevant, VuGen adds a web_stop_async step at the end of the asynchronous conversation. The web_stop_async step marks the end of the asynchronous conversation.
For details on the web_stop_async step, see the Function Reference (Help > Function
Reference).
5. The recording snapshots are updated by grouping the tasks in the asynchronous conversation under the step that started the conversation.
Page 203 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Defining the Start of an Asynchronous Conversation
This topic applies to Web (HTTP/HTML) protocol actions inside Web (HTTP/HTML), Flex,
Silverlight, and Web Services Vuser scripts.
After VuGen scans a Vuser script for asynchronous communication, the Async tab of the Design
Studio lists the asynchronous conversations that were found in the script. VuGen inserts a web_
reg_async_attributes into the Vuser script at the start of each asynchronous conversation that was detected. Use VuGen's Step Navigator to find the associated web_reg_async_attributes steps in the Vuser script. The web_reg_async_attributes steps should be located where the asynchronous conversations start when the script runs.
A web_reg_async_attributes step that is added to a Vuser script includes the following parameters: l
ID l
URL l
Pattern l
PollIntervalMS (for poll-type conversations only) l
RequestCB l
ResponseBodyBufferCB l
ResponseCB
The URL parameter in the web_reg_async_attributes step should be the same as one of the URLs that are specified in the step that follows the web_reg_async_attributes step. For details on the
web_reg_async_attributes step, see the Function Reference (Help > Function Reference).
Inserting a Comment
When VuGen inserts a web_reg_async_attributes step into a script, VuGen inserts an associated comment before the web_reg_async_attributes step. The inserted comment contains information about the associated asynchronous conversation, such as the conversation ID, the communication pattern (push, poll, or long-poll), a list of URLs that are part of the asynchronous communication, and list of callbacks implemented in the AsyncCallbacks.c extra file.
Notice that the step comment contains a TODO token. The TODO token indicates that you should check the relevant callback implementations in the AsyncCallbacks.c extra file.
For details on how an asynchronous conversation is terminated, see
"Defining the End of an
Asynchronous Conversation" on next page .
Example - web_reg_async_attributes
The sample code below shows a web_reg_async_attributes step that was added by VuGen.
Notice that the web_reg_async_attributes step was added before a web_url step, and that the
URL parameter in the web_reg_async_attributes step is the same as the URL parameter in the
web_url step.
Page 204 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Defining the End of an Asynchronous Conversation
This topic applies to Web (HTTP/HTML) protocol actions inside Web (HTTP/HTML), Flex,
Silverlight, and Web Services Vuser scripts.
After VuGen scans a Vuser script for asynchronous communication, the Async tab of the Design
Studio lists the asynchronous conversations that were found in the script. A web_stop_async step is inserted into the Vuser script at the end of each asynchronous conversation that was detected.
Use VuGen's Step Navigator to find the associated web_stop_async steps in the Vuser script.
Note: In some cases VuGen will not add a web_stop_async step at the end of an asynchronous conversation. This may occur when VuGen is not able to determine where the asynchronous conversation ends. This can occur when the asynchronous conversation was added due to a specific Async rule or when the asynchronous conversation was not ended during the recording. For details on Async rules, see
"Async Rules" on page 214
.
After VuGen has inserted a web_stop_async step into a Vuser script, make sure the web_stop_
async step was added in the correct location in the script, that is – where the asynchronous conversation should end when the Vuser script runs.
In order to make sure the asynchronous conversation ends correctly when the script runs, it may be necessary to modify the details of the web_stop_async step in the Vuser script. For details, see
"Fine-Tuning the End of an Asynchronous Conversation" on page 207
.
Page 205 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
For details on how an asynchronous conversation is started, see
"Defining the Start of an
Asynchronous Conversation" on page 204
.
Example - web_stop_async:
In the code sample below, VuGen added a web_stop_async step at the end of a poll conversation.
In this example, the original polling steps are commented out, and the lr_think_time steps that separated them have been merged into one lr_think_time step in order to emulate the duration of the entire poll conversation.
Using Asynchronous Request Thresholds
This topic applies to Web (HTTP/HTML) protocol actions inside Web (HTTP/HTML), Flex,
Silverlight, and Web Services Vuser scripts.
You can fine-tune some of VuGen's behavior when VuGen scans a Vuser script to locate asynchronous communication. You use VuGen's asynchronous request thresholds to fine-tune
VuGen's behavior. Each of the thresholds is associated with only one of the types of asynchronous conversations: push, poll, or long-poll.
l
Asynchronous request thresholds for push conversations
Minimum Response Size. Specify the minimum response content length (in bytes) for defining
push asynchronous conversations. If the server sent less than the specified value, VuGen will not classify the conversation as a push-type asynchronous conversation.
Maximum Sub Message Size. Specify the maximum sub message size (in bytes) sent by the server for defining push asynchronous conversations. If the server sent a sub message of size greater than the specified value, VuGen will not classify the conversation as a push-type asynchronous conversation.
Page 206 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Minimum Number of Sub Messages. Specify the minimum number of sub messages for defining push asynchronous conversations. A push conversation in which less than the specified number of sub messages was sent by the server will not be classified by VuGen as a push-type asynchronous conversation.
l
Asynchronous request thresholds for poll conversations
Interval Tolerance. Specify the interval tolerance (in milliseconds) for classifying poll asynchronous conversations. A conversation in which intervals differ from each other by more than the specified value will not be classified by VuGen as a poll-type asynchronous conversation.
l
Asynchronous request thresholds for long-poll conversations
Maximum Interval. Specify the maximum interval (in milliseconds) between the end of one response and the start of a new request for classifying long-poll asynchronous conversations. A conversation in which a request starts more than the specified value after the end of the previous response will not be classified by VuGen as a long-poll type asynchronous conversation.
For details on the available asynchronous request thresholds, see
"Asynchronous Request
Thresholds Dialog Box" on page 216 .
Fine-Tuning the End of an Asynchronous Conversation
This topic applies to Web (HTTP/HTML) protocol actions inside Web (HTTP/HTML), Flex,
Silverlight, and Web Services Vuser scripts.
After VuGen scans a Vuser script for asynchronous communication, the Async tab of the Design
Studio lists the asynchronous conversations that were found in the script. A web_stop_async step is inserted into the Vuser script at the end of each asynchronous conversation that was detected. In order to make sure that each asynchronous conversation ends correctly when the script runs, it may be necessary to perform one or more of the following tasks: l
Remove the web_stop_async step so that the asynchronous conversation will be terminated at the end of the iteration.
l
Move the web_stop_async step to a location that is after an existing action step or an existing
lr_think_time step, so the asynchronous conversation will end after that step is performed.
l
Add an lr_think_time step before the web_stop_async step, or change the time parameter in an existing lr_think_time step. Make sure that think-time is enabled in the Run-Time Settings.
For details, see
"General > Think Time Node" on page 370 .
l
Add a web_sync step to stop the asynchronous conversation after a specified parameter receives a value. Use the asynchronous conversation callbacks to make sure the parameter receives a value only when you want to end the conversation.
Correlating Asynchronous Vuser Scripts
This topic applies to Web (HTTP/HTML) protocol actions inside Web (HTTP/HTML), Flex,
Silverlight, and Web Services Vuser scripts.
Page 207 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
After modifying a Vuser script to enable it to emulate asynchronous communication, it may be necessary to perform correlation activities on the modified script. Due to asynchronous nature, dynamic values from asynchronous communication cannot be handled by Correlation Studio, and must be correlated manually.
You can search for dynamic values inside Response callbacks functions using the lr_save_
param_regexp function. This function can be called from a callback to extract the necessary value from server response (ResponseCB) or response buffer (ResponseBodyBufferCB), and assign this value to a parameter. This parameter can then be used for correlations.
For details about the lr_save_param_regexp function, see the Function Reference (Help >
Function Reference).
Implementing Callbacks
This topic applies to Web (HTTP/HTML) protocol actions inside Web (HTTP/HTML), Flex,
Silverlight, and Web Services Vuser scripts.
After VuGen scans a Vuser script for asynchronous communication, the Async tab of the Design
Studio lists the asynchronous conversations that were found in the script. For each asynchronous conversation found during the scan, VuGen adds the callback function signatures matching those declared in the web_reg_async_attributes step. The signatures are added to the
AsyncCallbacks.c extra file.
The available callbacks are:
1. RequestCB
This callback is called before a request is sent.
2. ResponseBodyBufferCB
This callback is called when there is content in the response body buffer and at the end of the response body.
3. ResponseCB
This callback is called once at the end of a conversation l
The names of the callback functions start with the conversation ID of the asynchronous conversation. For example, the RequestCB callback for an asynchronous conversation with ID
“LongPoll_0” will be LongPoll_0_RequestCB.
l
The names of the callback functions are declared in the web_reg_async_attributes step in the script.
Example 1:
In the following sample code, the three callback functions are declared in the web_reg_async_
attributes step.
Page 208 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Example 2:
In the following sample code, the three callbacks are implemented in the AsyncCallbacks.c extra file.
Page 209 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
You can modify the callbacks to implement the required behavior. For details, see
"Modifying
Callbacks" below .
Modifying Callbacks
This topic applies to Web (HTTP/HTML) protocol actions inside Web (HTTP/HTML), Flex,
Silverlight, and Web Services Vuser scripts.
After VuGen scans a Vuser script for asynchronous communication, the Async tab of the Design
Studio lists the asynchronous conversations that were found in the script. For each asynchronous conversation found during the scan, VuGen adds the required callback function declarations in the
AsyncCallbacks.c extra file. To implement the required behavior, you can modify the callbacks that were added by VuGen. Modifying a callback includes:
Page 210 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Modifying the request URL in the RequestCB callback
In poll and long-poll conversations, requested URLs often change in each polling iteration. The change is usually determined by client-side logic, usually implemented by JavaScript that is executed by the browser. Parts of the URL may be determined by correlation of a known parameter, such as a session ID. For details, see
"Parsing URLs " on next page .
Request URLs in an asynchronous conversation will be modified before the request is sent by using the RequestCB and the web_util_set_request_url function.
Modifying the request body in the RequestCB callback
The request body in requests that are part of an asynchronous conversation may need to be modified before the request is sent. You use the RequestCB and the web_util_set_request_body util function to modify the request body.
Modifying the request body is useful in poll and long-poll conversations in which each new request requires a different request body.
Each RequestCB that is generated by VuGen contains a commented snippet. You can
"uncomment" the snippet in order to use the web_util_set_request_body util function.
If VuGen finds that different requests have different body values in the recorded conversation, the generated RequestCB will contain a comment that prompts you to check the recording in order to implement the request body sent in each request when the script runs.
For details on using callback functions, see
"Implementing Callbacks" on page 208 .
Page 211 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Parsing URLs
This topic applies to Web (HTTP/HTML) protocol actions inside Web (HTTP/HTML), Flex,
Silverlight, and Web Services Vuser scripts.
URLs that are included in asynchronous conversations often include query strings that are derived in a variety of ways. These strings may include: l
Time-stamps l
Counters l
Complex strings
To enable a Vuser script to successfully perform asynchronous communication, VuGen must be able to recreate the required URLs.
l
When the URL includes a time-stamp, VuGen is usually able to successfully create the required
URL.
l
When the URL includes a counter, VuGen is usually able to recreate the counter, but it may be necessary to manually initialize the counter in the script.
l
When the URL includes more complex strings, the algorithms for generating the URLs must be manually added to the code in the Vuser script.
Example:
The sample code below shows a set of URLs that are part of a long-poll conversation. The URLs are included in the comment generated for a web_reg_async_attributes step:
If none of the parameters shown in the code sample above was found in VuGen's scan of the recorded Vuser script, the RequestCB implementation will contain a snippet that may be uncommented in order to set the URL for each response according to user defined code. For details, see
"Modifying Callbacks" on page 210 .
If any or all of the parameters shown in the sample code above are found during VuGen's scan of the recorded Vuser script, the RequestCB implementation will contain the following:
Page 212 of 1812 HP LoadRunner (11.50)
User Guide
VuGen l
A comment prompting the user to call web_util_set_request_url. The comment will contain a parameterized version of the URL.
l
For each time-stamp parameter found in the URL, a snippet for saving the time-stamp to a parameter.
l
For each counter parameter found in the URL, a snippet for incrementing a counter parameter. A matching step for initializing the counter parameter will also be added to the Action file. The snippet will also contain examples of the URL token containing the counter parameter, as seen during the recording.
l
For each complex string parameter found in the URL, a snippet for saving the string to a parameter. It is up to the user to generate the correct string to be saved to the parameter to be used in the URL. The snippet will also contain examples of the URL token that is considered an unknown parameter, as seen during the recording.
l
A snippet for passing the parameterized version of the URL to the web_util_set_request_url function.
Example: A snippet containing the parameterized version of a URL.
Example: A snippet prompting the user to set the value of an unknown parameter.
Example: A snippet for incrementing a counter parameter.
Example: A snippet for initializing a counter parameter.
Example: A snippet for saving a timestamp parameter.
Page 213 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Example: A snippet for passing the parameterized version of a URL to the web_util_set_request_
url function.
Async Rules
This topic applies to Web (HTTP/HTML) protocol actions inside Web (HTTP/HTML), Flex,
Silverlight, and Web Services Vuser scripts.
In some cases, when VuGen performs an Async scan, VuGen may fail to identify asynchronous conversations that are included in the Vuser script. In other cases, VuGen may erroneously classify regular synchronous steps as part of an asynchronous conversation. To help rectify both of these scenarios, you can use LoadRunner's Async rules file to define rules that determine how specified
URLs and regular expressions will be classified during an Async scan.
For details about using the Async rules functionality, contact HP Software Support.
Enabling Asynchronous Scripts to Run
This topic applies to Web (HTTP/HTML) protocol actions inside Web (HTTP/HTML), Flex,
Silverlight, and Web Services Vuser scripts.
After recording a Vuser script, VuGen scans the script to locate instances of asynchronous communication. If VuGen detects any asynchronous communication, VuGen attempts to modify the script to enable the script to exhibit the required asynchronous behavior when the script runs. To achieve this goal, additional manual modifications may be required. Once you have reviewed the modified Vuser script, run the script to make sure that each of the asynchronous conversations has been implemented correctly.
For every asynchronous conversation in the Vuser script, perform the following tasks:
1. Verify that the asynchronous conversation starts correctly. Expect to find replay log messages similar to the following examples: a. Action.c(154): web_reg_async_attributes started [MsgId: MMSG-26355] b. Action.c(162): web_url("PUSH_EXAMPLE") started [MsgId: MMSG-26355]
Page 214 of 1812 HP LoadRunner (11.50)
User Guide
VuGen c. Action.c(162): "ID=push_0" && "Pattern=Push" && "XMLHttpRequest=No" &&
"CrossStep=Yes" now applied to URL="http://push.example.com/" (RelFrameId=1,
Internal ID=31) [MsgId: MMSG-35172] d. Action.c(162): Retaining cross-step download of URL="http://push.example.com/"
(RelFrameId=1, Internal ID=31) [MsgId: MMSG-27658]
2. Verify that the asynchronous conversation ends correctly. Expect to find replay log messages similar to the following examples: a. Action.c(186): web_stop_async started [MsgId: MMSG-26355] b. Action.c(186): Notify: Deleting Conversation Information with ID="push_0" c. Action.c(186): Aborting download of URL="http://push.example.com/" (RelFrameId=1,
Internal ID=31) of conversation with ID="push_0" [MsgId: MMSG-35167] d. Action.c(186): web_stop_async was successful [MsgId: MMSG-26392]
3. For poll and long-poll conversations, expect to find replay log messages similar to the following examples: a. Action.c(151): Issuing a "POLL" request for conversation with ID="poll_0" and
"PollIntervalMs=1000". Scheduling due at t=6873, URL="http://poll.example.com/"
[MsgId: MMSG-35169] b. Action.c(151): "ID=poll_0" && "Pattern=Poll" && "PollIntervalMs=1000" &&
"XMLHttpRequest=Async" && "CrossStep=Yes" now applied to
URL="http://poll.example.com/" (RelFrameId=, Internal ID=10) [MsgId: MMSG-35172]
Async Tab [Design Studio]
The Async tab of the Design Studio lists all the occurrences of asynchronous communication that
VuGen detected in the Vuser script.
To access
l
Select Design > Design Studio, and then click the Async tab.
l
Click the Studio button on the VuGen toolbar, and then click the Async tab.
Important information
l
The Studio button is enabled only when you have a recorded script in the
Solution Explorer.
l
The Async tab enables you to only view the asynchronous communication that is included in the Vuser script - you cannot edit any of the asynchronous details from the Async tab. Changes to the asynchronous details must be made in the
Vuser script.
Relevant tasks
"How to Create an Asynchronous Vuser Script" on page 198
User interface elements are described below:
Page 215 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
UI Element Description
Type
Indicates the origin of the asynchronous code in the Vuser script:
Record. The asynchronous code was added by VuGen during an Async scan that was performed after recording or regenerating the Vuser script.
Rule. The asynchronous code was added by VuGen due to a specific rule in the
Async rules file.
Manual. The asynchronous code was manually added by a user.
Action
The section of the Vuser script in which the asynchronous behavior is located.
Occurrences
l
For push-type conversations, Occurrences is always 1.
l
For poll and long-poll conversations, Occurrences indicates the number of steps or extra resource attributes that were removed [commented-out] by
VuGen during the Async scan of the Vuser script.
Status
Always has the value Applied.
Async Type
The type of the asynchronous behavior that was detected: Push, Poll, or Long-
Poll.
URL
The URL in the web_reg_async_attributes step that starts the asynchronous conversation.
Select which asynchronous conversations to display in the conversation list.
Filter
Details
Expands the dialog box to show details about the selected asynchronous conversation.
Name
Line
Action
Name
Always has the value web_reg_async_attributes.
The line in the Vuser script that contains the web_reg_async_attributes step.
The section of the Vuser script in which the asynchronous behavior is located.
Description
The comment in the Vuser script that precedes the web_reg_async_attributes step.
Occurrences in Snapshot
l
For push-type conversations, displays the response body.
l
For poll and long-poll conversations, displays HTTP attributes associated with the asynchronous conversation.
Options
Opens the Asynchronous Request Thresholds dialog box.
Asynchronous Request Thresholds Dialog Box
This dialog box enables you to fine-tune some of VuGen's behavior when VuGen scans a Vuser script to locate asynchronous communication.
Page 216 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
To access
Record > Recording Options > General > Code Generation and then click
Async Options
User interface elements are described below:
UI
Element
Description
Minimum
Response
Size
Specify the minimum size (in bytes) of a server response for defining push asynchronous conversations. If the server sent less than the specified value,
VuGen will not classify the conversation as a push-type asynchronous conversation.
Maximum
Sub
Message
Size
Specify the maximum sub message size (in bytes) sent by the server for defining
push asynchronous conversations. If the server sent a sub message of size greater than the specified value, VuGen will not classify the conversation as a push-type asynchronous conversation.
Minimum
Number of Sub
Messages
Specify the minimum number of valid sub messages for defining push asynchronous conversations. A push conversation in which less than the specified number of valid sub messages was sent by the server will not be classified by
VuGen as a push-type asynchronous conversation.
Interval
Tolerance
Specify the interval tolerance (in milliseconds) for classifying poll asynchronous conversations. A conversation in which intervals differ from each other by more than the specified value will not be classified by VuGen as a poll-type asynchronous conversation.
Maximum
Interval
Specify the maximum interval (in milliseconds) between the end of one response and the start of a new request for classifying long poll asynchronous conversations.
A conversation in which a request starts more than the specified value after the end of the previous response will not be classified by VuGen as a long-poll type asynchronous conversation.
Asynchronous Example - Poll
The following example describes a Vuser script that includes a poll asynchronous conversation.
The application that is emulated by the Vuser is a demo of a “wiki” page. The browser displays the wiki page, and sends requests to refresh the page at intervals of 5 seconds.
Page 217 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Note: You can modify VuGen's asynchronous request thresholds to assist VuGen in finding poll-type conversations. For details, see
"Using Asynchronous Request Thresholds" on page
206 .
The above script was generated by VuGen after the required business processes were recorded.
An asynchronous scan was not performed on the script after the script was generated. Notice that the script contains a series of web_url functions with a repeating URL, namely:
http://example.com/content.php?messages. These web_url functions are separated by lr_
think_time functions, indicating that the web_url functions repeat at intervals of 4 seconds.
When the Vuser script runs, requests for http://example.com/content.php?messages should be sent repeatedly until the script is finished. Additionally, these requests should be sent in parallel
(simultaneously) with other actions performed in the Vuser script.
After VuGen performed an asynchronous scan on the script, the script looks as follows:
Page 218 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Notice that a web_reg_async_attributes function has been added to the script before the first
web_url function that calls http://example.com/content.php?messages.
Except for the first call to http://example.com/content.php?messages, all other web_url functions that call the same URL have been commented-out by VuGen.
Notice that the lr_think_time functions have been merged into one lr_think_time function.
The Snapshot pane for the remaining web_url function shows that the snapshots for the removed
web_url functions now have Origin = Polling, and that they start at intervals of 5 seconds.
Since the requests also have a response time, the think time in lr_think_time functions between the polling steps in the original script has been rounded down to 4 seconds.
Asynchronous Example - Push
The following example describes a Vuser script that is developed to emulate a browser displaying an application that utilizes push-type asynchronous conversations. The application is a demo of a
“stock quote” page. The browser shows the page with the stock values, and then sends a request and receives a response with updated stock values. The request remains open until it is closed by the user. For as long as the page is displayed, the server will continue to send sub-messages as
Page 219 of 1812 HP LoadRunner (11.50)
User Guide
VuGen part of the response - whenever the server has an update for the displayed stocks. Whenever such a sub-message is received by the client, the client displays the updated stock values.
Note that you can modify VuGen's asynchronous request thresholds to assist VuGen in finding push-type conversations. For details, see
"Using Asynchronous Request Thresholds" on page
206 .
If you attempt to run a script that calls a push url - without first performing an asynchronous scan the replay will halt while waiting for the response to the highlighted request. After two minutes,
VuGen will display an error similar to the following, in the Replay log:
Action.c(140): Error -27782: Timeout (120 seconds) exceeded while waiting to receive data for URL "http://push.example.com" [MsgId:
MERR-27782]
The error indicates that the response never finished.
Regenerating the script with Async Scan enabled will create a script similar to the following:
Page 220 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Notice that a web_reg_async_attributes function has been added before the web_url function that starts the push conversation, and that a web_stop_async function has been added after the last action step in the script. The script will now run successfully. The push conversation will remain active – running in parallel with the other script functions – until the web_stop_async function, or until the end of the script is reached.
Note that during the Async scan, VuGen did not remove (comment-out) any of the generated code in the Vuser script.
Asynchronous Example - Long-Poll
The following example describes a Vuser script that emulates an application that implements a
long-poll asynchronous conversation. The application is a demo of a “chat” page. A browser shows the chat page, and sends a request that remains open until a new message is sent to the chat by another user. After such a message is sent: l
The response is finished.
l
The new message is shown in the browser.
Page 221 of 1812 HP LoadRunner (11.50)
User Guide
VuGen l
The browser sends another request in order to listen for the next message sent to the chat.
Note: You can modify VuGen's asynchronous request thresholds to assist VuGen in finding long-poll type conversations. For details, see
"Using Asynchronous Request Thresholds" on page 206 .
The following is the Vuser script that VuGen generated after recording the application - before an asynchronous scan was performed. The script contains a series of web_url functions with similar
URLs. Since new requests are sent as soon as the previous response is finished, no lr_think_time functions are added between the web_url functions. This help to indicate that this is a long-poll conversation and not a poll conversation.
When the Vuser script runs, requests to the chat application should be sent repeatedly every time a response from the chat application is finished. In addition, requests should be sent in parallel
(simultaneously) with other actions performed in the script.
After VuGen performs an asynchronous scan on the script, the modified script looks as follows:
Page 222 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Notice that a web_reg_async_attributes function has been added before the first web_url function that calls the chat application.
Except for the first call the chat application, all other web_url functions that call similar URLs have been commented out.
A close look at the Snapshot pane for the remaining web_url function shows that the snapshots for the removed steps now have origin = Polling. Notice that the response times vary greatly as the responses arrive only when another user has sent a chat message. This helps to indicate that this is a long-poll conversation, and not a poll conversation.
Preparing Scripts for Load Testing
General Vuser Functions
The general Vuser functions are also called LR functions because each LR function has an lr prefix.
The LR functions can be used in any type of Vuser script. The LR functions enable you to: l
Get run-time information about a Vuser, its Vuser Group, and its host.
Page 223 of 1812 HP LoadRunner (11.50)
User Guide
VuGen l
Add transactions and synchronization points to a Vuser script. For example, the lr_start_
transaction (lr.start_transaction in Java) function marks the beginning of a transaction, and
the lr_end_transaction (lr.end_transaction in Java) function marks the end of a transaction.
See
"Preparing Scripts for Load Testing" on previous page
for more information.
l
Send messages to the output, indicating an error or a warning.
For details see the Function Reference (Help > Function Reference).
Protocol-Specific Vuser Functions
In addition to the general Vuser functions, VuGen also generates and inserts protocol-specific functions into the Vuser script while you record.
The protocol-specific functions are particular to the type of Vuser that you are recording. For example, VuGen inserts LRD functions into a database script, LRT functions into a Tuxedo script, and LRS functions into a Windows Sockets script.
By default, VuGen's automatic script generator creates Vuser scripts in C for most protocols, and in
Java for Java type protocols. You can instruct VuGen to generate code in Visual Basic or
Javascript. For more information, see
"General > Script Node" on page 309
.
All standard conventions apply to the scripts, including control flow and syntax. You can add comments and conditional statements to the script just as you do in other programming languages.
The following segment from a Web Vuser script shows several functions that VuGen recorded and generated in a script:
#include "as_web.h"
Action1()
{
web_add_cookie("nav=140; DOMAIN=dogbert");
web_url("dogbert",
"URL=http://dogbert/",
"RecContentType=text/html",
LAST);
web_image("Library",
"Alt=Library",
LAST);
web_link("1 Book Search:",
"Text=1 Book Search:",
LAST);
lr_start_transaction("Purchase_Order");
...
For more information about using C functions in your Vuser scripts, see the Function Reference
(Help > Function Reference). For more information about modifying a Java script, see
"Java
Protocol - Manually Programming Scripts" on page 532 .
Note: The C Interpreter used for running Vuser scripts written in C, only supports the ANSI C language. It does not support the Microsoft extensions to ANSI C.
Page 224 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Password Encoding
You can encode passwords in order to use the resulting strings as arguments in your script or parameter values. For example, your Web site may include a form in which the user must supply a password. You may want to test how your site responds to different passwords, but you also want to protect the integrity of the passwords. The Password Encoder enables you to encode your passwords and place secure values into the table.
To encode a password, select Start > All Programs > Tools > Password Encoder.
For task details, see
"How to Encode a Password" on next page .
For user interface details, see
"Password Encoder Dialog Box" on page 234 .
Encrypting Text
You can encrypt text within your script to protect your passwords and other confidential text strings.
You can perform encryption both automatically, from the user interface, and manually, through programming. You can restore the string at any time, to determine its original value. When you encrypt a string, it appears in the script as a coded string. Note that VuGen uses 32-bit encryption.
In order for the script to use the encrypted string, it must be decrypted with lr_decrypt.
lr_start_transaction(lr_decrypt("3c29f4486a595750"));
For task details, see
"How to Encrypt/Decrypt Text" on next page .
Transaction Overview
You define transactions to measure the performance of the server. Each transaction measures the time it takes for the server to respond to specified Vuser requests. These requests can be simple tasks such as waiting for a response for a single query, or complex tasks, such as submitting several queries and generating a report.
To measure a transaction, you insert Vuser functions to mark the beginning and the end of a task.
Within a script, you can mark an unlimited number of transactions, each transaction with a different name.
For LoadRunner, the Controller measures the time that it takes to perform each transaction. After the test run, you analyze the server's performance per transaction using the Analysis' graphs and reports.
Before creating a script, you should determine which business processes you want to measure.
You then mark each business process or sub-process as a transaction.
Transaction names cannot contain a "_" or "@" symbol. This will cause errors to occur when attempting to open the Analysis Cross Results graphs.
You can create transactions either during or after recording. For task details, see
"How to Insert
Transactions" on page 227
.
Page 225 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Rendezvous Points
When performing load testing, you need to emulate heavy user load on your system. To accomplish this, you synchronize Vusers to perform a task at exactly the same moment. You configure multiple
Vusers to act simultaneously by creating a rendezvous point. When a Vuser arrives at the rendezvous point, it waits until all Vusers participating in the rendezvous arrive. When the designated number of Vusers arrive, the Vusers are released.
You designate the meeting place by inserting a rendezvous point into your Vuser script. When a
Vuser executes a script and encounters the rendezvous point, script execution is paused and the
Vuser waits for permission from the Controller to continue. After the Vuser is released from the rendezvous, it performs the next task in the script.
For task details, see
"How to Prepare a Script for Load Testing" on page 228
.
Note: Rendezvous points are only effective in Action sections—not init or end.
How to Encrypt/Decrypt Text
This task describes how to encrypt and decrypt strings in your code. For background information, see
"Encrypting Text" on previous page
.
Encrypt a string
1. Select the text you want to encrypt.
2. Select Encrypt string (string) from the right-click menu.
Restore an encrypted string
1. Select the string you want to restore.
2. Select Restoreencrypted string (string) from the right-click menu.
For more information on the lr_decrypt function, see the Function Reference (Help > Function
Reference).
How to Encode a Password
This task describes how to encode a password. You can encode passwords in order to use the resulting strings as arguments in your script or parameter values. For example, your Web site may include a form in which the user must supply a password. You may want to test how your site responds to different passwords, but you also want to protect the integrity of the passwords.
Encode a password
1. From the Windows menu, select Start > All Programs > Tools > Password Encoder. The
Password Encoder dialog box opens.
2. Enter the password in the Password box.
3. Click Generate. The Password Encoder encrypts the password and displays it in the Encoded
Page 226 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
String box.
4. Use the Copy button to copy and paste the encoded value into the Data Table.
How to Create a Controller Scenario from VuGen
Note: The following section only applies to LoadRunner. For information on integrating scripts into Business Process profiles, see the HP Business Service Management documentation.
Normally, you create a scenario from the LoadRunner Controller. You can also create a basic scenario from VuGen using the current script.
To create this type of scenario, select Tools > Create Controller Scenario and complete the dialog box. For user interface details, see
"Create Controller Scenario Dialog Box" on page 233
.
For more information, see the HP Controller User Guide.
How to Insert Transactions
Notes:
l
You can create nested transactions—transactions within transactions. If you nest transactions, close the inner transactions before closing the outer ones—otherwise the transactions won't be analyzed properly. However, transactions must be contained within a single action section.
l
Transaction names must be unique and begin with a letter or number and may contain letters or numbers. Do not use the following characters: . , : # / \ " <.
The following steps describe different methods to insert transactions. For background information, see
"Transaction Overview" on page 225
.
Insert transactions in the Editor l
To mark the start of a transaction after recording, select Design > Insert in Script > Start
Transaction and enter a transaction name.
l
To mark the end of a transaction, select Design > Insert in Script > End Transaction. VuGen inserts an lr_end_transaction statement into the Vuser script.
Insert transactions during recording l
To mark the start of a transaction, click the Start Transaction button on the Recording toolbar while recording a script and enter a transaction name. When you click OK, VuGen inserts an lr_start_transaction statement into the Vuser script.
l
To mark the end of a transaction, click the End Transaction button on the Recording toolbar and select the transaction to close. When you click OK, VuGen inserts an lr_end_transaction statement into the Vuser script.
Page 227 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
How to Display Transactions
The following steps describe how to display different types of transactions when viewing them in the task pane. For background information, see
"Transaction Overview" on page 225 .
Display hidden transactions
To display the hidden transactions—the non-primary and client side transactions—click the button adjacent to Show hidden transactions at the bottom of the transaction list. VuGen lists the hidden transactions in gray. To hide them, click the button again.
Display transactions with errors
Transactions with errors are those that do not measure any server steps, or those with illegal names. To show the transactions with errors, click the Show transactions with errors button.
VuGen lists the transactions with errors in red. To hide them, click the button again.
Display transactions for non-primary steps
To show the transactions for non-primary steps, you need to display all of the thumbnails. Select
View > Show All Thumbnails.
How to Prepare a Script for Load Testing
This task describes the additional things you can do to your script after you have debugged it to prepare it for load testing. All of the items in this task are optional.
Search Steps
You can use the Step Navigator pane to search for specific steps in your script based on a variety of criteria. This can be helpful if you have a script with a lot of steps.
Enter a search string and select the part of the steps you want to search. The steps pane dynamically filters the steps in the display for those that match your search criteria. For user interface details, see
" Step Navigator Pane" on page 122 .
Insert Steps
You can insert a variety of steps into your script such as think time steps, debug messages, and output messages. For task details, see
"How to Insert Steps into a Script" on page 230 .
Edit Steps
You can modify individual step properties by selecting Show Arguments from the following ways : l
Right-clicking the step in the script editor l
Right-clicking the icon within the gutter of the script editor l
Select the step in the Steps Navigator pane
Insert Transactions
You can insert transactions into your script by using the Design > Insert in Script > Start
Transaction and Design > Insert in Script > End Transaction menu items. For task details, see
"How to Insert Transactions" on previous page
.
Page 228 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Insert Rendezvous Points
You can synchronize Vusers to perform a task at exactly the same moment by creating a rendezvous point. When a Vuser arrives at the rendezvous point, it waits until all Vusers participating in the rendezvous arrive. When the designated number of Vusers arrive, the Vusers are released.
You can insert rendezvous points in one of the following ways: l
To insert a rendezvous point while recording, click the Rendezvous button
Recording toolbar and enter a name in the dialog box (not case sensitive).
on the l
To insert a rendezvous point after recording, select Design > Insert in Script > Rendezvous and enter a name for the rendezvous point (not case sensitive).
When a rendezvous point is inserted, VuGen inserts a lr_rendezvous function into the Vuser script. For example, the following function defines a rendezvous point named rendezvous1: lr_rendezvous("rendezvous1");
For concept details, see
"Rendezvous Points" on page 226 .
Insert Comments
VuGen allows you to insert comments between Vuser activities. You can insert a comment to describe an activity or to provide information about a specific operation. For example, if you are recording database actions, you could insert a comment to mark the first query, such as "This is the first query."
You can insert a comment in one of the following ways: l
To insert a comment while recording, click the Insert Comment button toolbar and enter the desired comment in the Insert Comment dialog box.
on the Recording l
To insert a comment after recording, select Design > Insert in Script > Comment and enter the comment.
The following script segment shows how a comment appears in a Vuser script:
/* <comments> */
Insert VuGen Functions
You can insert VuGen functions at this point. For a list of some useful functions see
"Useful VuGen
Functions" on page 231 .
Insert Log Messages
You can use VuGen to generate and insert lr_log_message functions into a Vuser script. For example, if you are recording database actions, you could insert a message to indicate the first query, "This is the first query."
To insert a log message, select Design > Insert in Script > Log Message and enter the message.
Add Files to the Script
You can add files to your script folder to make them available when running the script. If the files are
Page 229 of 1812 HP LoadRunner (11.50)
User Guide
VuGen text-based, you will be able to view and edit them in VuGen's editor.
To add a file to the script, select File > Add Files to Script.
Synchronize the Script (RTE Vusers only)
You can add synchronization functions to synchronize the execution of the Vuser script with the output from your application. Synchronization applies to RTE Vuser scripts only.
The following is a list of the available synchronization functions:
Function
TE_wait_cursor
TE_wait_silent
TE_wait_sync
Description
Waits for the cursor to appear at a specified location in the terminal window.
Waits for the client application to be silent for a specified number of seconds.
Waits for the system to return from X-SYSTEM or Input Inhibited mode.
Waits for a string to appear in a designated location.
Records the time that the system remained in the most recent X-
SYSTEM mode.
TE_wait_text
TE_wait_sync_ transaction
For details about synchronization in RTE Vuser scripts, see
"RTE Synchronization Overview" on page 608 .
Configure the Test Results Window Options
To assist with debugging a Vuser script, you can view a report that summarizes the results of your script run. generates the report during the Vuser script execution and you view the report when script execution is complete.
By default, VuGen generates test results and automatically opens them at the end of a run.
To prevent VuGen from generating the results, chooseTools > Options > Script , select the
Replay tab and clear the Generate report during script execution option.
To indicate whether or not to open the results after running the script, choose Tools > Options >
Script , select the Replay tab, and select a view in the After Replay section.
Replay and Debug your Script
For more information, see
"Replaying and Debugging Vuser Scripts" on page 147
.
How to Insert Steps into a Script
The following steps describe how to add different types of steps into a Vuser script.
Insert Think Time Steps
The time that a user waits between performing successive actions is known as the think time.
Vusers use the lr_think_time function to emulate user think time. When your record a Vuser script,
Page 230 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
VuGen records the actual think times and inserts appropriate lr_think_time statements into the
Vuser script. You can edit the recorded lr_think_time statements, and manually add more lr_
think_time statements to a Vuser script.
To add a think time step, select Design > Insert in Script > New Step >Think Time and specify the desired think time in seconds.
Insert Debug Messages
You can add a debug or error message using VuGen's user interface. For debug messages you can indicate the level of the text message—the message is only issued when your specified level matches the message class. You set the message class using lr_set_debug_message.
To insert a debug message, select Design> Insert in Script > New Step > Debug Message and complete the dialog box. For user interface details, see Debug Message Dialog Box .
Insert Error and Output Messages
For protocols that support the Step Navigator, such as Web, Winsock, and Oracle NCA, you can add an error or output message using the user interface. A common usage of this function is to insert a conditional statement, and issue a message if the error condition is detected.
To insert an error or output message, select Design > Insert in Script > New Step > Error
Message or Output Message, and enter the message. An lr_error_message or lr_output_
message function is inserted at the current point in the script.
Useful VuGen Functions
This section contains useful VuGen functions that you may want to add to your script while debugging or preparing your script for load testing.
Obtaining Vuser Information
You can add the following functions to your Vuser scripts to retrieve Vuser information:
Function lr_get_attrib_ string
Description
Returns a command line parameter string.
lr_get_host_ name
Returns the name of the machine running the Vuser script.
lr_get_master_ host_name
Returns the name of the machine running the Controller. Not applicable when working with the HP Business Service Management.
lr_whoami
Returns the name of a Vuser executing the script. Not applicable when working with the HP Business Service Management.
In the following example, the lr_get_host_name function retrieves the name of the computer on which the Vuser is running.
my_host = lr_get_host_name( );
For more information about the above functions, see the Function Reference (Help > Function
Reference).
Page 231 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Sending Messages to Output
Using the Message type functions in your Vuser script, you can send customized error and notification messages to the output and log files, and to the Test Report summary. For example, you could insert a message that displays the current state of the client application. The LoadRunner
Controller displays these messages in the Output window. You can also save these messages to a file.
When working with HP Business Service Management, you can use Message type functions to send error and notification messages to the Web site or Business Process Monitor log files. For example, you could insert a message that displays the current state of the Web-based application.
Note: Do not send messages from within a transaction as this may lengthen the transaction execution time and skew the transaction results.
You can use the following message functions in your Vuser scripts:
Function Description lr_debug_ message
Sends a debug message to the Output window or the Business Process Monitor log file.
lr_error_ message
Sends an error message to the Output window, Test Results report, or the
Business Process Monitor log files.
lr_get_ debug_ message lr_log_ message
Retrieves the current message class.
Sends an output message directly to the log file, output.txt, located in the Vuser script folder. This function is useful in preventing output messages from interfering with TCP/IP traffic.
lr_output_ message
Sends a message to the Output window, Test Results report, or the Business
Process Monitor log files.
lr_set_ debug_ message lr_vuser_ status_ message lr_ message
Sets a message class for output messages.
Sends a message to the Vuser status area in the Controller. Not applicable when working with the HP Business Service Management.
Sends a message to the Vuser log and Output window or the Business Process
Monitor log files.
The behavior of the lr_message, lr_output_message, and lr_log_message functions are not affected by the script's debugging level in the Log run-time settings—they will always send messages.
Page 232 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Using the lr_output_message, and lr_error_message functions, you can also send meaningful messages to the Test Results summary report. For information, see
"Viewing Test Results" on next page
Create Controller Scenario Dialog Box
This dialog box enables you to create a basic Controller scenario from within VuGen.
To access
Relevant tasks
Tools > Create Controller Scenario
"How to Create a Controller Scenario from VuGen" on page
227
User interface elements are described below:
UI
Element
Description
Add script to current scenario
If a scenario is currently open in the Controller and you want to add the script to this scenario, select this check box. If you clear the check box, LoadRunner opens a new scenario with the specified number of Vusers.
Group
Name
Load
Generator
For a manual scenario, users with common traits are organized into groups.
Specify a new group name for the Vusers.
The name of the machine that will run the scenario.
Page 233 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Results
Directory
Script
Name
Select
Scenario
Type
Enter the desired location for the results.
For a goal-oriented scenario, specify a script name.
l
Goal Oriented Scenario. LoadRunner automatically builds a scenario based on the goals you specify.
l
Manual Scenario. The scenario is created manually by specifying the number of Vusers to run.
Password Encoder Dialog Box
This dialog box enables you to generate encoded passwords.
To access Start > All Programs > HP Software > HP LoadRunner > Tools >
Password Encoder
"How to Encode a Password" on page 226
Relevant tasks
See also
"Password Encoding" on page 225
User interface elements are described below:
UI Element Description
Copy
Copy the results from the encoded string field to paste them to the Data table containing your list of parameters.
Encoded
String
Generate
The encoded results are displayed here.
Click this to generate the encoded password.
Password
Enter the password you want to encode here.
Viewing Test Results
Page 234 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Test Results Overview
To assist with debugging a Vuser script, you can view a report that summarizes the results of your script run. VuGen generates the report during the Vuser script execution and you view the report when script execution is complete.
The Test Results window displays all aspects of the test run and can include: l a high-level results overview report (pass/fail status) l the data used in all runs l an expandable tree of the steps, specifying exactly where application failures occurred l the exact locations in the script where failures occurred l a still image of the state of your application at a particular step l a movie clip of the state of your application at a particular step or of the entire test l detailed explanations of each step and checkpoint pass or failure, at each stage of the test
Customizing the Test Results Display
Each result set is saved in a single .xml file (called results.xml). This .xml file stores information on each of the test result nodes in the display. The information in these nodes is used to dynamically create .htm files that are shown in the top-right pane of the Test Results window.
Each node in the run results tree is an element in the results.xml file. In addition, there are different elements that represent different types of information displayed in the test results. You can take test result information from the .xml file and use XSL to display the information you require in a customized format (either when printing from within the Test Results window, when displaying test results in your own customized results viewer, or when exporting the test results to an HTML file).
XSL provides you with the tools to describe exactly which test result information to display and exactly where and how to display, print or export it. Using a XSL editor, you can modify the .css and
.xsl files in the results folder, to change the appearance of the report (fonts, colors, and so forth).
For example, in the results.xml file, one element tag contains the name of an action, and another element tag contains information on the time at which the run was performed. Using XSL, you could tell your customized editor that the action name should be displayed in a specific place on the page and in a bold green font, and that the time information should not be displayed at all.
Connecting to Application Lifecycle Management from the Test Results Window
To manually submit defects to Application Lifecycle Management from the Test Results window, you must be connected to Application Lifecycle Management.
The connection process has two stages. First, you connect to a local or remote Application
Lifecycle Management server. This server handles the connections between the Test Results and the Application Lifecycle Management project.
Page 235 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Next, you log in and choose the project you want to access. The project stores tests and run session information for the application you are testing. Note that Application Lifecycle Management projects are password protected, so you must provide a user name and a password.
For more information on connecting to an ALM project, see
"How to Work with Scripts in ALM
Projects" on page 243 .
How to Send Custom Information to the Report
In addition to the information sent automatically to the report, for Web Service Vusers, you can send information to the report using the message functions lr_output_message or lr_error_
message.
For task details, see
"How to Insert Steps into a Script" on page 230
.
How to Configure the Appearance of the Test Results
Window
By default, the Test Results window has the same look and feel as the window, using the Microsoft
Office 2003 theme. You can change the look and feel of the Test Results window, as required.
To change these settings, select View > Window Theme and select the desired theme.
Note: You can apply the Microsoft Windows XP theme to the Tests Results window only if your computer is set to use a Windows XP theme.
How to Open the Test Results of a Specific Run
This task describes how to open the test results window for a specific run.
1. Select File > Open from within the Test Results window.
2. Select a script file to display the test results for that file and select the desired test result file.
By default, result files for tests are stored in <Script>\<ResultName>.xml. If your script is stored in Application Lifecycle Management, see below.
3. Select a results set and click Open.
Note: Results files for earlier versions were saved with a .qtp file extension. In the Select
Results File dialog box, only results files with an .xml extension are shown by default. To view results files with a .qtp extension in the Select Results File dialog box, select Test Results
(*.qtp) in the Files of type box.
Select a script stored in Application Lifecycle Management
1. Click the Application Lifecycle Management Connection button
Application Lifecycle Management project.
and connect to your
2. In the Open Test Results dialog box, enter the path of the folder that contains the results file for
Page 236 of 1812 HP LoadRunner (11.50)
User Guide
VuGen your test, or click the browse button to open the Open Test from ALM Project dialog box.
3. Select DB Vuser in the Test Type list.
4. Select the script whose test results you want to view, and click OK.
5. In the Open Test Results dialog box, highlight the test result set you want to view, and click
Open. The Test Results window displays the selected test results.
How to Find Steps in the Test Results
This task describes how to search the test results for steps of a particular type.
1. Select Tools > Find from within the Test Results window.
2. Select the type of step you wish to find. You can select multiple options.
3. Select Up or Down to indicate the direction of the search.
4. Select Find Next to find the next occurrence of the type of step you selected.
Test Results Window
This window displays a report that summarizes the results of your script run.
To access
l
Opens automatically after running a script.
l
Replay > Test Results...
Important information
l
You can configure the result settings from Tools > Options > Scripting >
Replay .
l
The Test Results window can show results with up to 300 levels in the tree hierarchy. If you have results with more than 300 nested levels, you can view the entire report by manually opening the results.xml file.
User interface elements are described below:
Page 237 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
UI
Element
Description
Report
Tree
A graphical representation of the test results located in a pane on the left of the window. You can collapse or expand a branch in the run results tree to change the level of detail that the tree displays.
The icons next to the steps indicate the following information:
Indicates a step that succeeded.
Indicates a step that failed.
Indicates a warning, meaning that the step did not succeed, but it did not cause the test to fail.
Indicates a step that failed unexpectedly.
You can expand and collapse all of the nodes from the View menu, or by clicking *.
Results
Details
Pane
(Results
Summary)
Contains details of the test run which change depending on which part of the report tree you select. When you select the top node of the tree, the Result Details tab shows a summary of the results for your test. When you select a branch or step in the tree, the Result Details tab contains the details for that step. The Result Details tab may also include a still image of your application for the highlighted step.
l
Iterations, actions, and steps that contain checkpoints are marked Passed or
Failed in the right part of the Test Results window and are identified by icons in the tree pane.
l
Iterations, actions, and steps that ran successfully, but do not contain checkpoints, are marked Done in the right part of the Test Results window.
Screen
Recorder
Tab
Contains the movie associated with your test results. If there is no movie associated with your test results, the Screen Recorder tab contains the message:
No movie is associated with the results.
Opens the test results of a specific run. For more details, see
"How to Open the
Test Results of a Specific Run" on page 236
.
Opens the Print dialog box, enabling you to print the test results. For more information, see
"Print Dialog Box" on page 240
.
Opens the Filters dialog box, enabling you to filter the test results. For more information, see
"Filters Dialog Box" on next page .
Opens the Find dialog box, enabling you to search the test results for steps of a particular type. For more information, see
"How to Find Steps in the Test Results" on previous page .
Searches the test results for the previous step matching the criteria in the Find dialog box.
Searches the test results for the next step matching the criteria specified in the Find dialog box.
Selects the previous node.
Page 238 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Selects the next node.
Opens the product documentation.
Filters Dialog Box
This dialog box enables you to filter the test results in the test results window.
To access
"Test Results Window" on page 237
> View > Filters
User interface elements are described below:
UI
Element
Description
Iterations
l
All. Displays test results from all iterations.
l
Fromiteration X to Y. Displays the test results from a specified range of test iterations.
Status
l
Fail. Displays the results for the steps that failed.
l
Warning. Displays the results for the steps with the status Warning (steps that did not pass, but did not cause the script to fail).
l
Pass. Displays the results for the steps that passed.
l
Done. Displays the results for the steps with the status Done (steps that were performed successfully but did not receive a pass, fail, or warning status).
Content
l
All. Displays all steps from all nodes in the test.
l
Show only actions. Displays the action nodes in the test (not the specific steps in the action nodes).
Page 239 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Print Dialog Box
This dialog box enables you to print the test results.
To access
"Test Results Window" on page 237
> File > Print
User interface elements are described below:
UI
Element
Description
Print range
l
All. Prints the results for the entire script.
l
Selection. Prints the results for the selected branch in the run results tree.
Copies
The number of copies to print.
Print format
l
Short. Prints a summary line (when available) for each item in the run results tree.
This option is available only if you the print range is set to All.
l
Detailed. Prints all available information for each item in the run results tree, or for the selected branch.
l
User-defined XSL. Enables you to browse to and select a customized .xsl file.
You can create a customized .xsl file that specifies the information to be included in the printed report, and the way it should appear. For more information, see
"Customizing the Test Results Display" on page 235
.
Print Preview Dialog Box
This dialog box enables you to view a print preview of the test results.
Page 240 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
To access
"Test Results Window" on page 237
> File > Print Preview
Important information
If some of the information is cut off in the preview, for example, if checkpoint names are too long to fit in the display, click the Page Setup button in the Print
Preview window and change the page orientation from Portrait to Landscape.
User interface elements are described below:
UI
Element
Description
Print range
l
All. Prints the results for the entire script.
l
Selection. Prints the results for the selected branch in the run results tree.
Print format
l
Short. Prints a summary line (when available) for each item in the run results tree.
This option is available only if you the print range is set to All.
l
Detailed. Prints all available information for each item in the run results tree, or for the selected branch.
l
User-defined XSL. Enables you to browse to and select a customized .xsl file.
You can create a customized .xsl file that specifies the information to be included in the printed report, and the way it should appear. For more information, see
"Customizing the Test Results Display" on page 235
.
Export to HTML File Dialog Box
This dialog box enables you to export the test results to an HTML file. This enables you to view the results even if the Test Results Viewer environment is unavailable. For example, you can send the file containing the results in an e-mail to a third-party. You can select the type of report you want to export, and you can also create and export a customized report.
Page 241 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
To access
"Test Results Window" on page 237
> File > Export to HTML File
User interface elements are described below:
UI
Element
Description
Export
Range
l
All. Exports the results for the entire script.
l
Selection. Exports result information for the selected branch in the results tree.
Export
Format
l
Short. Prints a summary line (when available) for each item in the run results tree.
This option is available only if you the print range is set to All.
l
Detailed. Prints all available information for each item in the run results tree, or for the selected branch.
l
User-defined XSL. Enables you to browse to and select a customized .xsl file.
You can create a customized .xsl file that specifies the information to be included in the printed report, and the way it should appear. For more information, see
"Customizing the Test Results Display" on page 235
.
Working with Application Lifecycle Management
Managing Scripts Using ALM Overview
VuGen works together with HP Application Lifecycle Management (ALM). ALM provides an efficient method for storing and retrieving Vuser scripts, scenarios, and results. You can store scripts in an ALM project and organize them into unique groups.
In order for VuGen to access an ALM project, you must connect it to the Web server on which ALM is installed. You can connect to either a local or remote Web server.
For more information on working with ALM, see the Application Lifecycle Management User Guide.
Page 242 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
ALM Version Control Overview
VuGen supports version control features in scripts saved in ALM projects that use version control.
The version control features change the process of opening and saving a script. Scripts with version control are either in a state of checked-in or checked-out. When you are working with a script in a checked-out state, any changes you make will not be saved on the ALM server until you check in the script. If you save the script from within VuGen, a temporary file is saved onto your machine that protects your changes in case your computer crashes.
If you are working with a script in a checked-in state, the script is read-only and you cannot make any changes until you check out the script.
If a particular script is being saved to ALM for the first time, and the project uses version control, the script automatically starts in a checked-out state.
How to Work with Scripts in ALM Projects
The following steps describe the workflow of how to work with scripts saved in an ALM project.
Note: To work with scripts in ALM projects with version control, see
"How to Work with
Version Controlled Scripts in ALM Projects" on next page .
Connect to ALM
Open a connection to the ALM server and project that contains the script. For task details, see
"Connect to ALM" below .
Open the script
Select File > Open and specify the location of the script.
Save the script
Select File > Save. If the script is in a project that uses version control and is not checked out, the script is only saved as a temporary file on your local machine.
Connect to ALM
To store and retrieve scripts from ALM, you need to connect to an ALM project. You can connect or disconnect from an ALM project at any time during the testing process.
You can connect to one version of HP ALM from VuGen and a different version from your browser.
For more information, see the Important Information section in
"HP ALM Connection Dialog Box" on page 246 .
Connect to ALM
1. Select ALM > ALM Connection. The HP ALM Connection dialog box opens.
2. Enter the required information in the HP ALM Connection dialog box, as described in
"HP ALM
Page 243 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Connection Dialog Box" on page 246
.
3. To disconnect from ALM, click Disconnect.
How to Submit Defects to ALM
When viewing the results, you can submit any defects detected to a Application Lifecycle
Management project directly from the Test Results window.
Manually submit a defect to Application Lifecycle Management
1. Ensure that the Application Lifecycle Management client is installed on your computer. (Enter the Application Lifecycle Management Server URL in a browser and ensure that the Login screen is displayed.)
2. Select Tools >Application Lifecycle Management Connection or click the Application
Lifecycle Management Connection button to connect to a project. For more information on connecting to a project, see
"Working with Application Lifecycle Management" on page 242
.
3. Select Tools > Add Defect or click the Add Defect button box in the specified Application Lifecycle Management project.
to open the Add Defect dialog
4. You can modify the defect information if required. Basic information on the is included in the description:
5. Click Submit to add the defect information to the Application Lifecycle Management project.
How to Work with Version Controlled Scripts in ALM
Projects
The following steps describe the workflow of how to work with scripts saved in ALM projects that use version control.
Note: This procedure is only relevant for scripts in ALM projects that support version control and have the Performance Center addition installed. If these two conditions are not met, see
"How to Work with Scripts in ALM Projects" on previous page
.
Connect to ALM
Open a connection to the ALM server and project that contains the script. For task details, see
"Connect to ALM" on previous page
.
Open the script
Select File > Open and specify the location of the script.
Check in/out the script
If the ALM project has version control, each script is always defined as being either checked-in or checked-out. For more details, see
"ALM Version Control Overview" on previous page
. To check in and check out scripts, select File > HP ALM Version Control > Check In/Out.
Page 244 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Note: If the ALM project has version control, the file is locked when it is checked out.
If the ALM project is not version controlled, the file is not locked when checked out of the project.
Cancel a check out (optional)
If you checked out a script and do not want to save the changes, you can return the status of the script to checked-in without saving by selecting File > HP ALM Version Control > Undo Check
Out.
Save the script
Select File > Save. If the script is in a project that uses version control and is not checked out, the script is only saved as a temporary file on your local machine.
How to Save VuGen Scripts to ALM Projects
The following steps describe how to save a VuGen script to an ALM project.
Open/create the VuGen script
Create or open the desired script in VuGen.
Connect to ALM
Open a connection to the ALM server and project that you want to store the script. For task details, see
"Connect to ALM" on page 243 .
Save the script to ALM
Select File > Save as and specify the location.
How to View/Modify Previous Versions of a Script
If your script is saved in an ALM project that uses version control, you can view, modify, and save previous versions of the script. The following steps describe how to do this.
Connect to ALM
Open a connection to the ALM server and project that you want to store the script. For task details, see
"Connect to ALM" on page 243 .
Open the script
Select File > Open and specify the location.
View a previous version of a script
To view a previous version of the script in read-only mode, select ALM > Version History and click Get Version.
Check out a previous version of a script
Select ALM> Version History and click Check Out. To check this version in as the new version, select ALM> > Check In. To return the script without saving select ALM > Undo Check Out.
Page 245 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
HP ALM Connection Dialog Box
This dialog box enables you to connect to an ALM project from within VuGen.
To access
Important information
ALM > ALM Connection
You can connect to one version of HP ALM from VuGen and a different version of
HP ALM from your browser.
You can only connect to different versions of HP ALM if one of the versions is
HP ALM 11.00 or higher.
If you are connecting from VuGen to a different HP ALM version than the one in your browser, you must first download the client files.
1. From the browser, navigate to the HP ALM server that you will be connecting to from .
2. Once the login screen is displayed, the client files have been downloaded.
There is no need to log in.
User interface elements are described below:
UI Element Description
Step 1:
Connect to
Server
l
Server URL. The URL of the server that contains ALM.
Page 246 of 1812 HP LoadRunner (11.50)
User Guide
VuGen l
User name. Your ALM project user name.
l
Password. Your ALM project password.
Step 2:
Login to
Project
l
. Connects to the server specified in the Server
URL box. Only one button is visible at a time, depending on your connection status.
l
Domain. The domain that contains the ALM project. Only those domains containing projects to which you have permission to connect to are displayed.
(If you are working with a project in versions of earlier than version 7.5, the
Domain box is not relevant.) l
Project. Enter the ALM project name or select a project from the list. Only those projects that you have permission to connect to are displayed.
l
. Logs into and out of the ALM project.
Restore connection on startup
Automatically reconnect to the server the next time you start the application, using the same user credentials.
Upload Script Dialog Box
This dialog box enables you to open a script from an ALM project or save a script to an ALM project.
To access ALM > ALM Connection > Save script created in VuGen to ALM
User interface elements are described below:
UI
Element
Description
Runtime
Mode
Uploads only the files needed to replay the script. Does not upload recording snapshot files and other unnecessary files. This results in a shorter download time.
All Files
Mode
Uploads all of the files associated with this script. This results in a longer upload time.
Parameters
Parameter Overview
When you record a business process, VuGen generates a script that contains the actual values used during recording. Suppose you want to perform the script's actions (query, submit, and so forth) using different values from those recorded. To do this, you replace the recorded values with parameters. This is known as parameterizing the script.
Page 247 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
The resulting Vusers substitute the parameter with values from a data source that you specify. The data source can be either a file, or internally generated variables.
You can use parameterization only for the arguments within a function. You cannot parameterize text strings that are not function arguments. In addition, not all function arguments can be parameterized. For details on which arguments you can parameterize, see the Function Reference
(Help > Function Reference) for each function.
Input parameters are parameters whose value you define in the design stage before running the script. Output parameters you define during design stage, but they acquire values during test execution. Output parameters are often used with Web Service calls.
Use care when selecting a parameter for your script during design stage, make sure that it is not an empty Output parameter.
Example:
Let's say you recorded a Vuser script while operating a Web application. VuGen generated the following statement that searches a library's database for the title "UNIX": web_submit_form("db2net.exe",
ITEMDATA,
"name=library.TITLE",
"value=UNIX",
ENDITEM,
"name=library.AUTHOR",
"value=",
ENDITEM,
"name=library.SUBJECT",
"value=",
ENDITEM,
LAST);
When you replay the script using multiple Vusers and iterations, you do not want to repeatedly use the same value, UNIX. Instead, you replace the constant value with a parameter: web_submit_form("db2net.exe",
ITEMDATA,
"name=library.TITLE",
"value={Book_Title}",
ENDITEM,
"name=library.AUTHOR",
"value=",
ENDITEM,
"name=library.SUBJECT",
"value=",
ENDITEM,
LAST);
Page 248 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Parameter Types
Every parameter is defined by the type of data it contains. This section contains information on the different parameter types.
File Parameter Types
Data files hold data that a Vuser accesses during script execution. Data files can be local or global.
You can specify an existing ASCII file, use VuGen to create a new one, or import a database file.
Data files are useful if you have many known values for your parameter.
The data in a data file is stored in the form of a table. One file can contain values for many parameters. Each column holds the data for one parameter. Column breaks are marked by a delimiter, for example, a comma.
In the following example, the data file contains ID numbers and first names: id,first_name
120,John
121,Bill
122,Tom
Note: When working with languages other than English, save the parameter file as a UTF-8 file. In the Parameter Properties window, click Edit with Notepad. In Notepad, save the file as a text file with UTF-8 type encoding.
Table Parameter Types
The Table parameter type is meant for applications that you want to test by filling in table cell values. Whereas the file type uses one cell value for each parameter occurrence, the table type uses several rows and columns as parameter values, similar to an array of values. Using the table type, you can fill in an entire table with a single command. This is common in SAP GUI Vusers where the sapgui_table_fill_data function fills the table cells.
XML Parameter Types
Used as a placeholder for multiple valued data contained in an XML structure. You can use an XML type parameter to replace the entire structure with a single parameter. For example, an XML parameter called Address can replace a contact name, an address, city, and postal code. Using
XML parameters for this type of data allows for cleaner input of the data, and enables cleaner parameterization of Vuser scripts. We recommend that you use XML parameters with Web Service scripts or for SOA services.
Internal Data Parameter Types
Internal data is generated automatically while a Vuser runs, such as Date/Time, Group Name,
Iteration Number, Load Generator Name, Random Number, Unique Number, and Vuser ID.
l
Custom: You can specify the parameter data type.
l
Date/Time: The current date/time. You can specify the format and the offset in the Parameter
Properties dialog box.
l
Group Name: The name of the Vuser Group. If there is no Vuser Group (for example, when
Page 249 of 1812 HP LoadRunner (11.50)
User Guide
VuGen running a script from VuGen) the value is always none.
l
Iteration Number: The current iteration number.
l
Load Generator Name: The name of the Vuser script's load generator (the computer on which the Vuser is running).
l
Random Number: A random number within a range of values that you specify.
l
Unique Number: Assigns a range of numbers to be used for each Vuser. You specify the start value and the block size (the amount of unique numbers to set aside for each Vuser). For example, if you specify a start value of 1 and a block size of 100 the first Vuser can use the numbers 1 to 100, the second Vuser can use the numbers 201-300, and so on.
l
Vuser ID: 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 is not the ID number that appears in the Vuser window—it is a unique ID number generated at runtime.
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.
Before you assign a user-defined function as a parameter, you create the external library (DLL) with the function. The function should have the following format:
__declspec(dllexport) char *<functionName>(char *, char *)
The arguments sent to this function are both NULL.
When you create the library, we recommend that you use the default dynamic library path. That way, you do not have to enter a full path name for the library, but rather, just the library name.
VuGen's bin folder is the default dynamic library path. You can add your library to this folder.
The following are examples of user-defined functions:
__declspec(dllexport) char *UF_GetVersion(char *x1, char *x2) {return
"Ver2.0";}
__declspec(dllexport) char *UF_GetCurrentTime(char *x1, char *x2) { time_t x = tunefully); static char t[35]; strcpy(t, ctime( =;x)); t[24] = '\0'; return t;}
Data Assignment Methods for File/Table/XML Parameters
When using values from a file, VuGen lets you specify the way in which you assign data from the source to the parameters. The following methods for assigning data are available:
Sequential
Assigns data to a Vuser sequentially. As a running Vuser accesses the data table, it takes the next available row of data.
If there are not enough values in the data table, VuGen returns to the first value in the table, continuing in a loop until the end of the test.
Page 250 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Random
Assigns a random value from the data table every time a new parameter value is requested.
When running a scenario in LoadRunner, or a script in HP Business Process Monitor, you can specify a seed number for random sequencing. Each seed value represents one sequence of random values used for test execution. Whenever you use this seed value, the same sequence of values is assigned to the Vusers in the scenario. You enable this option if you discover a problem in the test execution and want to repeat the test using the same sequence of random values.
For more information see, the HP Controller User Guide.
Unique
Assigns a unique sequential value to the parameter for each Vuser. Ensure that there is enough data in the table for all Vusers and their iterations. If you have 20 Vusers and you want to perform 5 iterations, your table must contain at least 100 unique values.
If you run out of unique values, VuGen behaves according to the option you select in the When out
of values field. For more information, see
"Parameter Properties Dialog Box" on page 263 .
Note: For LoadRunner users: If a script uses Unique file parameterization, running more than one Vuser group with that script in the same scenario may cause unexpected scenario results.
For more information about Vuser groups in scenarios, see the Function Reference.
l
For details on the different data assignment and update methods, see
"Data Assignment and
Update Methods for File/Table/ XML Parameters" below
.
l
For details on how parameters behave when the number of iterations do not match the number of values in the parameter file, see
"Vuser Behavior in the Controller (LoadRunner Only)" on page
253 .
Data Assignment and Update Methods for File/Table/ XML
Parameters
For File, Table, and XML type parameters, the Data Assignment method that you select, together with your choice of Update method, affect the values that the Vusers use to substitute parameters during the scenario run.
The Data Assignment method is determined by the Select next row field, and the Update method is determined by the Update value on field.
The following table summarizes the values that Vusers use depending on which Data Assignment and Update properties you selected:
Update
Method
Each iteration
Data Assignment Method
Sequential Random
The Vuser takes the next value from the data table for each iteration.
The Vuser takes a new
random value from the data table for each iteration.
Unique
The Vuser takes a value from the next unique position in the data table for each iteration.
Page 251 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Each occurrence
(Data Files only)
The Vuser takes the next value from the data table for each occurrence of the parameter, even if it is within the same iteration.
The Vuser takes a new
random value from the data table for each occurrence of the parameter, even if it is within the same iteration.
Once
The value assigned in the first iteration is used for all subsequent iterations for each Vuser.
The random value assigned in the first iteration is used for all iterations of that Vuser.
The Vuser takes a new
unique value from the data table for each occurrence of the parameter, even if it is within the same iteration.
The unique value assigned in the first iteration is used for all subsequent iterations of the Vuser.
Examples
Assume that your table/file has the following values:
Kim; David; Michael; Jane; Ron; Alice; Ken; Julie; Fred
Sequential Method l
If you specify update on Each iteration, all the Vusers use Kim in the first iteration, David in the second iteration, Michael in the third iteration, and so on.
l
If you specify update on Each occurrence, all the Vusers use Kim in the first occurrence, David in the second occurrence, Michael in the third occurrence, and so on.
l
If you specify update Once, all Vusers take Kim for all iterations.
Note: If you select the Sequential method and there are not enough values in the data table,
VuGen returns to the first value in the table, continuing in a loop until the end of the test.
Random Method l
If you specify update on Each iteration, the Vusers use random values from the table for each iteration.
l
If you specify update on Each occurrence, the Vusers use random values for each occurrence of the parameter.
l
If you specify update Once, all Vusers take the first randomly assigned value for all the iterations.
Unique Method l
If you specify update on Each iteration, for a test run of 3 iterations, the first Vuser takes Kim in the first iteration, David in the second, and Michael in the third. The second Vuser takes Jane,
Ron, and Alice. The third Vuser, Ken, Julie, and Fred.
l
If you specify update on Each occurrence, then the Vuser uses a unique value from the list for each occurrence of the parameter.
l
If you specify update Once, the first Vuser takes Kim for all iterations, the second Vuser takes
David for all iterations, and so on.
Page 252 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Vuser Behavior in the Controller (LoadRunner Only)
When you set up a scenario to run a parameterized script, you can instruct the Vusers how to act when there are not enough values. The following table summarizes the results of a scenario using the following parameter settings: l
Select next row = Unique l
Update Value on = Each iteration l
When out of values = Continue with last value
Situation
More iterations than values
Duration
Run until completion
Resulting Action
When the unique values are finished, each Vuser continues with the last value, but a warning message is sent to the log indicating that the values are no longer unique.
More
Vusers than values
Run indefinitely or Run for
...
Vusers take all of the unique values until they are finished. Then the test issues an error message Error: Insufficient records for
param <param_name> in table to provide the Vuser with
unique data. To avoid this, change the When out of values option in the Parameter properties or the Select next row method in the Parameter properties.
One of two parameters are out of values
Run indefinitely or Run for
...
The parameter that ran out of values, continues in a cyclic manner until the values of the second parameter are no longer unique.
Tuxedo and PeopleSoft Parameters
Tuxedo scripts contain strings of type "name=..." or "value=...". You can only define parameters for the portion of the string following the equal sign (=). For example: lrt_Fadd_fld((FBFR*)data_0,"name=PHONE","value= {parameter_1}",
LRT_END_OF_PARMS);
In general, we recommend that you use lrt_save_parm to save a portion of a character array to a parameter. Use lrt_save_searched_string when you want to save information, relative to the position of a particular string in a character array. For PeopleSoft Vusers, we recommend that you use lrt_save_searched_string, since the reply buffers returned from the PeopleSoft server often differ in size during replay from what was seen during recording.
XML Parameters
When you create a Web Service call to emulate a specific operation, the arguments in the operation may include complex structures with many values. You can use an XML type parameter to replace the entire structure with a single parameter.
Page 253 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
You can create several value sets for the XML elements and assign a different value set for each iteration.
The XML parameter type supports complex schema types such as arrays, Choice, and <Any> elements.
When working with Web Service Input Arguments, you may encounter arrays and their subelements. You can define a single XML parameter that will contain values for all of the array elements.
You can create new XML type parameters directly from the Insert menu, similar to all other parameter types. For Web Services type scripts, you create an XML parameter directly from the
Web Services Call properties.
How to Create a Parameter
This task describes how to create a parameter.
1.
Select the value you want to parameterize
You can do this step from both the Editor and from the Steps Navigator pane.
Select the value you want to parameterize, right-click and select Replace with Parameter.
Notes: n
When creating XML parameters in script view, you must select only the inner xml, without the bounding tags. For example, to parameterize the complex data structure
<A><B>Belement</B><C>Celement</C></A>, select the whole string,
<B>Belement</B><C>Celement</C>, and replace it with a parameter.
n
When parameterizing Java Record Replay or Java Vuser scripts, you must parameterize complete values, not parts of a value.
Steps Navigator pane
Right-click on a step and select Show Arguments. Click the ABC icon next to the argument that you want to parameterize.
2.
Create a new parameter in the Select or Create Parameter dialog box.
Specify the parameters name and type in the Select or Create Parameter dialog box. For user interface details, see
"Select or Create Parameter Dialog Box" on page 262 .
3.
Add a list of required values
From the Select or Create Parameter dialog box, select Properties. Create a table and add entries to serve as the list of values for your parameter. For user interface details, see
"Parameter Properties Dialog Box" on page 263
4.
Modify the parameter braces - optional
You can modify the braces that surround parameters in the Configure Parameter Braces dialog box. You can access the dialog box from the following locations:
Page 254 of 1812 HP LoadRunner (11.50)
User Guide
VuGen n
Right-click on the Parameters node in the Solution Explorer pane and select Configure
Parameter Delimiters.
n
Design > Parameters > Configure Parameter Delimiters
n
Tools > Options > Parameters
For user interface details, see Parameter Delimiters Configuration Dialog Box.
How to Create an XML Parameter from a Web Service Call
This task describes how to create a new XML Parameter from a Web Service Call. This procedure is in addition to the standard procedure to create a parameter. XML Parameters can also be created by using the standard procedure.
Create an XML Parameter from a Web Service Call
1. Select the root element of the complex data structure. The right pane displays the argument's details.
2. Select XML in the right pane, and click the ABC dialog box opens.
icon. The Select or Create Parameter
3. In the Parameter name box, enter a name for the parameter.
4. In the Parameter type box, select XML if it is not already selected.
5. Click Properties to assign a value set now, or OK to close the dialog box and assign values later.
Page 255 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
How to Create XML Parameters - Standard Method
This task describes how to create an XML type parameter without viewing the properties of a Web
Service call. This is the most common way of parameterizing values for most protocols and parameter types.
For Web Service Scripts, we recommend that you create parameters from within a Web Service
Call, as described in
"XML Parameters" on page 253
.
Create a new XML parameter
1. Select Insert > New Parameter or select a constant value in the Script view and select
Replace with a Parameter from the right-click menu. The Select or Create Parameter dialog box opens.
2. In the Parameter name box, enter a name for the parameter.
3. In the Parameter type box, select XML if it is not already selected.
4. Click Properties to assign a value set now, or OK to close the dialog box and assign values later.
How to Define XML Value Sets
This task describes how to create value sets for XML parameters.
Value sets are arrays that contain a set of values. Using the Add Column and Duplicate Column buttons, you can create multiple value sets for your parameter and use them for different iterations.
When using value sets, the number of array elements per parameter does not have to be constant.
You can use optional elements that will appear in one value set, but not in another. This allows you to vary the values you send for each of the iterations—some iterations can include specific array elements, while other iterations exclude them.
To exclude an optional element, click the small triangle in the upper left corner of the cell and insure that it is not filled in.
In the following example, Set 1 and Set 2 use the optional elements: name, street, and state. Set 3 does not use a street name.
Page 256 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Set parameter element values
1. View the Parameter Properties.
If the Parameter Properties dialog box is not open, select Vuser > Parameter List and select the desired parameter. The dialog box shows a read-only view of the parameter values.
2. Open the Data Parameterization box.
Click the Edit Data button to open the Data Parameterization dialog box.
Page 257 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
3. Define value sets for the XML parameter.
In the Set columns, insert values corresponding to the schema.
If a row says NIL, it implies that the element is nillable. To include a value for the nillable element, enter the value as usual. To mark a value as nil, click the NIL icon to fill it in. This erases any value that you may have assigned to the element. In the following example, the city element is nillable, but it is only marked as nil in Set 2 and Set3—not in Set 1.
4. Create additional value sets.
To insert more value sets, click Add Column and insert another set of values in the new column. To copy an existing value set, select a row in the value set you want to copy and click
Duplicate Column.
5. Copy arrays.
To duplicate an array element and its children, select the parent node and choose Duplicate
Array Element from the right-click menu.
Page 258 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
6. Handle the <any> elements.
For any type elements, right-click <any> in the Schema column and select one of the available options. These options may vary depending on the location of the cursor.
n
Add Array Element. Adds a sub-element under the root element.
n
Insert child. Adds a sub-element to the selected element.
n
Insert sibling. Adds a sub-element on the same level as the selected element.
n
Load XML. Loads the element values from an XML file.
n
Save XML. Saves the array as an XML file.
n
Copy XML. Copies the full XML of the selected element to the clipboard.
Click the Rename text to provide a meaningful name for each array element.
7. Remove unwanted columns.
To remove a value set, select it and click Delete Column.
8. Save the changes.
Click Apply to save the changes and update the view in the Parameter Properties dialog box.
Page 259 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
How to Set an Assignment Method
This task describes how to set an assignment method. The assignment method indicates which of the value sets to use and how to use them. For example, you can instruct Vusers to use a new value set for each iteration and use the value sets sequentially or at random. For more information, see
"Data Assignment and Update Methods for File/Table/ XML Parameters" on page 251 .
Define an assignment method
1. Open the Parameter Properties and select a parameter.
2. Define a data assignment method.
In the Select next value list, select a data assignment method to instruct the Vuser how to select the file data during Vuser script execution. The options are: Sequential, Random, or
Unique. For more information, see
"Data Assignment Methods for File/Table/XML Parameters" on page 250
.
3. Select an update option for the parameter.
In the Update value on list, select an update option. The choices are Each Iteration, Each
Occurrence, and Once. For more information, see
"Data Assignment and Update Methods for
File/Table/ XML Parameters" on page 251
.
4. If you chose Unique as the data assignment method the When out of values and Allocate
Vuser values in the Controller options become enabled.
n
When out of values. Specify what to do when there is no more unique data: Abort Vuser,
Continue in a cyclic manner, or Continue with last value.
n
Allocate Vuser values in the Controller (for LoadRunner users only). Indicate whether you want to manually allocate data blocks for the Vusers. You can allow the Controller to automatically allocate a block size or you can specify the desired number of values. Select
Automatically allocate block size or Allocate x values for each Vuser. For the second option, specify the number of values to allocate.
To track this occurrence, enable the Extended Log > Parameter Substitution option in the
Log Run-Time settings. When there is not enough data, VuGen writes a warning message to the Vuser log: No more unique values for this parameter in table <table_name>.
5. In the Parameter Properties dialog box, click Close.
The list of input arguments is replaced by the parameter name, and ABC button is replace by a table icon parameter.
which you can click to edit the parameter properties or un-parameterize the
How to Modify XML Parameter Properties
This task describes how to modify XML parameter properties.
To modify XML parameter properties:
1. In the Step Navigator, right-click the required step and select Show Arguments. The Web
Page 260 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Service Call Properties dialog box opens.
2. From the list of arguments, under Input Arguments, select the XML parameter. The right pane displays the parameter details.
3. To modify the XML parameter properties, select the XML check box, click the table icon button, and then select Parameter Properties. The Parameter Properties dialog box opens.
4. Modify the parameter properties as desired.
How to Work with Existing Parameters
This task describes how to replace values with pre-defined parameters.
Replace a value with a parameter
You can replace a value with an pre-defined parameter. In the script-editor, right-click on the relevant value and select one of the following options: l
Replace with Parameter > select a <pre-defined> parameter. The list of parameters include parameters which have the same original value or parameters that have not yet been used.
l
Replace with Parameter > select a parameter from the Parameter List dialog box.
Replace multiple occurrences of a value with a parameter
You can replace multiple occurrences of a value with a parameter. To do this, in the script editor replace at least one occurrence of the value with a parameter. Right-click the parameter and select
Replace more occurrences. Use Search and Replace to replace all of the values in the script with the selected parameter.
Restore the original value
You can undo a parameter and restore the original value by right-clicking the parameter in the script editor and selecting Restore original value.
How to Import Parameter Data from a Database
VuGen enables you to import data from a database for use with parameterization. You can import the data in one of the following ways. After you import the data, it is saved as a file .dat extension with a prefix of the <source script name>_ and stored as a regular parameter file.
l
"Create a query using Microsoft Query" below
l
"Specify an SQL statement manually" on next page
Create a query using Microsoft Query
1. In the
"Database Query Wizard" on page 275
, select Create query using Microsoft Query. If you need instructions on Microsoft Query, select Show me how to use Microsoft Query.
2. Click Finish. If Microsoft Query is not installed on your machine, VuGen issues a message indicating that it is not available. Install MS Query from Microsoft Office before proceeding.
3. Follow the instructions in the wizard, importing the desired tables and columns.
Page 261 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
4. When you finish importing the data, select Exit and return to the Virtual User Generator and click Finish. The database records appear in the Parameter Properties box as a data file.
Specify an SQL statement manually
1. In the
"Database Query Wizard" on page 275
, select Specify SQL Statement Manually and click Next.
2. Click Create to specify a new connection string. The Select Data Source window opens.
3. Select a data source, or click New to create a new one. The wizard guides you through the procedure for creating an ODBC data source. When you are finished, the connection string appears in the Connection String box.
4. In the SQLstatement box, enter an SQL statement.
5. Click Finish to process the SQL statement and import the data. The database records appears in the Parameter Properties box as a data file.
Select or Create Parameter Dialog Box
This dialog box enables you to create a new parameter or modify an existing parameter.
To access
Use one of the following: l
Solution Explorer pane > right-click on the Parameters node > Create
New Parameter
l
In script editor, right-click on the value > Replace with Parameter > Create
New Parameter
l
Design > Parameters > Create New Parameter
"How to Create a Parameter" on page 254
Relevant tasks
User interface elements are described below:
UI Element Description
Parameter name
Parameter type
The name of the parameter.
Note: Do not use the name unique, it is used by VuGen.
The type of the parameter. For information about the different parameter types see
"Parameter Types" on page 249 .
Page 262 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Original value
The original value of the parameter before parameterization.
Opens the Parameter Properties dialog box. For details, see
"Parameter
Properties Dialog Box" below .
Parameter Properties Dialog Box
This page allows you to view and modify the properties of a parameter. This dialog box varies depending on the type of parameter you are using.
To access Right-click parameter > Parameter properties
Date/Time, Group Name, Iteration Number, Load Generation Name, and Vuser ID parameters
User interface elements are described below:
UI Element Description
Adds the custom format specified in the Date/time format or Text format field to the format list.
Deletes the selected format from the format list.
Restores the format list to it's default state.
Date/time
You can specify a custom format here. See the chart below for a list of
Page 263 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
M
S
I
H p
Symbol
c
#c
format / Text format
Format list
Offset
(Date/time type only)
Date/time symbols.
The list of formats. See the chart below for a list of Date/time symbols.
Allows you to set an offset for the date/time parameter. For example, if you want to test a date next month, you set the date offset to 30 days.
l
Working days only. Use values for work days only (excludes Saturdays and Sundays).
l
Prior to current date. Sets the offset for a date or time that has already passed (negative offset).
The parameter type. For more information see
"Parameter Types" on page 249 .
Parameter type
Sample
(current time)
Displays an example parameter value based on the selected format.
Update values on
l
Each occurrence. Use a new value for each occurrence of the parameter in your script. This is useful when the statements using a parameter are unrelated. For example, for random data, it may be useful to use a new value for each occurrence of the parameter.
l
Each iteration. Updates the parameter one time per iteration. If a parameter appears in a script several times, the Vuser uses the same value for all occurrences of the parameter, for the entire iteration. This is useful when the statements using a parameter are related.
Note: If you create an action block with parameters using its own iteration count—if you instruct VuGen to update their values each iteration, it refers to l the global iteration and not the block iteration.
Once. Updates the parameter value only once during the scenario run. The
Vuser uses the same parameter value for all occurrences and all iterations of the parameter. This type may be useful when working with dates and times.
The following table describes the date/time symbols:
Description
complete date and time in digits complete date as a string and time hours (24 hour clock) hours (12 hour clock) minutes seconds
AM or PM
Page 264 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
B y
Y d m b day month in digits (01-12) month as a string - short format (e.g. Dec) month as a string - long format (e.g. December) year in short format (e.g. 03) year in long format (e.g. 2003)
File parameters
User interface elements are described below:
UI Element Description
Adds a column to the data set.
Adds a row to the data set.
Creates a new data table.
Opens the Database Query Wizard, enabling you to import data from an existing database. For more information, see
Deletes a column from the data set.
Deletes a row from the data set.
Enables you to view and edit parameter values in Notepad. This is important when working with large data sets because VuGen only displays up to 100 rows in the UI.
Notepad opens with the parameter's name in the first row and its original value in the second row. Enter additional column names and values into the file using a delimiter such as a comma or a tab to indicate a column break. Begin a new line for each table row (for each new row of data).
Select Column
Opens the Parameter Simulation dialog box. This allows you to simulate the parameter behavior with your data set. For more information, see
"Parameter Simulation Dialog Box" on page 270
.
Enables you to select the column to use as the data source either by the
Page 265 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
File Format
Select next row
Update value on
When out of values
Allocate Vuser values in the
Controller
File path
column number or name.
l
Column delimiter. The character used to separate values in the data file.
l
First data line. The first line of data to be used during Vuser script execution. The header is line 0. To begin with the first line after the header, specify 1. If there is no header, specify 0.
The method of selecting the file data during Vuser script execution. The options are: Sequential, Random, or Unique. For more information see
"Data Assignment Methods for File/Table/XML Parameters" on page 250 .
The method that determines when the parameter will switch to the next value. The choices are Each Iteration, Each Occurrence, and Once. For more information see
"Data Assignment Methods for File/Table/XML
Parameters" on page 250
.
Specify what to do when there is no more unique data: Abort the Vuser,
Continue in a cyclic manner, or Continue with last value.
(LoadRunner only). Indicate whether you want to manually allocate data blocks for the Vusers. You can allow the Controller to automatically allocate a block size or you can specify the desired number of values.
Select Automatically allocate block sizeor Allocate x values for each
Vuser. For the second option, specify the number of values to allocate.
To track this occurrence, enable the Extended Log > Parameter
Substitution option in the Log Run-Time settings. When there is not enough data, VuGen writes a warning message to the Vuser log "No more unique values for this parameter in table <table_name>".
Select the .dat file with the data for your parameter. Alternatively, you can create a new data set using the Create Table button.
Table parameters
User interface elements are described below:
UI Element Description
Adds a column to the data set.
Adds a row to the data set.
Creates a new data table.
Opens the Database Query Wizard, enabling you to import data from an existing database. For more information, see
Deletes a column from the data set.
Page 266 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Deletes a row from the data set.
Enables you to view and edit parameter values in Notepad. This is important when working with large data sets because VuGen only displays up to 100 rows in the UI.
Notepad opens with the parameter's name in the first row and its original value in the second row. Enter additional column names and values into the file using a delimiter such as a comma or a tab to indicate a column break.
Begin a new line for each table row (for each new row of data).
Allocate Vuser values in the
Controller
Column
File path
Row delimiter for log display
Rows
(LoadRunner only). Indicate whether you want to manually allocate data blocks for the Vusers. You can allow the Controller to automatically allocate a block size or you can specify the desired number of values. Select
Automatically allocate block sizeor Allocate x values for each Vuser.
For the second option, specify the number of values to allocate.
To track this occurrence, enable the Extended Log > Parameter
Substitution option in the Log Run-Time settings. When there is not enough data, VuGen writes a warning message to the Vuser log "No more unique values for this parameter in table <table_name>".
specify which columns you want to use. Alternatively, you can select
Select all columns.
To specify one or more columns by their number, select Columns by
number and enter the column numbers separated by a comma or a dash.
The column number is the index of the column containing your data. For example, if the data for the parameter is in the table's first column, select 1.
In the Column delimiter box, select a column delimiter—the character used to separate the columns in the table. The available delimiters are: comma, tab, space.
Select the .dat file with the data for your parameter. Alternatively, you can create a new data set using the Create Table button.
This delimiter is used to differentiate between rows in the output logs. If you enable parameter substitution logging, VuGen sends the substituted values to the Replay log. The row delimiter character in the Replay log indicates a new row.
l
Rows per iteration. How many rows to use per iteration. This only relevant when the Update value on field is set to Each iteration. If
Update value on is set to Once, then the same rows will be used for all iterations.
Page 267 of 1812 HP LoadRunner (11.50)
User Guide
VuGen l
First line of data. The first line of data to be used during script execution. To begin with the first line after the header, enter 1.
l
. Displays information about the table, including how many rows of data are available.
Select next row
The method of selecting the file data during Vuser script execution. The options are: Sequential, Random, or Unique. For more information see
"Data Assignment Methods for File/Table/XML Parameters" on page 250 .
Update value on
The method that determines when the parameter will switch to the next value. The choices are Each Iteration, Each Occurrence, and Once. For more information see
"Data Assignment Methods for File/Table/XML
Parameters" on page 250 .
When not enough rows
Specifies what VuGen does when there are not enough rows in the table for the iteration.
Example: The table you want to fill has 3 rows, but your data only has two rows. Select Parameter will get less rows than required to fill in only two rows. Select Use behavior of "Select Next Row" to loop around and get the next row according the method specified in the Select next row box.
When out of values
Specify what to do when there is no more unique data: Abort the Vuser,
Continue in a cyclic manner, or Continue with last value.
Random Number parameters
User interface elements are described below:
UI
Element
Description
Number format
Specifies the minimum number of digits your parameter will have. Where %01d represents one digit, %02d represents two digits, and so on.
Random range
The minimum and maximum range for the random values.
Sample value
Displays an example parameter value based on the selected format.
Update value on
l
Each occurrence. Use a new value for each occurrence of the parameter in your script. This is useful when the statements using a parameter are unrelated. For example, for random data, it may be useful to use a new value for each occurrence of the parameter.
l
Each iteration. Updates the parameter one time per iteration. If a parameter appears in a script several times, the Vuser uses the same value for all occurrences of the parameter, for the entire iteration. This is useful when the statements using a parameter are related.
Note: If you create an action block with parameters using its own iteration count—if you instruct VuGen to update their values each iteration, it refers to the global
Page 268 of 1812 HP LoadRunner (11.50)
User Guide
VuGen l iteration and not the block iteration.
Once. Updates the parameter value only once during the scenario run. The Vuser uses the same parameter value for all occurrences and all iterations of the parameter. This type may be useful when working with dates and times.
Unique Number parameters
Note: When scheduling a scenario in the Controller, the When out of values option only applies to the Run for HH:MM:SS option in the Schedule Builder's Duration tab. It is ignored for the Run until completion option.
User interface elements are described below:
UI
Element
Description
Number format
Specifies the minimum number of digits your parameter will have. Where %01d represents one digit, %02d represents two digits, and so on.
Number range
l
Start. The starting value.
l
Block size per Vuser. The amount of unique numbers assigned to each Vuser.
For example, if you specify a starting value of 1 and a block size of 100, the values be 1-100 can be used by the first Vuser, the values 101-200 can be used by the second Vuser, and so on.
Sample value
Displays an example parameter value based on the selected format.
Update value on
When out of values
l
Each occurrence. Use a new value for each occurrence of the parameter in your script. This is useful when the statements using a parameter are unrelated. For example, for random data, it may be useful to use a new value for each occurrence of the parameter.
l
Each iteration. Updates the parameter one time per iteration. If a parameter appears in a script several times, the Vuser uses the same value for all occurrences of the parameter, for the entire iteration. This is useful when the statements using a parameter are related.
Note: If you create an action block with parameters using its own iteration count—if you instruct VuGen to update their values each iteration, it refers to the global l iteration and not the block iteration.
Once. Updates the parameter value only once during the scenario run. The Vuser uses the same parameter value for all occurrences and all iterations of the parameter. This type may be useful when working with dates and times.
Determines what to do when the range of values is reached for a Vuser. The range of values is determined by the start value and the block size.
Abort Vuser. Terminates the Vuser script.
Continue in a cyclical manner. Restart the unique numbers for this Vuser from the beginning of its assigned range. For example, if a Vuser had the range of 1-100 and it reached 100, it would start again at 1.
Page 269 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Continue with last value. Use the last assigned value for this parameter for all subsequent occurrences of this parameter. For example, if a Vuser had the range of 1-
100 and it reached 100, it would continue with the value of 100 until the end of the script.
User Defined Function parameters
User interface elements are described below:
UI
Element
Description
Function
Name
The name of the function. Use the name of the function as it appears in the DLL file.
Library
Names
Update value on
The location of the relevant library files.
l
Each occurrence. Use a new value for each occurrence of the parameter in your script. This is useful when the statements using a parameter are unrelated. For example, for random data, it may be useful to use a new value for each occurrence of the parameter.
l
Each iteration. Updates the parameter one time per iteration. If a parameter appears in a script several times, the Vuser uses the same value for all occurrences of the parameter, for the entire iteration. This is useful when the statements using a parameter are related.
Note: If you create an action block with parameters using its own iteration count—if you instruct VuGen to update their values each iteration, it refers to the global l iteration and not the block iteration.
Once. Updates the parameter value only once during the scenario run. The Vuser uses the same parameter value for all occurrences and all iterations of the parameter. This type may be useful when working with dates and times.
XML parameters
For information about Web Services XML parameters, see
"XML Parameters" on page 253
.
Parameter Simulation Dialog Box
This dialog box allows you to view a simulation of the behavior of a file parameter.
To access Parameter List > Select Parameter > Simulate Parameter
Important information
l
This feature is only relevant for file type parameters.
l
Not all types of Parameter Substitution can be simulated. If you select Select
next row: Same line as... or Update value on: Each occurrence, then the
Parameter Simulation dialog box will not open.
l
VuGen can simulate up to 256 iterations and 256 Vusers.
Page 270 of 1812 HP LoadRunner (11.50)
User Guide
VuGen l
Run Indefinitely is compliant with the Real-life schedule in the Scheduler of the Controller.
l
If you select Select next row: Unique in the Parameter List dialog, then each
Vuser is assigned a unique range of rows from which the Simulator will substitute values (for that Vuser).
With this setting, the default selection in the Allocate Vuser values in the
Controller section is Automatically allocate block size. In this case, when you run the simulation, the range allocation takes place in accordance with your
Scenario run mode selection.
If you change the default selection to Allocate x values for each Vuser, then the Vusers will be allocated the amount of values you specify, ignoring of your
Scenario run mode selection.
User interface elements are described below:
UI Element Description
Vusers
The number of Vusers to run in the simulation.
Scenario
Run Mode
l
Run until completion. Enter the number of iteration to run or select Take
number of iteration from Run-Time settings.
l
Run indefinitely. Simulates the run indefinitely option in the controller.
VuGen only actually simulates the number of iterations you specify.
Runs the parameter simulation. The values of each parameter substitution are displayed.
Example:
In the following examples, the settings in the Parameter List dialog box are: l
Values for the new parameter. Value1 to Value7 l
Select next row. Unique l
When out of rows. Continue with last value l
Allocate Vuser values in the Controller. Automatically allocate block size
Scenario run mode: Run until completion
In the following example, the user has selected three Vusers, set the Scenario run mode to Run
until completion, and selected three iterations.
Page 271 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
When the scenario run mode is set to Run until completion, the number of rows that each Vuser receives is the same as the number of iterations. The range allocation stops when there are no longer enough rows in the table.
As the simulation is run, the first Vuser takes the first three values (because this was the number of iterations). The second Vuser takes the next three values. The third Vuser takes the remaining value in the first iteration. For the remaining iterations, since the When out of values option in the
Parameter List dialog box was set to Continue with last value, the third Vuser continues with the same value.
A fourth Vuser would have failed.
Scenario run mode: Run indefinitely
In the following example, the user has selected 3 Vusers and set the Scenario run mode to Run indefinitely and selected to show 3 iterations.
Page 272 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
When the Scenario run mode is set to Run indefinitely, the allocated range for each Vuser is calculated by dividing the number of cells in the .dat file by the number of Vusers. In this scenario, that is 7/3 = 2 (The simulator takes the closest smaller integer.).
As the simulation is run, the first Vuser takes Value1 and Value2. The second Vuser takes Value3 and Value4 and the third Vuser takes Value5 and Value6. Since there are were only 3 Vusers,
Value7 was not distributed.
Note: If you hold the mouse over the cells in the first column of the table, a tool tip appears with information about which values were assigned to that Vuser.
If you hold the mouse over cells which were not assigned values, a tool tip appears with the reason no values were assigned.
A tool tip does not appear if a proper value was assigned.
Parameter List Dialog Box
This dialog box enables you to view, create, delete, select, and modify parameters. The Parameter list shows all of the parameters that you created, including both input and output parameters.
Page 273 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
To access
Use one of the following: l
Solution Explorer pane > > Parameters node > Parameter List l
In the script editor, right-click on a value > Replace with Parameter>
Parameter List
l
Design > Parameters > Parameter List
Do not name a parameter unique, since this name is used by VuGen.
Important information
User interface elements are described below (unlabeled elements are shown in angle brackets):
UI Element
<Parameter
Properties Pane>
Parameter type
Description
Creates a new parameter. This does not replace any highlighted text with the parameter. Do not name a parameter unique, since this name is used by VuGen.
Deletes the selected parameter.
Note: If the parameter replaced a previous value, the original value is restored.
This pane appears different depending on the type of parameter you are using. For information about this pane, see one of the following sections: l
For Date/Time, Group Name, Iteration Number, Load Generation
Name, and Vuser ID parameters see
"Parameter Properties Dialog
Box" on page 263
.
l
For File parameters, see
"Parameter Properties Dialog Box" on page
263
.
l
For Table parameters, see
"Parameter Properties Dialog Box" on page 263
.
l
For BPT parameters, see
"Parameter Properties Dialog Box" on page
263
.
l
For Random Number parameters, see
"Parameter Properties Dialog
Box" on page 263
.
l
For Unique Number parameters, see
"Parameter Properties Dialog
Box" on page 263
.
l
For User Defined Function parameters, see
"Parameter Properties
Dialog Box" on page 263
.
l
For XML parameters, see
"Parameter Properties Dialog Box" on page
263
.
This drop-down list lets you select the parameter type. For information about the different parameter types, see
"Parameter Types" on page
249 .
Page 274 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Database Query Wizard
This wizard enables you to select data for a parameter form an existing database.
To access
Relevant tasks
Right-click parameter > Parameter properties > Data Wizard (only available for File / Table type parameters)
"How to Import Parameter Data from a Database" on page 261
User interface elements are described below:
UI Element Description
Query Definition
Select from one of the following options: l
Create query using Microsoft Query l
Specify SQL statement manually
Show me how to use
Microsoft Query
Displays instructions for using Microsoft Query when after you click next.
Maximum number of rows
The maximum number of rows to be created in the .dat file based on the specified query.
Create Parameter Dialog Box (Winsock)
This dialog box enables you to correlate data and create parameters in Winsock scripts.
To access Step Navigator > Right-click menu > Create Parameter
User interface elements are described below:
UI Element Description
Parameter
Name
The name of the parameter.
Data Range
You can define the parameter by a start and end range in bytes. Enter the numbers manually in the From and To fields or click Select Range and highlight the desired text.
Boundaries
You can define the parameter by defining a left and right boundary. To do so, select Extract parameter data using boundaries. Click the button to right of the
Left field, highlight the desired text, and click Done. Repeat the procedure for the
Right boundary.
Script
Statement
The statement that will appear in your script based on the options selected in this dialog box. You can manually edit this statement.
Page 275 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Parameter Original Value Dialog Box
This dialog box appears when you are parameterizing a Vuser script, and lets you specify the parameter's original value.
To access
In VuGen, select a text string in the Editor. Right-click and then select Replace
with Parameter > Parameter List. Select an existing parameter and click Close.
Important information
Each parameter has an original value. You can replace any parameter in a Vuser script with the parameter's original value. When you parameterize a selected text string and the selected text string is not the same as the selected parameter's original value, you can select to either keep the parameter's existing original value, or replace the parameter's original value with the selected text string.
User interface elements are described below:
UI Element Description
Use old original value <text>
Keeps the parameter's existing original value.
Use new original value
<text>
Assigns the selected text as the parameter's new original value.
Recording Options
Port Mapping Overview
When recording Vuser scripts that record network traffic on a socket level (HTTP, SMTP, POP3,
FTP, IMAP, Oracle NCA and WinSock), you can set the Port Mapping options. Using these options, you can map the traffic from a specific server:port combination to the desired communication protocol.
The available communication protocols to which you can map are FTP, HTTP, IMAP, NCA, POP3,
SMTP, and SOCKET. You create a mapping by specifying a server name, port number, or a complete server:port combination. For example, you can indicate that all traffic from the server
twilight on port 25, should be handled as SMTP. You can also specify that all traffic from the server called viper, should be mapped to the FTP protocol, regardless of the port. Additionally, you can map all traffic on port 23 to SMTP, regardless of the server name.
When recording in multi-protocol mode, If at least one of the protocols records on a socket level, the
Port Mapping node will be available. The only exception is when you record HTTP or WinSock as a single protocol script.
Port Mapping Auto Detection
VuGen's advanced port-mapping options let you configure the auto-detection options. VuGen's auto-detection analyzes the data that is sent to the server. It checks the data for a signature, a pattern in the data's content, that identifies the protocol. For the purpose of detecting a signature, all of the send buffers until the first receive buffer, are combined. All send buffers that were sent until a
Page 276 of 1812 HP LoadRunner (11.50)
User Guide
VuGen receive buffer is returned, are considered a single data transition. By default, no mappings are defined and VuGen employs auto-detection. In some protocols, VuGen determines the type in a single transition, (such as HTTP). Other network protocols require several transitions before determining the type. For this purpose, VuGen creates a temporary buffer for each server-port combination. If VuGen cannot determine the protocol type by reading the first transition buffers, it stores the data in a temporary buffer. It continues to read the incoming buffers until it detects a signature of a specific protocol.
By default, VuGen allows 4 transitions and uses a temporary buffer of 2048 bytes in order to detect a protocol signature. If VuGen has not yet determined the type after reaching the maximum number of transitions, or after reaching the maximum buffer size, it assigns the data to the WinSock protocol. If you did not instruct VuGen to record the WinSock protocol (in the multi-protocol selection), VuGen discards the data.
You can change the maximum number of buffers you want VuGen to read in order to detect the protocol type. You can also specify the size of the temporary buffer. In instances where the amount of data in the first send buffers, is greater than the size of the temporary buffer, VuGen cannot autodetect the protocol type. In this case, you should increase the size of the temporary buffer.
When working with the above network level protocols, we recommend that you allow VuGen to use auto-detection to determine the protocol type. In most cases, VuGen's recorder is able to recognize the signatures of these protocols. It then automatically processes them according to the protocol specifications. In certain instances, however, VuGen may be unable to recognize the protocol. For example: l
The protocol signature closely resembles an existing protocol, resulting in erroneous processing.
l
There is no unique signature for the protocol.
l
The protocol uses SSL encryption, and therefore cannot be recognized on a WinSock level.
In all of the above cases, you can supply information to uniquely identify the server and port hosting the protocol.
EUC-Encoding (Japanese Windows only)
When working with non-Windows standard character sets, you may need to perform a code conversion. A character set is a mapping from a set of characters to a set of integers. This mapping forms a unique character-integer combination for a given alphabet. Extended UNIX Code (EUC) and Shift Japan Industry Standard (SJIS) are non-Windows standard character sets used to display
Japanese characters on Web sites.
Windows uses SJIS encoding, while UNIX uses EUC encoding. When a Web server is running
UNIX and the client is running Windows, the characters in a Web site are not displayed on the client machine properly due to the difference in the encoding methods. This affects the display of EUCencoded Japanese characters in a Vuser script.
During recording, VuGen detects the encoding of a Web page through its HTTP header. If the information on the character set is not present in the HTTP header, it checks the HTML meta tag.
If you know in advance that a Web page is encoded in EUC, you can instruct VuGen to use the correct encoding by using the recording options. To record a page in EUC-encoding, enable the
EUC option in the Recording Options Recording node (only visible for Japanese Windows).
Page 277 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Enabling the EUC option forces VuGen to record a Web page in EUC encoding, even when it is not
EUC-encoded. Therefore, you should only enable this option when VuGen cannot detect the encoding from the HTTP header or the HTML meta tag or when you know in advance that the page is EUC-encoded.
During recording, VuGen receives an EUC-encoded string from the Web server and converts it to
SJIS. The SJIS string is saved in the script's Action function. However, for replay to succeed, the string has to be converted back to EUC before being sent back to the Web server. Therefore,
VuGen adds a web_sjis_to_euc_param function before the Action function, which converts the
SJIS string back to EUC.
In the following example, the user navigates to an EUC-encoded Web page and clicks a link.
VuGen records the Action function and adds the web_sjis_to_euc_param function to the script before the Action function.
web_sjis_to_euc_param("param_link","Search"); web_link("LinkStep","Text={param_link}");
For more information, see
"Advanced URL Dialog Box" on page 307
.
Script Generation Preference Overview
Before you record a session, VuGen allows you to specify a language for script generation. The available languages for script generation vary per protocol. Some of the available languages are C,
C#, Visual Basic, Visual Basic .NET, VB Script, and Javascript. By default, VuGen generates a script in the most common language for that protocol, but you can change this through the Script recording options node.
For user interface details, see
"General > Script Node" on page 309 .
Tip: If you record a script in one language, you can regenerate it in another language after the recording. For task details, see
"How to Regenerate a Vuser Script" on page 139
.
After you select a generation language, you can enable language-specific recording options which instruct the recorder what to include in the script and how to generate it.
If at least one of the protocols you are recording has multi-protocol capabilities, the Script node will be available except when you record HTTP or WinSock as a single protocol script.
Script Language Options
When you record a session, VuGen creates a script that emulates your actions. The default script generation language is C or C# for MS .NET. For the FTP, COM/DCOM, and mail protocols (IMAP,
POP3, and SMTP), VuGen can also generate a script in Visual Basic, VB Script, and Javascript.
The following list specifies which protocols are appropriate for each language: l
C. For recording applications that use complex COM constructs and C++ objects.
l
C #. For recording applications that use complex applications and environments (MS .NET
protocol only).
l
Visual Basic .NET. For VB .NET applications using the full capabilities of VB.
Page 278 of 1812 HP LoadRunner (11.50)
User Guide
VuGen l
Visual Basic Scripting. For VBscript-based applications such as ASP.
l
Java Scripting. For Javascript-based applications such as js files and dynamic HTML applications.
After the recording session, you can modify the script with regular C, C#, Visual Basic, VB Script, or Javascript code and control flow statements.
Recording Levels Overview
VuGen lets you specify what information to record and which functions to use when generating a
Vuser script by selecting a recording level in the General Recording Levels node of the
Recording Options dialog box. The recording level you select depends on your needs and environment. The available levels are GUI-based script, HTML-based script, and URL-based
script. For user interface information, see
"General > Recording Node" on page 307
.
The following examples show scripts using the three recording levels:
GUI-based script
Records HTML actions as context sensitive GUI functions, for example web_text_link.
/* GUI-based mode - CS type functions with JavaScript support*// vuser_init()
{ web_browser("WebTours",
DESCRIPTION,
ACTION,
"Navigate=http://localhost:1080/WebTours/",
LAST); web_edit_field("username",
"Snapshot=t2.inf",
DESCRIPTION,
"Type=text",
"Name=username",
"FrameName=navbar",
ACTION,
"SetValue=jojo",
LAST);
...
HTML-based script
Generates a separate step for each HTML user action. The steps are intuitive, but they do not reflect true emulation of the JavaScript code.
/* HTML-based mode - a script describing user actions*/
...
web_url("WebTours",
"URL=http://localhost/WebTours/",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
Page 279 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
"Mode=HTML",
LAST); web_link("Click Here For Additional Restrictions",
"Text=Click Here For Additional Restrictions",
"Snapshot=t4.inf",
LAST); web_image("buttonhelp.gif",
"Src=/images/buttonhelp.gif",
"Snapshot=t5.inf",
LAST);
...
URL-based script
Records all browser requests and resources from the server that were sent due to the user's actions. Automatically records all HTTP resources as URL steps (web_url statements). For normal browser recordings, it is not recommended to use the URL-based mode since is more prone to correlation related issues. However, if you are recording pages such as applets and non-browser applications, this mode is ideal.
URL-based scripts are not as intuitive as the HTML-based scripts since all actions are recorded as
web_url steps instead of web_link, web_image, and so on.
/* URL-based mode - only web_url functions */
...
web_url("spacer.gif",
"URL=http://graphics.hplab.com/images/spacer.gif",
"Resource=1",
"RecContentType=image/gif",
"Referer=",
"Mode=HTTP",
LAST); web_url("calendar_functions.js",
"URL=http://www.im.hplab.com/travelp/calendar_functions.js",
"Resource=1",
"RecContentType=application/x-javascript",
"Referer=",
"Mode=HTTP",
LAST);
...
You can switch recording levels and advanced recording options while recording, provided that you are not recording a multi-protocol script. The option of combining recording levels is available to advanced users for performance testing.
You can also regenerate a script after recording, using a different method than the original recording.
For example, if your record a script on an HTML-based level, you can regenerate it on a URL-based level. To regenerate a script, select Record > Regenerate Script and click Options to set the recording options for the regeneration.
Page 280 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Serialization Overview
VuGen uses serialization when it encounters an unknown object during the recording, provided that the object supports serialization. An unknown object can be an input argument which was not included by the filter and therefore its construction was not recorded. Serialization helps prevent compilation errors caused by the passing of an unknown argument to a method. If an object is serialized, it is often advisable to set a custom filter to record this object. For details, see
"How to
Serialize Scripts with the LoadRunner Serializer" on page 513 .
Tips for Working with Event Listening and Recording
It can sometimes be difficult to find the ideal listen and recording settings. When defining these settings, keep in mind the following guidelines: l
To record an event on an object, you must instruct VuGen to listen for the event, and to record the event when it occurs. You can listen for an event on a child object, even if a parent object contains the handler or behavior, or you can listen for an event on a parent object, even if the child object contains the handler or behavior.
However, you must enable recording for the event on the source object (the one on which the event actually occurs, regardless of which parent object contains the handler or behavior).
For example, suppose a table cell with an onmouseover event handler contains two images.
When a user touches either of the images with the mouse pointer, the event bubbles up to the cell and includes information on which image was actually touched. You can record this mouseover event by: n
Setting Listen on the WebTable mouseover event to If Handler (so that VuGen "hears" the event when it occurs), while disabling recording on it, and then setting Listen on the Image mouseover event to Never, while setting its recording status to Enable (to record the mouseover event on the image after it is listened to at the WebTable level).
n
Setting Listen on the Image mouseover event to Always (to listen for the mouseover event even though the image tag does not contain a behavior or handler), and setting the recording status on the Image object to Enabled (to record the mouseover event on the image).
l
Instructing VuGen to listen for many events on many objects may lower performance, so try to limit listening settings to the required objects.
l
In rare situations, listening to the object on which the event occurs (the source object) may interfere with the event.
Example of Click & Script Out of Context Recording
In the following example, a script was regenerated with the out-of-context recording option enabled.
web_image_link("Search Flights Button",
"Snapshot=t5.inf",
DESCRIPTION,
"Alt=Search Flights Button",
"FrameName=navbar",
ACTION,
Page 281 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
"ClickCoordinates=58,9",
LAST); web_add_cookie("MSO=SID=;1141052844; DOMAIN=localhost"); web_add_ cookie("MTUserInfo=hash=;47=;firstName=;Joseph=;expDate=;%0A=;creditCard=;=;address1=;234%20Willow%20Drive=;lastName=;Marshall%0A=;address2=;San%20Jose%2FCA%2F94085=;username=;jojo;
DOMAIN=localhost"); web_url("FormDateUpdate.class",
"URL=http://localhost:1080/WebTours/FormDateUpdate.class",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"UserAgent=Mozilla/4.0 (Windows 2000 5.0) Java/1.4.2_08",
"Mode=HTTP",
LAST);
...
If you disable this option, VuGen does not generate code for the ActiveX controls and Java applets.
In the following example, VuGen only generated the web_image_link function—not the web_url functions containing the class files.
web_image_link("Search Flights Button",
"Snapshot=t5.inf",
DESCRIPTION,
"Alt=Search Flights Button",
"FrameName=navbar",
ACTION,
"ClickCoordinates=58,9",
LAST);
For more information, see
"GUI Properties > Advanced Node" on page 322 .
Protocol Compatibility Table
The following table lists the Vuser protocols and which recording options nodes are available for each protocol.
Protocol
AJAX
Ajax TruClient
C Vuser
Citrix_ICA
Recording Options Nodes
l
General - Script, Recording l
GUI Properties - Advanced, Web Event Configuration l
Network - Port Mapping l
HTTP Properties - Advanced, Correlation l
None l
None l
General - Script l
Citrix - Configuration, Recorder, Code Generation, Login
Page 282 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
COM/DCOM
DB2 CLI
DNS
EJB
FTP
l
General - Script l
COM/DCOM - Filter, Options l
General - Script l
Database - Database l
None l
Java Environment Settings - Classpath l
EJB Options - Code Generation Options l
General - Script l
Network - Port Mapping
Flex (AMF/RTMP)
IMAP
Java over HTTP
l
General - Script, Protocols, Recording l
Flex - RTMP, Configuration, Externalizable Objects, AMF l
Network - Port Mapping l
HTTP Properties - Advanced, Correlation l
General - Script l
Network - Port Mapping l
General - Recording l
Java Environment Settings - Java VM, Classpath l
Network - Port Mapping l
HTTP Properties - Browser, Recording Proxy, Advanced, Correlation
Java Record Replay
l
Java Environment Settings - Java VM, Classpath l
Recording Properties - Recorder Options, Serialization Options,
Correlation Options, Log Options, Corba Options
Java Vuser
LDAP
l l
None
General - Script
MMS (Media Player)
l
None
Microsoft.NET
l
General - Script l
.NET - Recording, Filters
Microsoft Remote
Desktop Protocol
(RDP)
l
General - Script l
RDP - Client Startup, Code Generation (Basic, Advanced, and Agent) l
Network - Port Mapping
Page 283 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
MS Exchange
(MAPI)
MS SQL Server
l
None
MMS (Multimedia
Messaging Service)
ODBC
l
General - Script l
Database - Database l
General - Script
Oracle (2-Tier)
l
General - Script l
Database - Database l
General - Script l
Database - Database
Oracle NCA
Oracle Web
Applications 11i
PeopleSoft
Enterprise
l
General - Script, Protocols, Recording l
Network - Port Mapping l
HTTP Properties - Advanced, Correlation l
General - Script, Recording l
GUI Properties - Advanced, Web Event Configuration l
Network - Port Mapping l
HTTP Properties - Advanced, Correlation l
General - Script, Recording l
GUI Properties - Advanced, Web Event Configuration l
Network - Port Mapping l
HTTP Properties - Advanced, Correlation
PeopleSoft Tuxedo
l
None
POP3
l
General - Script l
Network - Port Mapping
Real
l
General - Script
SAP Web
l
General - Script, Recording l
Network - Port Mapping l
HTTP Properties - Advanced, Correlation
SAP Click & Script
l
General - Script, Recording l
GUI Properties - Advanced, Web Event Configuration l
Network - Port Mapping l
HTTP Properties - Advanced, Correlation
Page 284 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
SAP GUI
Siebel Web
Silverlight
SMTP
l
General - Script l
SAP GUI - General, Code Generation, Auto Logon l
General - Script, Protocols, Recording l
Network - Port Mapping l
HTTP Properties - Advanced, Correlation l
General - Script, Protocols, Recording l
Silverlight - Services l
Network - Port Mapping l
HTTP Properties - Advanced, Correlation l
Data Format Extensions - Chain Configuration, Code Generation l
General - Script l
Network - Port Mapping l
None
Tuxedo, Tuxedo 6
VB Script Vuser
VB Vuser
Web (Click &
Script)
l
None l
None l
General - Script, Recording l
GUI Properties - Advanced, Web Event Configuration l
Network - Port Mapping l
HTTP Properties - Advanced, Correlation
Web (HTTP/HTML)
l
General - Script, Protocols, Recording l
Network - Port Mapping l
HTTP Properties - Advanced, Correlation l
Data Format Extension - Chain Configuration, Code Generation
Web Services
Windows Sockets
l
General - Script, Protocols, Recording l
Traffic Analysis - Traffic Filters l
Network - Port Mapping l
HTTP Properties - Advanced, Correlation l
Sockets - Winsock
Citrix > Configuration Node
Enables you to set the window properties and encryption settings for the Citrix client during the recording session.
Page 285 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
To access
Important information
Record > Recording Options > Citrix > Configuration
This node is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility
Table" on page 282 .
User interface elements are described below:
UI Element Description
Encryption
Level
The level of encryption for the ICA connection: Basic, 128 bit for login only, 40
bit, 56 bit, 128 bit, or Use Server Default to use the machine's default.
Window
Size
The size of the client window.
Default value: 800 x 600.
Citrix > Code Generation
Enables you to configure the way VuGen captures information during recording.
To access Record > Recording Options > Citrix > Code Generation
Important information
l
This node is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on page 282
.
l
Text synchronization steps that you add manually during the recording are not affected by the above settings—they appear in the script even if you disable the above options.
l
The synchronization options also work for regenerating a script. For example, if you originally recorded a script with Add text synchronization calls disabled, you can regenerate after to recording to include text synchronization.
User interface elements are described below:
UI Element
Use Citrix Agent input in
Code Generation
Description
Use the Citrix Agent input to generate a more descriptive script with additional synchronization functions.
Default value: enabled.
l
Add text synchronization calls. Adds text synchronization
Sync on Text steps before each mouse click.
Default value: disabled.
Citrix > Login Node
Enables you to you set the connection and login information for the recording session.
Page 286 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
To access Record > Recording Options > Citrix > Login
Important information
l
This node is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on page 282
.
l
If you do not provide login information, you are prompted for the information when the client locates the specified server.
User interface elements are described below:
UI Element Description
Connection
l
Network Protocol. The preferred protocols are TCP/IP and TCP/IP+HTTP.
Most Citrix Servers support TCP/IP, however Citrix Clients starting with 11.2
do not. Certain servers, however, are configured by the administrators to allow only TCP/IP with specific HTTP headers. If you encounter a communication problem, select the TCP/IP+HTTP option.
l
Server. The Citrix server name. To add a new server to the list, click Add, and enter the server name (and its port for TCP/IP + HTTP).
Note: Multiple servers apply only when you specify a Published Application. If you are connecting to the desktop without a specific application, then list only one server.
l
Published Application. The name of the Published Application as it is recognized on Citrix server. The drop-down menu contains a list of the available applications. If you do not specify a published application, VuGen uses the server's desktop. If you added or renamed a published application, close the Recording options and reopen them to view the new list. Additionally, you can also enter the name of a published application manually if you know it exists (useful in cases where the drop-down list is inaccurate).
To change the name of the published application on the Citrix client, you must make the change on the Citrix Server machine. Select Manage Console >
Application and create a new application or rename an existing one.
Note: If you do not specify a published application, Citrix load balancing will not work. To use load balancing when accessing the server's desktop, register the desktop as a published application on the server machine, and select this name from the Published Application drop-down list.
Define connection parameters
Allows you to manually define the logon and connection details.
Logon
Information
Specify the User Name, Password, and Domain of the citrix user. Optionally, you can also specify the Client Name by which the MetaFrame server identifies the client.
Use ICA file for connection parameters
Specify an ICA file with the log configuration information.
Page 287 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Citrix > Recorder Node
Enables you to specify how to generate window names where the window titles change during recording. You can also specify whether to save snapshots of the screens together with the script files and whether to generate text synchronization functions.
To access Record > Recording Options > Citrix > Recorder
Important information
This node is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on page 282
.
User interface elements are described below:
UI
Element
Description
Save snapshots
Saves a snapshot of the Citrix client window for each script step, when relevant.
We recommend that you enable this option to provide you with a better understanding of the recorded actions. Saving snapshots, however, uses more disk space and slows down the recording session.
Window name
In some applications, the active window name changes while you are recording. If you try to replay the script as is, the Vuser uses the original window name and the replay may fail. You can specify a naming convention for the windows in which
VuGen uses a common prefix or common suffix to identify the windows as follows: l
Use new window name as is. Set the window name as it appears in the window title. (default) l
Use common prefix for new window names. Use the common string from the beginning of the window titles as a window name.
l
Use common suffix for new window names. Use the common string from the end of the window titles as a name.
Alternatively, you can modify the window names in the actual script after recording.
In the Script view, locate the window name, and replace the beginning or end of the window name with the "*" wildcard notation.
Example: ctrx_sync_on_window ("My Application*", ACTIVATE, ...CTRX_LAST);
COM/DCOM > Filter Node
Enables you to define which COM/DCOM objects to record.
To access
Use one of the following: l
Record > Recording Options > COM/DCOM > Filter
l
Replay > Recording Options > COM/DCOM > Filter
User interface elements are described below:
UI Element Description
Page 288 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
DCOM
Profile
DCOM
Listener
Settings
List
Specify one of the following filter types:
l
Default Filter. The filter to be used as the default when recording a COM
Vuser script.
l
New Filter. A clean filter based on the default environment settings. Note that you must specify a name for this filter before you can record with its settings.
You can also save the current settings and delete a filter using the Save As and
Delete buttons.
Displays a tree hierarchy of type libraries. You can expand the tree to show all of the available classes in the type library. You can expand the class tree to show all of the interfaces supported by that class.
To exclude a type library, clear the check box next to the library name. This excludes all of its classes in that type library. By expanding the tree, you can exclude individual classes or interfaces by clearing the check box next to the item.
An interface can be implemented differently by various classes. When you exclude an interface that is implemented by other classes that have not been excluded, a dialog box opens asking you if you also want to exclude the interface in all classes that implement it this interface.
Note that when you clear the check box adjacent to an interface, it is equivalent to selecting it in the Excluded Interfaces dialog box.
l
Environment. The environments to record: ADO objects, RDS Objects, and
Remote Objects. Clear the objects you do not want to record.
l
Type Libraries. A type library .tlb or .dll file, that represents the COM object to record. All COM objects have a type library that represents them. You can select a type library from the Registry, Microsoft Transaction Server, or file system.
Type Libraries. In the lower section of the dialog box, VuGen displays the following information for each type library.
l
TypLib. The name of the type library (tlb file).
l
Path. The path of the type library.
l
Guid. The Global Unique Identifier of the type library.
Adds another COM type library.
l
Browse Registry. Displays a list of type libraries found in the registry of the local computer. Select the check box next to the desired library or libraries and click OK.
l
Browse file system. Allows you to select type libraries from your local file system.
l
Browse MTS. add a component from a Microsoft Transaction Server. The
MTS Components dialog box prompts you to enter the name of the MTS server.
Type the name of the MTS server and click Connect. Remember that to record
MTS components you need an MTS client installed on your machine.
Page 289 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Select one or more packages of MTS components from the list of available packages and click Add. Once the package appears in the list of Type Libraries, you can select specific components from the package.
Removes a COM type library.
Excludes interfaces in the filter through the Excluded Interfaces dialog box.
In this dialog box, the checked interface listings are the ones that are excluded.
You can also add interfaces that are not listed. Click Add Interface... in the
Excluded Interfaces dialog box and enter the GUID number (interface ID) and name of the interface. You can copy the GUID from the interfaces.h file created by VuGen and listed in the selection tree in the left-hand column of the VuGen screen. Use the Add Interface... feature to exclude interfaces that are called needlessly by the script, but are not listed anywhere in the filter.
An interface can be implemented differently by various classes. When you exclude an interface that is implemented by other classes that have not been excluded, VuGen displays the a warning. If you check Don't ask me again and close the dialog box, then the status of all instances of the interface in all other classes will be changed automatically for this filter, whenever you change the status of the interface in one object. Click Yes to all to change the status of all instances of this interface for all other classes, click No to all to leave the status of all other instances unchanged. Click Next Instance to view the next class that uses this interface.
COM/DCOM > Options Node
Enables you to set additional options for your COM recording session, relating to the handling of objects, generation of logs, and VARIANT definitions.
The DCOM scripting options apply to all programming languages. These settings let you configure the scripting options for DCOM methods and interface handling.
To access Record > Recording Options > COM/DCOM > Options
User interface elements are described below:
UI Element
ADO Recordset filtering
Declare Temporary
VARIANTs as Globals
Fill array in separate scopes
Description
Condense multiple recordset operations into a single-line fetch statement (enabled by default).
Define temporary VARIANT types as Globals, not as local variables (enabled by default).
Fill in each array in a separate scope (enabled by default).
Fill structure in separate scopes
Fill in each structure in a separate scope (enabled by default).
Generate COM exceptions
Generate COM functions and methods that raised exceptions during recording (disabled by default).
Page 290 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Generate COM statistics
Generate recording time performance statistics and summary information (disabled by default).
Limit size of SafeArray log
Limit the number of elements printed in the safearray log per
COM call, to 16 (enabled by default).
Release COM Objects
Save Recordset content
Trap binded moniker objects
Record the releasing of COM objects when they are no longer in use (enabled by default).
Stores Recordset content as grids, to allow viewing of recordset in VuGen (enabled by default).
Trap all of the bound moniker objects (disabled by default).
Correlations > Configuration
This pane enables you to configure settings for Correlation Studio.
Page 291 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
UI example
To access Recording Options > Correlations > Configuration
Important information
l
"Correlation Studio Overview" on page 159
l
"Correlations > Rules " on next page
l
This node is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on page 282
.
Relevant tasks
"How to Correlate Scripts Using Design Studio" on page 163
User interface elements are described below:
Page 292 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
UI Element
Exclude strings
Description
Scan for correlations applying:
Rules Scan
Automatically correlate values found
Record Scan
Replay Scan
Apply correlation rules when performing correlation scan.
For details, see
"Correlations > Rules " below .
Correlation Studio will automatically correlate dynamic values found using the rules scan.
API used for correlations
Record and Replay scan Configuration
Select the API function to be used for correlation:
Boundary based: web_reg_save_param_ex
Regular Expression: web_reg_save_param_regexp
Ignore values shorter than [ ]
Ignore values longer than [ ]
Warm me if the dynamic string size is greater than 10 KB
Scan for correlations with the record based engine.
Scan for correlations with the replay based engine.
Enables you to define how short a dynamic value can be before it is ignored by the record or replay scan.
Default length is 4 characters.
Enables you to define the how long a dynamic value can be before it is ignored by the record or replay scan.
Default length is 400 characters.
Issues a warning if you try to correlate a string whose size is 10 KB or larger.
Record scan configuration
Enables you to enter strings that should be ignored by the record and replay scan.
Replay scan configuration
Scan for differences between snapshots using
Select a comparison method: l
HTML Comparison. Display the differences in HTML code only.
l
Text Comparison. Display all text, HTML, and binary differences.
Correlations > Rules
This dialog box enables you to manage correlation rules that automatically correlate dynamic values during code generation. You can:
Page 293 of 1812 HP LoadRunner (11.50)
User Guide
VuGen l
Add a new application l
Add a new rule l
Delete a rule l
Export rules l
Import rules l
Test a rule
To access
Important information
Relevant tasks
Do one of the following: l
Record > Recording Options > Correlations > Rules
l
Studio > Correlations > Rules
"Correlation Overview" on page 159
"Correlation Studio Overview" on page 159
"How to Correlate Scripts Using Design Studio" on page 163
User interface elements are described below (unlabeled elements are shown in angle brackets):
UI Element
<Application
List >
Description
A list of applications and their rules.
l
Select the check box adjacent to the application to activate it during recording.
l
Expand the application tree to select the checkbox adjacent to the rules to activate them during recording.
Add a new application to <Application List>.
Enter a new rule for the selected application in Correlation Rules.
For details, see
"New Rule Pane" on next page .
Delete the selected application or rule from the list.
Import a file containing correlation rule definitions.
Export a file containing a correlation rule definition.
Test a correlation rule.
For details, see
"Token Substitution Testpad Dialog Box" on page 296
.
Page 294 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
New Rule Pane
Enables you to define a new custom rule.
To access Record > Recording Options > Correlation > Rules > New Rule
Important information
This pane is available only for specific protocols. For a complete list of protocols and their associated nodes, see the
"Protocol Compatibility Table" on page 282 .
User interface elements are described below:
UI Element Description
Opens the
"Advanced Correlation Properties Dialog Box" on next page .
Action
Scan Type
RegExp
String
Left boundary
Specify the type of action for the rule from the following options: l
Search for Parameters in all of the Body Text. Searches the entire body—not just links, form actions or cookies. It searches the text for a match using the borders that you specify.
l
Search for parameters inlinks and form actions. Searches within links and forms' actions for the text to parameterize. This method is for application servers where you know the context rules. You define a left boundary, a right boundary, an alternate right boundary, and an instance of the left boundary within the current link.
l
Search for Parameters from cookie headers. Similar to the previous rule, except that the value is extracted from cookie text (exactly as it appears in the recording log) instead of from a link or form action.
l
Parameterize form field value. Saves the named form field value to a parameter. It creates a parameter and places it in the script before the form's action step. For this option, you need to specify the field name.
l
Text to enter a web_reg_add_cookie function by method inserts a web_
reg_add_cookie function if it detects a certain string in the buffer. It only adds the function for those cookies with the specified prefix. For this option, you need to specify the search text and the cookie prefix.
Specify the scan type either regular expression or boundary based.
Specify the regular expression. This element only applies to a regular expression scan type.
The left-most boundary where the rule will apply. This element only applies to boundary based scan type.
Match Case
Matches the case when looking for boundaries.
Parameter prefix
Uses a prefix in all automatically generated parameters based on this rule.
Prefixes prevent you from overwriting existing user parameters. In addition, prefixes allow you to recognize the parameter in your script. For example, in
Siebel Web, one of the built-in rules searches for the Siebel_row_id prefix.
Page 295 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Right boundary
Use '#' for any digit
The right-most boundary where the rule will apply. Use the drop-down menu to define this boundary as either the end of a string, a newline character, or a userdefined text. The element only applies to boundary based scan type.
Replaces all digits with a hash sign. The hash signs serve as wildcard, allowing you to find text strings with any digit.
Example: If you enable this option and specify HP### as the left boundary,
HP193 and HP284 will be valid matches.
This element only applies to boundary based scan type.
Advanced Correlation Properties Dialog Box
Enables you to set the advanced options for correlation rules.
To access Record > Recording Options > Correlation > Rules > New Rule >
Advanced
Important information
This node is available only for specific protocols. For a complete list of protocols and their associated nodes, see the
"Protocol Compatibility Table" on page 282 .
User interface elements are described below:
UI Element
Alternate right boundary
Always create new parameter
Left boundary instance
Length
Description
Alternative criteria for the right boundary, if the previously specified boundary is not found. Select one of the following options: User-defined
Text, Newline Character, End Of Page.
Creates a new parameter for this rule even if the value replaced by the parameter has not changed from the previous instance.
The number of occurrences of the left boundary in order for it to be considered a match.
The length of the string, starting with the offset, to save to the parameter. If this is not specified, the parameter continues until the end of the found value.
Offset
Replace with parameter only for exact matches
Reverse search
The offset of the string within the found value.
Replaces a value with a parameter only when the text exactly matches the found value.
Performs a backwards search.
Token Substitution Testpad Dialog Box
Enables you to test correlation rules before applying them.
Page 296 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
To access Record > Recording Options > Correlations > Rules > Test
User interface elements are described below:
UI Element Description
Runs the test.
Applied rules
Source string for substitution
Substitution Result
A list of the rules that were applied during the test.
Enter the source string for substitution.
The results of the test.
Database > Database Node
Enables you to set the recording options for database protocols.
To access Record > Recording Options > Database > Database
Important information
This node is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on page 282
.
User interface elements are described below:
UI Element Description
Opens the
"Database > Advanced Recording Options Dialog Box" below
.
Automatic transactions
Script options
Marks every lrd_exec and lrd_fetch function as a transaction. When these options are enabled, VuGen inserts lr_start_transaction and lr_end_
transaction functions around every lrd_exec or lrd_fetch function. Default
value: Disabled.
Generates comments into recorded scripts, describing the lrd_stmt option values. In addition, you can specify the maximum length of a line in the script.
Default value: 80 characters.
Think time
VuGen automatically records the operator's think time. You can set a threshold level, below which the recorded think time will be ignored. If the recorded think time exceeds the threshold level, VuGen places an lr_think_time statement before LRD functions. If the recorded think time is below the threshold level, an
lr_think_time statement is not generated.
Default value: five seconds.
Database > Advanced Recording Options Dialog Box
Enables you set the advanced recording options for database protocols.
Page 297 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
To access Record > Recording Options > Database > Database > Advanced
Important information
This node is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on page 282
.
User interface elements are described below:
UI
Element
Description
Code generation buffer size
Specify in kilobytes the maximum size of the code generation buffer.
Default value: 128 kilobytes.
CtLib
Function
You can instruct VuGen to generate a send data time stamp or an extended result set statement.
l
Generate send data time stamp. Generates lrd_send_data statements with the TotalLen and Log keywords for the mpszReqSpec parameter. The
Advanced Recording Options dialog box lets you instruct VuGen to also generate the TimeStamp keyword. If you change this setting on an existing script, you must regenerate the Vuser script by choosing Record >
Regenerate Script. It is not recommended to generate the Timestamp keyword by default. The timestamp generated during recording is different than that generated during replay and script execution will fail. You should use this option only after a failed attempt in running a script, where an lrd_result_set following an lrd_send_data fails. The generated timestamp can be correlated with a timestamp generated by an earlier lrd_send_data.
l
Generate extended result set statement. Generates an lrd_result_set function when preparing the result set. This setting instructs VuGen to generate the extended form of the lrd_result_set function, lrd_result_set_ext. In addition to preparing a result set, this function also issues a return code and type from ct_results.
Recording engine
You can instruct VuGen to record scripts with the older LRD recording engine for compatibility with previous versions of VuGen.
Note: This option is available only for single-protocol scripts.
Recording log options
You can set the detail level for the trace and ASCII log files. The available levels for the trace file are Off, Error Trace, Brief Trace, or Full Trace. The error trace only logs error messages. The Brief Trace logs errors and lists the functions generated during recording. The Full Trace logs all messages, notifications, and warnings.
You can also instruct VuGen to generate ASCII type logs of the recording session.
The available levels are Off, Brief detail, and Full detail. The Brief detail logs all of the functions, and the Full detail logs all of the generated functions and messages in ASCII code.
Data Format Extension > Chain Configuration Node
Enables you to add, remove, and modify chains and Data Format Extensions. You can add a Data
Format Extension to an extension chain.
Page 298 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
To access
Do one of the following: l
Record > Recording Options > Data Format Extension > Chain
Configuration
l
Replay > Run Time Settings > Data Format Extensions > Code
Generation
Important information
This node is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on page 282
.
See also
"Data Format Extensions" on page 661
"Data Format Extension List" on page 669
User interface elements are described below:
UI Element Description
Chains pane
Displays a list of the chains.
Add Chain. Enables you to add a new chain.
Edit Chain Name. Enables you to modify the name of the chain.
Delete Chain. Removes the selected chain.
Chain: <chain name> pane
Add DFE. Enables you to add a Data Format Extension to the selected chain in the Chains pane. For more information on Data Format Extensions, see
"Data
Format Extension List" on page 669 .
Edit DFE. If you selected a Prefix/Postfix Extension, you can edit the details in the Add Prefix/Postfix to Chain dialog box. For more information on the dialog box, see
" Add Prefix/Postfix to Chain Dialog Box" on next page .
Delete DFE. Removes the selected Data Format Extension from the chain.
Name
Tag
Move Up/Down. Moves a Data Format Extension up or down in the chain.
Extensions are run in the order in which they appear in the extensions list.
The display name of the Data Format Extension.
The unique ID of the extension.
Provider
The creator of the Data Format Extension.
Continue
Processing
Determines how the chain behaves if the Data Format Extension successfully reformats the data.
l
If the condition is true, VuGen continues to pass the converted data to the next
Data Format Extension in the chain.
l
If the condition is false, the chain is terminated.
Page 299 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Add Prefix/Postfix to Chain Dialog Box
This dialog enables you to add or edit a prefix/postfix extension to the selected chain.
To access
1. Go to Recording > Recording Options > Data Format Extension > Chain
Configuration node.
See also
2. In the Chain: <Chain name> area, click the
3. Select the Prefix/Postfix Extension option.
button.
"Data Format Extension > Chain Configuration Node" on page 298
"Data Format Extensions" on page 661
"Data Format Extension List" on page 669
User interface elements are described below:
UI Element Description
Case sensitive
Sets the extension to cut from the defined prefix and postfix of the string only if the letter cases match.
The name of Prefix/Postfix Extension.
Display name
Postfix to cut
The section you want to cut, from the end of the string.
Prefix to cut
The section you want to cut, from the beginning of the string.
Tag name
The unique ID of the Prefix/Postfix Extension.
Page 300 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Add Data Format Extension
This dialog box enables you to select the data format extension type.
GWT
Extension
URL
Encoding
Extension
JSON
Extension
XML
Validator
Extension
Prefix
Postfix
Extension
UI example
To access
Important information
Recording Options > Chain Configuration >
l
"Data Format Extension > Chain Configuration Node" on page 298
l
" Add Prefix/Postfix to Chain Dialog Box" on previous page
"How to Apply Chains to Sections of the HTTP Message" on page 667
Relevant tasks
Data
Format
Extension
Base64
Extension
Description
Decodes strings that are encoded with as BASE64 encoder.
Transforms GWT data to XML format.
Decodes strings that are encoded with URL encoding format.
Transforms JSON data to XML format.
Receives data and checks to see if it conforms with XML syntax. This check allows VuGen to perform correlations based on XPath and to display snapshot data in an xml viewer.
Enables you to cut data from the beginning and/or end of a string which you do not want decoded. You can add and customize as many prefix/postfix extensions as required. Each postfix/prefix extension created should have a unique display name and tag name.
Data Format Extension > Code Generation Node
Enables Data Format Extensions during code generation. Enables you to define chains for each message section of the HTTP message.
To access Record > Recording Options > Data Format Extensions > Code
Generation
Important information
This node is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on page 282
.
Page 301 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
See also
"Data Format Extensions" on page 661
"Data Format Extension List" on page 669
User interface elements are described below (unlabeled elements are shown in angle brackets):
UI Element Description
Enable data format extension
Enables you to select chains for each message section of the HTTP message.
Deselected by default.
Configuration
Format
l
Code and snapshots. (default) Enables Data Format Extensions on the code and snapshot data.
l
Snapshots. Enables Data Format Extensions on snapshot data, but does not format the data in the script itself.
Verify formatted data
Chains
Checks the results of the formatted data by converting it back to the original state and verifying that it matches the original data.
Note: Available for Base64 extension only.
Imports the Data Format Extensions from a file.
Exports the Data Format Extensions to a file.
<Message sections list>
Displays a list of the following sections of the HTTP message included in the script: l
Body l
Headers l
Cookies l
Query String
When you select a message section from the list, the title of the section chains pane (described below) reflects your selection and the pane displays the list of chains for that section.
<Section Chains>
Add Chain. Adds chain to selected message section.
Note: l
Enabled for Headers and Cookies sections only. Enables you to add additional chains to the selected message section.
l
For VuGen to correctly match the chain to the Headers or Cookies section, the name in the Name column must match the name of the Headers or Cookies section.
Page 302 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Delete Chain. Removes chain from corresponding message section.
Note: You cannot delete the default options from any of the message sections.
Reset. Clears the selected chain in the Chain column.
EJB > Code Generation Options Node
Enables you to set the EJB recording options.
To access Record > Recording Options > EJB Options > Code Generation Options
Important information
This node is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on page 282
.
User interface elements are described below:
UI Element Description
Auto
Transaction
Automatically marks all EJB methods as transactions. This encloses all methods with lr.start_transaction and lr.end_transaction functions.
Default value: enabled.
EJB
Initialization
Method
The method to which the EJB/JNDI initialization properties are written. The available methods are init and action.
Default value: init.
Insert Value
Check
Automatically insert an lr.value_check function after each EJB method. This function checks for the expected return value for primitive values and strings.
Flex > RTMP Node
This node enables you to include the flex_rtmp_recive_stream step in Flex RTMP scripts.
To access Record > Recording Options > Flex > RTMP
Important
Information
This node is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on page 282
.
User interface elements are described below:
UI
Element
Generate flex_ rtmp_ receive_ stream step
Description
Generates a single step when recording a stream. This step does not replay certain actions, such as pause and seek. If your script requires these actions, clear the check box to record all receive and send steps. However, in this case, you must manually modify your script as described in the Readme.
Page 303 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Flex > Configuration Node (Recording)
Enables you to set an external JVM (Java Virtual Machine) path.
To access Record > Recording Options> Flex > Configuration
Important information
This node is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on page 282
.
User interface elements are described below:
UI Element
Use External JVM
External JVM Path
UseGraniteDS configuration
Description
Enables you to use external JVM. VuGen must be restarted for the changes to be applied.
The path of the external JVM.
Defines the server side Data Service configuration.
If you select this option, do not select Use Flex LCDS/BlazeDS jars to serialize the messages.
Flex Code Generation Node
Enables you to set the code generation options for the Flex protocol.
To Access Record > Recording Options > Flex > Code Generation
Important
Information
This node is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on page 282
.
User interface elements are described below:
UI Element
Encode AMF3 using external parser
Encode externalizable object with
LoadRunner parser
Description
Attempt to encode externalizable objects using an external parser.
When recording Flex applications, in certain cases VuGen may be unable to decode externalizable objects. This is due to a proprietary encoding scheme employed by the Flex 2 application.
To overcome this issue, VuGen generates Custom Request functions containing unparsed AMF3 binary data when it encounters an externalizable object.
You can attempt to encode these objects using the LoadRunner parser as well. This decodes all externalizable objects as standard AMF3 objects, generating flex_amf_call functions. However, if objects cannot be parsed, they are not decoded at all so you have to check the script after it is generated to make sure that the parser was effective. Additionally, this
Page 304 of 1812 HP LoadRunner (11.50)
User Guide
VuGen option may reduce the stability of code generation.
Default value: enabled.
Flex server/application
JAR files location
The location of the external parser and JAR files to be encoded.
Flex > Externalizable Objects Node (Recording)
This dialog box enables you to configure how LoadRunner handles Externalizable objects in Flex scripts.
To access Record > Recording Options > Flex > Externalizable Objects
Important information
This node is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on page 282
.
Relevant tasks
l
"How to Serialize Using External Java Serializer" on page 512
l
"How to Serialize Scripts with the LoadRunner Serializer" on page 513
See also
l
"Flex Overview" on page 504
l
" Externalizable Objects in Flex Scripts" on page 509
User interface elements are described below:
UI Element Description
Do not serialize externalizable objects
Generate script using default settings.
Serialize objects using
Select the appropriate radio button: l
Select LoadRunner AMF serializer if you are not using the Adobe
LiveCycle Data Services or Adobe BlazeDS server.
l
Select Custom Java classes and select one or both of the options: n
Select Use Flex LCDS/BlazeDS jars if you are using Flex LCDS or
BlazeDS jars to serialize the messages. If you selected UseGraniteDS
configuration in the Configuation node, do not select Use Flex
LCDS/BlazeDS jars.
n
Select Use additional jars to add additional jars to serialize the messages. You must copy the jar files from the server and specify their location in the Classpath Entries List described below. You must ensure that the files exist in the same location on all load generator computers. If you add jars with the same names as the Flex LCDS or
Blaze DS jars chosen by selecting the first check-box, these files will be overwritten.
Page 305 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Classpath Entries List
Down Arrow. Moves a classpath entry down the list.
Up Arrow. Moves a classpath entry up the list.
Add Classpath. Adds a new line to the classpath list.
Add Classpath Folder. Adds all files from the folder to the classpath list.
Delete. Permanently removes a classpath.
General > Protocol Node
Enables you to set the script generation preferences by setting the scripting language and options.
To access
Important information
Record > Recording Options > General > Protocols
This node is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on page 282
.
User interface elements are described below:
UI Element
Active Protocols List
Description
A list of the protocols which comprise your multiple protocol script. VuGen lets you modify the protocol list for which to generate code during the recording session. Select the check boxes adjacent to the protocols you want to record in the next recording session. Clear the check boxes adjacent to the protocols you do not want to record in the next recording session.
General > Code Generation
This pane of the Recording Options dialog box enables you to define what tasks VuGen performs automatically after generating a Vuser script.
To access
Relevant tasks
Record > Recording Options > General > Code Generation
"How to Create an Asynchronous Vuser Script" on page 198
"How to Correlate Scripts Using Design Studio" on page 163
User interface elements are described below:
Page 306 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
UI Element
Description
Correlations
Scan
Instructs VuGen to analyze the Vuser script to locate dynamic values that may need to be correlated. This scan is performed after a new script is recorded and after an existing script is regenerated.
Async Scan Instructs VuGen to analyze the Vuser script to locate asynchronous communication. This scan is performed after a new script is generated and after an existing script is regenerated.
Async
Options...
Opens the
"Asynchronous Request Thresholds Dialog Box" on page 216 .
General > Recording Node
Enables you to specify what information to record and which functions to use when generating a
Vuser script, by selecting a recording level.
To access Record > Recording Options > General > Recording
Important information
This node is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on page 282
.
User interface elements are described below:
UI Element Description
Opens the
"Advanced HTML Dialog Box" on next page
.
Opens the
"Advanced URL Dialog Box" below
.
GUI-based script
HTML-based script
This is the default recording level for Web (HTTP/HTML) Vusers. It instructs VuGen to record HTML actions in the context of the current Web page. It does not record all resources during the recording session, but downloads them during replay. This options is recommended for browser applications with applets and VB script.
URL-based script
Recommended for most applications, including those with JavaScript.
Also recommended for PeopleSoft Enterprise and Oracle Web
Applications.
Record all requests and resources from the server. It automatically records every HTTP resource as URL steps (web_url statements), or in the case of forms, as web_submit_data. It does not generate the web_
link, web_image, and web_submit_form functions, nor does it record frames. This options is recommended For non-browser applications.
Advanced URL Dialog Box
Enables you to set the advanced options for scripts using the URL recording mode.
Page 307 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
To access Record > Recording Options > General > Recording > URL Advanced
Important information
This dialog box is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on page
282
.
User interface elements are described below:
UI Element Description
Restores the default settings of this dialog box.
Create concurrent groups for resources after their source
HTML page
Enable EUC-
Encoded Web
Pages
Records the resources in a concurrent group (enclosed by web_concurrent_
start and web_concurrent_end statements) after the URL. Resources include files such as images and js files. If you disable this option, the resources are listed as separate web_url steps, but not marked as a concurrent group.
(For Japanese windows only) Instructs VuGen to use EUC encoding. For more information, see
"EUC-Encoding (Japanese Windows only)" on page
277 .
Use web_ custom_request only
Records all HTTP requests as custom requests. VuGen generates a web_
custom_request function for all requests, regardless of their content.
Recommended for non-browser applications.
Advanced HTML Dialog Box
Enables you to set the advanced options for HTTP-based scripts.
To access Record > Recording Options > General > Recording > HTML Advanced
Important information
This dialog box is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on page
282
.
User interface elements are described below:
UI Element Description
Restores the default settings of this dialog box.
Non-HTML generated elements
Many Web pages contain non-HTML elements, such as applets, XML, ActiveX elements, or JavaScript. These non-HTML elements usually contain or retrieve their own resources. Using the following options, you can control how VuGen records non HTML-generated elements.
Page 308 of 1812 HP LoadRunner (11.50)
User Guide
VuGen l
Record within the current script step. Does not generate a new function for each of the non HTML-generated resources. It lists all resources as arguments of the relevant functions, such as web_url, web_link, and web_
submit_data. The resources, arguments of the Web functions, are indicated by the EXTRARES flag.
l
Record in separate steps and use concurrent groups. Creates a new function for each one of the non HTML-generated resources and does not include them as items in the page's functions (such as web_url and web_
link). All of the web_url functions generated for a resource are placed in a concurrent group (surrounded by web_concurrent_start and web_
concurrent_end).
l
Do not record. Does not record any non-HTML generated resources.
Script type
l
A script describing user actions. Generates functions that correspond directly to the action taken. It creates URL (web_url), link (web_link), image
(web_image), and form submission (web_submit_form) functions. The resulting script is very intuitive and resembles a context sensitive recording.
l
A script containing explicit URL's only. Records all links, images and
URLs as web_url statements, or in the case of forms, as web_submit_data. It does not generate the web_link, web_image, and web_submit_form functions. The resulting script is less intuitive. This mode is useful for instances where many links within your site have the same link text. If you record the site using the first option, it records an ordinal (instance) for the link, but if you record using the second option, each link is listed by its URL. This facilitates parameterization and correlation for that step.
General > Script Node
Enables you to set the script generation preferences by setting the scripting language and options.
To access Record > Recording Options > General > Script
Important information
This node is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on page 282
.
User interface elements are described below:
UI Element Description
Close all
AUT processes when recording stops
Automatically closes all of the AUT's (Application Under Test) processes when
VuGen stops recording.
Default value: disabled.
Page 309 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Correlate arrays
Correlate large numbers
Correlate simple strings
Correlate small numbers
Correlate structures
Tracks and correlates arrays of all data types, such as string, structures, numbers, and so on.
Default value: enabled.
Correlates long data types such as integers, long integers, 64-bit characters, float, and double.
Default value: disabled.
Correlates simple, non-array strings and phrases.
Default value: disabled.
Correlates short data types such as bytes, characters, and short integers.
Default value: disabled.
Tracks and correlates complex structures.
Default value: enabled.
Declare primitives as locals
Declares primitive value variables as local variables rather than class variables (C,
C#, and .NET only).
Default value: enabled.
Explicit variant declaration
Declares variant types explicitly in order to handle ByRef variants (Visual Basic for
Applications only).
Default value: enabled.
Generate fixed think time after end transaction
Adds a fixed think time, in seconds, after the end of each transaction. When you enable this option, you can specify a value for the think time.
Default value: disabled, 3 seconds when enabled.
Generates a log of all events that took place during recording.
Default value: disabled.
Generate recorded events log
Generate think time greater than threshold
Uses a threshold value for think time. If the recorded think time is less than the threshold, VuGen does not generate a think time statement. You also specify the threshold value. The default values is 3—if the think time is less than 3 seconds,
VuGen does not generate think time statements. If you disable this option, VuGen will not generate any think times.
Default value: enabled, 3 seconds.
Insert output parameters values
Inserts output parameter values after each call (C, C#, and .NET only).
Default value: disabled.
Insert postinvocation info
Insert informative logging messages after each message invocation (non-C only).
Default value: enabled.
Page 310 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Insert preinvocation info
Insert informative logging messages before each message invocation (non-C only).
Default value: enabled.
Maximum number of lines in action file
Replace long strings with parameter
Reuse variables for primitive return values
Create a new file if the number of lines in the action exceeds the specified threshold. The default threshold is 60000 lines (C, C#, and .NET only).
Default value: disabled.
Save strings exceeding the maximum length to a parameter. This option has an initial maximum length of 100 characters. The parameters and the complete strings are stored in the lr_strings.h file in the script's folder in the following format:
const char <paramName_uniqueID> ="string".
This option allows you to have a more readable script. It does not effect the performance of the script.
Default value: enabled.
Reuse the same variables for primitives received from method calls. This overrides the Declare primitives as locals setting.
Default value: enabled.
Track processes created as
COM local servers
Track the activity of the recorded application if one of its sub-processes was created as a COM local server (C and COM only).
Default value: enabled.
Use full type names
Use the full type name when declaring a new variable (C# and .NET only).
Default value: disabled.
Use helpers for arrays
Use helper functions to extract components in variant arrays (Java and VB
Scripting only).
Default value: disabled.
Use helpers for objects
Use helper functions to extract object references from variants when passed as function arguments (Java and VB Scripting only).
Default value: disabled.
Use protected application recording
Use this option if VuGen is unable to record your application. Your application may block access to VuGen, and recording with this option selected may enable access.
Default value: disabled.
GUI Properties > Web Event Configuration Node
Enables you to set the level of detail recorded in a script (web event recording).
Page 311 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
To access Record > Recording Options > GUI Properties > Web Event Configuration
Important information
This node is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on page 282
.
User interface elements are described below:
UI Element
Basic Event
Configuration
Level
Custom
Settings
High Event
Configuration
Level
Medium Event
Configuration
Level
Description
l
Always records click events on standard Web objects such as images, buttons, and radio buttons.
l
Always records the submit event within forms.
l
Records click events on other objects with a handler or behavior connected.
l
Records the mouseover event on images and image maps only if the event following the mouseover is performed on the same object.
Opens the
"Custom Web Event Recording Configuration Dialog Box" below
, where you can customize the event recording configuration.
In addition to the objects recorded in the Medium level, it records mouseover, mousedown, and double-click events on objects with handlers or behaviors attached.
In addition to the objects recorded in the Basic level, it records click events on the <DIV>, <SPAN>, and <TD> HTML tag objects.
Custom Web Event Recording Configuration Dialog Box
Enables you to customize the level of web event recording.
To access Record > Recording Options > GUI Properties > Web Event Configuration
> Custom Settings
Important information
This dialog box is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on page
282
.
User interface elements are described below (unlabeled elements are shown in angle brackets):
UI
Element
Description
<Object
List>
A list of the web objects. Each web object can be customized according to the other settings in this dialog box.
Page 312 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
<Object
Menu>
Event
Menu
l
Add. Adds a new HTML tag object to the object list. Type in the name of the tag.
l
Delete. Deletes an object from the object list.
l
Add. Adds an event to the Event Name column of this object.
l
Delete. Deletes an event from the Event Name column of this object.
A list of events associated with the object.
Event
Name
File
Menu
Listen
l
Load Configuration. Loads a previously created custom configuration.
l
Save Configuration As. Saves the current configuration.
The criteria which determines when VuGen listens for an event.
l
Always. Always listen to the event.
l
If Handler. Listens to the event if a handler is attached to it. A handler is code in a
Web page, typically a function or routine written in a scripting language, that receives control when the corresponding event occurs.
l
If Behavior. Listens to the event if a DHTML behavior is attached to it. A DHTML behavior encapsulates specific functionality or behavior on a page. When applied to a standard HTML element on a page, a behavior enhances that element's default behavior.
l
If Handler or Behavior. Listens to the event if either a handler or a behavior is attached to it.
l
Never. Never listens to the event.
For more information, see
"Tips for Working with Event Listening and Recording" on page 281
.
Record
The criteria which determines when VuGen records an event.
l
Enabled. Records the event each time it occurs on the object as long as VuGen listens to the event on the selected object, or on another object to which the event bubbles. Bubbling is the process whereby, when an event occurs on a child object, the event can travel up the chain of hierarchy within the HTML code until it encounters an event handler to process the event.
l
Disabled. Does not record the specified event and ignores event bubbling where applicable.
l
Enabled on next event. Same as Enabled, except that it records the event only if the subsequent event occurs on the same object. For example, suppose a mouseover behavior modifies an image link. You may not want to record the mouseover event each time you happen to move the mouse over this image.
Because only the image that is displayed after the mouseover event enables the link event, however, it is essential that the mouseover event is recorded before a click event on the same object.
For more information, see
"Tips for Working with Event Listening and Recording" on page 281
.
Reset
Resets the custom settings to the settings of your choice: basic, medium, or high.
Page 313 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Settings
HTTP > Advanced Node
Enables you to customize the code generation settings in the area of think time, resetting contexts, saving snapshots, and the generation of web_reg_find functions.
To access Record > Recording Options > HTTP Properties > Advanced
Important information
l
This node is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on page 282
l
Some options within this node are not available in when using a multi-protocol script.
User interface elements are described below:
UI Element Description
Opens the
"Headers Dialog Box" on next page
.
Opens the
"Content Type Filters Dialog Box" on page 316
.
Opens the
"Non-Resources Dialog Box" on page 316
.
Add comment to script for HTTP errors while recording
Adds a comment to the script for each HTTP request error. An error request is defined as one that generated a server response value of 400 or greater during recording.
Generate web_reg_ find functions for page titles
Generates web_reg_find functions for all HTML page titles. VuGen adds the string from the page's title tag and uses it as an argument for web_
reg_find.
l
Generate web_reg_find functions for sub-frames. Generates web_
reg_find functions for page titles in all sub-frames of the recorded page.
Note: This option is available only for Web and Oracle NCA protocols
Record script using earlier recording engine
Record using the single-protocol recording engine. By default, for Web
(HTTP/HTML) Vusers, VuGen uses the multi-protocol recording engine for all recordings even if you are only recording a single protocol.
Record think time
Records the think times and generate lr_think_time functions. You can also set a Think-time Threshold value to only generate lr_think_time functions when the actual think-time is greater than the threshold.
Note: This option is available only for Wireless Protocols scripts.
Reset context for each action
Resets all HTTP contexts between actions. Resetting contexts allows the Vuser to more accurately emulate a new user beginning a browsing
Page 314 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Save snapshot resources locally
Support charset
session. This option resets the HTML context, so that a context-less function is always recorded in the beginning of the action. It also clears the cache and resets the user names and passwords.
Note: This option is available only for Web and Oracle NCA protocols
Saves a local copy of the snapshot resources during record and replay, thereby creating snapshots more accurately and displaying them quicker.
l
UTF-8. Enables support for UTF-8 encoding. This instructs VuGen to convert non-ASCII UTF-8 characters to the encoding of your locale's machine in order to display them properly in VuGen. You should enable this option only on non-English UTF-8 encoded pages. The recorded site's language must match the operating system language. You cannot record non-English Web pages with different encodings (for example, UTF-8 together with ISO-8859-1 or shift_jis) within the same script.
l
EUC-JP. If you are using Japanese Windows, select this option to enable support for Web sites that use EUC-JP character encoding.
This instructs VuGen to convert EUC-JP strings to the encoding of your locale's machine in order to display them properly in VuGen.
VuGen converts all EUC-JP (Japanese UNIX) strings to the SJIS
(Japanese Windows) encoding of your locale's machine, and adds a
web_sjis_to_euc_param function to the script. (Kanji only)
Headers Dialog Box
Enables you to automatically send additional HTTP headers with every HTTP request submitted to the server.
To access Record > Recording Options > HTTP > Advanced > Headers
Important information
l
This dialog box is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on page 282
.
l
The following standard headers are considered risky: Authorization,
Connection, Content-Length, Cookie, Host, If-Modified-Since, Proxy-
Authenticate, Proxy-Authorization, Proxy-Connection, Referer, and WWW-
Authenticate. They are not recorded unless selected in the Header list.
User interface elements are described below (unlabeled elements are shown in angle brackets):
UI Element Description
Plus. Adds a new entry.
Minus. Deletes an entry.
Restores the current list to the default values and entries.
Page 315 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
<Dropdown menu>
<Header list>
Restores all lists to the default values and entries.
Controls the options for this dialog box: l
Do not record headers.
l
Record headers in list.
l
Record headers not in list.
List of headers which may or may not be recorded. The lists vary depending on which drop-down item is selected. Each item can be selected or deselected using its individual checkbox.
Content Type Filters Dialog Box
Enables you to filter content types for your recorded script. You can specify the type of the content you want to record or exclude from your script.
To access Record > Recording Options > HTTP > Advanced > Content Types
Important information
This node is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on page 282
.
User interface elements are described below (unlabeled elements are shown in angle brackets):
UI Element Description
Plus. Adds a new entry.
Minus. Deletes an entry.
Restores the current list to the default values and entries.
<Dropdown menu>
<Header list>
Restores all lists to the default values and entries.
Controls the options for this dialog box: l
Do not filter content types.
l
Filter content types in list.
l
Filter content types not in list.
List of content types which may or may not be filtered. The lists vary depending on which drop-down item is selected. Each item can be selected or deselected using its individual checkbox.
Non-Resources Dialog Box
When you record a script, VuGen indicates whether or not it will retrieve the resource during replay using the Resource attribute in the web_url function. If the Resource attribute is set to 0, the
Page 316 of 1812 HP LoadRunner (11.50)
User Guide
VuGen resource is retrieved during script execution. If the Resource attribute is set to 1, the Vuser skips the resource type.
You can exclude specific content types from being handled as resources. For example, you can indicate to VuGen that gif type resources should not be handled as a resource and therefore be downloaded unconditionally.
To access Record > Recording Options > HTTP > Advanced > Non-Resources
Important information
This dialog box is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on page
282
.
User interface elements are described below (unlabeled elements are shown in angle brackets):
UI Element Description
Add. Adds a new entry to the list.
Remove. Deletes an entry from the list.
Restores the default list.
<Non-Resource
Content Type list>
List of items which should not be recorded as resources. Each item can be selected or deselected using its individual checkbox.
Java > Classpath Node
Enables you to specify the location of additional classes that were not included in the system's classpath environment variable. You may need these classes to run Java applications and insure proper recording.
To access Record > Recording Options > Java Environment Settings > Classpath
Important information
This node is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on page 282
.
User interface elements are described below:
UI Element Description
Down Arrow. Moves a classpath entry down the list.
Up Arrow. Moves a classpath entry up the list.
Add Classpath. Adds a new line to the classpath list.
Classpath Entries List
Delete. Permanently removes a classpath.
A list of classpath entries.
Page 317 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Java > VM Node
Enables you to indicate additional parameters to use when recording Java applications.
To access Record > Recording Options > Java Environment Settings > Java VM
Important information
This node is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on page 282
.
User interface elements are described below:
UI Element
Additional VM
Parameters
Description
List the Java command line parameters here. These parameters may be any
Java VM argument. The common arguments are the debug flag (-verbose) or memory settings (-ms, -mx). In additional, you may also pass properties to
Java applications in the form of a -D flag. For more information about the Java
VM flags, see the JVM documentation.
Prepend
CLASSPATH to -
Xbootclasspath parameter
Instructs VuGen to add the Classpath before the Xbootclasspath (prepend the string).
Use classic
Java VM
Use the specified
Additional VM
Parameters during replay
Instructs VuGen to use the classic version of VM (for example, not Sun's
Java HotSpot).
Instructs VuGen to use the same Additional VM parameters in replay.
.NET > Filters Node
Enables you to set the recording options for .NET Vuser scripts.
To access Record > Recording Options > Microsoft .NET > Filters
Important information
This node is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on page 282
.
See also
l
".NET Filters Overview" on page 576
l
".NET Filters - Advanced" on page 577
l
"Guidelines for Setting .NET Filters" on page 578
User interface elements are described below:
Page 318 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
UI Element
Custom Filter
Environment Filter
New Filter
Description
Opens the Create a New Filter dialog box, enabling you to create a new filter. For more details, see
"Create a New Filter Dialog Box
[.NET Protocol]" below .
Opens the Filter Manager, allowing you to view and modify all
Microsoft .NET protocol filters. For details, see
"Filter Manager
[.NET Protocol]" below .
Shows the filters that you created earlier on the current machine.
Lists the available environment filters: .NET Remoting, ADO.NET,
Enterprise Services, and WCF (Windows Communication
Foundation of Framework 3.0).
Indicates that you want to create a new filter.
Create a New Filter Dialog Box [.NET Protocol]
This dialog box enables you to create a new filter for .NET Vuser scripts.
To access Record > Recording Options > Microsoft .NET > Filters >
New Filter > Create
User interface elements are described below:
UI Element
Based on a custom filter
Based on an environment filter
Start with an empty filter
Description
Create a new filter based on a custom filter. Use the drop-down menu to select the custom filter.
Create a new filter based on an environment filter. Use the check boxes next to the environment filters to indicate which environment filters to base the filter on.
Create a new filter that is not based on a pre-existing filter.
Filter Manager [.NET Protocol]
This dialog box enables you to create and edit .NET filters.
To access
Record > Recording Options > Microsoft .NET > Filters > Environment /
Custom Filter > Filter Manager
See also
".NET Filters Overview" on page 576
".NET Filters - Advanced" on page 577
"Guidelines for Setting .NET Filters" on page 578
User interface elements are described below (unlabeled elements are shown in angle brackets):
Page 319 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
UI
Element
Description
Includes the selected element. If you manually include a parent node, the Filter
Manager includes the child elements below it, provided that no other rule exists. For example, if you include a class, it will include all its methods unless you specifically excluded a method.
Excludes the selected element. The child elements are also excluded unless they were included by another rule. By default, when you exclude a class, the Filter
Manager applies the Exclude attribute to the class, but it allows the recording engine to record activity within the methods of the excluded class. When you exclude a method, however, the Filter Manager applies Totally Exclude, preventing the recording engine from recording any activity within the methods of the excluded class. Advanced users can modify these setting in the filter file.
Removes the manual inclusion or exclusion rule. In this case, the element may be impacted by other parent elements.
The inclusion and exclusion rules have the following properties: l
The rules are hierarchical—if you add an include or exclude rule to a class, then the derived classes will follow the same rule unless otherwise specified.
l
A rule on a class only affects its public methods, derived classes, and inner classes.
l
A rule on a namespace affects all the classes and their public methods.
l
Note that adding or removing assemblies does not necessarily affect the classes that they contain—you can remove an assembly, yet its methods may be recorded due to the hierarchical nature of the filter.
l
As part of the filter design, several methods, such as .cctor() and
Dispose(bool), do not follow the standard hierarchal rules.
Note: The resetting of a parent node does not override a manual inclusion or exclusion applied to a child node. For example, if you manually exclude a method, and then reset its class, which by default included all sub-nodes, your method will remain excluded.
Properties and events are view-only and cannot be included or excluded through the
Filter Manager. In addition, several system related elements are protected and may not be altered.
For tips about including and excluding elements in the filter, see
"Guidelines for
Setting .NET Filters" on page 578
.
Navigates to the previous or next tree node visited by the user.
Impact
Log
The Impact Log indicates what your last changes were and how they affected your filter. The user actions are listed in descending order, with the latest changes at the top.
For each element affected by your manual inclusion or exclusion, the log indicates how it affected the element. It also provides a link to that element in the Filter
Manager.
To view the Impact Log, click the Impact Log button on the Filter Manager's toolbar or select Actions > View Impact Log in the Filter Manager window.
Page 320 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
<Filter
Manager
Tree>
The Filter Manager tree uses symbols to illustrate the elements and their status. For details about each of the icons, see the table below.
l
Element icons represent the type of element—assembly, namespace, class, method, structure, property, events, or interfaces.
l
A check mark or X adjacent to the element icon, indicates whether or not the element is included or excluded.
l
A bold element indicates that it was explicitly included or excluded. This may be a result of being manually included or excluded by the user or by a pre-defined rule in the environment filter. If you reset a bold node, it returns to its original, non-bold state.
Add
Reference
Opens the Add Reference dialog box with a list of .NET Framework components or assemblies in the Public Assemblies folder. For more information, see
"Add
Reference Dialog Box [.NET Protocol]" on next page .
Delete
Deletes the selected custom filter. The Filter Manager prompts you for a confirmation.
New
Opens the Create a New Filter dialog box, in which you create an empty filter or a new filter based on an existing one. For more information, see
"Create a New Filter
Dialog Box [.NET Protocol]" on page 319
.
Remove
Reference
Removes the assembly that is selected in the Filter Manager and all of the elements associated with it. The Filter Manager prompts you for a confirmation.
Save
Saves the changes you made to filter.
View
Impact
Log
Opens the Impact log for the selected filter. The Impact log shows which nodes in the tree were affected by recent actions.
The following table shows the Filter Manager Tree icons that represent the various elements:
Icon Description
assembly assembly that couldn't be loaded assembly that was partially loaded class constructor static constructor
Icon Description
interface method static method namespace property static property structure event static event
Page 321 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Add Reference Dialog Box [.NET Protocol]
This dialog box enables you to add references to .NET filters.
To access
Record > Recording Options > Microsoft .NET > Filters > Environment /
Custom Filter > Filter Manager > Add Reference
User interface elements are described below (unlabeled elements are shown in angle brackets):
UI Element Description
<Component
List>
A list of .NET Framework components or assemblies in the Public Assemblies folder.
l
To add one of the listed items, select it and click Select. You can select multiple components using ctrl-click. The bottom pane shows the selected references.
l
To add an assembly that is not in the list, click Browse and locate the reference on your file system or network.
<Selected
Component
List>
The list of selected components. The Type column indicates .NET for a component from the Public Assemblies folder and File for a component that was added by selecting Browse.
l
To clear an item from the list, select it in the bottom pane and click Remove.
GUI Properties > Advanced Node
Enables you to set advanced recording options for Click & Script Vusers.
To access Record > Recording Options > GUI Properties > Advanced
Important information
This node is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on page 282
.
User interface elements are described below:
Recording Settings Properties
UI Element
Record renderingrelated property values
Record
'click' by mouse
Description
Records the values of the rendering-related properties of DOM objects (for example, offsetTop), so that they can be used during replay. Note that this may significantly decrease the replay speed.
Default value: disabled.
Records mouse clicks by capturing mouse events instead of capturing the click() method. Enable when the recorded application uses the DOM click() method, to prevent the generation of multiple functions for the same user action.
Default value: enabled.
Page 322 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
events
Record socket level data
Generate snapshots for AJAX steps
Enables the recording of socket level data. If you disable this option you will need to manually add the starting URL before recording. In addition, you will be unable to regenerate the script on an HTML level.
Default value: enabled.
Enables generation of snapshots for AJAX steps. Enabling this option can result in errors during recording.
Default value: disabled.
Code Generation Settings Properties
UI Element Description
Enable generation of out-of-context steps
Creates a URL-based script for ActiveX controls and Java applets, so that they will be replayed. Since these functions are not part of the native recording, they are referred to as out-of-context recording.
Default value: disabled.
Enables automatic browser title verification.
Default value: disabled.
Enable automatic browser title verification
Perform a title verification for
l
each navigation. Performs a title verification only after a navigation. When a user performs several operations on the same page, such as filling out a multi-field form, the title remains the same and verification is not required.
l
each step. Performs a title verification for each step to make sure that no step modified the browser title. A modified browser title may cause the script to fail.
l
Perform a title verification using the URL if the title is missing. For browser windows without a title, perform a title verification for each step using its URL.
.NET > Recording - Recording Node
Enables you to set the recording options for .NET Vuser scripts.
To access Record > Recording Options > Microsoft .NET > Recording
Important information
This node is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on page 282
.
User interface elements are described below:
UI Element Description
Code
Generation
Allow you to indicate whether to show warnings, a stack trace, or all event subscriptions during code generation.
Page 323 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Debug
Options
Filters
Logging
Remote
Objects
l
Show Warnings. Shows warning messages that are issued during the code generation process.
l
Show Stack Trace. Shows the recorded stack trace if it is available.
l
Show All Event Subscriptions. Generates code for all event subscriptions that were recorded. If this option is disabled, VuGen will only generate code for events in which both the publisher (the object which invokes the event) and the subscriber (the object informed of the event) are included in the filter.
Default value: disabled.
Enables you to trace the stack and specify its size.
l
Stack Trace. Traces the contents of the stack for each invocation within the script. It allows you to determine which classes and methods were used by your application. This can be useful in determining which references, namespaces, classes, or methods to include in your filter. Enabling the trace may affect your application's performance during recording.
l
Default value: disabled.
Stack Trace Limit. The maximum number of calls to be stored in the stack. If the number of calls exceeds the limit, VuGen truncates it.
Default value: 20 calls.
l
Ignore all assemblies by default. Ignores all assemblies that are not explicitly included by the selected filter. If you disable this option, VuGen looks for a matching filter rule for all assemblies loaded during the recording.
The Logging options let you set the level of detail that is recorded in the recording log file.
l
Log severity. Sets the level of logging to Errors Only (default), or Debug.
The severity setting applies for all the logs that you enable below. You should always use the Errors Only log unless specifically instructed to do otherwise by HP support, since detailed logging may significantly increase the recording time.
l
Instrumentation Log. Logs messages related to the instrumentation process.
l
Default value: enabled.
Recording Log. Logs messages issued during recording.
l
Default value: enabled.
Code Generation Log. Logs messages issued during the code generation stage.
Default value: enabled.
For information about this property, see
"Remote Objects Property" on next page .
Page 324 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Serialization
l
Serialization format. The format of the serialization file that VuGen creates while recording a class that supports serialization: Binary, XML, or Both.
The advantage of the binary format is that since it is more compressed, it is quicker. The disadvantage of the binary format is that you do not have the ability to manipulate the data as you do with XML.
l
Serialize long arrays. For long arrays containing serializable objects (for example, an array of primitives), use VuGen's serialization mechanism.
Enabling this option generates LrReplayUtils.GetSerializedObject calls if the array size is equal to or larger than the threshold value.
l
Threshold value for long array size. The threshold size for an array to be considered a long array.If the array size is equal to or larger than this size,
VuGen serializes it when detecting serializable objects.
Tip: For XML serialization, you can view the content of the XML file. To view the file, select View XML from the right-click menu.
Remote Objects Property
User interface elements are described below:
UI Element
Record inprocess objects
Description
Records activity between the client and server when the server is hosted in the same process as the client. Since the actions are not true client/server traffic, it is usually not of interest. When in-process methods are relevant, for example, in certain Enterprise Service applications, you can enable this option to capture them.
Default value: disabled.
Asynchronous calls
Specifies how VuGen should handle asynchronous calls on remote objects and their callback methods l
Call original callbacks by default. Uses the recorded application's original callback when generating and replaying the script. If the callback method is explicitly excluded by a filter, the callback will be excluded even if you enable this option.
l
Generate asynchronous callbacks. This option defines how VuGen will handle callbacks when the original callbacks are not recorded.
For more information, see
"Asynchronous Calls" on page 573
.
WCF duplex binding
l
Generate dummy callback handler. Replaces the original callback in duplex communication with a dummy callback, performing the following actions: n
Store arguments. When the server calls the handler during replay, it saves the method arguments to a key-value in memory map.
Page 325 of 1812 HP LoadRunner (11.50)
User Guide
VuGen n
Synchronize replay. It stops the script execution until the next response arrives. VuGen places the synchronization at the point that the callback occurred during recording. This is represented in the script by a warning: l
Generate unique client base address. If your application employs dual
HTTP Binding, since HTTP is inherently not a duplex protocol, the framework uses a standard port to receive response data being passed to the callback. When you attempt to run multiple instances of your application, you may be unable to do so using the same port number. This option replaces the original client base address's port number with a unique port.
For background information about WCF duplex binding, see
"Recording WCF
Duplex Communication " on page 569 .
.NET > Shared DLLs
This dialog box enables you to specify the list of shared DLLs before you record a Vuser script. If a
DLL is included in the list of shared DLLs, when the Vuser script is run and requires a particular
DLL, the Vuser will access the DLL in its shared location – the DLL will not be copied to the load generator. Adding a DLL to the list of shared DLLs therefore saves hard-drive space on the load generator when a Vuser is run.
Note: The location that you specify for a shared DLL must be accessible to all load generators on which the Vuser will run.
After you record a Vuser script, the list of shared DLLs is copied from the Recording Options to the
Run-Time Settings. For details on how to view and modify the run-time settings, see
".NET >
Shared DLLs" on page 386
.
To access
See also
Record > Recording Options > Microsoft .NET > Shared DLLs
".NET > Shared DLLs" on page 386
User interface elements are described below:
UI
Element
Description
DLL
Entries
The list of shared DLLs that VuGen will access while the Vuser script is being recorded. The order in which the DLLs appear in the list is significant. When a specific
DLL is required, VuGen will access the first instance of that DLL in the list.
If a specific DLL is not currently available, clear the check box to the left of the DLL entry. The DLL will remain in the list of shared DLLs. To enable the DLL, select the check box to the left of the DLL entry.
Down Arrow. Moves the selected DLL entry down the list.
Up Arrow. Moves the selected DLL entry up the list.
Page 326 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Add DLL. Enables you to add a DLL to the list of shared DLLs.
Add DLL Folder. This option is always disabled.
Delete. Removes the selected DLL from the list of shared DLLs.
Mobile TruClient Properties > Mobile Device Node
This pane enables you to select a mobile device properties when recording a Mobile TruClient script.
To access
l
Recording Options > Mobile TruClientProperties > Mobile Device
l
Select Moble Device button from the Main VuGen Toolbar
Relevant tasks
"How to Add, Remove, and Import Mobile Device Settings for Mobile TruClient" on page 567
"How to Record a Script with Mobile TruClient " on page 566
User interface elements are described below:
UI
Element
Description
Mobile
Device
User
Agent
Select the mobile device type you want to test.
Specify the header string that is sent to server to identify your mobile device. Once you have a selected a device, the default header value will appear. However, this header string can be modified.
Display
Specify the height and width of your mobile device screen. Mobile TruClient will open browser window according to the display settings.
Network > Port Mapping Node
Enables you to set the port mapping recording options.
To access Record > Recording Options > Network > Port Mapping
Page 327 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Important information
This node is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on page 282
.
User interface elements are described below (unlabeled elements are shown in angle brackets):
UI Element
<Port Mapping list>
Capture level
Network-level server address mappings for:
Description
Opens the Server Entry dialog box, allowing you to add a new mapping. For user interface details, see
"Server Entry Dialog Box" below .
Opens the Server Entry dialog box, allowing you to edit the selected entry.
For user interface details, see
"Server Entry Dialog Box" below .
Opens the Advanced Settings dialog box to enable auto-detection of the communication protocol and SSL level. For user interface details, see
"Advanced Port Mapping Settings Dialog Box" on page 331 .
A list of the port mappings. You can temporarily disable any entry by clearing the check box adjacent to it. When you disable an entry, VuGen ignores all traffic to that server:port combination. You should disable the port entry when the data is irrelevant or if the protocol is not supported.
The level of data to capture (relevant only for HTTP based protocols): l
Socket level data. Capture data using trapping on the socket level only.
Port mappings apply in this case (default).
l
WinINet level data. Capture data using hooks on the WinINet.dll API used by certain HTTP applications. The most common application that uses these hooks is Internet Explorer. Port mappings are not relevant for this level.
l
Socket level and WinINet level data. Captures data using both mechanisms. WinINet level sends information for applications that use
WinINet.dll. Socket level sends data only if it determines that it did not originate from WinINet.dll. Port mapping applies to data that did not originate from WinINet.dll.
Specifies the mappings per protocol. For example, to show only the FTP mappings, select FTP.
Server Entry Dialog Box
Enables you to define a server from the server list in the network port mapping node.
To access Record > Recording Options > Network > Port Mapping > New Entry / Edit
Entry
Important information
This dialog box is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on page
282
.
Page 328 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
See also
l
Use heading and page format if cross-referencing within this portal.
l
Use generic and name of another portal if cross-referencing outside of this portal.
l
Do not use periods unless you have complete sentences.
User interface elements are described below:
UI Element Description
Allow forwarding to target server from local port
Forwards all traffic from a specific port to another server. This is particularly useful in cases where VuGen cannot run properly on the client, such as unique Linux machines, or instances where it is impossible to launch the application server through VuGen. You configure VuGen to intercept the traffic from the problematic client machine, and pass it on to the server. In this way, VuGen can process the data and generate code for the actions.
Example: If you were working on a Linux client called host1, which communicated with a server, server1, over port 8080, you would create a Port
Mapping entry for server1, port 8080. In the Traffic Forwarding section of the
Server Entry dialog box, you enable traffic forwarding by selecting the Allow
forwarding to target server from local port check box. You specify the port from which you want to forward the traffic, in our example 8080.
You then connect the client, host1, to the machine running VuGen, instead of server1. VuGen receives the communication from the client machine and forwards it via the local port 8080, to the server. Since the traffic passes through
VuGen, it can analyze it and generate the appropriate code.
Connection
Type
The security level of the connection: Plain (non-secure), SSL, or Auto. If you select Auto, the recorder checks the first 4 bytes for an SSL signature. If it detects the SSL signature, it assumes that SSL is being used.
Page 329 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Port
The port of the target server for which this entry applies. Entering 0 specifies all ports.
If you do not specify all of the port and server names, VuGen uses the following priorities in assigning data to a service: l
Priority 1: port and server specified l
Priority 2: port not specified, server specified l
Priority 3: port specified, server not specified l
Priority 4: port and server not specified
A map entry with a high priority does not get overridden by an entry with a lower priority. For example, if you specify that traffic on server twilight using port 25 be handled as SMTP and then you specify that all servers on port 25 be handled as
HTTP, the data will be treated as SMTP.
l
Forced mapping. If you specify a mapping for a port number, server name, or combination server:port, VuGen forces the network traffic to use that service.
For example, if you were to specify <Any> server on port 80 to use FTP,
VuGen uses the FTP protocol to record that communication, even though the actual communication may be HTTP. In this instance, the Vuser script might be empty.
Record
Type
The type of recording—directly or through a proxy server.
Service ID
A protocol or service name used by the recorder to identify the type of connection
(i.e. HTTP, FTP, and so on). You can also specify a new name. The name may not exceed 8 characters.
Service
Type
The type of service, currently set to TCP.
SSL Cipher
The preferred SSL cipher to use when connecting with a remote secure server.
SSL
Version
The preferred SSL version to use when communicating with the client application and the server.
Default value: SSL 2/3. However some services require SSL 3.0 only or SSL 2.0
only. Some new wireless applications require TLS 1.0—a different security algorithm.
The IP address or host name of the target server for which this entry applies.
Default value: All Servers.
Target
Server
Use specified client-side certificate
The default client-side certificate to use when connecting to a remote server.
Specify or browse for a certificate file in txt, crt, or pem format, and supply a password.
Use specified proxyserver certificate
The default server certificate to present to client applications that request a server certificate. Specify or browse for a certificate file in txt, crt, or pem format, and supply a password. Click Test SSL to check the authentication information against the server.
Page 330 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Advanced Port Mapping Settings Dialog Box
Enables you to set the advanced port mapping settings. For more information, see
"Port Mapping
Auto Detection" on page 276
.
To access Record > Recording Options > Network > Port Mapping > Options
Important information
This dialog box is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on page
282
.
User interface elements are described below:
UI Element Description
Enable auto detection of
SOCKET based communication
Automatically detects the type of communication. If required, raise the maximum number of transitions, one at a time until VuGen succeeds in detecting the protocol. You can also gradually increase the maximum buffer size by 1024 bytes (1 KB) at a time until VuGen succeeds in detecting the protocol. This allows VuGen to review a larger amount of data in order to find a signature.
Enable auto
SSL detection
Log Level
Automatically detects SSL communication. Specify the version and default cipher that you want to detect. Note that this only applies to port mappings that were defined as auto in the Connection type box, or not defined at all. If a server, port, or server:port combination was defined as either Plain or SSL, then auto SSL detection does not apply.
Sets the logging level for the automatic socket detection.
RDP > Code Generation > Advanced Node
Enables you to control the way VuGen creates an RDP script. Only advanced users are advised to modify these settings.
To access Record > Recording Options > RDP > Code Generation - Adv
Important information
This node is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on page 282
.
User interface elements are described below:
UI Element Description
Correlate clipboard parameters
Replaces the recorded clipboard text sent by the user with the correlated parameter containing the same text as received from the server.
Doubleclick
The maximum time (in milliseconds) between two consecutive mouse button clicks to be considered a double-click.
Page 331 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
timeout
(msec)
Prefix for clipboard parameters
Prefix for snapshot names
Default value: 500 milliseconds.
The prefix for clipboard parameters generated in the current script. This is useful when merging scripts, allowing you to specify a different prefix for each script.
Default value:ClipboardDataParam_.
The prefix for snapshot file names generated in the current script. This is useful when merging scripts—you can specify a different prefix for each script.
Default value: snapshot_.
RDP > Code Generation > Agent Node
Enables you to control the way the agent for Microsoft Agent for Terminal Server functions with
VuGen during recording.
To access Record > Recording Options > RDP > Code Generation - Agent
Important information
This node is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on page 282
.
User interface elements are described below:
UI
Element
Description
Enable
RDP agent log
Enables the RDP agent log.
l
RDP agent log detail level. Configures the level of detail generated in the RDP agent log with Standard being the lowest level of detail and Extended Debug being the highest level of detail.
l
RDP agent log destination. Configures the destination of the RDP agent log data. File saves the log messages only on the remote server side. Stream sends the log messages to the VuGen machine. FileAndStream sends the log messages to both destinations.
l
RDP agent log folder. The folder path on the remote server that the RDP agent log file will be generated in.
Use
RDP agent
Generates script using information gathered by the RDP agent during the recording session. The LoadRunner RDP agent must be installed on the server.
RDP >Code Generation > Basic Node
Enables you to control the way VuGen creates a script—the level of detail, triggers, and timeouts.
To access Record > Recording Options > RDP > Code Generation - Basic
Important information
This node is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on page 282
.
Page 332 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
User interface elements are described below:
UI Element
Always generate connection name
Description
If selected, function call will contain the ConnectionName parameter. If not selected, the functions will only contain this parameter if more than a single
rdp_connect_server appears in the script.
Default value: disabled.
Automatic generation of synchronization points
Synchronization points allow the script to pause in the replay while waiting for a window or dialog to pop-up, or some other control to fulfil a certain condition. This option automatically generates sync_on_image functions before mouse clicks and drags (enabled by default). The Sync radius is the distance from the mouse operation to the sides of the rectangle which defines the synchronization area. The default is 20 pixels. Select one of the following options: l
None. No synchronization points are automatically added.
l
Rectangular. Creates synchronization points as rectangular boxes centered around the click or drag location.
l
Enhanced. Creates synchronization points designed to select only the desired location (e.g. a button) and to react to changes in the UI (e.g. the button moves). If a synchronization region is not recognized, the rectangular synchronization settings are used.
Generate mouse movement calls
Generates rdp_mouse_move calls in the script. When enabled, this option significantly increases the script size.
Default value: disabled.
Generate raw keyboard calls
Generate raw mouse calls
Generates rdp_raw_key_up/down calls as if the script level was set to
Raw. Mouse calls will still be generated according to the script level. If disabled, VuGen generates Keyboard calls according to the script level. If the script level is set to Raw, this option is ignored.
Default value: disabled.
Generates rdp_mouse_button_up/down calls as if the script level was set to Raw. Keyboard calls will still be generated according to the script level. If disabled, VuGen generates Mouse calls according to the script level. If the script level is set to Raw, this option is ignored.
Default value: disabled.
Script generation level
The level of the script and the type of API functions to use when generating the script.
l
High. Generate high level scripts. Keyboard events are translated to rdp_
type calls. Two consecutive mouse clicks with the same coordinates are translated as a double-click.
l
Low. Generate low level scripts. Key up/down events are translated into
rdp_key events. Modifier keys (Alt, Ctrl, Shift) are used as a KeyModifier parameter for other functions. Mouse up/down/ move events are translated to mouse click/drag events.
Page 333 of 1812 HP LoadRunner (11.50)
User Guide
VuGen l
Raw. Generates a script on a raw level, by extracting input events from network buffers and generating calls in their simplest form: key up/down, mouse up/down/move. The KeyModifier parameter is not used.
RDP > Client Startup Node
Enables you to set the RDP client startup recording options.
To access Record > Recording Options > RDP > Client Startup
Important information
This node is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on page 282
.
User interface elements are described below:
UI Element Description
Run RDP client application
Connects to the terminal server by running the Terminal Services client.
Use custom connection file
Use default connection file
Connects to the terminal server by using an existing connection file. The file should have an *.rdp extension. You can browse for the file on your file system or network.
Connects to the terminal server by using the Default.rdp file in your document's folder.
Recording Properties > Corba Options Node
Enables you to set the CORBA specific recording properties and several callback options.
To access Record > Recording Options > Recording Properties > Corba Options
Important information
This node is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on page 282
.
User interface elements are described below:
UI Element Description
Record
CallBack
Connection
Instructs VuGen to generate a connect statement for the connection to the ORB, for each callback object.
Default value: disabled.
Record DLL only
Instructs VuGen to record only on a DLL level.
Default value: disabled.
Page 334 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Record
Properties
Resolve
CORBA
Objects
Show IDL
Constructs
Use local vendor classes
Vendor
Instructs VuGen to record system and custom properties related to the protocol.
Default value: enabled.
When correlation fails to resolve a CORBA object, recreate it using its binary data.
Default value: disabled.
Displays the IDL construct that is used when passed as a parameter to a
CORBA invocation.
Default value: enabled.
Use local vendor classes and add the srv folder to the BOOT classpath. If you disable this option, VuGen uses network classes and adds the script's classes to the classpath.
Default value: enabled.
The CORBA vendors: Inprise Visibroker, Iona OrbixWeb, or Bea Weblogic.
Recording Properties > Correlation Options Node
Allows you to enable automatic correlation, and control its depth.
To access Record > Recording Options > Recording Properties > Correlation
Options
Important information
This node is available only for specific protocols. For a complete list of protocols
and their associated nodes, see "Protocol Compatibility Table" on page 282
User interface elements are described below:
UI Element Description
Advanced
Correlation
Enables correlation on complex objects such as arrays and CORBA container constructs and arrays. This type of correlation is also known as deep correlation.
Default value: enabled.
Correlate
Collection
Type
Correlate
String
Arrays
Correlates objects from the Collection class for JDK 1.2 and higher.
Default value: disabled.
Correlate strings within string arrays during recording. If disabled, strings within arrays are not correlated and the actual values are placed in the script.
Default value: enabled.
Correlate
Strings
Correlate strings in script during recording. If disabled, the actual recorded values are included in the script between quotation marks and all other correlation options are ignored
Default value: disabled.
Correlation
Level
Indicates the level of deep correlation, the number of inner containers to be scanned.
Default value: 15.
Page 335 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Recording Properties > Log Options Node
Enables you to determine the level of debug information generated during recording.
To access Record > Recording Options > Recording Properties > Log Options
Important information
This node is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on page 282
.
User interface elements are described below:
UI Element
Digest
Calculation
Description
Class Dumping
Dumps all of the loaded classes to the script folder. Default value: disabled.
Generate a digest of all recorded objects.
Default value: disabled.
l
Exclude from Digest. A list of objects not to be included in the digest calculation.
Syntax: java.lang.Object class format, delimiter = ","
Log Level
Synchronize
Threads
The level of recording log to generate: l
None. No log file is created l
Brief. Generates a standard recording log and output redirection l
Detailed. Generates a detailed log for methods, arguments, and return values.
l
Debug. Records hooking and recording debug information, along with all of the above.
For multi-threaded applications, instructs VuGen to synchronize between the different threads.
Default value: disabled.
Recording Properties > Recorder Options Node
Enables you to set the Java protocol to record as well as other protocol specific recording options.
To access Record > Recording Options > Recording Properties > Recorder Options
Important information
This node is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on page 282
.
User interface elements are described below:
UI Element
Byte Array
Description
The format of byte arrays in a script: Regular, Unfolded Serialized Objects,
Page 336 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Format
Bytes as
Characters
Comment Lines
Containing
Displays readable characters as characters with the necessary casting— not in byte or hexadecimal form.
Default value: enabled.
Comment out all lines in the script containing one of the specified strings. To specify multiple strings, separate the entries with commas.
Default value: Any line with a string containing <undefined> will be commented out.
Extensions List
A comma separated list of all supported extensions. Each extension has its own hooks file.
Default value: JNDI.
Insert
Functional
Check
Load Parent
Class Before
Class
Record
LoadRunner
Callback
or Folded Serialized Objects. Use one of the serialized object options when recording very long byte arrays.
Default value: Regular.
Inserts verification code that compares the return value received during replay, to the expected return value generated during recording. This option only applies to primitive return values.
Default value: disabled.
Change the loading order so that parent classed are loaded before child classes. This helps identify hooking for trees with deep inheritance.
Default value: enabled.
Records the LoadRunner stub object as a callback. If disabled, VuGen records the original class as the callback.
Default value: enabled.
Recorded
Protocol
Remove Lines
Containing
Specifies which protocol to record: RMI, CORBA, JMS, or Jacada.
Default value: RMI.
Remove all lines containing one of the specified strings from the script. To specify multiple strings, separate the entries with commas. This feature is useful for customizing the script for a specific testing goal.
Unreadable
Strings as Bytes
Represents strings containing unreadable characters as byte arrays. This option applies to strings that are passed as parameters to invocations.
Default value: enabled.
Use _JAVA_
OPTIONS flag
Forces JVM versions 1.2 and higher to use the _JAVA_OPTION environment variable which contains the desired JVM parameters.
Default value: disabled.
Use DLL hooking to automatically attach LoadRunner support to any JVM.
Use DLL hooking to attach
LoadRunner support
Page 337 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Recording Properties > Serialization Options Node
Enables you to control how objects are serialized. Serialization is often relevant to displaying objects in an ASCII representation in order to parameterize their values.
To access Record > Recording Options > Recording Properties > Serialization
Options
Important information
This node is available only for specific protocols. For a complete list of protocols and their associated nodes,
"Protocol Compatibility Table" on page 282
See also
"How to Correlate Scripts - Java Scripts - Serialization" on page 180
User interface elements are described below:
UI
Element
Description
Unfold
Serialized
Objects
Expands serialized objects in ASCII representation and allows you to view the
ASCII values of the objects in order to perform parameterization.
l
Limit Object Size (bytes). Limits serializable objects to the specified value.
Objects whose size exceeds this value, will not be given ASCII representation in the script.
l
Default value: 3072 bytes.
Ignore Serialized Objects. Lists the serialized objects not to be unfolded when encountered in the recorded script. Separate objects with commas.
l
Syntax: java.lang.Object class format, delimiter = ","
Serialization Delimiter. Indicates the delimiter separating the elements in the
ASCII representation of objects. VuGen will only parameterize strings contained within these delimiters. The default delimiter is `#'.
l
Unfold Arrays. Expands array elements of serialized objects in ASCII representation. If you disable this option and an object contains an array, the object will not be expanded.
Default value: enabled—all deserialized objects are totally unfolded.
n
Limit Array Entries. Instructs the recorder not to open arrays with more than the specified number of elements. Default value: 200.
RTE > Configuration Node
Enables you to set the recording options to match the character set used during terminal emulation.
To access Record > Recording Options > RTE > Configuration
Important information
This node is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on page 282
.
User interface elements are described below:
Page 338 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
UI
Element
Description
Character
Set
Match the character set used during terminal emulation. The default character set is
ANSI. For Kanji and other multi-byte platforms, you can specify DBCS (Double-byte
Character Set).
RTE > RTE Node
Enables you to set the general RTE recording options.
To access Record > Recording Options > RTE > RTE
Important information
This node is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on page 282
.
User interface elements are described below:
UI Element Description
Generate automatic synchronization commands
Automatically generates a number of TE-synchronization functions, and insert them into the script while you record.
l
Cursor. Generate a TE_wait_cursor function before each TE_type function.
l
Prompt. Generate a TE_wait_text function before each TE_type function
(where appropriate).
l
X-System. Generate a TE_wait_sync function each time a new screen is displayed while recording.
Note: VuGen generates meaningful TE_wait_text functions when recording
VT type terminals only. Do not use automatic TE_wait_text function generation when recording block-mode (IBM) terminals.
Generate automatic X-
System transaction
Generate screen header comments
Generates screen header comments while recording a Vuser script, and inserts the comments into the script. A generated comment contains the text that appears on the first line of the terminal emulator window.
Note: You can generate comments automatically only when using blockmode terminal emulators such as the IBM 5250.
Keyboard record timeout
Records the time that the system was in the X SYSTEM mode during a scenario run. This is accomplished by inserting a TE_wait_sync_
transaction function after each TE_wait_sync function. Each TE_wait_
sync_transaction function creates a transaction with the name default.
Each TE_wait_sync_transaction function records the time that the system spent in the previous X SYSTEM state.
When you type text into a terminal emulator while recording, VuGen monitors the text input. After each keystroke, VuGen waits up to a specified amount of time for the next key stroke. If there is no subsequent keystroke within the specified time, VuGen assumes that the command is complete.
Page 339 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
SAPGUI > Auto Logon Node
Enables you to log on automatically when you begin recording. The logon functions are placed in the vuser_init section of the script.
To access Record > Recording Options > SAPGUI > Auto Logon
Important information
This node is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on page 282
.
User interface elements are described below:
UI
Element
Description
Enable
Auto logon
Enables you to log on automatically when you begin recording. Enter the Server
name, User, Password, Client name, and interface Languages for the SAP server.
SAPGUI > Code Generation Node
Enables you to set the code generation settings for the SAPGUI protocol.
To access Record > Recording Options > SAPGUI > Code Generation
Important information
This node is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on page 282
.
User interface elements are described below:
UI Element Description
Always generate
Object ID in header file
Places the Object IDs in a separate header file instead of in the script. When you disable this option, VuGen generates the IDs according to the specified string length in the general script setting. This results in a more compact and cleaner script.
Generate
Fill Data steps
Generates Fill Data steps for table and grid controls—instead of separate steps for each cell.
Generate logon operation as a single step
Generates a single sapgui_logon method for all of the logon operations. This helps simplify the code. If you encounter login problems, disable this option.
SAPGUI > General Node
Enables you to set the general recording options for the SAPGUI protocol.
Page 340 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
To access Record > Recording Options > SAPGUI > General
Important information
This node is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on page 282
.
User interface elements are described below:
UI
Element
Description
Capture screen snapshots
Indicates how to save the snapshots of the SAPGUI screens as they appear during recording: ActiveScreensnapshots, Regular snapshots, or None. ActiveScreen snapshots provide more interactivity and screen information after recording, but they require more resources.
Changing events during recording
l
Process Context menus by text. Processes context menus by their text, generating sapgui_toolbar_select_context_menu_item_by_text functions.
When disabled, VuGen processes context menus by their IDs, and generates a
sapgui_toolbar_select_context_menu_item for context menus. This is an advantage when working with Japanese characters.
Silverlight > Services Node
Enables you to manage WSDL files in Silverlight Protocol scripts.
To access Record > Recording Options > Silverlight > Services
Important information
This node is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on page 282
.
Relevant tasks
"How to Import WSDL Files" on page 639
User interface elements are described below (unlabeled elements are shown in angle brackets):
UI Element
<Service list>
Automatically detect
WSDL files and import services during code generation
Do not use WSDL files
Description
The list of imported WSDL files and their locations. The toolbar allows you to add, delete and edit WSDL files. Additionally, select the Protocol and Security Data button to edit Protocol and Security
Data.
Automatically attempts to locate and import WSDL files used in your script.
Disables WSDL files in your script, generating SOAP requests instead. This results in a lower level script, however it generally increases the script performance.
Page 341 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Service Endpoint
Use WSDL files included in the script
WSDL Location
The location of the endpoint at which a given WSDL is available.
Enables WSDL files imported automatically or manually.
The location of the selected WSDL file.
Add / Edit Services Dialog Box
Enables you to locate and import WSDLs to a Silverlight Protocol script.
To access Record > Recording Options > Silverlight > Services > Add
Important information
This node is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on page 282
.
Relevant tasks
"How to Import WSDL Files" on page 639
User interface elements are described below:
UI Element
Select WSDL from
Service Endpoint
WSDL Location
Description
Opens the Connection Settings dialog box, enabling you to configure the proxy and authentication information for the specified WSDL file. For user interface information, see
"Connection Settings Dialog Box" below
.
l
URL. Select the WSDL by specifying the URL.
l
File. Select the WSDL by specifying the local path.
l
Previously Imported. Select the WSDL from the WSDL History (list of previously imported WSDL files).
The location of the endpoint at which a given WSDL is available.
The URL or local path to the WSDL.
Connection Settings Dialog Box
Configures the proxy and authentication information for WSDL files in Silverlight Protocol scripts.
To access Record > Recording Options > Silverlight > Services > Add > Connection
Settings
Page 342 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Important information
l
This node is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on page 282
.
l
These settings are only relevant for importing WSDL files. To configure authentication and proxy information for WSDL files to be used during replay, add a web_set_user_step function with the desired values.
Relevant tasks
"How to Import WSDL Files" on page 639
User interface elements are described below:
UI Element Description
Authentication
Enable the authentication settings by selecting Use Authentication Settings and entering your user name and password.
Proxy
Enable the proxy settings by selecting Use Proxy Settings and entering your user name, password, server, and port number.
Protocol and Security Scenario Data Dialog Box
Enables you to configure the protocol and security scenario data settings.
To access Record > Recording Options > Silverlight > Services > Protocol and
Security Data Button
Important information
l
This node is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on page 282
.
l
These settings are only relevant for importing WSDL files. To configure authentication and proxy information for WSDL files to be used during replay, add a web_set_user_step function with the desired values.
l
The settings in this dialog box are reset during code generation.
Relevant tasks
"How to Import WSDL Files" on page 639
User interface elements are described below:
UI Element
Port
Description
An individual endpoint for a WSDL binding.
Note: Selecting a different port resets the values in this dialog box to the last saved values. Any changes made that have not yet been saved will be reset.
Page 343 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Transport
Encoding
WS
Addressing version
Security
The transport layer protocol used by VuGen to send service requests to the server. You can select HTTP, HTTPS, or LrHTTP.
Note: HTTP is not compatible with UserNameOverTransport security and
HTTPS requires that you select UserNameOverTransport security.
The encoding method to be used for service requests sent to the server.
The WS-Addressing version for the selected WSDL file.
Authentication mode
Enable authentication by selecting UserNameOverTransport mode.
Default mode: None.
Username
Password
When authentication is enabled, a valid username is required.
When authentication is enabled, a valid password is required.
Traffic Analysis > Traffic Filter
This dialog box enables you to filter either incoming or outgoing traffic.
To access Record > Recording Options > Traffic Analysis > Traffic Filters
Important information
l
For details, see
"Analyzing Traffic" on page 559 .
l
This node is available only for specific protocols. For a complete list of
protocols and their associated nodes, see the "Protocol Compatibility Table" on page 282
.
Relevant tasks
"How to Create a Script by Analyzing Traffic" on page 561
User interface elements are described below (unlabeled elements are shown in angle brackets):
UI Element
When generating the script
Description
Include all IP addressing the list. Checkbox to include traffic from specified IP address.
Exclude all IP address in the list . Checkbox to exclude traffic from specified IP addresses.
<Incoming Traffic Tab>
Enables you to identify IP addresses for incoming traffic
Add an IP address
Source IP
Specify the IP address of the server.
Page 344 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
UI Element Description
Delete IP address
<Outgoing Traffic Tab>
Enables you to indentify IP addresses for outgoing traffic
Add an IP address
Destination IP
Destination Port
Specify the IP address of the server.
Specify the distination port of the server.
Delete IP address
WinSock Node
Enables you to set the WinSock recording options.
To access
Important information
Relevant tasks
Record > Recording Options > WinSock
When using translation tables on Solaris machines, you must set the following environment variables on all machines running scripts: setenv LRSDRV_SERVER_FORMAT 0025 setenv LRSDRV_CLIENT_FORMAT 04e4
"How to Record a Windows Sockets Script" on page 790
User interface elements are described below:
UI Element Description
Adds a new entry to the list of excluded sockets.
Removes the selected entry from the list of excluded sockets.
Do not include excluded socket in log
Excludes the sockets on the list from the log. Clearing this option enables logging for the excluded sockets. Their actions are preceded by "Exclude" in the log file.
Exclude
Settings/
Socket List
The host and port of the sockets to exclude from the recording or regeneration of the script. Use the following syntax: l
host:port format excludes a specific port.
l
host format excludes all ports for the specified host.
l
:port format excludes a specific port on the local host.
l
*:port format excludes a specific port on all hosts.
Page 345 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Think Time
Threshold
During recording, VuGen automatically inserts the think time steps when you pause between actions. You can set a threshold level, below which the recorded think time will be ignored.
Default value: five seconds.
Translation tables
The Translation Table lets you specify the format for recording sessions when using the WinSock single protocol, and for code generation when using a WinSock multi protocol. This applies to users running on mainframe machines or AS/400 servers. Both the server and client machines determine the format of the data from translation tables installed on your system. Select a translation option from the list box.
The first four digits of the listbox item represent the server format. The last four digits represent the client format.
The translation tables are located in the ebcdic folder under the VuGen's installation folder. If your system uses different translation tables, copy them to the ebcdic folder.
Note: If your data is in ASCII format, it does not require translation. Select the
None option, the default value.
Run-Time Settings
Run-Time Settings Overview
Before or after you record a Vuser script, you can configure its run-time settings.The run-time settings define the way that the script runs. These settings are stored in the file default.cfg, located in the Vuser script folder. Run-time settings are applied to Vusers when you run a script using
VuGen, the Controller, or Business Process Monitor.
Configuring run-time settings allows you to emulate different kinds of user activity. For example, you could emulate a user who responds immediately to output from the server, or a user who stops and thinks before each response. You can also configure the run-time settings to specify how many times the Vuser should repeat its set of actions.
Not all run-time setting settings are available for every protocol. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on next page
.
Content Checking Overview
You use the ContentCheck run-time options to check the contents of a page for a specific string.
This is useful for detecting non-standard errors. In normal operations, when your application server fails, the browser displays a generic HTTP error page indicating the nature of the error. The standard error pages are recognized by VuGen and treated as errors, causing the script to fail.
Some application servers, however, issue their own error pages that are not detected by VuGen as error pages. The page is sent by the server and it contains a formatted text string, stating that an error occurred.
For example, suppose that your application issues a custom page when an error occurs, containing the text ASP Error. You instruct VuGen to look for this text on all returned pages. When VuGen detects this string, it fails the replay. Note that VuGen searches the body of the pages—not the headers.
Page 346 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Multithreading
The Controller uses a driver program (such as mdrv.exe or r3vuser.exe) to run your Vusers. If you run each Vuser as a process, then the same driver program is launched (and loaded) into the memory again and again for every instance of the Vuser. Loading the same driver program into memory uses up large amounts of RAM (random access memory) and other system resources.
This limits the numbers of Vusers that can be run on any load generator.
Alternatively, if you run each Vuser as a thread, the Controller launches only one instance of the driver program (such as mdrv.exe), for every 50 Vusers (by default). This driver process/program launches several Vusers, each Vuser running as a thread. These threaded Vusers share segments of the memory of the parent driver process. This eliminates the need for multiple re-loading of the driver program/process saves much memory space, thereby enabling more Vusers to be run on a single load generator.
To configure these options, see
"General > Miscellaneous Node" on page 368
.
Protocol Compatibility Table
The following table lists the Vuser protocols and which run-time setting nodes are available for each protocol.
Protocol
AJAX
Ajax TruClient
C Vuser
Citrix_ICA
COM/DCOM
DB2 CLI
Run-Time Setting Nodes
l
General - Run Logic, Pacing, Log, Think Time, Additional
Attributes, Miscellaneous l
Network - Speed Simulation l
Browser - Browser Emulation l
Internet Protocol - Proxy, Preferences, Download Filters,
ContentCheck l
General - Pacing, Additional Attributes, Log, Load Mode
Browser Settings, Other Settings l
General - Run Logic, Pacing, Log, Think Time, Additional
Attributes, Miscellaneous l
General – Run Logic, Pacing, Log, Think Time, Additional
Attributes, Miscellaneous l
Network – Speed Simulation l
Citrix – Configuration, Synchronization l
General - Pacing, Log, Think Time, Additional Attributes,
Miscellaneous l
General - Pacing, Log, Think Time, Additional Attributes,
Miscellaneous
Page 347 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
DNS
EJB
l
General - Pacing, Log, Think Time, Additional Attributes,
Miscellaneous l
General - Pacing, Log, Think Time, Additional Attributes,
Miscellaneous l
Java Environment Settings - Classpath, Java VM
FTP
l
General - Pacing, Log, Think Time, Additional Attributes,
Miscellaneous l
Network - Speed Simulation
Flex
Internet Messaging (IMAP)
l
General - Run Logic, Pacing, Log, Think Time, Additional
Attributes, Miscellaneous l
Network - Speed Simulation
Java over HTTP
l
General - Pacing, Log, Think Time, Additional Attributes,
Miscellaneous l
Network - Speed Simulation l
Browser - Browser Emulation l
Java Environment Settings - Classpath, Java VM l
Internet Protocol - Proxy, Preferences, Download Filters
Java Record Replay, Java
Vuser
l
General - Run Logic, Pacing, Log, Think Time, Additional
Attributes, Miscellaneous l
Network - Speed Simulation l
Browser - Browser Emulation l
Flex - RTMP, Configuration, Externalizable Objects l
Internet Protocol - Proxy, Preferences, Download Filters,
Content Check
Javascript Vuser
LDAP
l
General - Pacing, Log, Think Time, Additional Attributes,
Miscellaneous l
Java Environment Settings - Classpath, Java VM l
General - Pacing, Log, Think Time, Additional Attributes,
Miscellaneous l
Network - Speed Simulation l
Internet Protocol - Proxy, Preferences, Download Filters l
General - Pacing, Log, Think Time, Additional Attributes,
Miscellaneous l
Network - Speed Simulation
Page 348 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
MMS (Media Player)
Microsoft.NET
RDP
MS Exchange (MAPI)
MS SQL Server
MMS (Multimedia
Messaging Service)
ODBC
Oracle (2-Tier)
Oracle NCA
l
General - Pacing, Log, Think Time, Additional Attributes,
Miscellaneous l
Network - Speed Simulation l
General - Pacing, Log, Think Time, Additional Attributes,
Miscellaneous l
.NET - .NET Environment l
General - Run Logic, Pacing, Log, Think Time, Additional
Attributes, Miscellaneous l
Network - Speed Simulation l
RDP - Configuration, Synchronization, Advanced, RDP
Agent l
General - Pacing, Log, Think Time, Additional Attributes,
Miscellaneous l
General - Pacing, Log, Think Time, Additional Attributes,
Miscellaneous l
General - Run Logic, Pacing, Log, Think Time, Additional
Attributes, Miscellaneous l
Browser - Browser Emulation l
MMS - Server and Protocol l
WAP - Radius, Gateway l
Internet Protocol - Proxy, Preferences, Download Filters l
General - Pacing, Log, Think Time, Additional Attributes,
Miscellaneous l
General - Pacing, Log, Think Time, Additional Attributes,
Miscellaneous l
General - Run Logic, Pacing, Log, Think Time, Additional
Attributes, Miscellaneous l
Network - Speed Simulation l
Oracle NCA - Client Emulation
Page 349 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Oracle Web Applications
11i
PeopleSoft Enterprise
PeopleSoft Tuxedo
POP3
Real
SAP Web
SAP Click & Script
SAP GUI
l
General - Run Logic, Pacing, Log, Think Time, Additional
Attributes, Miscellaneous l
Network - Speed Simulation l
Browser - Browser Emulation l
Internet Protocol - Proxy, Preferences, Download Filters,
ContentCheck l
Oracle NCA - Client Emulation l
General - Run Logic, Pacing, Log, Think Time, Additional
Attributes, Miscellaneous l
Network - Speed Simulation l
Browser - Browser Emulation l
Internet Protocol - Proxy, Preferences, Download Filters,
ContentCheck l
General - Pacing, Log, Think Time, Additional Attributes,
Miscellaneous l
General - Pacing, Log, Think Time, Additional Attributes,
Miscellaneous l
Network - Speed Simulation l
General -Pacing, Log, Think Time, Additional Attributes,
Miscellaneous l
Network - Speed Simulation l
General - Run Logic, Pacing, Log, Think Time, Additional
Attributes, Miscellaneous l
Network - Speed Simulation l
Browser - Browser Emulation l
Internet Protocol - Proxy, Preferences, Download Filters,
ContentCheck l
General - Run Logic, Pacing, Log, Think Time, Additional
Attributes, Miscellaneous l
Network - Speed Simulation l
Browser - Browser Emulation l
Internet Protocol - Proxy, Preferences, Download Filters,
ContentCheck l
General - Run Logic, Pacing, Log, Think Time, Additional
Attributes, Miscellaneous l
SAP GUI - General l
Network - Speed Simulation
Page 350 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Siebel Web
Silverlight
SMTP
RTE
Tuxedo
VB Script Vuser
VB Vuser
Web (Click & Script)
l
General - Run Logic, Pacing, Log, Think Time, Additional
Attributes, Miscellaneous l
Network - Speed Simulation l
Browser - Browser Emulation l
Internet Protocol - Proxy, Preferences, Download Filters,
ContentCheck l
General - Run Logic, Pacing, Log, Think Time, Additional
Attributes, Miscellaneous l
Network - Speed Simulation l
Browser - Browser Emulation l
Silverlight - Services l
Data Format Extensions - Configuration l
Internet Protocol - Proxy, Preferences, Download Filters,
ContentCheck l
General - Pacing, Log, Think Time, Additional Attributes,
Miscellaneous l
Network - Speed Simulation l
General - Run Logic, Pacing, Log, Think Time, Additional
Attributes, Miscellaneous l
RTE - RTE l
General - Pacing, Log, Think Time, Additional Attributes,
Miscellaneous l
General - Pacing, Log, Think Time, Additional Attributes,
Miscellaneous l
Network - Speed Simulation l
Internet Protocol - Proxy, Preferences, Download Filters l
General - Pacing, Log, Think Time, Additional Attributes,
Miscellaneous l
Network - Speed Simulation l
Internet Protocol - Proxy, Preferences, Download Filters l
VBA - VBA l
General - Run Logic, Pacing, Log, Think Time, Additional
Attributes, Miscellaneous l
Network - Speed Simulation
Page 351 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Web (HTTP/HTML)
Web Services
Windows Sockets
l
Browser - Browser Emulation l
Internet Protocol - Proxy, Preferences, Download Filters,
ContentCheck l
General - Run Logic, Pacing, Log, Think Time, Additional
Attributes, Miscellaneous l
Network - Speed Simulation l
Browser - Browser Emulation l
Internet Protocol - Proxy, Preferences, Download Filters,
Content Check l
Data Format Extension - Configuration l
General - Run Logic, Pacing, Log, Think Time, Additional
Attributes, Miscellaneous l
Network - Speed Simulation l
JMS - Advanced l
General - Pacing, Log, Think Time, Additional Attributes,
Miscellaneous l
Network - Speed Simulation
Browser > Browser Emulation Node
Enables you to configure the browser related run-time settings.
To access Replay > Run-Time Settings> Browser > Browser Emulation
Important information
This node is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on page 347
.
User interface elements are described below:
Description UI
Element
User
Agent
This displays information about the browser that is to be emulated.
All Internet Vuser headers include a User Agent header that identifies the type of browser (or toolkit for Wireless) that is being emulated. For example, User-Agent:
Mozilla/3.01Gold (WinNT; I) identifies the browser as Netscape Navigator Gold version 3.01 running under Windows NT on an Intel machine.
Click to change the User Agent header. Specify the browser type, browser version, language, and operating system or enter a custom User Agent header.
Page 352 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Change
Button
Opens the User-Agent Dialogue Box, enabling you to change the emulated browser.
Simulate
Browser
Cache
Instructs the Vuser to simulate a browser with a cache (enabled by default). Even if you disable this option, each resource is only downloaded once for each page, even if it appears multiple times. A resource can be an image, a frame, or another type of script file. Enabling this options allows you to set the following options: l
Cache URLs requiring content (HTML). Instructs VuGen to cache only the
URLs that require the HTML content. The content may be necessary for parsing, verification, or correlation. When you select this option, HTML content is automatically cached.
Default value: enabled.
Tip: To decrease the memory footprint of the virtual users, disable this option, l unless it is an explicit requirement for your test.
Check for newer versions of stored pages every visit to the page. Instructs the browser to check for later versions of the specified URL than those stored in the cache. When you enable this option, VuGen adds the "If-modified-since" attribute to the HTTP header. This option brings up the most recent version of the page, but also generates more traffic during the scenario or session execution.
Default value: disabled.
l
. Opens the
"Browser > Browser Emulation Node" on previous page
, enabling you to specify the URL content types that you want to store in the cache.
Download non-
HTML resources
Instructs Vusers to load graphic images when accessing a Web page during replay.
This includes both graphic images that were recorded with the page, and those which were not explicitly recorded along with the page. When real users access a
Web page, they wait for the images to load. Therefore, enable this option if you are trying to test the entire system, including end-user time. To increase performance and not emulate real users, disable this option.
Disable this option if you experience discrepancies in image checks, since some images vary each time you access a Web page (for example, advertiser banners).
Simulate a new user each iteration
Instructs VuGen to reset all HTTP contexts between iterations to their states at the end of the init section. This setting allows the Vuser to more accurately emulate a new user beginning a browsing session. It deletes all cookies, closes all TCP connections (including keep-alive), clears the emulated browser's cache, resets the
HTML frame hierarchy (frame numbering will begin from 1) and clears the usernames and passwords.
Default value: enabled.
l
Clear cache on each iteration. Clears the browser cache for each iteration in order to simulate a user visiting a Web page for the first time. Clear the check box to disable this option and allow Vusers to use the information stored in the browser's cache, simulating a user who recently visited the page.
Cache URL Requiring Content - Advanced Dialog Box
The Advanced dialog box lets you specify the URL content types that you want to store in the
Page 353 of 1812 HP LoadRunner (11.50)
User Guide
VuGen cache.
User interface elements are described below (unlabeled elements are shown in angle brackets):
UI Element
<Content Types List>
Specify URLs requiring content in addition to HTML page
Description
Restore the default content types if they were deleted.
Add. Adds a new content type.
Remove. Removes a content type.
A list of the content types along with a check box to enable/disable each type.
Enables you to specify URL's.
Citrix > Configuration Node
Enables you to set the Citrix configuration run-time settings.
To access Replay > Run-Time Settings > Citrix > Configuration
Important information
This node is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on page 347
.
User interface elements are described below:
UI Element
Queue mouse movements and keystrokes
Sound quality
Description
Instructs Vusers to create a queue of mouse movements and keystrokes, and send them as packets to the server less frequently. This setting reduces network traffic with slow connections. Enabling this option makes the session less responsive to keyboard and mouse movements.
Default value: disabled.
Specifies the quality of the sound. If the client machine does not have a 16-bit
Sound Blaster-compatible sound card, select Sound Off. With sound support enabled, you will be able to play sound files from published applications on your client machine.
SpeedScreen
Latency
Reduction
The mechanism used to enhance user interaction when the network speed is slow. You can turn this mechanism on or off, depending on the network speed.
The auto option turns it on or off based on the current network speed. If you do not know the network speed, set this option to Use Server Default to use the machine's default.
Use data compression
Instructs Vusers to compress the transferred data. You should enable data compression if you have a limited bandwidth.
Default value: enabled.
Page 354 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Use disk cache for bitmaps
Instructs Vusers to use a local cache to store bitmaps and commonly-used graphical objects. You should enable this option if you have a limited bandwidth.
Default value: disabled.
Citrix > Synchronization Node
Enables you to set the Citrix synchronization run-time settings.
To access Replay > Run-Time Settings > Citrix > Synchronization
Important information
This node is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on page 347
.
User interface elements are described below:
UI Element
Default Image Sync
Tolerance
Timeout
Description
This setting controls the level of equality two images must share to be considered synchronized.
Exact. Must have a 100% match.
Low. Must have a 95% match.
Medium. Must have an 85% match.
High. Must have a 70% match.
Default value: Exact.
l
Connect Time. The time (in seconds) to wait idly at an established connection before exiting.
l
Waiting Time. The time (in seconds) to wait idly at a synchronization point before exiting.
The delay (in milliseconds) between keystrokes.
Typing rate
To access
COM/DCOM > Options Node
Enables you to set additional options for your COM recording session, relating to the handling of objects, generation of logs, and VARIANT definitions.
The DCOM scripting options apply to all programming languages. These settings let you configure the scripting options for DCOM methods and interface handling.
To access Replay > Run-time Settings > COM/DCOM > Options
User interface elements are described below:
UI Element Description
Page 355 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
ADO Recordset filtering
Declare Temporary
VARIANTs as Globals
Fill array in separate scopes
Condense multiple recordset operations into a single-line fetch statement (enabled by default).
Define temporary VARIANT types as Globals, not as local variables (enabled by default).
Fill in each array in a separate scope (enabled by default).
Fill structure in separate scopes
Fill in each structure in a separate scope (enabled by default).
Generate COM exceptions
Generate COM functions and methods that raised exceptions during recording (disabled by default).
Generate COM statistics
Generate recording time performance statistics and summary information (disabled by default).
Limit size of SafeArray log
Limit the number of elements printed in the safearray log per
COM call, to 16 (enabled by default).
Release COM Objects
Save Recordset content
Trap binded moniker objects
Record the releasing of COM objects when they are no longer in use (enabled by default).
Stores Recordset content as grids, to allow viewing of recordset in VuGen (enabled by default).
Trap all of the bound moniker objects (disabled by default).
Data Format Extension > Code Generation Node
Enables Data Format Extensions during code generation.
To access Replay > Run-Time Settings > Data Format Extensions > Code Generation
Important information
This node is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on page 282
.
Relevant tasks
See also
l
"How to Apply Chains to Sections of the HTTP Message" on page 667
l
"How to use GWT-DFE" on page 668
l
"Data Format Extensions" on page 661
l
"Data Format Extension List" on page 669
User interface elements are described below:
UI Element
Enable data format extension
Description
Enables you to select chains for each message section of the HTTP message. Deselected by default.
Page 356 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Flex > Configuration Node (Run-Time Settings)
Enables you to set an external JVM (Java Virtual Machine) path.
To access Replay > Run-Time Settings > Flex > Configuration
Important information
This node is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on page 347
.
User interface elements are described below:
UI Element
Use External JVM
External JVM Path
Description
Enables you to use external JVM.
The path of the external JVM.
Flex > Externalizable Objects Node (Run-Time Settings)
The dialog box enables you to configure run time setting for externalizable objects in Flex scripts.
To access
Relevant tasks
See also
Replay > Run-Time Settings > Flex > Externalizable Objects
l
"How to Serialize Using External Java Serializer" on page 512
l
"How to Serialize Scripts with the LoadRunner Serializer" on page 513
l
"Flex Overview" on page 504
l
" Externalizable Objects in Flex Scripts" on page 509
User interface elements are described below:
UI Element Description
Do not serialize externalizable objects
Generate script using default settings.
Serialize objects using
Select the appropriate radio button: l
Select LoadRunner AMF serializer if you are not using the Adobe
LiveCycle Data Services or Adobe BlazeDS server.
l
Select Custom Java classes and select one or both of the options: n
Select Use Flex LCDS/BlazeDS jars if you are using Flex LCDS or
BlazeDS jars to serialize the messages. If you selected UseGraniteDS
configuration in the Configuation node, do not select Use Flex
LCDS/BlazeDS jars.
Page 357 of 1812 HP LoadRunner (11.50)
User Guide
VuGen n
Select Use additional jars to add additional jars to serialize the messages. You must copy the jar files from the server and specify their location in the Classpath Entries List described below. You must ensure that the files exist in the same location on all load generator computers. If you add jars with the same names as the Flex LCDS or
Blaze DS jars chosen by selecting the first check-box, these files will be overwritten.
Classpath Entries List
Down Arrow. Moves a classpath entry down the list.
Up Arrow. Moves a classpath entry up the list.
Add Classpath. Adds a new line to the classpath list.
Add Classpath Folder. Adds all files from the folder to the classpath list.
Delete. Permanently removes a classpath.
Flex > RTMP Node
Enables you to set the Flex RTMP run-time settings.
To access Replay > Run-Time Settings > Flex > RTMP
Important information
This node is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on page 347
.
User interface elements are described below:
UI Element
Close all open
RTMP connections after each iteration
TCP receive timeout
(milliseconds)
Status for TCP receive timeout
Description
Automatically disconnects any open RTMP connections at the end of each iteration.
Specifies the time interval in milliseconds during which waits for the client to start receiving TCP/IP packets. If a timeout has been reached, triggers a warning or error depending on the run-time setting for Status for TCP
receive timeout.
Indicates which status to issue for a step when timeout is exceeded.
Page 358 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Warning
Error
Issues a warning for the step when the timeout is exceeded. continues to the next step.
Issues an error for the step when the timeout is exceeded. The script ends.
General > Additional Attributes Node
You can use the Additional Attributes node to provide additional arguments for a Vuser script. The
Additional Attributes settings apply to all Vuser script types.
You specify command line arguments that you can retrieve at a later point during the test run, using
lr_get_attrib_string. Using this node, you can pass external parameters to prepared scripts.
To access Replay > Run-Time Settings > General > Additional Attributes
Important information
This node is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on page 347
.
User interface elements are described below (unlabeled elements are shown in angle brackets):
UI Element
<Additional Attributes table>
Description
A list of the additional attributes and their values.
Add a new argument.
Remove an argument.
General > Log Node
Enables you to configure the amount and types of information that is recorded in the log.
To access Replay > Run-Time Settings > General > Log
User interface elements are described below:
UI
Element
Enable logging
Description
Enables automatic logging during replay. Disabling this options only affects automatic logging and log messages issued through lr_log_message. Messages sent manually, using lr_message, lr_output_message, and lr_error_message, are still issued.
Page 359 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Log options
Indicates when messages are sent to the log: l
Send messages only when an error occurs. Sends messages to the log only when an error occurs. Click Advanced to configure the log cache size. If the contents of the cache exceed the specified size, VuGen deletes the oldest items.
l
Always send messages. Sends all messages to the log.
Standard log
Creates a standard log of functions and messages sent during script execution to use for debugging. You can disable this option for large load testing scenarios or profiles if you wish to save system resources.
Extended log
Creates an extended log, including warnings and other messages. You can disable this option for large load testing scenarios or profiles if you wish to save system resources.
You can also specify the following options: l
Parameter substitution. Logs all parameters assigned to the script along with their values.
l
Data returned by server. Logs all of the data returned by the server.
l
Advanced trace. Logs all of the functions and messages sent by the Vuser during the session.
General > Log Node (TruClient)
Enables you to configure the amount and types of information that is reported to a log for TruClient scripts.
To access Replay > Run-Time Settings > General > Log
User interface elements are described below:
UI Element
Log Level and
Associated
Options
Description
Error-only
l
Select to log only error messages.
Standard log
l
Log errors/warnings only (in Standard log). Select to log errors and warnings only. Informative messages are not included.
In Extended log, all messages ignored due to this option are included, regardless of this setting.
Extended Log
l
Select to log low-level informative messages and all messages included in the Standard log.
HTTP-related messages
Page 360 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Create a log file only if required
l
Log HTTP request headers. Log HTTP request header of each request.
l
Log HTTP request body (POST data). Log the HTTP request body of each request.
l
Log HTTP response headers. Log the HTTP response headers of each response.
l
Log HTTP response body. Log the HTTP response body of each response.
l
Log HTTP trace. Log the HTTP request/response handling Application under Test (AUT) messages
Application under test (AUT) messages
l
Log AUT error messages. Logs error messages which are received from the application under test.
l
Log AUT non-error messages. Log informative messages which are received from the application under test.
Parameterization
l
Log Parameter substitution. Logs the parameters and the values used when the Vuser script runs.
Accumulate messages in memory, write only if required.
l
Select to log messages only when an error occurs.
l
Accumulate Messages in Memory Buffer Size. Enter the memory buffer size where important messages are logged.
Note: If the size is too small, messages will be lost. If the size is too large, this may contribute to paging issues and slow execution.
Log Message
Formatting
Options
User Log Line Length.
l
Enter the limit for a single line in a user log file before the message line begins to wrap.
Include Timestamps in user log.
l
Select to include time trace to each message in the log.
Internal Support
Options
These options are for use with a customer support representative only. Do no modify them unless specifically instructed to do so by customer support.
General > Advanced Settings (TruClient)
This dialog box enables you to configure advanced settings for Mobile TruClient.
To access Replay > Run Time Settings > General > Advanced Settings
User interface elements are described below:
Page 361 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
UI Element
Enable Plugin
Support
Description
If selected, enables plug in support, such as Flash.
Load > Browser Settings Node (TruClient)
This node enables you to configure settings for the TruClient browser for scripts that you run in load mode.
To access Replay > Run Time Settings > Load > Browser Settings
Important information
l
Settings that you modify in the Load Mode Browser Settings node affect load mode only.
l
The settings available in the Load Mode Browser Settings node are the same
settings that are available in the " Ajax TruClient General Settings Dialog Box" on page 439
.
n
Settings that you modify in the Browser Settings tab affect interactive mode only. When you save your script in interactive mode, any settings that you modified in the Browser Settings tab are applied to the Load Mode Browser
Settings.
User interface elements are described below:
UI Element
Proxy selection
No proxy (direct connection to the internet)
Use system proxy settings
Manual proxy configuration
Do not use a proxy for
(exceptions)
Host for HTTP/all protocols
Port for HTTP/all protocols
Description
For all Vusers, make the connection to the Internet directly without using a proxy server.
(Default) Use system configuration for proxy settings.
Enables you to set and configure proxy server settings.
You can specify exceptions to the proxy server rules. You can list the exceptions as hostnames, IPs and/or masks.
Note: You can use wildcards as part of the hostname, e.g.
*.devlab.ad.
The domain name or IP address of the proxy server used forHTTP and other protocol requests.
The port number of the proxy server used for HTTP and other protocol requests.
Page 362 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Use seperate proxy for
HTTPS protocol
Host for HTTPS protocol
Port for HTTPS protocol
AUTOMATIC proxy configuration (PAC)
Enables you to use a separate proxy server to handle all HTTPS protocol requests.
The domain name or IP address of the proxy server used for HTTPS protocol requests.
The port number of the proxy server used for HTTPS protocol requests.
Automatically read the proxy settings from the proxy auto configuration file (PAC). In the URL field, enter the URL of the PAC file.
Advanced
Home Page URL
User-Agent
Compare the page in cache to the page on the network
Keep-Alive
Proxy Keep-Alive
Keep-Alive timeout
(sec)
HTTP version
Proxy HTTP version
DNS cache entries
SSL
Enter the URL to navigate to when window home is called from
JavaScript. (about:blank by default)
Enter the User-Agent string for overriding the browser default in request headers.
Enter the corresponding number used to compare the URL page in the cache to the URL page called from the network.
l
0. (Default) Once per session.
l
1. Every time the page is accessed.
l
2. Never.
l
3. When the page is out of date (default).
Allows persistent (non-proxied) network connections.
l
Checked. (Default)Allow persistent (non-proxied) network connections, so that the open connections can be reused.
l
Cleared. Close each connection after the request is complete.
Allows persistent proxy connections.
l
Checked. (Defeat) Allow persistent proxy connections, so that open connections can be reused.
l
Cleared. Close each connection after the request is complete.
Enter the number of seconds to keep idle connections open. (300 by default)
Enter the HTTP version to use when accessing the network/application not via a proxy. (1.1 by default)
Enter the Proxy HTTP version to use when accessing the network/application via a proxy. (1.1 by default)
Enter the maximum number of entries to keep in the DNS cache.
Enter 0 to disable this option. (20 by default)
Select the secure connection setting/s:
Page 363 of 1812 HP LoadRunner (11.50)
User Guide
VuGen l
SSL 2.0
l
(Default) SSL 3.0
l
(Default) TLS 1.0
Load > Other Settings (TruClient)
This dialog box enables you to configure snapshot generation and action on error for TruClient.
To access Replay > Run Time Settings > Load > Other Settings
User interface elements are described below:
UI Element
Snapshot Generation
Description
Replay snapshots generation
Action on error
Never. If selected, snapshots are never generated on replay.
On Error. If selected, snapshots are generated on steps with errors during replay.
Always. If selected, snapshots are generated on all steps in the script during replay.
Abort script. Select to abort running script when an error occurs.
Continue to the next iteration. Select to stop current iteration and continue to the next one.
General > Replay Node
All Protocols - Except Mobile TruClient
To access Replay > Run-Time Settings > General > Replay
UI
Element
Description
Simulate a new user on each iteration
Instructs VuGen to reset all HTTP contexts between iterations. This setting allows the Vuser to more accurately emulate a new user beginning a browsing session.
Default value:enabled.
Proxy selection
The settings in this section apply to both recording and running the script. They apply to this script only. To configure proxy settings for all TruClient scripts, open the Browser Configuration Settings dialog box. For more information, see
" Ajax
TruClient General Settings Dialog Box" on page 439 .
Page 364 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Snapshots generation
Recording snapshots generation
l
Never. If selected, recording snapshots of the script are not automatically saved.
l
Always. If selected, recording snapshots are automatically saved for every step in the script.
Replay snapshots generation
l
Never. If selected replay snapshots are not generated.
Note: This is the default setting.
l
On error. Select to generate a snapshot when errors occurs. This option can be used to help identify bugs in your script. For more information, see Debug
Scripts Using Snapshots.
l
Always. If selected snapshots are generated for every step in the script.
Action on error
Retrieve global proxy settings (defined in Ajax TruClient
Browser Options).
Select to use the proxy settings defined in the Browser Options dialog box. The settings are retrieved when you click Develop Script. Once global proxy settings are retrieved, they are copied to the script's run-time settings and can be managed in the "Define proxy settings for script" section.
Define specific proxy settings for the script.
l
No proxy (direct connection to the internet). For all Vusers, make the connection to the Internet directly without using a proxy server.
l
Manual proxy configuration. If selected, you can specify exceptions to the proxy server rules, specify the proxy server for all HTTP/HTTPS connections. you require a seperate proxy server for HTTP connections, check Use separate proxy for HTTPS protocol box and specify the proxy server settings.
l
AUTOMATIC proxy configuration (PAC). If selected, the proxy settings is automatically read from the proxy auto configuration file (PAC). In the URL field, enter the URL of the PAC file.
Replay
Options
Abort script
Select to abort running script when an error occurs.
Continue to the next iteration
Select to stop iteration when an error occurs and continue to the next one.
Maximum time for object-not-found (seconds)
Enter the maximum time to search for an object before the application displays an error message.
Inter-step interval (milliseconds)
Page 365 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Enter the minimal interval between steps. Specifying a higher value can help with synchronization issues, but too high a value may slow the script more than necessary.
End-of-network identification timeout (milliseconds)
The end-of-network for a step is recognized when the specified time has elapsed with no networking activity.
Advanced
A number of options for advanced users. For more details, read the tips displayed at the bottom of the Run-Time settings dialog box: l
Home Page URL. Enter the URL to navigate to when window home is called from JavaScript.
l
User-Agent. Enter the User-Agent string for overriding the browser default in request headers.
l
Compare the page in cache to the page on the network. Enter the corresponding number used to compare the URL page in the cache to the URL page called from the network. 0=Once per session, 1=Every time the page is accessed, 2=Never, 3=When the page is out of date (default).
l
Keep-Alive. Select to allow persistent (non-proxied) network connections.
Enter the following corresponding number: 1=Allow persistent (non-proxied) network connections, so that the open connections can be reused, 0=Close each connection after the request is complete.
l
Proxy Keep-Alive. Select to allow persistent proxy connections. Enter the following corresponding number: 1=Allow persistent proxy connections, so that open connections can be reused. 0=Close each connection after the request is complete.
l
Keep-Alive timeout (sec). Enter the number of seconds to keep idle connections open.
l
HTTP version. Enter the HTTP version to use when accessing the network/application not via a proxy.
l
Proxy HTTP version. Enter the Proxy HTTP version to use when accessing the network/application via a proxy.
l
DNS cache entries. Enter the max number of entries to keep in the DNS cache.
Note: Enter 0 to disable this option.
l
Non-interactive window size. Enter the initial dimensions (width and height in pixels) of the browser window in non-interactive mode.
l
SSL.Select the secure connection setting/s: n
SSL 2.0 n
SSL 3.0
n
TLS 1.0
Page 366 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Mobile TruClient
UI Element Description
Simulate a new user on each iteration
Instructs VuGen to reset all HTTP contexts between iterations. This setting allows the Vuser to more accurately emulate a new user beginning a browsing session.
Default value:enabled.
Replay Options
Replay using recorded duration for steps
During replay, each step's minimum time of running will be as recorded.
Note: After editing the script, this might cause false timing of steps in the script.
Failed event causes step failure
Enable profiling
Minimum Time
If the End Event of a step fails, the step will fail. For example, if the End
Event of a step is Document Loaded and the document fails to load, the step will fail.
This option is enabled by default.
Enable/disable profiling for client side breakdown.
Maximum time for object-not-found (seconds)
Enter the maximum time to search for an object before the application displays an error message.
Step timeout
The amount of time to perform a step. I|f the End Evend does not occur b this time the step fails.
Inter-step interval (milliseconds)
Enter the minimal interval between steps. Specifying a higher value can help with synchronization issues, but too high a value may slow the script more than necessary.
End-of-network identification timeout (milliseconds)
The end-of-network for a step is recognized when the specified time has elapsed with no networking activity.
Typing interval (milliseconds)
The average amount of time between keystrokes when entering text during replay.
Random step's minimum time within range.
During replay, each step's minimum time settings will be overridden by a randomized value.
Page 367 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Automatic transactions
From (percentage). Set lower percentage.
To (percentage). Set upper percentage.
Limit step's minimum time. Set the step's minimum time value in seconds.
Apply minimum time setting on wait steps. Enable/disable applying minimum time setting on wait steps.
No automatic transactions. Do not apply automatic transactions.
Define each action as a transaction.. Treat each action in the script as a transaction for performance measurements.
Define each action as step as a transaction. Treat each action and step in as a transaction for performance measurements.
General > Miscellaneous Node
Enables you set miscellaneous run-time settings.
To access Replay > Run-Time Settings > General > Miscellaneous
Important information
l
This node is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on page 347
.
l
We do not recommend enabling both the Continue on Error and Generate
Snapshot on Error options in a load test environment. This configuration may adversely affect the Vusers' performance.
l
The following protocols should not be run as threads: Sybase-Ctlib, Sybase-
Dblib, Informix, Tuxedo, and PeopleSoft-Tuxedo.
l
If you require the Vusers to generate breakdown data for diagnostics (J2EE) during the scenario run, do not use automatic transactions. Instead, manually define the beginning and end of each transaction.
User interface elements are described below:
UI Element
Automatic
Transactions
Description
l
Define each action as a transaction. Instructs LoadRunner (not applicable to HP Business Service Management) to handle every action in the script as a transaction.
l
Define each step as a transaction. Instructs LoadRunner (not applicable to HP Business Service Management) to handle every step in the script as a transaction.
Page 368 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Error
Handling
l
Continue on Error. Continue script execution when an error occurs.
l
Default value: disabled.
Fail open transactions on lr_error_message. Instructs VuGen to mark all transactions in which an lr_error_message function was issued, as
Failed. The lr_error_message function is issued through a manually defined If statement.
l
Generate Snapshot on Error. Generates a snapshot when an error occurs. You can see the snapshot by viewing the Vuser Log and doubleclicking on the line at which the error occurred.
Multithreading
l
Run Vuser as a process. Disables multithreading.
l
Run Vuser as a thread. Enables multithreading.
For details, see
"Multithreading" on page 347 .
General > Pacing Node
Allows you control the time between iterations. The pace tells the Vuser how long to wait between iterations of your actions.
To access Replay > Run-Time Settings > General > Pacing
Important information
This node is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on page 347
.
User interface elements are described below:
UI Element Description
After the previous iteration ends
As soon as the previous iteration ends
Starts each new iteration a specified amount of time after the end of the previous iteration. Specify either an exact number of seconds or a range of time.
The new iteration begins as soon as possible after the previous iteration ends.
At
<fixed/random> intervals
You specify the time between iteration—either a fixed number of seconds or a range of seconds from the beginning of the previous iteration. Each scheduled iteration will only begin when the previous iteration is complete.
General > Run Logic Node
Enables you to set the run logic run-time settings.
To access Replay > Run-Time Settings > General > Run Logic
Page 369 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Important information
This node is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on page 347
.
See also
"Script Sections " on page 132
User interface elements are described below (unlabeled elements are shown in angle brackets):
UI Element Description
Inserts a new Action at the insertion point.
Inserts a new Action block at the insertion point.
Deletes an item.
Moves an item up.
Moves an item down.
Opens the Properties Dialog Box enabling you to set the run logic and iterations settings.
Run Logic. Configures the action to run sequentially or randomly.
Iterations. Sets the number of times an item will run.
<Run logic tree>
A graphical illustration of the run logic for this script.
Number of
Iterations
The number of times the script will run of the items in the run logic tree.
General > Think Time Node
Enables you to configure the think time settings, controlling the time that a VuGen waits between actions. These settings are designed to help you emulate a real user.
To access
Replay > Run-Time Settings > General > Think Time
See also
l
VuGen uses lr_think_time functions to record think time values into your Vuser scripts. For more information about the lr_think_time function and how to modify it manually, see the Function Reference (Help > Function Reference).
User interface elements are described below:
UI Element Description
As recorded
During replay, use the argument that appears in the lr_think_time function. For example, lr_think_time(10) waits ten seconds.
Page 370 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Ignore think time
Ignore the recorded think time—replay the script ignoring all lr_think_time functions.
Limit think time to
Limit the think time's maximum value.
Multiply recorded think time by
During replay, use a multiple of the recorded think time. This can increase or decrease the think time applied during playback. For example, if a think time of four seconds was recorded, you can instruct your Vuser to multiply that value by two, for a total of eight seconds. To reduce the think time to two seconds, multiply the recorded time by 0.5.
Replay the think time
Enables options which let you customize the recorded think times.
Use random percentage of recorded think time
Use a random percentage of the recorded think time. You set a range for the think time value by specifying a range for the think time. For example, if the think time argument is 4, and you specify a minimum of 50% and a maximum of 150%, the lowest think time can be two (50%) and the highest value six (150%).
Internet Protocol > ContentCheck Node
Enables you to check websites for content during run-time.
To access Replay > Run-Time Settings > Internet Protocol > ContentCheck
Important information
This node is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on page 347
.
User interface elements are described below (unlabeled elements are shown in angle brackets):
UI Element Description
Deletes the selected rule or application.
Exports rules to an xml file.
Imports rules from an existing xml file.
Adds a new application to the list of applications and rules. Click to change the name.
Displays the rule criteria in the right pane, allowing you to enter a new rule for the currently selected application.
l
Search for text. The text of the string for which you want to search.
l
Search by prefix and suffix. The prefix and suffix of the string for which you want to search.
Page 371 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
<Application and Rule list>
Enable
ContentCheck during replay
l
Match case. Perform a case sensitive search.
l
Fail if. Configure the results of the search to fail if the string is either found or not found.
l
Search JavaScript alert box text.Only search for text within JavaScript alert boxes (Web , PeopleSoft Enterprise, and Oracle Web Applications
11i Vusers only).
Set the ContentCheck configuration as default (i.e. new scripts will start with this configuration).
A list of applications and rules. You can enable and disable individual items by using the check boxes to the left of each item.
Enable content checking during replay. Note that even after you define applications, you can disable it for a specific test run, by disabling this option.
Default value: enabled.
Internet Protocol > Download Filters Node
Enables you to set the download filters.
To access Replay > Run-Time Settings > Internet Protocol > Download Filters
Important information
This node is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on page 347
.
User interface elements are described below (unlabeled elements are shown in angle brackets):
UI Element Description
<Filter list>
A list of filters for the script. Each filter has a type and data. For example, a filter of type URL would have a URL address as its data. You can Add, Edit, Remove, or
Remove All entries in the list.
Ignore requests from the listed sites or hosts.
Exclude addresses in list
Include only addresses in list
Restrict replay to the listed sites or hosts.
Internet Protocol > Preferences Node
Enables you to set various internet related run-time settings.
To access Replay > Run-Time Settings > Internet Protocol > Preferences
Important
This node is available only for specific protocols. For a complete list of protocols
Page 372 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
information
and their associated nodes, see
"Protocol Compatibility Table" on page 347
.
User interface elements are described below:
UI Element Description
Checks
l
Enable Image and Text Check. Allows the Vuser to perform verification checks during replay by executing the verification functions web_find or
web_image_check. This option only applies to statements recorded in
HTML-based mode. Vusers running with verification checks use more memory than Vusers who do not perform checks.
Default value: disabled.
Generate
Web
Performance
Graphs
Instructs a Vuser to collect data used to create Web Performance graphs. You view the Hits per Second, Pages per Second, and Response Bytes per
Second (Throughput) graphs during test execution using the online monitors and after test execution using the Analysis. You view the Component Breakdown graph after test execution using the Analysis. Select the types of graph data for the Vuser to collect.
If you do not use the Web performance graphs, disable these options to save memory.
Advanced
l
WinInet Replay. Instructs VuGen to use the WinInet replay engine instead of the standard Sockets replay. VuGen has two HTTP replay engines: Socketsbased (default) or WinInet based. The WinInet is the engine used by Internet
Explorer and it supports all of the features incorporated into the IE browser.
The limitations of the WinInet replay engine are that it is not scalable and does not support Linux. In addition, when working with threads, the WinInet engine does not accurately emulate the modem speed and number of connections. VuGen's proprietary sockets-based replay is a lighter engine that is scalable for load testing. It is also accurate when working with threads.
The limitation of the sockets-based engine is that it does not support SOCKS proxy. If you are recording in that type of environment, use the WinInet replay engine.
l
Default value: disabled (socket-based replay engine).
File and line in automatic transaction names. Creates unique transaction names for automatic transactions by adding file name and line number to the transaction name.
l
Default value: enabled.
Non-critical item errors as warnings. This option returns a warning status for a function which failed on an item that is not critical for load testing, such as an image or Java applet that failed to download. This option is enabled by default. If you want a certain warning to be considered an error and fail your test, you can disable this option. You can set a content-type to be critical by adding it to the list of Non-Resources. For more information, see
"Non-
Resources Dialog Box" on page 316
.
Page 373 of 1812 HP LoadRunner (11.50)
User Guide
VuGen l
Save snapshot resources locally. Instructs VuGen to save the snapshot resources to files on the local machine.
l
. Opens the
"Advanced Options Dialog Box" below
.
Advanced Options Dialog Box
Enables you to set the advanced internet preference run-time settings.
To access Replay > Run-Time Settings > Internet Protocol > Preferences > Options
Important information
l
This dialog box is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on page 347
.
l
This dialog box divides the properties into different categories: HTTP, General,
Authentication, Log, and Web (Click & Script) Specific.
HTTP
User interface elements are described below:
UI Element
HTTP version
Keep-Alive
HTTP connections
Accept-
Language request header
Description
Specifies which version HTTP to use: version 1.0 or 1.1. This information is included in the HTTP request header whenever a Vuser sends a request to a
Web server.
Default value: HTTP 1.1.
HTTP 1.1 supports the following features: l
Persistent Connections—see "Keep-Alive HTTP connections" below.
l
HTML compression—see
"Accept Server-Side Compression" on next page
below.
l
Virtual Hosting—multiple domain names sharing the same IP address.
Keep-alive is a term used for an HTTP extension that allows persistent or continuous connections. These long-lived HTTP sessions allow multiple requests to be sent over the same TCP connection. This improves the performance of the Web server and clients.
The keep-alive option works only with Web servers that support keep-alive connections. This setting specifies that all Vusers that run the Vuser script have keep-alive HTTP connections enabled.
Default value: enabled.
Provides a comma-separated list of accepted languages. For example, en-us,
fr, and so forth. For more details, see
"Page Request Header Language" on page
807 .
Page 374 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
HTTP errors as warnings
HTTPrequest connect timeout
(seconds)
Issues a warning instead of an error upon failing to download resources due to an
HTTP error.
The time, in seconds, that a Vuser will wait for the connection of a specific
HTTP request within a step before aborting. Timeouts provide an opportunity for the server to stabilize and respond to the user. Note that this timeout also applies to the time the Vuser will wait for a WAP connection, initiated by the
wap_connect function.
Default value: 120 seconds.
HTTPrequest receive timeout
(seconds)
Request Zlib
Headers
The time, in seconds, that a Vuser will wait to receive the response of a specific
HTTP request within a step before aborting. Timeouts provide an opportunity for the server to stabilize and respond to the user.
Default value: 120 seconds.
Sends request data to the server with the zlib compression library headers. By default, requests sent to the server include the zlib headers. This option lets you emulate non-browser applications that do not include zlib headers in their requests. To exclude these headers, set this option to No.
Default value: Yes.
Accept
Server-Side
Compression
Indicate to the server that the replay can accept compressed data. The available options are: None (no compression), gzip (accept gzip compression), gzip,
deflate (accept gzip or deflate compression), and deflate (accept deflate compression). Note that by accepting compressed data, you may significantly increase the CPU consumption.
Default value: Accept gzip and deflate compression.
To manually add compression, enter the following function at the beginning of the script: web_add_auto_header("Accept-Encoding", "gzip");
To verify that the server sent compressed data, search for the string Content -
Encoding: gzip in the section of the server's responses of the replay log. The log also shows the data size before and after decompression.
General
User interface elements are described below:
UI Element Description
DNS caching
Instructs the Vuser to save a host's IP addresses to a cache after resolving its value from the Domain Name Server. This saves time in subsequent calls to the same server. In situations where the IP address changes, as with certain load balancing techniques, be sure to disable this option to prevent Vuser from using the value in the cache.
Default value: enabled.
Page 375 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Convert from/to UTF-8
Converts received HTML pages and submitted data from and to UTF-8. You enable UTF-8 support in the recording options. For more information, see
"Recording Options" on page 276
.
Default value: no.
Step timeout caused by resources is a warning
Issues a warning instead of an error when a timeout occurs due to a resource that did not load within the timeout interval. For non-resources, VuGen issues an error.
Default value: disabled.
Parse HTML
Content-Type
Step download timeout (sec)
Network buffer size
When expecting HTML, parse the response only when it is the specified content-type: HTML, text\html, TEXT any text, or ANY, any content-type.
Note that text/xml is not parsed as HTML.
Default value: TEXT.
The timeout settings are primarily for advanced users who have determined that acceptable timeout values should be different for their environment. The default settings should be sufficient in most cases. If the server does not respond in a reasonable amount of time, check for other connection-related issues, rather than setting a very long timeout which could cause the scripts to wait unnecessarily.
The time that the Vuser will wait before aborting a step in the script. This option can be used to emulate a user behavior of not waiting for more than x seconds for a page.
Sets the maximum size of the buffer used to receive the HTTP response. If the size of the data is larger than the specified size, the server will send the data in chunks, increasing the overhead of the system. When running multiple Vusers from the Controller, every Vuser uses its own network buffer. This setting is primarily for advanced users who have determined that the network buffer size may affect their script's performance. The default is 12K bytes. The maximum size is 0x7FFF FFFF.
Print information about the NTLM handshake to the standard log.
Print NTLM information
Print SSL information
Print information about the SSL handshake to the standard log.
Max number of error matches issued as
ERRORS
Limits the number of error matches issued as ERRORS for content checks using a LB or RB (left boundary or right boundary). This applies to matches where a failure occurs when the string is found (Fail=Found). All subsequent matches are listed as informational messages.
Default value: 10 matches.
Maximum number of
META
Refresh to the same page
The maximum number of times that a META refresh can be performed per page.
Default value: 2.
ContentCheck
Store the values in the ContentCheck XML file in UTF-8.
Page 376 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
values in
UTF-8
Authentication
User interface elements are described below:
UI Element
Fixed think time upon authentication retry (msec)
Description
Automatically adds a think time to the Vuser script for emulating a user entering authentication information (username and password). This think time will be included in the transaction time.
Default value: 0.
Disable NTLM2 session security
Use full NTLM 2 handshake security instead of the more basic NTLM 2 session security response.
Default value: No.
Use Windows native NTLM implementation
Use the Microsoft Security API for NTLM authentication instead of the indigenous one.
Default value: No.
Enable integrated
Authentication
Induce heavy
KDC load
Enable Kerberos-based authentication. When the server proposes authentication schemes, use Negotiate in preference to other schemes.
Default value: No.
Do not reuse credentials obtained in previous iterations. Enabling this setting will increase the load on the KDC (Key Distribution Server). To lower the load on the server, set this option to Yes in order to reuse the credentials obtained in previous iterations. This option is only relevant when Kerberos authentication is used.
Default value: No.
Log
User interface elements are described below:
UI Element Description
Print buffer line length
Line length for printing request/response header/body and/or
JavaScript source, disabling wrapping.
Print buffer escape only binary zeros
l
Yes. Escape only binary zeros when printing request/response headers/body and/or JavaScript source.
l
No. Escape any unprintable/control characters.
Web (Click & Script) Specific
User interface elements are described below:
UI Element Description
Page 377 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
General
Timers
History
l
Home Page URL. The URL of the home page that opens with your browser
(default is about:blank).
l
DOM-based snapshots. Instructs VuGen to generate snapshots from the
DOM instead of from the server responses.
l
Default value: Yes.
Charset conversions by HTTP. Perform charset conversions by the
`Content-Type:....; charset=...' HTTP response header. Overrides `Convert from /to UTF-8.' l
Reparse when META changes charset. Reparse HTML when a META tag changes the charset. Effective only when Charset conversions by HTTP is enabled. Auto means reparsing is enabled only if it used in the first iteration.
l
Fail on JavaScript error. Fails the Vuser when a JavaScript evaluation error occurs.
Default value: No (issue a warning message only after a JavaScript error, but l continue to run the script).
Initialize standard classes for each new window project. When enabled, the script—the src compiled script, will not be cached.
l
Ignore acted on element being disabled. Ignore the element acted on by a
Vuser script function being disabled.
l
Optimize timers at end of step. When possible, executes a setTimeout/setInterval/<META refresh> that expires at the end of the step before the expiration time l
Default value: Yes.
Single setTimeout/setInterval threshold (seconds). Specifies an upper timeout for the window.setTimeout and window.setInterval methods. If the delay exceeds this timeout, these methods will not invoke the functions that are passed to them. This emulates a user waiting a specified time before clicking on the next element.
l
Default value: 5 seconds.
Accumulative setTimeout/setInterval threshold (seconds). Specifies a timeout for the window.setTimeout and window.setInterval methods. If the delay exceeds this timeout, additional calls to window.setTimeout and window.setInterval will be ignored. The timeout is accumulative per step.
l
Default value: 30 seconds.
Reestablish setInterval at end of step.0 = No; 1 = Once; 2 = Yes.
l
History support. Enables support for the window.history object for the test run. The options are Enabled, Disabled, and Auto. The Auto option instructs
Vusers to support the window.history object only if it was used in the first iteration. Note that by disabling this option, you improve performance.
l
Default value: auto.
Maximum history size. The maximum number of steps to keep in the history list.
Default value: 100 steps.
Page 378 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Navigator
Properties
Screen
Properties
l
navigator.browserLanguage. The browser language set in the navigator
DOM object's browserLanguage property.
Default value: The recorded value. Scripts created with older recording engines l use en-us by default.
navigator.systemLanguage. The system language set in the navigator DOM object's systemLanguage property.
Default value: The recorded value. Scripts created with older recording engines l use en-us by default.
navigator.userLanguage. The user language set in the navigator DOM object's userLanguage property.
Default value: The recorded value. Scripts created with older recording engines use en-us by default.
l
screen.width Sets the width property of the screen DOM object in pixels.
l
Default value: 1024 pixels.
screen.height Sets the height property of the screen DOM object in pixels.
l
Default value: 768 pixels.
screen.availWidth Sets the availWidth property of the screen DOM object in pixels.
l
Default value: 1024 pixels.
screen.availHeight. Sets the availHeight property of the screen DOM object in pixels.
Default value: 768 pixels.
Memory
Management
l
Default block size for DOM memory allocations. Sets the default block size for DOM memory allocations. If the value is too small, it may result in extra calls to malloc, slowing the execution times. Too large a block size, may result in an unnecessarily big footprint.
l
Default value: 16384 bytes.
Memory Manager for dynamically-created DOM objects.Yes—Use the
Memory Manager for dynamically-created DOM objects. No—Do not use the
Memory Manager, for example when multiple DOM objects are dynamically created in the same document as under SAP. Auto—Use the protocol recommended (default Yes for all protocols except for SAP).
l
JavaScript Runtime memory size (KB). Specifies the size of the
JavaScript runtime memory in kilobytes.
l
Default value: 256 KB.
JavaScript Stack memory size (KB). Specifies the size of the JavaScript stack memory in kilobytes.
Default value: 32 KB.
Page 379 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Web
Javascript
l
Enable running Javascript code. Yes—Enables running web Javascript steps, such as web_js_run() and web_js_reset()
. No—Web
Javascript steps can not be run. Note that enabling this option causes the creation of a Javascript Engine Runtime, even if there are no Javascript steps in the script.
Default value: No l
Javascript Engine runtime size (KB). Specifies the size of the Javascript
Engine Runtime memory in kilobytes. One Runtime will be created for all
VUsers in a process.
Default value: 10240 KB l
Javascript Engine stack size per-thread (KB). Specifies the size of each
VUser thread in the Javascript Engine memory in kilobytes.
Default value: 32 KB
Internet Protocol > Proxy Node
Enables you to set the proxy server connection settings.
To access Replay > Run-Time Settings> Internet Protocol > Proxy
Important information
This node is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on page 347
.
User interface elements are described below:
UI
Element
Description
No proxy
All Vusers should use direct connections to the Internet. This means that the connection is made without using a proxy server.
Obtain the proxy settings from the default browser
All Vusers use the proxy settings of the default browser from the machine upon which they are running.
Use custom proxy
All Vusers use a custom proxy server. You can supply the actual proxy server details or the path of a proxy automatic configuration script (. pac file) that enables automatic configuration.
l
Use automatic configuration script. Allows you to specify a JavaScript file containing proxy assignment information. This script tells the browser when to access a proxy server and when to connect directly to the site, depending on the
Page 380 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
URL. In addition, it can instruct the browser to use a specific proxy server for certain addresses and another server for other addresses. Specify the location of the script in the Address field.
l
Use proxy server. You can specify one proxy server for all HTTP sites, and another proxy server for all HTTPS (secure) sites or check the use the same
proxy server for all protocols box.
l
. Allows you to specify exceptions to the proxy server rules.
l
. Opens the Proxy Authentication Dialog Box. If the proxy server requires authentication for each Vuser, use this dialog box to enter the relevant password and user name. To add authentication dynamically during recording, or to add authentication for multiple proxy servers, use the web_set_user function.
For more information, see the Function Reference ( Help > Function Reference).
Java Environment Settings > Java Classpath Node
The ClassPath section lets you specify the location of additional classes that were not included in the system's classpath environment variable. You may need these classes to run Java applications and insure proper replay.
You can browse for the required classes on your computer or network and disable them for a specific test. You can also manipulate the classpath entries by changing their order.
To access Replay > Run-Time Settings > Java Environment Settings > Classpath
Important information
This node is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on page 347
.
User interface elements are described below:
UI Element Description
Add Classpath. Adds a new line to the classpath list.
Classpath Entries List
Delete. Permanently removes a classpath.
Down Arrow. Moves a classpath entry down the list.
Up Arrow. Moves a classpath entry up the list.
A list of classpath entries.
Java Environment Settings > Java VM Node
Enables you to set the Java VM run-time settings.
Page 381 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
To access Replay > Run-Time Settings > Java Environment Settings > Java VM
Important information
This node is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on page 347
.
User interface elements are described below:
UI
Element
Virtual
Machine
Settings
Class
Loading
Settings
Description
l
Use internal logic to locate JDK. Search the PATH, registry, and Windows folder for the JDK to use during replay.
l
Use specified JDK. Use a specified JDK during replay.
l
JDK. The home folder of the specified JDK.
l
Additioal VM Parameters. Any optional parameters used by the virtual machine.
l
Using Xbootclasspath parameters. Replays the script with the Xbootclasspath
/p option.
Load each Vuser using dedicated class loader. Load each Vuser using a dedicated class loader. This will allow you to use a unique namespace for each
Vuser and manage their resources separately.
JMS > Advanced Node
Enables you to set the JMS Advanced run-time settings.
To access Replay > Run-Time Settings > JMS > Advanced
Important information
This node is available only for the Web Service protocol. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on page
347
.
Relevant tasks
"How to Prepare Scripts for Replay " on page 712
User interface elements are described below:
VM (Virtual Machine)
Description UI
Element
Use external
VM
Enables you to select a VM (Virtual Machine) other than the standard one. If you disable this option, Vusers use the JVM provided with VuGen.
Page 382 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
JVM
Home
Location of the external JVM. This should point to the JDK home folder, defined by
JDK_HOME. VuGen supports JDK 1.4 and above.
Classpath
Vendor implementation of JMS classes together with any other required supporting classes, as determined by the JMS implementation vendor.
JMS
UI Element
Additional
VM
Parameters
JNDI initial context factory
Description
Extra parameters to send to the JVM such as Xbootclasspath, and any parameters specified by the JVM documentation.
The fully qualified class name of the factory class that will create an initial context. Select a context factory from the list or provide your own.
JNDI provider URL
URL string of the service provider. For example: l
Weblogic - t3://myserver:myport l
Websphere - iiop://myserver:myport
JMS connection factory
JMS security principal
JNDI name of the JMS connection factory. You can only specify one connection factory per script.
Identity of the principal (for example the user) for the authentication scheme.
JMS security credentials
Number of
JMS connections per process
Received message timeout options
The principal's credentials for the authentication scheme.
The number of JMS connections per mdrv process, or Vuser. All Vusers sharing a connection will receive the same messages. The default is 1, and the maximum is 50 Vusers. The fewer connections you have per process, the better your performance.
The timeout for received messages: l
Infinite wait. Wait as long as required for the message before continuing.
l
No wait. Do not wait for the Receive message, and return control to the script immediately. If there was no message in the queue, the operation fails.
l
Specify the timeout in seconds. A timeout value for the message. If the timeout expired and no message has arrived, the operation fails. (default) l
User defined timeout. The amount of seconds to wait for the message before timing out. The default is twenty seconds.
Default value: No wait.
Automatically
Generates a selector for the response message with the correlation ID of the
Page 383 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
generate selector
request (No by default). Each JMS message sent to the server has a specific
ID. Enable this option if you want VuGen to automatically create a selector that includes the message ID.
MMS > Server and Protocol Node
Enables you to set the MMS (Multimedia Messaging Service) run-time settings.
To access Replay > Run-Time Settings > MMS > Server and Protocol
Important information
l
This node is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on page 347
.
l
In the General > Miscellaneous node, under Multithreading, select Run
Vuser as a process.
User interface elements are described below:
UI Element
Automatic
WAP
Connections
Timeout
(seconds)
Description
Defines when to connect and disconnect from a WAP gateway. This setting is only relevant when a WAP gateway is used. The possible values are:
Per Iteration. Connect at the beginning of each iteration and disconnect at the end of each iteration.
Per Send or Receive. Connect and disconnect at the beginning and end of each message.
None. Do not use automatic WAP connections.
Default value: Per Iteration.
Default Sender address
The default address sent in the Sender header.
Default value: +999999.
MMS Version
The version of the MMS protocol used by the script.
MMSC URL
The URL of the MMSC (Multimedia Messaging Center) server.
SMSC IP
The IP address of the SMSC server used for sending MMS notifications over
SMPP.
SMSC Port
The IP port of the SMSC server used for sending MMS notifications over
SMPP.
The time that the server waits for incoming messages.
Default value: 60 seconds.
Mobile TruClient Properties > Mobile Device Node
This pane enables you to select a mobile device properties when recording a Mobile TruClient script.
Page 384 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
To access
l
Replay > Run Time Settings > Mobile TruClient Properties >
Mobile Device Node
l
Select Moble Device button from the Main VuGen Toolbar
Relevant tasks
"How to Add, Remove, and Import Mobile Device Settings for Mobile
TruClient" on page 567
"How to Record a Script with Mobile TruClient " on page 566
User interface elements are described below:
UI Element
Mobile Device
User Agent
Display
Description
Select the mobile device type you want to test.
Specify the header string that is sent to server to identify your mobile device. Once you have a selected a device, the default header value will appear. However, this header string can be modified.
Specify the height and width of your mobile device screen. Mobile
TruClient will open browser window according to the display settings.
.NET > .NET Environment Node
Enables you to set the run-time settings for .NET Vuser scripts.
To access Replay > Run-Time Settings > .NET > .NET Environment
Important information
This node is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on page 347
.
User interface elements are described below:
UI Element Description
AUT configuration
Configuration settings for the AUT location and configuration files.
l
AUT Application Base Path. The AUT (Application Under Test) base folder from which DLLs are loaded during replay. By default, during recording, all of the necessary DLLs are stored in the script's folder. Use this option to specify the location of any missing DLL files for the AUT. This is usually the installation path of the recorded application. Note that the AUT must be
Page 385 of 1812 HP LoadRunner (11.50)
User Guide
VuGen installed on the machine running the script. If you leave this box empty,
VuGen uses the local script\bin folder as the application base folder during replay.
l
AUT Configuration File. The file name of the recorded application's configuration file. VuGen copies the AUT configuration file to the script\bin folder and loads the locally saved file. To specify a different location, enter a full path. If you only specify a file name, and the file is not in the script\bin folder, VuGen loads it from the App base folder.
Concurrency
AppDomain Per Vuser. Enables execution of each Vuser in a separate app domain. Running Vusers in separate App Domains enables each Vuser to execute separately without sharing static variables and prevents locking between them.
Default value: true.
.NET > Shared DLLs
This dialog box enables you to view and modify the list of shared DLLs after you record a Vuser script. If a DLL is included in the list of shared DLLs, when the Vuser script is run and requires a particular DLL, the Vuser will access the DLL in its shared location – the DLL will not be copied to the load generator. Adding a DLL to the list of shared DLLs therefore saves hard-drive space on the load generator when a Vuser is run.
Note: The location that you specify for a shared DLL must be accessible to all load generators on which the Vuser will run.
After you record a Vuser script, the list of shared DLLs is copied from the Recording Options to the
Run-Time Settings. For details on how to view and modify the recording options, see
".NET >
Shared DLLs " on page 326
.
To access
See also
Replay > Run-Time Settings > Microsoft .NET > Shared DLLs
".NET > Shared DLLs " on page 326
User interface elements are described below:
UI Element Description
DLL Entries
The list of shared DLLs that the Vusers will access when the Vuser script is run.
Down Arrow. Moves the selected DLL entry down the list.
Up Arrow. Moves the selected DLL entry up the list.
Add DLL. Enables you to add a DLL to the list of shared DLLs.
Add DLL Folder. This option is always disabled.
Delete. Removes the selected DLL from the list of shared DLLs.
Page 386 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Network > Speed Simulation Node
Enables you to configure the network speed run-time settings.
To access Replay > Run-Time Settings > Network > Speed Simulation
Important information
This node is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on page 347
.
User interface elements are described below:
UI Element Description
Use bandwidth
Indicate a specific bandwidth level for your Vuser to emulate. You can select a speed ranging from 14.4 to 512 Kbps, emulating analog modems, ISDN, or DSL.
Use custom bandwidth
Indicate a bandwidth limit for your Vuser to emulate. Specify the bandwidth in bits, where 1 Kilobit=1024 bits.
Use maximum bandwidth
Vusers run at the maximum bandwidth that is available over the network.
Default value: enabled.
Oracle NCA > Client Emulation Node
Enables you to set the Oracle NCA run-time settings.
To access Replay > Run-Time Settings > Oracle NCA > Client Emulation
Important information
This node is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on page 347
.
User interface elements are described below:
UI Element Description
Network
l
Socket Mode. Configure the connection between the client and server at the socket level.
n
Timeout. The time that an Oracle NCA Vuser waits for a response from the server. Default value: -1 (disables the timeout and the client waits indefinitely).
l
Pragma Mode. Configure the communication on the Oracle-defined Pragma mode (higher level than socket and HTTP).
n
Max Retries. The maximum number of IfError messages the client will
Page 387 of 1812 HP LoadRunner (11.50)
User Guide
VuGen accept from the server before issuing an error. IfError messages are the periodic messages the server sends to the client, indicating that it will respond with the data as soon as it is able.
n
Retry Interval (ms). The interval (in milliseconds) between retries in the case of IfError messages.
n
Include retry intervals in transaction. Includes the interval between retry time, as part of the transaction duration time.
l
Enable Heartbeat. Sends a heartbeat signal is sent to the server. You can configure the frequency of the heartbeat by setting the frequency property.
Default value: enabled, 120.
Connection
l
Forms version. The version of the Oracle Forms server detected during recording. Modify this setting only if the server was upgraded since the recording.
l
Command line parameter separator. Marker for the division between separate parameters in a command line string.
Diagnostic
l
Application Version. The version of Oracle Application. This option is relevant when using Oracle Application—not a custom Oracle NCA application. It is only required when using Oracle database breakdown.
RDP > Advanced Node
Enables you to set the RDP advanced run-time settings.
To access Replay > Run-Time Settings > RDP > Advanced
Important information
This node is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on page 347
.
User interface elements are described below:
UI Element
Bitmap caching
Description
Allows the remote desktop server to use bitmap caching. Enabling this setting can save system resources on the remote desktop server.
Font smoothing
Menu and window animation
Remote desktop composition
Allows the remote desktop server to use font smoothing. Disabling this setting can save system resources on the remote desktop server.
Allows the remote desktop server to animate menus and windows. Disabling this setting can save system resources on the remote desktop server.
Enables remote desktop composition.
Show contents of window
Shows the contents of windows while they are being dragged. Disabling this setting can save system resources on the remote desktop server.
Page 388 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
while dragging
Show remote desktop background image
Allows you to run the remote desktop application without displaying the desktop background image on the remote desktop. Disabling this setting can save system resources on the remote desktop server.
Socket receive buffer size
(bytes)
The number of bytes to allocate for the socket's receive buffer. If the buffer is too small, it can fill up causing the server to disconnect. If the buffer is too large, it uses more local system resources (memory).
Themes
Allows the remote desktop server to use Windows themes. Disabling this setting can save system resources on the remote desktop server.
RDP > Configuration Node
Enables you to set the RDP configuration run-time settings.
To access Replay > Run-Time Settings > RDP > Configuration
Important information
This node is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on page 347
.
User interface elements are described below:
UI Element
Enable RDP caching
RDP Client
Version Emulation
Remote desktop color depth
Remote desktop resolution (pixels)
Start the following program on connection
Description
Support data caching orders in RDP (enabled by default).
The version of RDP packets to produce during replay: As Recorded, or a specific version number.
The color depth settings for the replay: As Recorded, or a specific depth.
The size of the window in which the applications are run: As Recorded, or a specific size (in pixels).
Open RDP connection to invoke the specified application. Specify the following information: Program path and file name and optionally, Start
in folder.
RDP > RDP Agent Node
Enables you to set the RDP Agent run-time settings.
To access Replay > Run-Time Settings > RDP > RDP Agent
Important information
This node is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on page 347
.
Page 389 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
User interface elements are described below:
UI
Element
Description
Use
RDP agent
Enable
RDP agent log
Instructs VuGen to use RDP agent during recording, then generates script using information gathered by the RDP agent during the recorded session. LoadRunner
RDP agent must be installed on the server.
Enables the RDP agent log. This feature is should be used only for debugging purposes.
l
RDP agent log detail level. Configures the level of detail generated in the RDP agent log with Standard being the lowest level of detail and Extended Debug being the highest level of detail.
l
RDP agent log destination. Configures the destination of the RDP agent log data. File saves the log messages only on the remote server side. Stream sends the log messages to the VuGen machine. FileAndStream sends the log messages to both destinations.
l
RDP agent log folder. The folder path on the remote server that the RDP agent log file will be generated in. If none is specified and the agent log destination was set to File, the log is saved in the temp folder of the user on the server.
RDP > Synchronization Node
Enables you to set the RDP synchronization run-time settings.
To access
Important information
Replay > Run-Time Settings > RDP > Synchronization
This node is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol
Compatibility Table" on page 347 .
User interface elements are described below:
UI Element
Default input origin
Description
The default origin for input operations.
Default offset addition
Saves the offset of images that moved during synchronization for all subsequent functions.
Default value: No.
Default synchronization timeout (sec)
The time in seconds to wait for synchronization operations. Enter a value between 0 and 1000.
Default value: 60.
Default tolerance for image
The tolerance level for performing synchronization on images. Select one of the options: Exact, Low, Medium, or High. High has the most tolerance for changes and mismatches. Low requires a match of approximately 95
Page 390 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
synchronization
percent, Medium requires a match of approximately 85 percent, High requires a match of approximately 70 percent, and Exact requires an 100 percent match.
Default value: Medium.
Disable synchronization failure dialog
When selected, it prevents the Synchronization Failure Dialog box from opening.
Default value: not selected.
Fail image synchronization step on timeout
Instructs Vusers how to proceed when images are not found during synchronization. Yes sets a Fail status and Vusers follow the Continue on
Error setting. No returns an LR_NOT_FOUND flag, the step reports a warning and the script continues.
Default value: Yes.
Recorded
Synched
Uses coordinates for all input operations with a non-specified input origin.
Default value: enabled.
Adds the most recent offsets saved at one of the previous synchronization functions to the recorded coordinates of each input operation with a nonspecified input origin.
Typing speed
(msec/char)
The time in milliseconds for sending consecutive characters in keyboard commands. Enter a value between 0 and 1000.
Default value: 150.
RTE > RTE Node
Enables you to set the RTE run-time settings.
To access Replay > Run-Time Settings > RTE > RTE
Important information
This node is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on page 347
.
User interface elements are described below:
UI Element
Maximum number of connection attempts
Use original device name
Description
The TE_connect function is generated by VuGen when you record a connection to a host. When you replay an RTE Vuser script, the TE_connect function connects the terminal emulator to the specified host. If the first attempt to connect is not successful, the Vuser retries a number of times to connect successfully.
Default value: 5.
In certain environments, each session (Vuser) requires a unique device name. The TE_connect function generates a unique 8-character device name for each Vuser, and connects using this name. Select this option to connect using the device name that is contained within the com_string parameter of the TE_connect function.
Note: The original device name setting applies to IBM block-mode terminals
Page 391 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Delay before typing
only.
The delay setting determines how Vusers execute TE_type functions.
l
First key. Specify the amount of time (in milliseconds) that a Vuser waits before entering the first character in a string.
l
Subsequent keys. Specifies the amount of time (milliseconds) that a
Vuser waits before between submitting successive characters.
Note: You can use the TE_typing_style function to override the Delay settings for a portion of a Vuser script.
X-System synchronization
l
Timeout. The timeout (in seconds) to wait for the system to stabilize when replaying a TE_wait_sync function before an error is returned.
l
Stable time. The time (in milliseconds) that the Vuser waits to ensure that the terminal is no longer in the X-SYSTEM mode after executing a TE_
wait_sync function.
SAPGUI > General Node
Enables you to set the SAP GUI run-time settings.
To access Replay > Run-Time Settings > SAPGUI > General
Important information
This node is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on page 347
.
User interface elements are described below:
UI Element
Send status bar text
Send active window title
Show SAP
Client during replay
Description
Send the text from the status bar to the log file.
Send the active window title text to the log file.
Shows an animation of the actions in the SAP client during replay. The benefit of displaying the user interface (UI) is that you can see how the forms are filled out and closely follow the actions of the Vuser. This option, however, requires additional resources and may affect the performance of your load test.
l
Take ActiveScreen snapshots during replay. Captures replay snapshots with the Control ID information for all active objects.
ActiveScreen snapshots differ from regular ones, in that they allow you to see which objects were recognized by VuGen in the SAP GUI client.
As you move your mouse across the snapshot, VuGen highlights the detected objects. You can then add new steps to the script directly from within the snapshot. It also allows you to add steps interactively from within the snapshot for a specific object. For more information, see
"How to Enhance SAP GUI Scripts" on page 630 .
Page 392 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Opens the SAP GUI Advanced Options Dialog Box, enabling you to set the following settings: l
Replay using running SAPlogon application. Instructs the Vusers to use the SAPlogon application that is currently running for replay.
l
Set SAPfewgsvr application timeout. Allows you to modify the
SAPfewgsvr.exe process timeout.
n
Timeout to SAPfewgsvr. The SAPfewgsvr.exe process timeout in seconds. Default value: 300 seconds.
Silverlight > Services Node
Displays the WSDL files associated with your script and allows you to modify their settings for the replay phase.
To access Replay > Run-Time Settings > Silverlight > Services
Important information
This node is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on page 347
.
User interface elements are described below (unlabeled elements are shown in angle brackets):
UI
Element
Description
<Service
List>
A list of the WSDL files that are available for this script.
Protocol
=;
Security
Data
Opens the Protocol and Security Scenario Data dialog box, allowing you to configure a number of settings for each selected WSDL. For more information, see
"Protocol and Security Scenario Data Dialog Box" on page 343 .
VBA > VBA Node
Enables you to set the Visual Basic run-time settings.
To access Replay > Run-Time Settings > VBA > VBA
Important information
This node is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on page 347
.
User interface elements are described below:
UI Element Description
VBA
References
List
Select the reference library that you want to use while running the script. Select a library to display its description and version in the bottom of the dialog box.
Page 393 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
VBA
Compiler
Options
l
Debug script through VBA IDE. Enables debugging through the Visual
Basic IDE (Integrated Development Environment).
l
On Error keep VBA IDE visible. Keeps the Visual Basic IDE visible during script execution.
WAP > Gateway Node
Enables you to set the WAP gateway run-time settings.
To access Replay > Run-Time Settings > WAP > Gateway
Important information
This node is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on page 347
.
User interface elements are described below:
UI
Element
Description
HTTP
Direct
Run the Vusers run in HTTP mode, accessing a Web server directly.
WAP
Gateway
Property
Run the Vusers accessing a Web server via a WAP Gateway.
l
IP. The IP of the gateway.
l
Port. The port of the gateway. When running your Vusers through a WAP gateway, VuGen automatically sets default port numbers, depending on the selected mode. However, you can customize the settings and specify a custom
IP address and port for the gateway.
l
WAP 1.x (WSP). Selects the appropriate WAP version. If you recorded in WAP
1.x (WSP), you can run the Vuser in either 1.x (WSP), or 2.0 (HTTP proxy) mode.
If you select this option, you can set the WAP 1.x (WSP) Properties. For more information, see
"WAP 1.x (WSP) Properties" below .
l
WAP 2.0 (HTTP). Selects the appropriate WAP version. If you recorded in WAP
2.0 (HTTP proxy), then you can only run the Vuser in the same mode.
WAP 1.x (WSP) Properties
UI Element
Advanced
Connection
Options
Enable
Description
Expand to set the Advanced Properties. For more information see
"Advanced
Properties" on next page .
l
Connection-oriented Mode sets the connection mode for the WSP session to Connection-Oriented.
l
Connectionless Mode sets the connection mode for the WSP session to
Connectionless.
Enable a secure connection to the WAP gateway.
Page 394 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Security
Advanced Properties
UI Element
Acknowledge headers
BearerType
Description
Returns standard headers that provide information to the gateway.
Default value: Disabled.
Confirm Push support
The type of bearer used as the underlying transport.
CAPSessionResume
Enables requests for session suspend or resume.
Client SDU buffer size
The largest transaction service data unit that may be sent to the client during the session.
Default value: 4000.
In CO mode, if a push message is received, this option instructs the
Vuser to confirm the receipt of the message. For more information, see
"VuGen Push Support" on page 797
.
The number of outstanding methods that can occur simultaneously.
MethodMOR
Network MTU Size
Push support
PushMOR
The maximum size in bytes, of the network packet.
Default value: 4096.
Enables push type messages across the gateway.
Default value: Disabled.
The number of outstanding push transactions that can occur simultaneously.
Retrieve messages
Server SDU buffer size
Support Cookies
When a push messages is received, this option instructs the Vuser to retrieve the message data from the URL indicated in the push message.
Default value: Disabled.
The largest transaction service data unit that may be sent to the server during the session.
Default value: 4000.
Provide support for saving and retrieving cookies.
Default value: Disabled.
WTLS Abbreviated
Handshake
WTLS Deffie
Hellman
Use an abbreviated handshake instead of a full one, when receiving a redirect message.
Default value: False.
Use the Deffie Hellman encryption scheme for WTLS (Wireless
Transport Layer Security) instead of the default scheme, RSA.
Default value: False.
Page 395 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
WTLS Deffie
Hellman identifier
WTP
Retransmission
Time
WTP Segmentation and Reassembly
An identifier for the Deffie Hellman encryption scheme. This identifier is required for the abbreviated handshake with the Operwave gateway that uses the Deffie Hellman encryption scheme.
The time in seconds that the WTP layer waits before re-sending the
PDU if it did not receive a response.
Default value: 5000.
Enables segmentation and reassembly (SAR) in WTP, Wireless
Transport Protocol.
Default value: True.
WAP > Radius Node
Enables you to set the WAP radius run-time settings.
To access Replay > Run-Time Settings > WAP > Radius
Important information
This node is available only for specific protocols. For a complete list of protocols and their associated nodes, see
"Protocol Compatibility Table" on page 347
.
User interface elements are described below:
UI Element
Accounting port number
Authentication port number
Connection Timeout
(sec)
IP Address
Network Type
Description
Accounting port of the Radius server.
Authentication port of the Radius server.
The time in seconds to wait for the Radius server to respond.
Default value: 120 seconds.
IP address of the Radius server.
Accounting network type: GPRS (General Packet Radio Service) or
CSD (Circuit-Switched Data).
Radius client IP
Radius packets source IP, usually used to differentiate between packets transmitted on different NIC cards on a single Load
Generator machine.
Retransmission retries
The number of times to retry after a failed transmission. Default
value: 0.
Secret Key
The secret key of the Radius server.
Store attributes returned by the server to parameters
Allow Vusers to save attributes returned by the server as parameters, which can be used at a later time.
Default value: False.
Page 396 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Protocols
AJAX - Click & Script Protocol
AJAX - Click & Script - Protocol Overview
AJAX (Asynchronous JavaScript and XML) represents a group of technologies for creating interactive Web applications. With AJAX, Web pages exchange small packets of data with the server, instead of reloading an entire page. This reduces the amount of time that a user needs to wait when requesting data. It also increases the interactive capabilities and enhances the usability.
Using AJAX, developers can create fast Web pages using Javascript and asynchronous server requests. The requests can originate from user actions, timer events, or other predefined triggers.
AJAX components, also known as AJAX controls, are GUI based controls that use the AJAX technique—they send a request to the server when a trigger occurs.
For example, a popular AJAX control is a Reorder List control that lets you drag components to a desired position in a list. VuGen's support for AJAX implementation is based on Microsoft's
ASP.NET AJAX Control Toolkit formerly known as Atlas.
AJAX - Click & Script - Supported Frameworks
The supported frameworks for Ajax Click & Script functions are: l
Atlas 1.0.10920.0/ASP.NET AJAX—All controls l
Scriptaculous 1.8—Autocomplete, Reorder List, and Slider
VuGen supports the following frameworks at the engine level. This implies that VuGen will create standard Web Click & Script steps, but not AJAX specific functions: l
Prototype 1.6
l
Google Web Toolkit (GWT) 1.4
Ajax - Click & Script - Example Script
VuGen uses the control handler layer to create the effect of an operation on a GUI control. During recording, when encountering one of the supported AJAX controls, VuGen generates a function with an ajax_xxx prefix.
In the following example, a user selected item number 1 (index=1) in an Accordion control. VuGen generated an ajax_accordion function.
style="font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline">web_browser("Accordion.aspx",
DESCRIPTION,
ACTION,
"Navigate=http://labm1app08/AJAX/Accordion/Accordion.aspx",
Page 397 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
LAST); lr_think_time(5); ajax_accordion("Accordion",
DESCRIPTION,
"Framework=atlas",
"ID=ctl00_SampleContent_MyAccordion",
ACTION,
"UserAction=SelectIndex",
"
Index=1",
LAST); web_edit_field("free_text_2",
"Snapshot=t18.inf",
DESCRIPTION,
"Type=text",
"Name=free_text",
ACTION,
"SetValue=
FILE_PATH",
LAST);
Note: When you record an AJAX session, VuGen generates standard Web (Click & Script) functions for objects that are not one of the supported AJAX controls. In the example above, the word FILE_PATH was typed into an edit box.
Click & Script - Recording Tips
This section lists tips for recording click-and-script Vuser scripts.
Use the mouse and not the keyboard
It is preferable to click on an object with the mouse rather than using the keyboard. During recording, use only GUI objects that are within the browser's pane. Do not use any browser icons, controls, the Stop button, or menu items, such as View > Refresh. You may, however, use the
Refresh, Home, Back and Forward buttons and the address bar.
Do not record over an existing script
It is best to record into a newly created script—not an existing one.
Avoid context menus
Avoid using context menus during recording. Context menus are right-click menus which pop up when clicking certain objects in a graphical user interface.
Avoid working in another browser while recording
While recording, do not work in any browser window other than the browser windows opened by
VuGen.
Page 398 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Wait for downloads
Wait for all downloads to complete before doing any action, such as clicking on a button or filling in a text field.
Wait for pages to load
During recording, it is best to wait for the page to load completely before doing the next step. If you did not wait for all of the pages to load, record the script again.
Navigate to the start page
If the last page in an action does not contain the links and buttons that were available at the start of the iteration, then the next iteration will fail. For example, if the first page has a text link Book A
Flight, make sure to navigate to the appropriate page at the end of your recording, so that the same link will be visible at the end of the business process.
Use a higher event configuration level
Record the business process again using the High event configuration level. For more information on changing the event configuration level, see
"Click and Script - Troubleshooting and Limitations" on page 651 .
Disable socket level recording
In certain cases, the capturing of the socket level messages disrupts the application. For most recordings, socket level data is not required. To prevent the recording of socket level data, disable the option in the recording options. For more information, see
"GUI Properties > Advanced Node" on page 322 .
Enable the "Record rendering-related property values" option
If the client-side scripts of the application use a lot of styling activities, enable the Record
rendering-related property values option before recording the script. For example, enable this option to record additional DOM properties such as offsetTop. Note that enabling this option may decrease the recording speed. You can enable the option by selecting Recording Options > GUI
Properties > Advanced. For more information, see
"GUI Properties > Advanced Node" on page
322 .
Click & Script - Replay Tips
This section lists tips for replaying click-and-script Vuser scripts.
Do not reorder statements in a recorded script
Do not change the order of the statements within a recorded script. Also, copying segments of code from one Action to another is not recommended.
Convert non-ASCII characters
If your links contain non-ASCII characters, you should instruct VuGen to convert the data to or from the UTF-8 format.
Enable UTF-8 conversion
1. Click Record > Recording Options to open the Recording Options dialog box.
Page 399 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
2. Select Replay > Run-Time Settings and select the Internet Protocol > Preferences node.
3. Click Options to open the Advanced Options dialog box.
4. Locate the Convert from/to UTF-8 option and set it to Yes.
Alternatively, view the list of options that is displayed when a link is not found. Enter the displayed text as-is, such as the hex escape sequences \xA0 or any other non-standard format.
Run the same sequence of actions twice
In some cases, you can perform a certain process only once—such as deleting a user from the database. Replay will fail after the first iteration because the action is no longer valid. Verify that your business process can be repeated more than once with the same data.
Set unique image properties
In the Step Navigator, double click on the previous image step to open its properties. If the Id,
Name, and Alt properties are empty, provide further identification of the image, such as its file name in the Src property.
Alternatively, you can add an Ordinal argument to specify the occurrence number of the image on that page. The Ordinal argument uniquely identifies each image on the page where all other identification arguments are not unique. For more information, see the Function Reference
(Help > Function Reference).
Check the step's description
If you receive a GUI Object is not found error, check the Output pane for a list of the objects in the problematic step. In some cases, the object description changes slightly from run to run.
There are several solutions: l
If the new value is stable, open the script in the Editor and manually modify the value of the step's DESCRIPTION argument.
l
If the description changes from run to run, you can use a regular expression in the
DESCRIPTION argument. For more information, see the Function Reference (Help > Function
Reference).
l
Alternatively, replace the problematic object description property, such as Name, with the
Ordinal property. For more information, see the Function Reference (Help > Function
Reference).
Click & Script - Miscellaneous Tips
The following additional tips may help you in troubleshooting problems that you experience with click-and-script Vuser scripts:
Search for warnings
Search for warnings or alerts in the Output pane.
Verify the response
Verify the response of the previous step is correct using web_reg_find. For more information, see the Function Reference (Help > Function Reference).
Page 400 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Use alternate navigation
For problematic steps or those using Java applets, use Alternative Navigation to replace the Web step with an HTTP level step. Note that the HTTP level steps may require manual correlations. To perform Alternative Navigation, select a step in the Step Navigator, or the text in Script View, and select Replace with alternative navigation from the right-click menu.
Working with the Kerberos Protocol
If you are using the Kerberos Protocol for authentication, you must customize VuGen to properly convene authorization sessions. Advanced users can attempt to perform this customization themselves.
In order for the Kerberos Protocol to work properly, create a krb5.ini file and put it in an available folder. Save the full path name of krb5.ini into the KRB5_CONFIG environment variable.
The krb5.ini file should contain detailed information about each domain (KDS and AS addresses) and trust chains.
For more information, contact HP software support.
Click and Script - Troubleshooting and Limitations
This section describes troubleshooting and limitations for click-and-script protocols. Some items apply to specific click-and-script protocols only.
Recording Issues and Limitations
Firefox is not supported
Only Internet Explorer is supported for Web (Click & Script). To record browser activity on Firefox, use the Web (HTTP/HTML) protocol.
Application behaves differently while being recorded
If your application behaves differently during recording, than it does without recording, you should determine if the recording problem is unique to Web. The effect may be that a Web page will not load, part of the content is missing, a popup window does not open, and so forth.
Create a new Web (HTTP/HTML) script and repeat the recording.
In the event that the recording fails in Web (HTTP/HTML), we recommend that you disable socket level recording (see
"Click & Script - Recording Tips" on page 648 ).
The problem may be the result of an event listener. Use trial and error to disable event listeners in the Web Event Configuration Recording Options, and then re-record your session as a Web user.
Certain Click and Script steps do not generate properly
After recording a script, if not all steps are correctly generated, the problem may be due to the
Windows Component > Internet Explorer Enhanced Security Configuration.
Page 401 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Remove Internet Explorer Enhanced Security Configuration by selecting Control Panel >
Add or Remove Programs > Add or Remove Windows Components and re-record your script.
Disable an event listener
1. Click Record > Recording Options to open the Recording Options dialog box.
2. Select Recording > Recording Options and select the GUI Properties > Web Event
Configuration node.
3. Click Custom Settings and expand the Web Objects node. Select an object.
4. Select Disabled from the list in the Record column for the relevant Web object. If the recording still does not work, enable the listener you previously disabled, and try disabling another one. Repeat these steps until your recording succeeds.
Dynamic menu navigation was not recorded
A dynamic menu is a menu that dynamically changes depending on where you select it. If the dynamic menu navigation was not recorded, record again using "high" event configuration mode.
These settings can be found in the Recording Options > GUI Properties > Web Event
Configuration node.
Certain user actions were not recorded
Check if there is a Java applet running inside the browser. If not, record the script with the Web
(HTTP/HTML) protocol.
Replay Issues
GUI object not found
Does the error occur at the beginning of the second iteration?
If the error occurs at the beginning of the second iteration's Action section, it is probably the result of a starting page that was present for the first iteration, but missing for the second one. If the last page in an action does not contain the links and buttons that were available at the start of the iteration, then the next iteration will fail. For example, if the first page has a text link Book A Flight, make sure to navigate to the appropriate page, so that the same link will be visible at the end of the business process.
Is it a text link containing non-ASCII characters?
If the problem occurs with non-ASCII characters, you should instruct VuGen to covert the data to a suitable character set.
Enable data conversion on Windows machines
1. Click Record > Recording Options to open the Recording Options dialog box.
2. Select Replay > Run-Time Settings and select the Internet Protocol > Preferences node.
Page 402 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
3. Click Options to open the Advanced Options dialog box.
4. Locate Charset Conversions by HTTP in the Web (Click & Script) > General options, and set it to Yes.
Enable UTF-8 conversion for Linux machines
1. Click Record > Recording Options to open the Recording Options dialog box.
2. Select Replay > Run-Time Settings and select the Internet Protocol > Preferences node.
3. Click Options to open the Advanced Options dialog box.
4. Locate Convert from/to UTF-8 in the General options and set it to Yes.
Alternatively, view the list of alternatives that are displayed when a link is not found. Enter the displayed text as-is, such as hex escape sequences \xA0 or any other non-standard format.
Can you run the same sequence of actions twice in the application?
In some cases, you can only perform a certain process once, such as deleting a user from the database. Replay will fail after the first iteration, because the action is no longer valid. Verify that your business process can be repeated in the application more than once with the same data, without recording again.
Were the image properties 'Id', 'Name' and 'Alt' empty?
In the Step Navigator, double click on the previous image step to open its properties. If the Id,
Name, and Alt properties are empty, provide further identification of the image, such as its file name in the Src property.
Alternatively, you add an Ordinal argument to specify the occurrence number of the image on that page. The Ordinal argument uniquely identifies each image on the page where all other identification arguments are not unique. For more information, see the Function Reference
(Help > Function Reference).
Did the step's description change?
Check the Output pane for a list of the objects in the problematic step. In some cases, the object description changes slightly from run to run.
There are several solutions: n
If the new value is stable, open the Script View and manually modify the value of the step's
DESCRIPTION argument(s).
n
If the description changes from run to run, you can use a regular expression in the
DESCRIPTION argument(s). For more information, see the Function Reference (Help >
Function Reference).
n
Alternatively, replace the problematic object description property, such as Name, with the
Ordinal property For more information, see the Function Reference (Help > Function
Reference).
Did the page load completely during recording?
During recording, it is best to wait for the page to load completely before doing the next step. If
Page 403 of 1812 HP LoadRunner (11.50)
User Guide
VuGen you did not wait for all of the pages to load, record the script again.
Replay failure
If the replay is failing at a particular step, check the step description. VuGen sometimes reads a single space as a double space. Make sure that there are no incorrect double spaces in the string.
Miscellaneous Issues
Out of memory error in JavaScript
Increase the JavaScript memory in the Run-Time settings.
Increase the JavaScript memory size
1. Click Record > Recording Options to open the Recording Options dialog box.
2. Select Replay > Run-Time Settings and select the Internet Protocol > Preferences node.
3. Click Options to open the Advanced Options dialog box.
4. Locate the Memory Management JavaScript Runtime Memory Size (Kb) and Memory
Management JavaScript Stack Memory Size (Kb) options.
5. Increase the memory sizes to 512Kb or higher.
VuGen displays JavaScript errors
If VuGen displays JavaScript errors in the Output pane, enable IE (Internet Explorer) script errors in order to verify that the Javascript itself does not contain errors.
Show script errors
1. Open Internet Explorer.
2. Select Tools > Internet Options and click the Advanced tab.
3. Under Browsing, select the Display a notification about every script error check box.
4. Rerun the application in IE. If IE displays script errors, then there is a problem with the
JavaScript application. If it is not possible to fix the application, you can safely ignore the corresponding replay errors.
Problems following parameterization
If you encounter problems only after you have parameterized values, verify that the values are valid for your application. Perform business process with the value of the parameter and verify that the application accepts it.
Page 404 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Problems with applications that utilize styling actions
If the client-side scripts of the application use a lot of styling activities, you should record the script again after enabling the Record rendering-related property values option. This enables the recording of additional DOM objects.
Enable the "Record rendering-related property values" option
1. Click Record > Recording Options to open the Recording Options dialog box.
2. Select Recording > Recording Options and select the GUI Properties > Advanced node.
3. Select the Record rendering-related property values check box.
Re-record the Vuser script.
Ajax TruClient Protocol
Ajax TruClient Protocol Overview
The Ajax TruClient protocol interactively records scripts as you navigate through your business process. This enables VuGen to record dynamic, complex web-based applications and create user friendly scripts. Scripts are created in real-time and steps can be seen in the LoadRunner VuGen for
TruClient sidebar as they are performed. Currently, you can select to record scripts with either the
Mozilla Firefox or Internet Explorer browser.
Note: This section documents features available in both the Mozilla and Internet Explorer browsers.
Look for the browser's icon throughout this section, in the How To topic headers, in the
Important Information section in UI topics, or next to specific features to determine if functionality is applicable to that browser.
You can watch a video demonstration from the VuGen start page.
The TruClient protocol workflow is different from the workflow for other VuGen protocols. The following flowchart illustrates the basic TruClient workflow:
Page 405 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
The following lists some of the main differences between the Ajax TruClient protocol and other
VuGen protocols: l
The script is visible in VuGen’s script view but it is read only. The script is created and modified in the TruClient sidebar in the browser (FF or IE).
Page 406 of 1812 HP LoadRunner (11.50)
User Guide
VuGen l
TruClient scripts are asynchronous. Steps do not have to wait for previous steps to complete.
Each step defines an End Event which defines the point at which subsequent steps are allowed to start running.
l
TruClient scripts are recorded on the user level, therefore there are no correlations however the main challenge becomes object identification.
l
TruClient scripts are replayed at the user level, therefore each Vuser requires a browser instance with loaded DOM and Javascript. This makes resource footprint larger than the Web (transport based) protocol and also makes it dependent on the DOM and Javascript of the application.
l
All recorded events are saved in the script. Events deemed to be irrelevant are assigned to different script levels and are not replayed unless the level is manually changed by the user.
l
TruClient transactions are defined by step events, not the steps themselves as in other protocols. For example, a step's End Event may allow the script to continue, while a transaction that ends on that step may continue until the step event that defines the transaction is reached.
l
The Run-Logic in TruClient scripts is controlled differently. There is only one action.
l
TruClient step arguments accept JavaScript code as values.
l
Move a TruClient step by grabbing the hand on the step and dragging it to the desired new location.
Most of the tasks involved in recording, replaying, and modifying scripts are done using the
TruClient Sidebar for Internet Explorer or Mozilla Firefox .
TruClient Snapshots - Overview
Vuser scripts based on the TruClient protocol utilize VuGen's Snapshot pane.
l
For an introduction to the Snapshot pane, see
"Snapshot Pane - Overview" on page 85
.
l
For details on how to work with the Snapshot pane, see
"How to Work with Snapshots" on page
88
.
l
For details on the Snapshot pane UI, see
"Snapshot Pane" on page 119 .
TruClient automatically generates snapshots during recording. These snapshots can be viewed by hovering the mouse over each step's icon. The snapshots are taken before the step's action is implemented and they are saved as .png files. Click each snapshot to display it in a new browser tab. Make sure that the correct tab is active before replay. Recording snapshots are stored in the snapshot folder.
You can configure snapshot generation during recording and replay by clicking the button and selecting the Interactive Options tab. For details, see
" Ajax TruClient General Settings Dialog
Box" on page 439 .
Snapshots can be viewed in snapshot viewer in VuGen. For details, see
"How to Work with
Snapshots" on page 88 . You can also view snapshots in the TruClient snapshot viewer. For details,
see
" TruClient Home Tab" on page 436
.
TruClient can also generate snapshots during load mode according to your specifications in the
Run-Time settings. For details, see
"General > Replay Node" on page 364 .
Page 407 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Replay snapshots are stored in the results folder and are organized according to the type of replay
(interactive or load), the script section, and the iteration.
TruClient Alternative Steps
Alternative steps allow you to view instances in which there are multiple ways to perform the same action in a step. You can modify such steps to perform the given action to debug or enhance your script. For example, in a drop-down list, VuGen gives you the option of specifying your selection by name or by the number in which it appears in the list.
Steps that have alternative options are labeled with an alternative step symbol . Click it to view the alternative options for that step. Click the desired alternative and select Back.
Below is a snapshot of a step in which the second item in a drop-down list named "Kindle Books" was selected. The alternative steps feature gives you the option of defining the step based on clicking the link "Kindle Books", selecting the object "Kindle Books" from the drop-down menu, or selecting the second item in the drop-down menu.
TruClient Script Levels
As part of the process of recording a business process, some steps that are performed by the user while recording are not needed during replay. VuGen removes steps it deems to be unnecessary and places them in different script levels. For example, a click step that occurs in an area of the application that has no effect is placed in level 2. VuGen assumes that this step is not significant and will not help the user to emulate a business process on the application. During the replay phase, only steps that are visible are run. The default view displays level 1 steps only. To view steps from levels 2 and 3 as well, use the slide bar in the home tab.
In certain cases, you may want to override VuGen's decisions and manually change the level of a given step. This can happen in cases such as mouse over steps that are needed during replay.
VuGen generally views mouse over steps as unnecessary for replay and assigns them to level 3.
For more information, see
" How to Debug Ajax TruClient Scripts" on page 415 .
Note: Automatic leveling during replay
The level of a step is normally set during recording according to the importance of the events in the business process. It can happen that an important step will look unimportant and will be placed in a lower script level. This may cause the replay to fail, generating an “object not found” error. In TruClient Firefox scripts,TruClient will check if there are steps in a lower level that can
Page 408 of 1812 HP LoadRunner (11.50)
User Guide
VuGen affect the outcome of the current step. If found, the meaningful step will be moved to higher script level.
The following screen shot displays a small script. Note that the step numbers skip from 1 to 3. Step
2 is hidden in a different level.
After changing the display settings by using the slide bar, all steps are now displayed and will run if replayed in interactive mode.
TruClient Global Event Handlers
Global event handlers are designed to handle events that can occur at any time during the run of the script. The event trigger is set to an object appearing in the application with or without an additional specified property. The handler (action) of the event is a function selected from the script’s function libraries.
During the replay of the script, when moving from one step to the next, TruClient checks to see if a defined event occurs and if it does, TruClient runs the function.
The flowchart below illustrates the Global Event Handler workflow using the business process example of buying and selling of stocks.
Page 409 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Page 410 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
For details, see : l
" How To Use The Global Events Handler" on page 424
l
" TruClient Events Handler Editor Dialog Box" on page 441
Global Firefox Browser Settings
Each TruClient script is opened in Firefox with a different profile. Firefox profiles save user data such as cookies, client certificates, history, cache, and so on. To make changes that are saved in the script profile, make the changes in the Firefox window when interactively developing the script.
These changes will apply to the current script only.
Firefox options that affect interactive mode can be modified in the Global Settings dialog box. All of the settings in this dialog box are imported to each new script as it is created, but affect interactive mode only. When the script is saved, these settings are copied to the Run-time settings as well.
Scripts that are run in load mode use the settings defined in the Load Mode Browser Settings node of Run-time Settings dialog box.
The Firefox extensions settings are imported to each script every time a script is opened in Firefox.
For details, see
" Ajax TruClient General Settings Dialog Box" on page 439 .
Some standard Firefox options are disabled in the version of Firefox that TruClient uses to develop scripts. These include, but are not limited to, some File, Bookmark, Tools, and Help options. To save bookmarks for use in your scripts, use the
" Ajax TruClient General Settings Dialog Box" on page 439
described on
" Ajax TruClient General Settings Dialog Box" on page 439 .
TruClient Functions and Function Libraries
A TruClient function is a group of steps, such as a login, that you define as a function. Functions are stored in libraries that can be reused multiple times in a script. Each library can contain multiple functions.
Each library can be either local or global. A local library can be accessed by the script that created it. A global library can be accessed by all TruClient scripts. Additionally, a global library can be saved on the network and shared between many users.
For details on creating and using function and function libraries, see
" How To Create and Use
Function and Libraries " on page 426
Firefox Private Browsing
Private Browsing is a Mozilla Firefox mode which allows a user to browse without saving information about their session. Some examples of items which are not saved are passwords, cookies, and history.
To more accurately emulate real users, VuGen replays scripts in private browsing mode. This ensures that the browser does not use saved session information when running a script more than one time.
Page 411 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
You can manually change enable and disable private browsing from the Firefox menu.
Considerations for Working With Ajax TruClient Scripts
The following section contains considerations for recording Ajax TruClient scripts.
Where is JavaScript Supported
The arguments listed in the Arguments section of each step are all JavaScript based and can accept JavaScript expressions. It is important to remember that to provide a string value, quotation marks are required. For example: City will be interpreted as a variable whereas "City" or 'City' will be evaluated as a string.
All other sections such as Step, Object, Transactions, are not JavaScript based, are not evaluated as JavaScript and do not support JavaScript expressions. The only exception is object identification using JavaScript.
However, object identification variables and step variables do not share the same context.
Variables that are defined in one context are not recognized in the other. To use a variable in object identification that is defined in a step, add the prefix ArgsContext before the variable name. For example, if the variable firstname is defined as a value for an argument of a step, it cannot be used in object identification. To use the firstname variable in object identification, refer to the variable as
ArgsContext.firstname.
How Can I Learn More about JavaScript
JavaScript is the scripting language of the Web. JavaScript is used in millions of Web pages to add functionality, validate forms, detect browsers, and much more. The Internet is full of resources for learning JavaScript and can be located using search engines.
An example of some tutorials and references: http://www.javascriptkit.com/jsref/ http://www.w3schools.com
http://www.learn-javascript-tutorial.com/
Script Debugging Tips
Since all the TruClient arguments support JavaScript you use the Alert function to display information during script development. You can also reference any DOM element using regular functions such as location.
To further improve debugging capabilities you can install plug-ins such as DOM Inspector and
Firebug that can provide additional information on the application object properties.
Page 412 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
General Tips Regarding Successful Interactive Replay
l
Do not resize the Firefox browser between record and replay and during replay.
This can cause objects to move and interfere with VuGen's ability to locate them.
Note: This is especially important when the Related Objects feature is used, as resizing may change the relative position of the objects.
l
Do not switch between applications during interactive replay. Keep Firefox in focus without working in the browser.
l
In certain cases where applications are sensitive to the focus status certain steps may have problems replaying. This may occur due to an object that either captures the focus or requires a certain focus. In either case, you can try clicking on another object to change the focus state immediately before the problematic step.
General Tips Regarding Successful Recording
Do not use arrow keys, tab key, the escape key, or the middle mouse key when recording.
l
Try to use their mouse equivalents.
l
Do not resize the application during recording.
Resolving Step Timeouts
Steps may timeout due to several reasons: l
Application is responding slowly, possibly under load. This is actually an important test result.
l
Step Timeout is incorrect and should be modified via the Step section of the step properties.
l
The end event of the step is incorrect and the step is waiting for an event that doesn't occur. The end event should be changed via the Step section of the step properties.
Using Regular Expressions
To use regular expressions, there are two options: l
Use the '/' notation: Replace the quotation marks of a string with a slash.
For example:
/LoadRunner/ is a regular expression that will match any string that contains the word
"LoadRunner" in it.
l
If you need to dynamically create a regular expression (e.g. using a parameter), you can use the regular expression constructor and specify the string. For example, the equivalent of the above example is RegExp("LoadRunner").
The full list of supported regular expressions can be found here:
Page 413 of 1812 HP LoadRunner (11.50)
User Guide
VuGen https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/RegExp
How to Record Ajax TruClient Scripts
This task describes the basic steps involved in interactively recording an Ajax TruClient Vuser
Script.
1.
Configure the Run-Time Settings
Configure the Run-Time settings before recording and performing a load test. To open the Run-
Time settings dialog box, click F4. For more information, see
"Run-Time Settings" on page
346 .
2.
Configure the Global Browser Configuration Settings
The Browser Configuration settings allow you to configure settings that apply to all TruClient scripts. The settings are imported to new scripts as they are created. For more information, see
" Global Firefox Browser Settings" on page 411 . To edit these settings click the Ajax
TruClient General Settings button from the Record toolbar in the VuGen main window and select the Browser Settings tab. For details, see
" Ajax TruClient General Settings Dialog
Box" on page 439 .
3.
Start developing the script
Click Develop Script to initialize the interactive recording session in Mozilla Firefox or
TruClient browser for IE.
4. Record interactively
Navigate to the desired starting website and click record. All of your actions will be recorded and displayed in the VuGen tab on the left as you perform your business process. You can pause or stop the script and continue recording from any point in the script.
To record into different section of the script, right-click a step and select Record > Record
after or Record > Record before to begin recording new steps into the desired location in the script.
5.
Enhance the script
You can enhance your script in a number of ways such as inserting parameters, transaction, loops, and verification steps. For task details, see
" How to Enhance Ajax TruClient Scripts" on page 422 .
6.
Replay the script
Replay the script at least two times, correcting any errors that occur during the process. After two successful consecutive replays, you can move on to the next step. If you continue to experience errors, see
" How to Debug Ajax TruClient Scripts" on next page
.
During interactive replay, TruClient will animate each step progress according to its real running progress by filling the step bar. The step running progress can be for example: finding the test object, performing the action, or synchronizing the step on its end-event.
7.
Stop developing
Page 414 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Click the Save button to save the script. Close the browser window.
8.
Replay the script in Load Mode
TruClient scripts are run slightly differently when performing load testing, so Load Mode was created to run the script exactly as it will run during load testing. In the VuGen main window, click the arrow next to the Develop Script button to replay the script in Load Mode. Progress can be monitored in the Interactive Replay log. The browser does not open, and snapshots are not displayed.
Note: Any customizations (such as bookmarks) that you make within this instance of
Firefox will not be saved globally. This is because VuGen opens each script in a unique
Firefox profile. If you want to use firefox for any use other than creating this script (e.g.
browse the internet), we recommend that you open an additional firefox window.
How to Debug Ajax TruClient Scripts
This task describes the basic steps involved in interactively recording an Ajax TruClient Vuser
Script.
View Replay Errors in Browser
If any steps failed during replay, they are marked with an error icon. Hover the mouse over these icons to view descriptions of the errors.
Run The Script Step by Step
You can run your script step by step to view the replay more slowly and in a controlled manner. To run the script step by step, select the down arrow from the replay button in the browser and select
Replay step by step. Repeat this procedure after each step to continue the step by step replay.
View the Replay Logs
In the VuGen's Output Window, you can view details your script's replay in the Replay and
Interactive Replay Logs. For more information, see Output Window .
Insert Breakpoints
Breakpoints instruct the script to stop running during a replay when in interactive mode. They can be used to help debug your script. To insert a breakpoint, select the desired step and click the
Breakpoints button.
Debug Scripts Using Snapshots
You can use the snapshots generated during replay to debug scripts by viewing the snapshots of the failed step(s).
1. Open the Run-Time settings dialog box and go to the General > Other Settings node.
2. Set the Replay Snapshot Generation setting to On Error.
3. Replay the script.
4. Look in the Replay or Interactive Replay logs for errors. Note the step numbers of the steps
Page 415 of 1812 HP LoadRunner (11.50)
User Guide
VuGen that had errors.
5. In the VuGen main window, right-click and select Open Script Directory > Results >
Interactive and select the relevant section and iteration.
You now have a group of snapshots in which errors occurred in the script.
Modify and view script levels
Sometimes, steps that were recorded and are necessary for replay are placed in levels 2 and 3. In this case, you need to manually modify the level of those steps to level 1.
l
To modify a the script's replay level, drag the slider in the toolbar to the desired level. Dragging the slider to level 3 displays and replays the steps on levels 1, 2, and 3.
l
To move a step to a different level, open the step and click on the step section. Move the slider to the desired level. If the step is part of a group step, both the group step and the individual step must be modified.
For more information, see
" TruClient Script Levels" on page 408 .
Insert Wait steps
Wait steps cause the script to pause for a specified amount of time before continuing with the next step. Wait for Object steps cause the script to wait for a specified object to load before continuing with the next step. Wait steps differ from think time steps in other protocols because the dynamic nature of the TruClient protocol. Wait steps begin after the End Event of the previous step is reached. This means that the previous step may continue to run after the wait step has been reached. To insert a wait, select Toolbox > Functions and drag the Wait or Wait for Object icon to the desired location in your script. Wait steps wait for a specified amount of time, Wait for Object steps wait until the specified object appears in the application. In Wait for Object steps, select the
Click to choose an object buttonto select the target object in the application.
How to Resolve Object Identification Issues
In dynamic websites, objects which have been recorded can often move or change content. Object identification presents one of the biggest challenges with recording and replaying Web 2.0
applications. This can cause the script to lose the ability to locate the object.
Ajax TruClient includes very sophisticated mechanisms to overcome this challenge including the
Highlight, Improve Object Identification, Replace Object and Related Object options. When identifying objects for applications that recorded in windows, make sure that the correct window is selected. The following steps describe the ways to resolve these issues.
Highlight, Improve Identification, Replace, Related Objects all require the user to select an object in the application. There are cases in which various actions are required in the application to make the object visible such as mouse over and mouse click. In these cases use the CTRL+ALT+F4 option to suspend the TruClient object selection mode until you've brought the object into view and press
CTRL+ALT+F4 again to select the object.
Tip: After you perform any of the changes, replay the single failed step in question and only afterwards replay the whole script again. This will help verify whether the change has solved the issue you encountered.
The following steps describe the ways to resolve object identification issues.
Page 416 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Highlighting an object
Regardless of which method of object identification is used, you can use the highlight button to check if an object is visible in the application at any time. If the object is not found this may be an issue of pacing and timing. If the object cannot be found, an error message is displayed.
Improve Object Identification
If the Highlight option fails, use the Improve Object Identification.
This will let TruClient relearn the properties of the object and compare them to the properties learned during recording. Based on the differences, the necessary adjustments can be made. Depending on how dynamic the application is, you may need to use the Improve Object Identification function more than once.
Once you have done this, try replaying the step again to check whether the problem has been solved.
Alternative Steps
Alternative steps allow you to view instances in which there are multiple ways to perform the same action in a step. If Improve Object Identification fails, try using one of the alternative steps.
For example, you may be clicking on an option in a drop down list in which the text changes based on some value.
If you try to click based on the text, the step may fail.
If you use an alternative step that selects the item in the list based on the ordinal value of the option within the list, the click will succeed regardless of the text.
Note: Before selecting one of the alternatives, try highlighting the object used by the alternative step and replaying it. This way you'll make sure the alternative step is replaying the necessary action.
Modify the Object Identification Method
You can modify the way TruClient identifies the object by modifying the object identification method in the Object section of the step properties. The following options are available: l
Automatic. TruClient's default object identification method. The Automatic method allows
TruClient to use its internal advanced algorithms to locate the object. If this method does not successfully find the object during replay, click the Improve Object Identification button and replay the script again.
l
XPath. If Automatic identification fails, even after using Improve Identification or Related
Objects (described below), try using the XPath identification method. This method identifies the object based on an XPath expression that defines the object in the DOM tree. Click the dropdown arrow next to the XPath edit box to select a suggested XPath for the object. You can manually modify the suggested path. To revert to one of the original expressions generated by
VuGen, select one of the options from the drop-down again.
For example, if you need to select the first search result, regardless of the term being searched for, using XPath identification may help.
l
JavaScript. JavaScript code that returns an object. For example:
Page 417 of 1812 HP LoadRunner (11.50)
User Guide
VuGen document.getElementById("SearchButton") returns an element that has a DOM ID attribute of
"SearchButton".
Using the JavaScript identification method you can write JavaScript code that references the returned document and can use CSS selectors and other standard functions.
For example, the page returned by the server contains multiple links with the same "title" attribute
(search results) and we want the script to randomly click on one of the available links.
Object identification for this case, using the JavaScript identification method, may look something like this: var my_results = document.querySelectorAll('a[title="SearchResult"]'); random(my_results);
Modify the script timing
Sometimes objects may not be found because of timing and synchronization issues. For example, the script may be looking for an object that was in the application, but the script replayed too quickly and already progressed to another page. If you suspect that the object is not being found because of a timing or synchronization issue, you can insert Wait steps. For more information, see
" How to
Debug Ajax TruClient Scripts" on page 415 .
Relating objects to other objects
If the Improve Object Identification function does not solve the issue and neither do any of the alternative steps, try using the Related Objects option.
If an object becomes difficult to identify on its own, you can label the object based on a different, more stable object. For example, you can select an object which is not dynamic and "relate it" to the target object. Relations are defined visually, relating objects according to their distance in pixels from other objects. Relations are defined per ID method, per object. If more than one relation is defined for an ID method of a given object, both relations must locate the same object for the step to pass. VuGen then uses this object to help locate the target object. To use this function, expand the step, select Object > Related Objects, and click the add button . Follow the directions to create a relation. Verify that it has worked by highlighting both the object and its related object.
Tips:
l
Use this feature only if other identification methods have failed as it may be more resource intensive.
l
Use the minimum search area to improve performance.
l
Related Objects are sensitive to window sizing. Resizing may alter object positions and relationships. This should be taken into account.
l
Each identification method (Automatic, XPath, and JavaScript) has its own set of related objects. These related objects are not shared between identification methods.
l
If several relations exist they all need to be found in order for the identification to succeed.
Replacing an object
If you selected the wrong object during recording, or an object has permanently changed you can
Page 418 of 1812 HP LoadRunner (11.50)
User Guide
VuGen replace it with a different object without replacing the step. This effectively resets the step, deleting changes made to the original step such as relations. Expand the step, select Object, and click the
Replace button . Select the new object and replay the script.
Replace Object will tell TruClient that the object currently referenced in the step is incorrect.
TruClient will remove any current knowledge of the object and learn the object you select from scratch.
Therefore, you should only use the Replace Object option if the object you used during recording was the wrong one.
Object Identification Assistant
Object identification can fail during replay for several reasons. For each reason, TruClient will launch the object identification assistant to try to resolve failed indentification.
Cannot confirm object
TruClient suspects a specific object to be the desired object but it cannot be positively identified.
The suspected object will be highlighted on the screen, and the following assistant dialog box will appear:
Options: l
Yes. The suspected (and highlighted) object is the correct object.
l
Locate. The suspected object is not the right object. You will need to identify the correct object in the application.
l
Cancel. Stop the replay.
Multiple objects found
TruClient found several objects that match the identification of the desired object. All suspected objects will behighlighted on the screen, and the following assistant dialog box will appear:
Page 419 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Options: l
The correct object is one of the marked objects. Click the object in the application to specify the correct one.
l
Locate. The suspected object is not one of the highlighted objects.You will then need to highlight the correct object in the application.
l
Cancel. Stop the replay.
Object not found
TruClient could not find the desired object. The following assistant dialog box will appear:
Options: l
Locate. Locate the object. You will need to highlight the correct object in the application.
l
Cancel. Stop the replay.
Wrong level on step
Page 420 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
TruClient found that a step in a higher level is needed for the identification of the object of current step. This is common for mouse over steps that are usually recorded in level 3 but might be needed for click steps that are recorded in level 1.
When TruClient recognizes this dependency during recording, the mouse over will move automatically to level 1.
When TruClient recognizes this dependency during replay, the following assistant will appear:
Options: l
Yes. Move the needed step to level 1.
l
Cancel. Stop the replay.
How to Insert and Modify Loops
Loops repeat selected portions of the script until certain criteria is met or for a specified number of iterations. You can insert loops and loop modifiers from the Functions section of the Toolbox.
For Loops
For loops perform the steps surrounded by the loop until the end condition is met or the code reaches a break statement. Loops arguments use JavaScript syntax. To insert a for loop, select
Toolbox > Flow Control >Functions > For Loop.
Break statements
Break statements indicate that the current loop should end immediately. For example, if a break statement is encountered in the second of five iteration in a for loop, the loop will end immediately without completing the remaining iterations. To insert a break statement, select Toolbox >
Functions > Flow Control > Break.
Page 421 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Continue statements
Continue statements indicate that the current loop iteration should end immediately. The loop condition is then checked to see if the entire loop should end as well. For example, if a continue statement is encountered in the second of five iterations in a for loop, the second iteration will end immediately and the third iteration will begin. To insert a continue statement, select Toolbox >
Functions > Flow Control > Continue.
How to Insert Custom JavaScript and C Code into
Ajax TruClient Scripts
This task describes how to insert code into an Ajax TruClient script. You can insert code into a preexisting step as part of a step argument or insert steps that are completely comprised of external code (C or JavaScript).
1. Insert code into a pre-existing step
You can insert JavaScript code into pre-existing steps in the arguments fields of most steps.
This allows you to perform any number of customizations.
2. Insert steps composed entirely of code
You can insert steps comprised entirely of code into your script. To do so, select Toolbox >
Miscellaneous and drag the Eval Javascript, Eval C, or Eval JS on Object icon to the desired location. The Eval JS on Object step runs to the JavaScript code after the specified
Object has loaded. We recommend avoiding Eval C and using JavaScript instead wherever possible. The user can refer to this object as the variable "object" in the JavaScript code within the step.
Example:
The following code creates a variable called amount that generates a random number between
1 and 5. You can then use this variable in the argument fields of other steps.
var amount=Math.floor(Math.random()*5)+1;
How to Enhance Ajax TruClient Scripts
There are a number of optional enhancements that can be added to scripts beyond the basic workflow. This task describes the enhancements and how to use them.
Modify Steps
Modify step arguments and objects by selecting the desired step and expanding the options. This expands the step and allows you to modify the objects and properties. For a detailed list of the step structure, see
" TruClient Toolbox " on page 443
.
Insert loops
Loops repeat selected portions of the script until certain criteria is met or for a specified number of times. To insert a loop, select Toolbox > Flow Control > For loop. For more information, see
"
How to Insert and Modify Loops" on previous page .
Insert If blocks or If-else blocks and exit steps
To conditionalize a portion of the script, you can insert If or If-else blocks. To insert an If block,
Page 422 of 1812 HP LoadRunner (11.50)
User Guide
VuGen select Toolbox > Flow Control > If block. To add an else condition, click the Add else link next to the If step title. For more details, see
" TruClient Step Arguments" on page 427
.
Exit steps cause a script to exit the iteration or the entire script. These can be used with If statements to exit a script or iteration when a specified condition occurs. To insert an exit step, select Toolbox > Flow Control > Exit.
Insert comments
You can insert comments into your script by selecting Toolbox > Misc and dragging the Comment icon to the desired location.
Create Parameters
Parameters for Ajax TruClient scripts can be created in the standard method as for all protocols.
Parameters can be referenced and created within step arguments or Eval JavaScript steps.
To parameterize a value:
1. Select a field in the step Arguments area.
2. Highlight the entire string.
3. Right-click and select Replace with a Parameter.
4. In the Enter Parameter Name dialog box, enter the name of a new or existing parameter.
If the parameter does not exist in the Parameter List, it is created and the default parameter type is set to File. You can go to the Parameter List to add or delete values for the specified parameter.
By default, the original value is included in the list of values for the new parameter.
The following is an example of how to use a parameter in your script. This string can be used as the
Argument in an Evaluate JavaScript step:
During replay it returns the current value of the parameter paramname.
LR.getParam("paramname")
During replay it assigns the parameter paramname the value value1.
LR.setParam("paramname", "value1")
Page 423 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
For example, let's assume we have an auto-complete list that has a different set of values based on the text that's typed.
Trying to select an option in the list based on the text of the option is bound to fail once the typed text is defined by a parameter. The options are changed every time the parameter value is updated.
In these cases the step that uses an ordinal value is more appropriate
For more details on parameters, see the section on
"Parameters" on page 247
.
Insert Catch Error Steps
Catch error steps are group steps that run their contents if the previous step contains an error.
Additionally, the error is "caught" and is not returned. You can define catch error steps to catch any error, or a specific type of error. If there are two catch error steps in a row, they both apply to the same step. To insert a catch error step, select Toolbox > Flow Control > Catch Error.
Verify that an objects exist
To verify that a string or object exists in the application, you can insert a verify step:
1. Select Toolbox > Functions and drag the Verify icon to the desired location.
2. Click the object in the verify step.
3. Select the object you want to verify.
Insert Generic Steps
You can insert a blank step and manually configure it. To insert a generic step, select Toolbox >
Functions > Generic Object/Browser Action, expand the step, and enter the desired step properties. Generic Object Actions perform an unspecified action on an object. Generic Browser
Actions perform an unspecified action on the browser such as go back, reload, switch tabs, and so on.
How To Use The Global Events Handler
This task describes how to create and use events with the Global Events Handler. For an illustration, see
" TruClient Global Event Handlers" on page 409
Prerequisites
The Global Events Handler runs functions if a certain event occurs during the replay of the script.
Before you create handlers, you must create the associated functions. For details, see
" How To
Create and Use Function and Libraries " on page 426
Create an Event Handler
1. Click the button from the TruClient Toolbar. This will open the Event Handler Editor.
Page 424 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
2. Click the button from the Event Handler pane.
3. Define the properties of the handler.
You can specify if you wish to the handler to run at any time during the script or only between certain steps. For details on this and other properties, see
" TruClient Events Handler Editor
Dialog Box" on page 441
Define object associated with event
Select the object in the application with the occur.
button on which the event will
For example, select the text box for the Widget stock price if you wish to trigger the function
SellStock, if the stock prices rises over $99.99.
Once the object is selected you can select the button to verify that the correct object was selected. Additionally, you can select the button to replace the selected object with another one. For details, see
" How to Resolve Object Identification Issues" on page 416 .
Define the event
You can select to run the handler if the object exists or if, object's properties meet specific conditions. For details, see
" TruClient Events Handler Editor Dialog Box" on page 441
.
Assign handler to the event
Select the function library, the function and specify argument values. For details, see
" TruClient
Events Handler Editor Dialog Box" on page 441
Enable the handler
To enable the handler during script replay, select the check box next to the handler in the Event
Handler Pane.
Page 425 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
How To Create and Use Function and Libraries
This task describes how to create and use function libraries and functions in TruClient Scripts.
Create a function library and function from the TruClient sidebar
1. Select Functions from the drop down list in the VuGen TruClient tab.
2. Select an existing library from the <Library Selector> drop down or click the the Function toolbar to create a new library.
button from
3. Click the button to create a new function. This will insert a new unspecified function.
4. Click the button to expand the function.
5. Define the step including function name and end event.
6. Define the function arguments using the Argument Editor. Argument names should be meaningful so that when you are using the function it is clear what value you need to specify.
Create a function within a script
1. Highlight the steps in the script to include in the function. To select multiple steps, press
CTRL
.
Page 426 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
2. Right-click on a highlighted step and select Group Into > Function which opens the Create a
New Function dialog box. For details, see
" Create New Function Dialog Box" on page 448
3. To assign steps that contain arguments, expand the argument section, and insert the function funcArgs.<argument name>
. .
Tip: To insert javascript as the argument value, click the
Javascript editor.
button to access the
Create a global library
1. Select Function Libraries from the <Script Section Selector> from the TruClient toolbar.
2. Select an existing library from the <Library Selector> drop down in the TruClient tab.
3. Click the button to export the library to a location on your file directory as an xml file.
Note:
l
When working with a global library, you can save changes to the library by clicking the button.
l
If you save the library to a network location, other users can click the the library.
button to import l
Click the button to disconnect the library from global mode. Any changes that you make in local mode are saved within the script.
Use a function in the script
1. Click the TruClient Toolbox tab.
2. Select the Functions tab.
3. Drag and drop Call Function to the correct location in your script.
4. Click the Call Function link to expand the function.
5. Specify the library and the function in the step section.
6. Specify the arguments' values in the augments section. For details, see
"Create a function within a script" on previous page
. (Optional)
7. Specify transactions in the transaction section. (Optional)
TruClient Step Arguments
The following table displays the step arguments categorized by role. Mandatory arguments are marked with a red star to the left of the argument name in the user interface. All arguments can accept JavaScript code and LoadRunner functions as values. For a list of LoadRunner functions, see
"TruClient Functions " on page 431 .
Page 427 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Role
element element element element element
Action Arguments
Evaluate JavaScript Code: JavaScript code
Mouse Actions:
Mouse Down,
Mouse Up, Mouse
Over, Click, Double
Click
Drag l l
Button. The mouse button that is clicked.
X Coordinate. The offset location of the action relative to the upper left corner of the object. This number must be positive. If not specified, the default is the center of the object.
l
Y Coordinate. The offset location of the action relative to the upper left corner of the object. If not specified, the default is the center of the object.
l
Ctrl Key. Whether or not this key is pressed during the action.
l
Alt Key. Whether or not this key is pressed during the action.
l
Shift Key. Whether or not this key is pressed during the action.
l
Button. The mouse button that is clicked.
l
X Offset. The amount of pixels to drag the object on the x axis. A positive number indicates a drag to the right.
l
Y Offset. The amount of pixels to drag the object on the y axis. A positive number indicates a drag down.
l
Path. List of coordinates representing user drag path. Do not modify this argument.
Drag To
Get Property l
Target Object. The step object is dragged to this target object.
l
X Offset. The offset from the top left of the target object in the x axis. This number must be positive.
l
Y Offset. The offset from the top left of the target object in the y axis. This number must be positive.
l
Property. The property whose value will be stored in the specified variable. The list of properties available depends on all the roles of the object.
The following are the default properties available for all objects: n
Visible text. The visible text of the item, corresponding to the DOM textContent property.
n
All text. The entire text of the item, corresponding to the
DOM textContent property.
Page 428 of 1812 HP LoadRunner (11.50)
User Guide
VuGen element Verify element Wait for Property focusable text box
Press Key
Type n
Inner HTML. The inner html markup of the object, corresponding to the DOM innerHTML property.
l
Variable. The name of the variable in which to store the specified property value.
l
Value. The string or number to verify.
l
Property. The object property whose value will be verified. The list of properties available to verify depends on all the roles of the object.
The following are the default properties available for verification on all objects: n
Visible text. Items that are visible in the application.
n
All text. Items that are in the application but are not necessarily visible. Items in this category are contained in DOM property textContent.
n
Inner HTML. Items contained in the DOM property innerHTML.
l
Condition. The relationship between the value and property arguments.
l
Value. The value of the specified property that the step will wait for, before the step passes.
l
Property. The object property whose value the script will wait for. The list of properties available for which to wait, depends on all the roles of the object.
The following are the default properties available for all objects: n
Visible text. Items that are visible in the application.
n
All text. Items that are in the application but are not necessarily visible. Items in this category are contained in DOM property textContent.
n
Inner HTML. Items contained in the DOM property innerHTML.
l
Condition. The relationship between the value and property arguments.
l
Key name. Enter or Space.
l
Value. What is typed.
l
Clear. Clear the text box before typing. The default is true.
l
Typing Interval. The average time in milliseconds between keystrokes.
Page 429 of 1812 HP LoadRunner (11.50)
User Guide
VuGen checkbox listbox radiogroup filebox slider browser browser browser browser browser browser browser browser
Set
Select
Select
Set
Set datepicker Set Day browser Activate
Activate Tab
Close Tab
Add Tab
Navigate
Go Back
Go Forward
Resize
Scroll browser Dialog - Confirm l
Checked. Set the checkbox to either checked (T) or unchecked (F).
l
Text. The selected string.
l
Ordinal. The order of the selected item in the list. If the text argument is also specified, than this argument refers to the instance of the specified text value in the listbox.
An ordinal of 0 generates a random value.
l
Text. The selected string.
l
Ordinal. The order of the selected item in the list. If the text argument is also specified, than this argument refers to the instance of the specified text value in the listbox.
An ordinal of 0 generates a random value.
l
Path. The selected path.
l
Value. The value that the slider is set to.
l
Day. An integer between 1-31 representing the day of the month.
l
Ordinal. Defined as an integer. Moves the specified browser window to the foreground.
l
Ordinal. Which tab (integer) to activate.
l
Ordinal. Which tab (integer) to close.
l
Location. The URL to navigate to in the newly opened tab.
l
Location. The URL to navigate to.
l
Count. The number of pages to go back.
l
Count. The number of pages to go forward.
l
Width. The new width. Leaving this blank means do not resize the width.
l
Height. The new height. Leaving this blank means do not resize the height.
l
X Coordinate. The new x coordinate. Leaving this blank means do not scroll along the x axis.
l
Y Coordinate. The new y coordinate. Leaving this blank means do not scroll along the y axis.
l
Button. Ok or Cancel.
Page 430 of 1812 HP LoadRunner (11.50)
User Guide
VuGen browser Dialog Prompt browser Dialog -
Authentication browser Verify l
Value. The string to enter.
l
Button. Ok or Cancel.
l
Username. The username to enter.
l
Password. The password to enter.
l
Domain. The domain to enter.
l
Button. Ok or Cancel.
l
Value. The value of the property to verify.
l
Property. The property to verify. You can verify the following properties of a browser object: n
Title. The title of the browser window.
n
Location. The location of the browser window.
l
Condition. The relationship between the value and property arguments.
TruClient Functions
The following functions can be inserted as values in TruClient step elements.
Method
The arguments in this row can be used in all methods
IO.createDir(path)
Description Arguments
l
Object. The step's object as defined in the application.
l
Window.
Points to the global window object of the application.
l
Document. The global document object of the application.
path. The absolute path of the folder.
Related
Function
IO.delete(path)
Creates the specified folder. If needed, creates all the folders necessary to complete the path.
Deletes the specified folder or file. If a folder is specified, deletes all the files in the folder, including subdirectories.
path. The absolute path of the folder or file.
Page 431 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
IO.isExist(path)
IO.read(path, charset)
IO.write(path, string, append, charset)
LR.advanceParam
(parameter)
Returns True if the specified folder or file exists and False if it does not. Returns False for a disconnected or unauthenticated mapped drive.
Returns all the data from the specified file. Converts the data from the specified charset to unicode.
path. The absolute path of the folder or file.
path. The absolute path to the file.
charset. The charset of the file, if it is not UTF 8.
Writes the string to the specified file. If the file does not exist it is created.
Advances the specified parameter to the next value in the file.
absolute path.
The absolute path to the file.
string. The string to write to the file.
append. Boolean.
True. (default)
Append the string to the end of the file.
False. Overwrite the file with the string.
charset. The charset of the file, if it is not UTF 8.
parameter. The name of the parameter to advance. Must be a parameter of type file or unique number.
lr_ advance_ param
LR.setParam(name, value) Saves a string to a parameter, creating the parameter if it does not exist.
name. The name of the parameter in which to save the value.
value. The value.
lr_save_ string
LR.getParam(name)
LR.getLRAttr(name)
LR.evalC(funcname)
Returns the value of the specified parameter.
Returns the value of the specified mdrv command parameter.
Runs the specified function whose definition is found in the
name. The parameter name.
name. The name of the commandline parameter.
funcname. The function name.
lr_eval_ string lr_get_ attrib_*
Page 432 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
LR.log(text, level)
LR.decrypt(text)
LR.userDataPoint(name, value)
LR.evalXPath(XPath)
LR.startTransaction
(name)
LR.endTransaction
(name, status) specified file.
Use the
#include command to include the file where the function is defined.
Logs a message.
text. The message.
level. One of the following: l
"Error", lr_debug_ message l
"Warning", l
"Standard", l
"Extended", l
"Status".
example:
LR.log("text",
"Error");
Returns the text after decryption.
text. The encrypted text.
lr_ decrypt
Records a user-defined data point for analysis.
name. The name of the data point.
Do not begin a data-point name with any of these strings: HTTP,
NON_HTTP,
RETRY, mic_, stream_, mms_
value. The numeric value.
lr_user_ data_ point
Returns an array of the objects defined by the XPath in the argument.
xpath. The xpath query.
Starts a LoadRunner transaction.
name. The name of the transaction to start
Ends a LoadRunner transaction.
l
name. The name of the transaction to end
Page 433 of 1812 HP LoadRunner (11.50)
User Guide
VuGen l
status. One of the following values: “Pass”,
“Fail”, “Auto”
Utils.clearCookies()
Utils.clearCache()
Removes all cookies currently stored by the Vuser.
Clears the contents of the cache simulator.
Utils.getEnv(name)
Utils.import(path)
Utils.isEnvExists(name)
Utils.setEnv(name, value)
Utils.addAutoFilter(filter, isIncluded
Returns the value of the specified environment variable. Returns an empty string if the specified variable does not exist.
name. The name of the environment variable.
Evaluates the specified
JavaScript file in the arguments context.
Returns True if the specified environment variable exists and
False if it does not exist.
Sets the named environment variable to the specified value. If the variable already has a value it is overwritten.
path. The absolute path to the
JavaScript file.
name. The name of the environment variable.
l
name. The name of the environment variable.
l
value. The value to set the environment variable to.
Adding a filter to one of the black list or white list lists of URLs. The
URL of each HTTP request will be checked against those lists – first the black list, and if not empty, the white list. HTTP requests that do not pass the check will be blocked.
l
filter. String representing the
URL.
l
isInclude. True value indicates the white list, false otherwise.
web_ cleanup_ cookies web_ cache_ cleanup
Page 434 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Utils.removeAutoFilter(filter, isIncluded
Utils.cleanupAutoFilters ()
Utils.addAutoHeader
(header, value, merge)
Remove a filter from one of the black list or white list lists of
URLs.
l
filter. String representing the
URL.
l
isInclude. True value indicates the white list, false otherwise.
Remove all filters from both the black list and white list lists of
URLs.
Adding an HTTP header to every consecutive HTTP requests following this function call.
l
header. The name of the header to be added.
l
value. The value of the header to be added.
Utils.removeAutoHeader
(header)
Stops adding an HTTP header to every consecutive HTTP request following this function call.
l
merge.
True value indicates to merge the value with an existing header by the same name, false indicates to overwrite it.
header. The name of the header to be stopped from being added.
Utils.cleanupAutoHeaders ()
TruClient Properties
These properties can be used as arguments in TruClient functions.
Property
LR.userId
Description
The user ID as it appears in the MDRV command line. MDRV is the main process that runs all protocols.
Page 435 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
LR.groupName
The group name as it appears in the MDRV command line. MDRV is the main process that runs all protocols. If the process was started by VuGen its value is
0.
LR.scenarioId
The scenario ID as it appears in the MDRV command line. MDRV is the main process that runs all protocols. The scenario ID exists only if MDRV was started by Controller, if it was started by VuGen its value is 0.
LR.outputDir
LR.scriptDir
The user output folder that contains all the output for the script. For VuGen the output folder and script folder are the same. For Controller they are different.
The returned path includes the last folder separator.
The user script folder. You can store external files in the script folder such that when you want to include them in your script, you can append the filename of your external file to LR.scriptDir.
TruClient Home Tab
This tab enables you to control the basic flow of the recording process for TruClient scripts.
Actions
To access
Important information
Select Actions from the drop down list on the TruClient sidebar.
Relevant tasks
Applies to:
" TruClient Step Structure" on page 444
User interface elements are described below:
UI Element Description
Record. Starts recording the script. Additionally, you can use the arrow to specify whether to record before or after the selected step.
Play. Replays the script. Additionally, you can use the arrow to specify whether to play the selected step only, or to run the script step by step.
Running the script step by step pauses the replay after each step. For more information, see
" How to Debug Ajax TruClient Scripts" on page 415
.
Stop. Stops recording or replaying the script.
Toggle Breakpoint. Toggles breakpoints on the selected step.
Script Level. Modifies the script levels that are visible and replayed in the script. For more information, see
" TruClient Script Levels" on page 408
.
Page 436 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Start/End Transaction. Inserts a starting or ending point for a transaction.
Functions
Save. Saves the script.
General Settings. Opens the Ajax TruClient General Settings dialog box. For details, see
" Ajax TruClient General Settings Dialog Box" on page 439 .
Snapshot View. Displays the Snapshot view in the right pane. Adds the following elements to the right pane: l
Snapshot Type. These buttons enable you to view snapshots taken during different modes: n
Recording .Display snapshots that were taken for a specific step during recording.
n
Interactive Replay. Display snapshots that were taken for a specific step during interactive replay.
n
Load Mode Replay. .Display snapshots that were taken for a specific step during load mode replay n
Play Slide Show. Display snapshots as a slide show.
n
Stop Slide Show.
l
View. You can select from the following views: l
Single. Displays the snapshot for a single step.
l
Compare. Splits the screen so you can compare snapshots from different modes. Use the Snapshot View buttons in each pane to select which snapshots to view. Click the Synchronize Scrolling button to synchronize scrolling between the panes. The snapshot error icon indicates that the snapshot is not current for the step.
l
Thumbnails. Displays the snapshots in thumbnails view.
l
Previous/Next. Navigates to the screenshot for the previous or next step. The corresponding step is highlighted in the script.
Opens the Event Handler Editor box. This feature is available for . For details, see
" TruClient Events Handler Editor Dialog Box" on page 441
To access
Select Functions from the drop down list on the TruClient sidebar
Page 437 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Important information
Relevant tasks
Applies to:
" How To Create and Use Function and Libraries " on page 426
User interface elements are described below:
Description
Enables you to select the active library.
New Library. Enables you to create a new library.
Import Library. Import a function library from an xml file.
Export Library. Export a function library to an xml file.
Delete Library. Delete a function library.
New Function. Enables you to create a new function. For details , see
" How To Create and Use Function and Libraries " on page 426
TruClient Edit Tab
This tab enables you to cut, copy, and paste steps and data in TruClient scripts.
To access
Select the Edit tab from the TruClient sidebar.
User interface elements are described below:
UI
Element
Description
Cut the selected data or step.
Copy the selected step or data.
Pastes before the selected step.
Pastes after the selected step.
Page 438 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Pastes into the selected step.
Deletes the selected step
Opens the Find dialog box, allowing you to search the script for steps by step name or number.
Go to the specified step.
The following actions can be undone: l
Cut l
Copy l
Paste l
Delete l
Group • Drag & drop (step) l
Add step from the toolbox
The following actions can be redone: l
Cut l
Copy l
Paste l
Delete l
Group • Drag & drop (step) l
Add step from the toolbox
Ajax TruClient General Settings Dialog Box
This dialog box enables you to set many options that affect the Firefox browser as you develop your scripts in interactive mode.
To access
Important information
Relevant tasks
Ajax TruClient General Settings button
The Ajax TruClient General Settings dialog box can be accessed from the VuGen window or the TruClient browser in interactive mode.
" How to Record Ajax TruClient Scripts" on page 414
Page 439 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Browsing Settings Tab
This tab enables you to configure settings for the TruClient browser for scripts that you run in interactive mode.
The settings available in the Browser Settings tab are the same settings that are available in the
Run Time Settings > Load Mode Browser Settings node. For a description of the available options,
" Load > Browser Settings Node (TruClient)" on page 362
Settings that you modify in the Browsing Settings tab affect interactive mode only and apply to all
TruClient scripts. When you save your script in interactive mode, any settings that you modified in the Browsing Settings tab are applied to the Load Mode Browser Settings.
Interactive Options
User interface elements are described below:
UI Element
Action on
Error
Snapshots generation
Recording snapshots generation
l
Never. Never generate snapshots during recording.
l
Always. Always generate snapshots during recording.
n
Maximum Level. Enables you to select the script level to generate snapshots (1-3).
Replay snapshots generation
l
Never. Never generate snapshots during replay.
l
On error. Generate snapshots during replay on error.
l
Always. Always generate snapshots during replay.
Enable. If selected, enables the object identification assistant.
Object
Identification
Assistant
The object identification assistant facilitates resolving identification errors during replay. For details, see
" How to Resolve Object Identification Issues" on page 416 .
Server
Parameter
Console
Settings
Debug
Settings
Description
Abort Script. Abort script on error.
Continue to the next iteration. Stop iteration on error and continue to next iteration.
Replace server with parameter. If selected, server domain name in navigation steps will be automatically replaced by a parameter.
Display log messages. Display console's log messages during replay.
Disable Step Into Functions. Disable display steps of functions during interactive replay.
Page 440 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Client Certificate Tab
Enables you to manually export the client certificate to the script folder .
TruClient Events Handler Editor Dialog Box
This dialog box enables you to define events handlers and it's properties.
To access
Important information
Click the button from the TruClient sidebar
Global Events handlers are designed to handle events that can occur at any time during script replay.
Relevant tasks
" How To Use The Global Events Handler" on page 424
" How To Create and Use Function and Libraries " on page 426
See Also
" TruClient Global Event Handlers" on page 409
User interface elements are described below:
Page 441 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
UI
Element Description
Event
Handler
Pane
Add Event Handler. Add an event to the event handler.
Delete Event Handler. Delete an event from the event handler.
Properties General
l
Name. Enables you to name the event.
l
Execute only once. Select check box to execute the event once.
l
Allow other handlers to interrupt. Select check box to enable other events to run during the run of this event.
You can select either: l
Event can be triggered during the entire script. Select check box to enable event to be triggered during entire script.
or l
Start Step. Enables you to select a start step from which point the event handler can be triggered.
l
End Step. Enables you to select a end step after which the event handler cannot be triggered.
Object
l
Enables you to select an object from your application that will trigger the event handler.
l
Roles. Displays the roles which determines what operations can be done on the object. For example, an “element” role has operations like “click” and “mouse over". The “textbox” role will also have a “type” operation.
Other roles: element, foucasable, textbox, checkbox, filebox, radiogroup, listbox, multi_listbox, slider, datepicker, video, audio, browser.
l
Name. Enables you to specify the name of the object.
l
ID Method
Automatic (Recommended). Enable TruClient to resolve object identification.
XPath. Enables you to insert an xpath query to identify the object
JavaScript. Enables you to insert JavaScript code to identify the object.
l
Related objects. Enables you to associate your object with another object in your application that facilitates object identification during replay.
Event
Page 442 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
UI
Element Description
l
Event type
You can select between two event types:
Object Exists. If object exists during replay, the event handler is triggered.
Property exists on Object. If the property of an object meets the defined criteria, the event handler is triggered.
Handler
l
Library. Enables you to select the library containing the function.
l
Function. Enables you to select the function.
l
Arguments. Enables you to specify the argument values.
TruClient Toolbox
The toolbox enables you to add steps to TruClient scripts. The toolbox opens and closes by clicking on the tab and moves by dragging it up or down.
User interface elements are described below:
UI Element
Functions
Description
l
Verify. Verify that an object exists in the application.
l
Wait. Wait for a specified number of seconds before continuing with the next step.
l
Wait for Object. Wait for an object to load before continuing with the next step.
Page 443 of 1812 HP LoadRunner (11.50)
User Guide
VuGen l
Generic Object/Browser Action. Blank steps that can be inserted and manually configured.
l
Call Function. Insert a custom function in the script. For details, see
"
How To Create and Use Function and Libraries " on page 426
.
Flow Control
l
For Loop. A logical structure that repeats the steps contained in the loop a specified number of times.
l
If Block. A logical structure that runs the steps contained in the block if the condition is met.
n
Add else. Click the Add else link to add an else section to your If block. If the condition is not met, the steps included in the else section run.
n
Remove else. Removes the else section from the If block.
Note: If the else section contains steps and you click Remove else, the steps are deleted. Copy and paste them into the main body of your script to save them.
n
If exists. A combination of “If Block” and “Verify”, a logical structure that runs the steps contained in the block if the condition on a property of the selected object is met.
n
If verify. A logical structure that runs the steps contained in the block if the selected object exists in the application.
l
Break. Causes the loop to end immediately without completing the current or remaining iterations.
l
Continue.. Causes the current loop iteration to end immediately. The script continues with the next iteration.
l
Catch Error. Catches an error in the step immediately preceding and runs the contents of the catch error step. For more information, see
" How to
Enhance Ajax TruClient Scripts" on page 422
.
l
Exit. Exits the iteration or the entire script depending on the specified setting.
Miscellaneous
l
Evaluate JavaScript. Runs the JavaScript code contained in the step.
l
Evaluate JS on Object. Runs the JavaScript code contained in the step after the specified object is loaded in the application.
l
Evaluate C. Runs the C code contained in the step.
l
Comment. A blank step which allows you to write comments in your script.
TruClient Step Structure
Page 444 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
TruClient steps are comprised of a number of sections. The sections and elements within each section vary depending of the type of step.
User interface elements are described below:
UI Element Description
Script levels selector. Allows you to view and modify the script level of the step. For more information, see
" TruClient Script Levels" on page 408
.
Replay. Replays this step only.
Step
Disable/Enable Step. Steps that are disabled are not replayed. This feature allows you to temporarily remove steps from the script without deleting them.
Optional Step. Marking a step as optional means that in the event that the step can not find its object, the script continues without returning an error.
Alternative Steps. This icon indicates a step which can be redefined in alternative ways. To redefine the step, click the icon, select the desired step definition, and click Back. For more information, see
" TruClient Alternative
Steps" on page 408
.
l
Action. The action that defines the step. For steps with objects, this list is determined by the step roles.
l
Object Timeout. If the object does not appear before this time in seconds, the step returns an error.
l
Step Timeout. If the End Event is not reached by this time in seconds, the step returns an error. The way the script behaves when such an error occurs can be configured in the Run-Time settings dialog box.
l
Minimum Time.The least time in seconds that the execution of the step will take. The value of this field can be either 0, “as recorded” or another manually set number.
The step execution will end immediately after the step’s end event if minimum time is = 0.
Page 445 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
A minimum time value greater than 0 forces TruClient to wait the additional time (if not elapsed already) from the step's end event before moving on to the next step.
TruClient records and stores the time that elapsed between recorded actions and allows you to set the minimum time to “as recorded”.
l
End Event. TruClient automatically determines when the End Event occurs. This step allows the script to continue running subsequent steps and in general will be set to Action Completed. In a step that includes navigation, the end event will be set to Document Loaded, in a step that includes networking, the end event will be set to Network Completed.
Arguments
Roles
End Event. Default end event for steps is Network complete.
Contains step arguments. These arguments differ for different step actions and roles. For a list of the step arguments, see
" TruClient Step Arguments" on page
427
.
The functions that TruClient understands about an object. This information is read-only and is updated dynamically depending on how the object is used during recording. The list of available step actions is defined by these roles.
Name
ID Method
A logical name for the object. This does not affect replay and can be modified to enhance readability.
The method of identifying the object.
l
Automatic. TruClient's default object identification method. If this method does not successfully find the object during replay, click the Improve Object
Identification button, reselect the correct object from the application, and replay the script again.
l
XPath. Identifies the object based on an XPath expression that defines the object in the DOM tree. When you select this option, the next edit box in the display is labeled XPath and enables you to select an XPath to define the object. See below for details.
l
JavaScript. JavaScript code that returns an object. When you select this option, the next edit box in the display is labeled JavaScript and enables you to define a JavaScript to define the object. See below for details.
XPath/JavaScript
XPath
VuGen generates from zero to a few suggested XPaths, depending on the object. Click the drop-down arrow next to the XPath edit box to select a suggested XPath for the object. You can manually modify the suggested
XPath. To revert to one of the original expressions generated by VuGen, select one of the options from the drop-down again.
You can also click the Regenerate expression button and select an object.
VuGen generates a new set of suggestions based on the selected object.
JavaScript
If TruClient can generate a suggested XPath for the object, that XPath is entered as the argument in an evalXPath function in the JavaScipt field. The
Page 446 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
evalXPath function returns an array of the objects defined by the XPath in the argument. You can modify the suggested XPath in the argument to return a different list of objects, or you can enter a different JavaScript.
For example: document.getElementById("SearchButton") returns an element that has a DOM ID attribute of "SearchButton".
TruClient also includes a random function that returns a random item from the array that is provided as its argument. For example: random(document.getElementsByTagName("a"))
Note: The evalXPath and random functions are available as object identification methods only. They are not recognized in an Evaluate JavaScript code step.
Transactions
Allows you to create, modify, and view transactions. For more information, see
" How to Enhance Ajax TruClient Scripts" on page 422
.
TruClient Browser for IE
The TruClient Browser for IE simulates the functionality of an IE browser. This enables you to record and replay scripts as if you were working in an IE environment.
The TruClient for IE protocol is designed to work with applications running in IE9 in standard mode only. For details on document and browser modes, see Browser modes .
Firebug Lite
Firebug Lite is a third-party utility that provides many valuable development tools. You can edit, debug, and monitor CSS, HTML, and JavaScript live in any web page. You can access this utility by selecting Advanced > FireBug Lite or by pressing F12.
For details on FireBug Lite's features, see What is Firebug?
Enforce IE9 Standard Mode
TruClient for IE can only record and replay application in IE9 standard mode. TruClient enforces this mode on all pages that you navigate to while you are recording and replaying. You can see the icon at the bottom left corner of the browser.
If you wish to explore how pages are rendered in a non-standard IE mode, you can temporarily deactivate enforcement by deselecting Advanced > Enforce IE9 Standard Mode. When deselected the following message appears in the Sidebar:
Page 447 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
While in the mode you will not be able to develop or edit scripts in the TruClient IE browser. Click the Enforce button in the message box or select Advanced > Enforce IE9 Standard Mode, to continue recording and replaying in the TruClient for IE browser.
Create New Function Dialog Box
This dialog box enables you create a new function and assign the function to a library.
To access
Right click on a highlighted step in the script, and then select Group Into > New
Function.
" How To Create and Use Function and Libraries " on page 426
Relevant tasks
User interface elements are described below:
UI Element
Function Name
Add to library
Replace steps with function call
Description
Enables you to specify a function name.
l
Select Existing. Save new function to an existing library.
l
Create New. Save new function to a new library.
If selected, VuGen will automatically insert a call function in place of steps.
Transaction Editor Dialog Box
This dialog box enables you to manage transactions in Ajax TruClient vuser scripts.
User interface elements are described below:
Page 448 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
UI Element Description
Adds a new transaction or deletes the selected transaction.
General
Enables you to edit the name of the transaction.
Start Point
The step and the event within the step which indicates the start of the transaction.
End Point
The step and the event within the step which indicates the end of the transaction.
Troubleshooting Object Identification Issues
How Related Objects Can Help the XPath and JavaScript Identification Methods
The XPath and JavaScript identification methods may return multiple elements depending on the expression used.
For example, if the XPath value is //button, and the web page in question includes multiple button elements, multiple objects will be returned.
To return a single object you can add a Related Object that will narrow down the identification.
Interactive Replay Fails with Object Not Found Error
If replay stops with an error that says the object wasn't found try the following: l
Select the failed step and press Highlight. If the correct object isn't highlight there's an object identification issue and you should use Improve Identification to improve object identification.
l
If the object is highlighted it may be that step was reached before the object appeared. Add a
Wait or Wait for Object step before the problematic step.
Sometimes you may need to choose an Alternative Step that is provided in order to solve the issue.
For example, you may be clicking on an option in a drop down list in which the text changes based on some value. If you try to click based on the text, the step may fail.If you use an alternative step that selects the item in the list based on the ordinal value of this option within the list, the click will succeed regardless of the text.
Interactive Replay Fails Due to Object Not Found Although Highlight
Locates the Object
If the replay fails even though the Highlight option finds the correct object, this may be a case of pacing.
The object takes a little longer to load and the step is executed faster. Therefore, during execution the step cannot locate the object although, during debugging, the Highlight option on the failed step finds the object.
In this case it is recommended to "slow down" the script so there's enough time for the object to load. Use one of the following options to do this: l
Change the Object Timeout of the failing step. This is available via the Step section on the step's properties.
Page 449 of 1812 HP LoadRunner (11.50)
User Guide
VuGen l
Add a Wait or Wait for Object step before the failed step.
Replay Fails to Select an Item from a List
One of the common reasons for this is that the names of the items in the list are dynamic.
For example, the list may include a list of cities based on the text entered so far (auto-complete).
Based on the text types the list constantly changes.
There are two ways to solve this issue: l
Use an alternative step that selects an item from the list using the ordinal identifier instead of the text of the actual item.
l
If the text is only partially dynamic you can use a regular expression to locate the required item based on partial text matching.
Troubleshooting TruClient Scripts
How to Check for Specific Text Including Branching
One option is to add a Verify step from the Functions section of the Toolbox. In this step you can select various validation settings such as the object, the text to look for, and so on.
When you want to perform certain actions based on whether a validation succeeded or failed you add a Catch Error step from the Flow Control section of the Toolbox.
This way you can make sure the step continues even if the validation failed and within the Catch
Error group you can define the set of steps that should be executed if the validation fails.
You can also take a more programmatic approach to validations. Using JavaScript you can access the DOM and validate any property you wish to verify. You can then add a conditional Break or Exit step (available via the Flow Control section of the Toolbox) based on this verification.
You can also check for the required text directly from the IF statement. The 'condition' argument of the IF statement is simply JavaScript code. You can use JavaScript code that accesses the window global object of the application under test. This can be done by referring to window.
Then you can manually verify if the text exists within the current page. For example, assuming a single frame application, you can write something like: window.document.body.textContent.indexOf("Off") == -1
Where "Off" is the text you're looking for and -1 indicates that the text was not found.
The code in question is application specific.
You can optimize the code if you have further knowledge of the application (by getting the specific element).
How to Check for Specific Text that is Case Insensitive
By default, the Verify step is case sensitive. For example, looking for 'Test' will fail if 'test' is found.
If you'd like the Verify step to be case insensitive do the following:
Page 450 of 1812 HP LoadRunner (11.50)
User Guide
VuGen l
In the Verify step set the Condition argument to "Regular Expression" l
To check if the string 'test' is contained in the text regardless to case you can use:
RegExp("test", "i")
How to Select a Random Option from a List
Set the Ordinal argument to 0. TruClient will automatically select a random option from the list.
For example, let's assume you have an auto-complete list that shows a list of cities based on the typed text. You've currently selected the second option and the step is: Select option #2 from City autocomplete.
All you need to do is open the Arguments section of the step properties and change the Ordinal argument to 0. The step will now be: Select a random option from City autocomplete.
This option is very important when the typed text is a parameter and therefore you have no easy way of knowing in advance what values exist in the list and how many there are.
How to Use External Functions in the Script
Add your JavaScript and C functions to the JS-Function.js and C-functions.c files that are part of the script and appear in the left navigation pane in VuGen.
JavaScript functions can be called directly from the Ajax TruClient script, as all arguments and parameters support JavaScript. You can also add an Evaluate JavaScript step from the Toolbox for this purpose.
To call C functions add an Evaluate C step from the Toolbox.
Some of the Events and Actions do not Appear in the Recorded Script
Try solving this in one of the following ways: l
Ajax TruClient records all the events in the application. The event you're looking for may be in a different script level from the one being displayed.
n
You can tell that additional steps exist in other script levels if the steps in the viewed level are not numbered consecutively.
n
The current script level is set using the slider in the toolbar:
Try looking for the missing event or step in the other levels by changing the slider value.
n
Once you have found the required event you can change its level and make it part of level 1.
n
Change the script level back to level 1 and try to replay again.
n
Please consult the Ajax TruClient documentation for a full explanation of the script level concept.
l
You can manually add a step to the script.
n
From the toolbox select the Generic Object Action and customize the step to perform the required action.
Dragging of a Slider or a Map does not Replay Correctly
If drag does not work (e.g. set option of slider, drag of map) and the result does not bring the control to the appropriate place try the following:
Page 451 of 1812 HP LoadRunner (11.50)
User Guide
VuGen l
Try using one of the Alternative Steps and see if it helps.
l
Set the values manually until they meet your needs (e.g. the precise number of pixels you'd like to drag in each of the relevant directions).
l
Try using the "Drag to" capability (by changing the Action of the Drag step in the Step section of the step properties). This way you can drag your object to a relative position from another object.
Polling for an Object
Create a loop that includes the following steps: l
A step that performs an action on an object.
l
A Catch Error section that includes a Continue step.
l
A Break step.
The Catch Error section will make the loop continue until the object is found and the step succeeds.
How do I Create a WHILE Loop
A "For" loop has 3 arguments: Init, Condition, and Increment.
A "While" is basically a "For" loop with only the Condition argument.
To create a while loop add a "For" loop (using the context menu or the toolbox), delete the Init and
Increment arguments and specify the Condition.
Troubleshooting Load Mode for TruClient Scripts
How to Make the Script as Stable as Possible
One of the characteristics of Web 2.0 applications is objects with dynamic attributes.
For example the ID of an object may have different values every time the application is accessed.
To make sure the script is stable and can run even when these changes occur, the following steps are recommended: l
After you have successfully replayed the script, make sure you replay it again several times in the Firefox interactive script development sidebar.
l
If any of these replays fails, use the various methods for improving object identification (e.g.
Improve Identification, Related Objects, and Alternative Steps).
l
If the application objects change based on certain events (e.g. IIS Reset), make sure these events occur between replays, to validate the scripts stability.
l
Use the Run option in VuGen to run the script again in load mode and validate that it is ready to be incorporated into a load test.
How to Fix a Script that Replays in Interactive Development but Fails During Load
It is highly recommended to use the Run option in VuGen to test the script in load mode before actually using it in a load test. The Run function plays the script the way it would be played in a load test and enables you validate it before including it in a load test.
Page 452 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
If the script fails during Run in VuGen or in the actual load test but functions correctly in interactive replay please follow these steps: l
Look at the replay log to find out what the error is.
l
If the error is "object not found" this may be due to pacing. Load mode replay is faster than interactive replay and the object may not be loaded in the application quickly enough.
l
You can resolve this using one of the following methods: n
Use the "Inter-step interval" run-time setting which allows the user to specify the time (in ms) between steps. This setting will be used for ALL the steps in the script.
n
Add a Wait or Wait for Object step before the step that failed. This will slow down the replay.
l
Some applications may be sensitive to the browser size. When the script runs under load, a certain predefined window size is used which may cause object location failures.
To solve this you can either add a Resize step to the script or set the initial width and height for non-interactive mode replay. This can be done using the 'Non-interactive window size' setting, located under 'Other Settings' in the Run-Time Settings.
How to Debug the Script in Load Mode
Consult the log and get a better understanding of the error.
To view the state of the application when the error occurred go to Run-Time Settings and select
Snapshot on Error and replay the script. The snapshot will be generated when the error occurs and will be saved under the results folder based on the run logic ( Results > Load > [Action-Name] >
[Iteration-Number]).
You can also add additional messages to the log by using the LR.log function inside the script itself.
For more information on this function please consult the LoadRunner Ajax TruClient documentation.
TruClient General Troubleshooting and Limitations
This section describes limitations for Ajax TruClient scripts.
Troubleshooting Communication between VuGen and TruClient
Error message: VuGen cannot open the TruClient browser because the port range is busy or invalid.
Recommendation: In order to open a server, a free port is needed. The server is open on the http://127.0.0.1:<free_port>/ url.
The free port can be configured in the following xml files :
%APPDATA%\Hewlett-Packard\LoadRunner\Data\Settings\VuGenProperties.xml
< VuGenProperties >
< BrowserCommunicationServerEndPort value="8090" />
< BrowserCommunicationServerStartPort value="8080" />
Page 453 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
If there is a problem with the ports (all are busy or port range is not valid, the start port is bigger than the end port) you can change the range in the configuration file.
If you are unable to resolve this issue contact HP software support.
Error Message: VuGen cannot open the TruClient browser.This error has occurred because you do not have the proper permissions to establish communication between VuGen and the TruClient browser.
Recommendation: Ask your administrator or a power user to run this command: netsh http add urlacl url=http://127.0.0.1:<port_given_in_the_error_message>/ user=<DOMAIN>\<USER_NAME>
Example: netsh http add urlacl url=http://127.0.0.1:8080/ user=DOMAIN\john
Word Verification Function in the Business Process
Many web sites use special Word Verification fields that display some text that the user must enter in order to validate that an actual user is filling out the form.
This is designed to block crawlers, spiders and so on from using the site and taking up valuable system resources.
These fields are especially designed to block automatic tools such as LoadRunner.
In order to complete your business process automatically you must cancel this function on the web site against which you are running the load.
Citrix Protocol
Citrix Protocol - Overview
Citrix Vuser scripts emulate Citrix ICA protocol communication between a Citrix client and server.
VuGen records all activity during the communication and creates a Vuser script.
When you perform actions on the remote server, VuGen generates functions that describe these actions. Each function begins with a ctrx prefix. These functions emulate the analog movements of the mouse and keyboard. In addition, the ctrx functions allow you to synchronize the replay of the actions, by waiting for specific windows to open.
VuGen also allows you to record a Citrix NFUSE session. With Citrix NFUSE, the client is installed, but your interface is a browser instead of a client interface. To record NFUSE sessions, you must perform a multi-protocol recording for Citrix and Web Vusers. In multi-protocol mode,
VuGen generates functions from both Citrix and Web protocols during recording.
In the following example, ctrx_mouse_click simulates a mouse click on the left button.
ctrx_mouse_click(44, 318, LEFT_BUTTON, 0, CTRX_LAST);
For more information about the syntax and parameters, see the Function Reference (Help >
Function Reference).
Page 454 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Citrix Recording Tips
When recording a Citrix Vuser script, be sure to follow these guidelines in order to create an effective script.
Single vs. Multi-Protocol Scripts
When creating a new script, you may create a single protocol or multi-protocol script. If you plan to record a simple Citrix ICA session, use a single protocol script. When recording an NFUSE Web
Access session, however, you must create a multi-protocol script for Citrix ICA and
Web (HTML/HTTP), to enable the recording of both protocols.
Record into Appropriate Sections
Record the connection process into the vuser_init section, and the closing process into the vuser_
end section. This will prevent you from performing iterations on the connecting and disconnecting.
For more information about recording into sections, see
"Script Sections " on page 132
Run a Clean Session
When recording a session, make sure to perform the complete business process, starting with the connection and ending with the cleanup. End your session at a point from where you could start the entire process from the beginning. Do not leave any client or application windows open.
Explicit Clicks
When opening expanded menu options, click explicitly on each option—do not depend on the expanding menu. For example, when choosing Start > All Programs > Microsoft Word, be sure to click on the line All Programs.
Do not Resize Windows
Although VuGen supports the resizing of windows during recording the session, we recommend that you do not move or resize them while recording. To change the size or position of a window, double-click on the relevant Sync on Window step in the Step Navigator and modify the window's coordinates.
Make Sure Resolution Settings are Consistent
To insure successful bitmap synchronization, make sure that the resolution settings match. On the recording machine, check the settings of the ICA client, the Recording Options, and the Run Time settings. On the load generators, check the settings of the ICA client, and make sure that they are consistent between all load generators and recording machines. If there is an inconsistency between the resolutions, the server traffic increases in order to make the necessary adjustments.
Add Manual Synchronization Points
While waiting for an event during recording, such as the opening of an application, we recommend that you add manual synchronization points, such as Sync on Bitmap or Sync on Text. For details, see
"Citrix- Automatic Synchronization" on page 457
.
Disable Client Updates
Disable client updates when prompted by the Citrix client. This will prevent forward compatibility issues between VuGen and newer Citrix clients that were not yet tested.
Windows Style
For Sync on Bitmap steps, record windows in the "classic" windows style—not the XP style.
Page 455 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Change the Windows style to "classic"
1. Click in the desktop area.
2. Select Properties from the right-click menu.
3. Click the Theme tab.
4. From the Theme list, select Windows Classic.
5. Click OK.
Citrix Replaying Tips
Wildcards
You can use wildcards (*) in defining window names. This is especially useful where the window name may change during replay, by its suffix or prefix.
In the following example, the title of the Microsoft Internet Explorer window was modified with a wildcard.
ctrx_mouse_click(573, 61, LEFT_BUTTON, 0,
"
Welcome to MSN.com - Microsoft Internet Explorer");ctrx_mouse_ click(573, 61, LEFT_BUTTON, 0,
" * - Microsoft Internet Explorer");
For more information, see the Function Reference (Help > Function Reference).
Set Initialization Quota
To prevent overloading by multiple Vusers while connecting, set an initialization quota of 4 to 10
Vusers (depending on the capacity of the server) or apply ramp-up initialization using the Scheduler.
Enable Think Time
For best results, do not disable think time in the Run-Time settings. Think time is especially relevant before the ctrx_sync_on_window and ctrx_sync_on_bitmap functions, which require time to stabilize.
Regenerate Script
During recording, VuGen saves all of the agent information together with the script. By default, it also includes this information in the script, excluding the Sync On Text steps. If you encounter text synchronization issues, then you can regenerate the script to include the text synchronization steps.
In addition, if you disabled the generation of agent information in the Recording options, you can regenerate the script to include them.
Regenerating scripts is also useful for scripts that you manually modified. When you regenerate the script, VuGen discards all of your manual changes and reverts back to the originally recorded version.
To regenerate a script, select Record > Regenerate Script and select the desired options. For more information about regenerating scripts, see
"How to Regenerate a Vuser Script" on page 139
.
Set Consistency Between Machines
If you intend to replay the script on another machine, make sure that the following items are
Page 456 of 1812 HP LoadRunner (11.50)
User Guide
VuGen consistent between the record and replay machines: Window Size (resolution), Window Colors,
System Font and the other Default Options settings for the Citrix client. These settings affect the hash value of bitmaps, and inconsistencies may cause replay to fail. To view the Citrix Client settings, select an item from the Citrix program group and select Application Set Settings or
Custom Connection Settings from the right-click menu. Select the Default Options tab.
Increasing the Number of Vusers per Load Generator Machine
Load Generator machines running Citrix Vusers may be limited in the number of Vusers that can run, due to the graphic resources available to that machine, also known as the GDI (Graphics
Device Interface). To increase the number of Vusers per machine, you can open a terminal server session on the machine which acts as an additional load generator.
The GDI count is Operating System dependent. The actual GDI (Graphics Device Interface) count for a heavily loaded machine using LoadRunner is approximately 7,500. The maximum available
GDI on Windows 2000 machines is 16,384.
For more information on creating a terminal server session, see
"Terminal Services Overview " on page 939 .
Note: By default, sessions on a terminal server use a 256-color set. If you intend to use a terminal session for load testing, make sure to record on machines with a 256-color set.
Citrix Synchronization
Synchronization refers to waiting for windows and objects to become available before executing an action. This is necessary when recording Citrix scripts because, for example, if a step in a script opens a window, and the next step performs an action in that window, the second step cannot be implemented until the window opens. In order to ensure that VuGen does not replay the script incorrectly, it automatically generates functions that synchronize the script by waiting for windows or objects to become available. In addition, you can add synchronization functions manually.
For information about automatic synchronization, see
"Citrix- Automatic Synchronization" below
.
For information about manually adding synchronization points, see
"How to Synchronize Citrix
Scripts Manually" on page 464 .
Citrix- Automatic Synchronization
During recording, VuGen automatically generates steps that help synchronize the Vuser's replay of the script:
Sync on Window
The Sync On Window step instructs the Vuser to wait for a specific event before resuming replay.
The available events are Create and Active. The Create event waits until the window is created.
The Active event waits until the window is created and then activated (in focus). Usually VuGen generates a function with a create event. If, however, the next instruction is a keyboard event,
VuGen generates a function with an active event.
In the Editor, the corresponding function call to the Sync On Window step is ctrx_sync_on_
window.
Page 457 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Sync on Obj Info
The Sync On Obj Info step instructs the Vuser to wait for a specific object property before resuming replay. The available attributes are Enabled, Visible, Focused, Text, Checked, Lines, or Item. The Enabled, Visible, Focused, and Checked attributes are boolean values that can receive the values true or false. The other attributes require a textual or numerical object value.
A primary objective of this step is to wait for an object to be in focus before performing an action upon it.
VuGen automatically generates sync_on_obj_info steps when the Citrix agent is installed and the
Use Citrix Agent Input in Code Generation option is enabled in the Recording options. By default, this Recording option is enabled. For more information, see
"Citrix > Code Generation " on page
286 .
ctrx_sync_on_obj_info("Run=snapshot9", 120, 144, TEXT, "OK",
CTRX_LAST);
Sync on Text
The Text Synchronization step, Sync On Text, instructs the Vuser to wait for a text string to appear at the specified position before continuing. When replaying Sync On Text, Vusers search for the text in the rectangle whose modifiable coordinates are specified in the step's properties.
Caution: The maximum allowable length of a text string is 255 characters.
With an agent installation (see
"Agent for Citrix Presentation Server Overview" on page 460 ), you
can instruct VuGen to automatically generate a text synchronization step before each mouse click or double-click. By default, automatic text synchronization is disabled. For more information, see
"Citrix > Code Generation " on page 286
.
Note, that even if you record a script with the option disabled, if you enable the option and regenerate the script, VuGen will insert text synchronization calls throughout the entire script.
In the Editor, the corresponding function call to the Sync On Text step is ctrx_sync_on_text_ex.
The following segment shows a ctrx_sync_on_text_ex function that was recorded during a Citrix recording with the HP Citrix Agent installed and text synchronization enabled.
ctrx_sync_on_window ("ICA Seamless Host Agent", ACTIVATE, 0,
0,391,224, "snapshot1", CTRX_LAST);
ctrx_sync_on_text_ex (196, 198, 44, 14, "OK", "ICA Seamless Host
Agent=snapshot2", CTRX_LAST); ctrx_obj_mouse_click ("<class=Button text=OK>", 196, 198, LEFT_BUTTON,
0, "ICA Seamless Host Agent=snapshot2", CTRX_LAST);
For more information on this function, see the Function Reference (Help > Function Reference).
See
"Citrix Alternate Synchronization" below
for additional information.
Citrix Alternate Synchronization
In addition to
automatic synchronization
in Citric Vuser scripts, you can add several other steps that affect the synchronization indirectly:
Page 458 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Setting the Waiting Time
The Set Waiting Time step sets a waiting time for the other Citrix synchronization functions. This setting applies to all functions that follow it within the script. For example, if your Sync on Window steps are timing out, you can increase the default timeout from 60 seconds to 180 seconds.
To insert this step, select Insert > Add Step > Set Waiting Time.
Checking if a Window Exists or Closed
The ctrx_win_exist step checks if a window is visible in the Citrix client. By adding control flow statements, you can use this function to check for a window that does not always open, such as a warning dialog box. In the following example, ctrx_win_exist checks whether a browser was launched. The second argument indicates how long to wait for the browser window to open. If it did not open in the specified time, it double-clicks its icon.
if (!ctrx_win_exist("Welcome",6, CTRX_LAST))
ctrx_mouse_double_click(34, 325, LEFT_BUTTON, 0, CTRX_LAST)
To insert this step, select Insert > Add Step > Win Exist.
Another useful application for this step is to check if a window has been closed. If you need to wait for a window to close, you should use a synchronization step such as UnSet Window or ctrx_
unset_window.
For detailed information about these functions, see the Function Reference (Help > Function
Reference).
Waiting for a Bitmap Change
In certain cases, you do not know what data or image will be displayed in an area, but you do expect it to change. To emulate this, you can use the Sync on Bitmap Change step or its corresponding function, ctrx_sync_on_bitmap_change. Right-click in the snapshot, and select Insert Sync on
Bitmap from the right-click menu. VuGen inserts the step or function at the location of the cursor.
The syntax of the functions is as follows: ctrx_sync_on_bitmap (x_start, y_start, width, height, hash, CTRX_
LAST); ctrx_sync_on_bitmap_change (x_start, y_start, width, height,
[initial_wait_time,]
[timeout,] [initial_ bitmap_value,] CTRX_LAST);
The following optional arguments are available for ctrx_sync_on_bitmap_change: l initial wait time value—when to begin checking for a change.
l a timeout—the amount of time in seconds to wait for a change to occur before failing.
l initial bitmap value—the initial hash value of the bitmap. Vusers wait until the hash value is different from the specified initial bitmap value.
In the following example, the recorded function was modified and assigned an initial waiting time of
300 seconds and a timeout of 400 seconds.
Page 459 of 1812 HP LoadRunner (11.50)
User Guide
VuGen ctrx_sync_on_bitmap_change(93, 227, 78, 52,
300,400,
"66de3122a58baade89e63698d1c0d5dfa",CTRX_LAST);
Note: If you are using Sync on Bitmap, make sure that the Configuration settings in the
Controller, Load Generator machine, and screen are the same. Otherwise, VuGen may be unable to find the correct bitmaps during replay. For information on how to configure the client settings, see
"Recording Options" on page 276 .
Agent for Citrix Presentation Server Overview
The Agent for Citrix Presentation Server, or Citrix Agent, is an optional utility that you can install on the Citrix server. It provides enhancements to the normal Citrix functionality. The following sections describe these enhancements.
It is provided in the product's installation disk and you can install it on any Citrix server. For more information about installing the Citrix Agent, see
"How to Install and Uninstall the Citrix Agent" on page 464 .
Object Detail Recording
When the Agent for Citrix Presentation Server is installed, VuGen records specific information about the active object instead of general information about the action. For example, VuGen generates Obj Mouse Click and Obj Mouse Double Click steps instead of Mouse Click and
Mouse Double Click that it generates without the agent.
The following example shows the same mouse-click action recorded with and without the agent installation. Note that with an agent, VuGen generates ctrx_obj_xxx functions for all of the mouse actions, such as click, double-click and release.
/*
WIthout Agent Installation */ ctrx_mouse_click(573, 61, LEFT_BUTTON, 0, test3.txt - Notepad);
/*
WIth Agent Installation */ ctrx_obj_mouse_click("<text=test3.txt - Notepad class=Notepad>" 573,
61, LEFT_BUTTON, 0, test3.txt - Notepad=snapshot21, CTRX_
LAST);
In the example above, the first argument of the ctrx_obj_mouse_click function contains the text of the window's title and the class, Notepad. Note that although the agent provides additional information about each object, Vusers only access objects by their window name and its coordinates.
Active Object Recognition
The agent installation lets you see which objects in the client window are detected by VuGen. This includes all Windows Basic Objects such as edit boxes, buttons, and item lists in the current window.
To see which objects were detected, you move your mouse through the snapshot. VuGen highlights the borders of the detected objects as the mouse passes over them.
In the following example, the Yes button is one of the detected objects.
Page 460 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Expanded Right-Click Menu
When you click within a snapshot, you can insert several functions into the script using the rightclick menu. When no agent is installed, you are limited to the Insert Mouse Click, Insert Mouse
Double Click, Insert Sync on Bitmap and Insert Get Bitmap Value. If you are using a 256-color set, the Insert Sync on Bitmap and Get Bitmap Value steps are not available from the right-click menu.
When the Agent for Citrix Presentation Server is installed, the following additional options are available from the right-click menu of window in focus: l
Obj Get Info and Sync on Obj Info. Provide information about the state of the object:
ENABLED, FOCUSED, VISIBLE, TEXT, CHECKED, and LINES.
l
Insert Sync on Obj Info. Instructs VuGen to wait for a certain state before continuing. This is generated as a ctrx_sync_on_obj_info function.
l
Insert Obj Get Info. Retrieves the current state of any object property. This is generated as a
ctrx_get_obj_info function.
l
Insert Sync on Text and Get Text. These are discussed in the section
"Agent for Citrix
Presentation Server Overview" on previous page .
These commands are interactive—when you insert them into the script, you mark the object or text area in the snapshot.
In the following example, the ctrx_sync_on_obj_info function provides synchronization by waiting for the Font dialog box to come into focus.
ctrx_sync_on_obj_info("Font", 31, 59, FOCUSED, "TRUE", CTRX_LAST);
Page 461 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Utilizing VuGen's ability to detect objects, you can perform actions on specific objects interactively, from within the snapshot.
Insert a function interactively using the agent capabilities
1. Click at a point within the Step Navigator to insert the new step. Make sure that a snapshot is visible.
2. Click within the snapshot.
3. To mark a bitmap, right-click on it and select Insert Sync on Bitmap.
VuGen issues a message indicating that you need to mark the desired area by dragging the cursor. Click OK and drag the cursor diagonally across the bitmap that you want to select.
When you release the mouse, VuGen inserts the step into the script after the currently selected step.
4. For all other steps, move your mouse over snapshot objects to determine which items are active—VuGen highlights the borders of active objects as the mouse passes over them.
Right-click and select one of the Insert commands. A dialog box opens with the step's properties.
Set the desired properties and click OK. VuGen inserts the step into your script.
Text Retrieval
With the agent installed, VuGen lets you save standard text to a buffer. Note that VuGen can only save true text—not a graphical representation of text in the form of an image.
You save the text using the Sync On Text step either during or after recording.
For task details, see
"How to Synchronize Citrix Scripts Manually" on page 464
.
Troubleshooting Xenapp 5.0
When recording with Xenapp 5.0 using a Citrix and Web multi-protocol script, manual modifications are needed to ensure proper recording.
Page 462 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Record using Xenapp 5.0
1. Modify XeApp Settings: a. Connect to the XenApp server through a web interface.
b. Select Preferences > Session Settings and set Window Size to No Preference.
2. Update Correlation Rules
3. Modify Recording Options a. Open the General > Recording node of the Recording Options dialog box.
b. Select Advanced HTML to open the Advanced HTML dialog box.
c. Select A script containing explicit URL's only.
4. Manually Modify Script
How to Configure the Citrix Client and Server
Before creating a script, make sure you have a supported Citrix client installed on your machine, and that your server is properly configured. The following steps describe this process.
l
"Configure the Citrix client" below
l
"Install the Metaframe server" below
l
"Configure the Metaframe server" below
Configure the Citrix client
In order to run your script, you must install a Citrix client on each Load Generator machine. If you do not have a client installed, you can download one from the Citrix Website www.citrix.com under the
download section.
VuGen supports all Citrix clients with the exception of versions 8.00, version 6.30.1060 and earlier, and Citrix Web clients.
Install the Metaframe server
Make sure the MetaFrame server (3, 4, or 4.5) is installed. To check the version of the server, select Citrix Connection Configuration on the server's console toolbar and select Help >
About.
Configure the Metaframe server
Configure the Citrix server to completely close a session. After a Citrix client closes the connection, the server is configured, by default, to save the session for the next time that client opens a new connection. Consequently, a new connection by the same client will face the same workspace from which it disconnected previously. It is preferable to allow each new test run to use a clean workspace.
The make sure that you have a clean workspace for each test, you must configure the Citrix server not to save the previous session. Instead, it should reset the connection by disconnecting from the client each time the client times-out or breaks the connection.
Page 463 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Configure the server
1. Open the Citrix Connection Configuration dialog box. Select All Programs > Citrix >
Administration Tools > Citrix Connection Configuration Tool.
2. Select the ica-tcp connection name and select Connection > Edit. Alternatively, double-click on the connection. The Edit Connection dialog box opens.
3. Click Advanced. The Advanced Connection Settings dialog box opens.
4. In the bottom section of the dialog box, clear the inherit user config check box adjacent to the
On a broken or timed-out connection list. Change the entry for this list box to reset.
How to Synchronize Citrix Scripts Manually
In addition to the automatic synchronization, you can manually add synchronization both during and after recording. A common use of this capability is where the actual window did not change, but an object within the window changed. Since the window did not change, VuGen did not detect or record a Sync on Window.
For example, if you want the replay to wait for a specific graphic image in a browser window, you insert manual synchronization. Or, if you are recording a large window with several tabs, you can insert a synchronization step to wait for the new tab's content to open.
Synchronize manually during recording
To add synchronization during recording, you use the floating toolbar. The Sync On Bitmap and
Sync on Text functions lets you to mark an area or text within the client window that needs to be in focus before resuming replay.
l
To insert a Sync on Bitmap step, click the InsertSync on Bitmap and mark a rectangle around the desired area.
button on the toolbar l
To insert a Synch on Text step (Citrix Agent required), click the Insert Sync On Text button on the toolbar and mark a rectangle around the desired text.
Synchronize manually after recording
You can also add synchronization after the recording session. To add a synchronization step, rightclick in the Snapshot pane, and select a synchronization option: l
Sync on Bitmap. Waits until a bitmap appears l
Sync on Obj Info. Waits until an object's attributes have the specified values (agent installations only) l
Sync on Text. Waits until the specified text is displayed (agent installations only)
How to Install and Uninstall the Citrix Agent
The installation file for the Agent for Citrix Presentation Server is located on the LoadRunner installation disk, under the Additional Components\ Agent for Citrix Presentation Server folder.
Note that the agent should only be installed on your Citrix server machine—not Load Generator machines.
Page 464 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Install the Agent for Citrix Presentation Server
1. If you are upgrading the agent, make sure to uninstall the previous version before installing the next one.
2. If your server requires administrator permissions to install software, log in as an administrator to the server.
3. If you are using a Remote Desktop connection (RDP) to install the agent onto a machine running Windows 2003, run the following command on the target machine before starting the installation:
Change user /install
4. Locate the installation file, Setup.exe, on the product installation disk in the Additional
Components\ Agent for Citrix Presentation Server\Win32 or Win64 folder.
5. Follow the installation wizard to completion.
Note: After installation the agent will only be active for LoadRunner invoked Citrix sessions—it will not be active for users who start a Citrix session without LoadRunner.
Uninstall the Agent for Citrix Presentation Server
1. If your server requires administrator privileges to remove software, log in as an administrator to the server.
2. Open Add/Remove Programs in the server machine's Control Panel. Select HP Software
Agent for Citrix Presentation Server 32 or 64 and click Change/Remove.
Citrix Functions
During a Citrix recording session, VuGen generates functions that emulate the communication between a client and a remote server. The generated functions have a ctrx prefix. For example,
ctrx_obj_mouse_click emulates a mouse click for a specific object. You can manually edit or add any of the functions into your Vuser script after the recording session.
For more information about the ctrx functions, see the Function Reference (Help > Function
Reference).
Note that for the functions that specify a window name, you can use the wildcard symbol, an asterisk (*). You can place the wildcard at the beginning, middle, or end of the string.
Citrix - Understanding ICA Files
Citrix ICA client files are text files that contain configuration information for the applications accessed through the Citrix client. These files must have an .ica extension and must conform to the following format:
[WFClient]
Version=
TcpBrowserAddress=
[ApplicationServers]
AppName1=
Page 465 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
[AppName1]
Address=
InitialProgram=#
ClientAudio=
AudioBandwidthLimit=
Compress=
DesiredHRES=
DesiredVRES=
DesiredColor=
TransportDriver=
WinStationDriver=
Username=
Domain=
ClearPassword=
Note: When you load an ICA file using the Recording Options, VuGen saves the file together with your script, eliminating the need to copy the ICA file to each load generator machine.
The following example shows a sample ICA file for using Microsoft Word on a remote machine through the Citrix client:
[WFClient]
Version=2
TcpBrowserAddress=235.119.93.56
[ApplicationServers]
Word=
[Word]
Address=Word
InitialProgram=#Word
ClientAudio=On
AudioBandwidthLimit=2
Compress=On
DesiredHRES=800
DesiredVRES=600
DesiredColor=2
TransportDriver=TCP/IP
WinStationDriver=ICA 3.0
Username=test
Domain=user_lab
ClearPassword=test
For more information, see the Citrix Website www.citrix.com.
Failed Bitmap Synchronization Dialog Box
This dialog box enables you to decide what to do when a bitmap synchronization fails.
Page 466 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
To access
This dialog box opens automatically during replay when there is a mismatch between the record snapshot and the replay snapshot in a bitmap synchronization step.
User interface elements are described below:
UI
Element
Description
Continue
Accept the mismatch and use both the original and new snapshots as a basis for comparison between screens during future replays. If replay returns either one of the bitmaps, the Vuser will not fail.
Recording
Snapshot
A view of the recording snapshot.
A view of the replay snapshot.
Replay
Snapshot
Stop
Consider the mismatch between the snapshots to be an error. This error will be handled like all other errors and halt the execution by default. Alternatively, you can specify Continue on Error for a specific function as described in
"Troubleshooting and Limitations" below .
Troubleshooting and Limitations
This section describes troubleshooting and limitations for Citrix Vusers.
Effects and Memory Requirements of Citrix Agent
When you run Citrix Vusers with the agent installed, each Vuser runs its own process of
ctrxagent.exe. This results in a slight reduction in the number of Vusers that can run on the server machine (about 7%).
The memory requirements per Citrix ICA Vuser (each Vuser runs its own ctrxagent.exe process) is approximately 4.35 MB. To run 25 Vusers, you would need 110 MBs of memory.
Data Execution Prevention (DEP) and Citrix Agent Performance
DEP is a security feature included in Windows version XP Service Pack 2 and later. DEP can interfere with some functions of the Agent for Citrix Presentation Server and may cause VuGen to stop recording.
If you experience unusual behavior during recording in these environments, modify the DEP settings.
Modify the Windows DEP settings
1. Open Start > Control Panel > System.
2. In the Advanced tab, click Performance settings.
3. In the Performance Options Data Execution Prevention tab, select the first option, DEP for
essential services only.
Page 467 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
If you cannot change this option, click Add. Browse to the client program, for example
IEXPLORE.EXE.
If neither of these options are possible, try to disable DEP completely.
a. In the Control Panel, click the Advanced tab under System section.
b. Under Startup and Recovery, click Edit.
c. Replace NoExecute=OptOut with NoExecute=AlwaysOff.
4. Click OK to save the settings.
5. Reboot the machine.
Debugging Tips
The following section lists debugging tips for Citrix scripts.
Single Client Installation
If you are unsuccessful in recording any actions in your Citrix session, verify that you have only one
Citrix client installed on your machine. To verify that only one client is installed, open the
Add/Remove Programs dialog box from the Control Panel and make sure that there is only one entry for the Citrix ICA client.
Add Breakpoints
Add breakpoints to your script in VuGen to help you determine the problematic lines of code.
Synchronize Your Script
If replay fails, you may need to insert synchronization functions into your script to allow more time for the desired windows to come into focus. Although you can manually add a delay using lr_think_
time, we recommend that you use one of the synchronization functions discussed in
"Citrix-
Automatic Synchronization" on page 457
.
Continuing on Error
You can instruct Vusers to continue running even after encountering an error, such as not locating a matching window. You specify Continue on Error for individual steps.
This is especially useful where you know that one of two windows may open, but you are unsure of which. Both windows are legal, but only one will open.
Indicate Continue on Error:
In the Step Navigator, right-click on the step and select Properties. In the Continue on Error box, select the CONTINUE_ON_ERROR option.
In Script view, locate the function and add CONTINUE_ON_ERROR as a final argument, before
CTRX_LAST.
Page 468 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
This option is not available for the following functions: ctrx_key, ctrx_key_down, ctrx_key_up,
ctrx_type, ctrx_set_waiting_time, ctrx_save_bitmap, ctrx_execute_on_window, and ctrx_set_
exception.
Extended Log
You can view additional replay information in the Extended log. To do this, enable Extended logging in the Run-Time settings ( f4 Shortcut key) Log tab. You can view this information in the Replay
Log tab or in the output.txt file in the script's folder.
Snapshot Bitmap
When an error occurs, VuGen saves a snapshot of the screen to the script's output folder. You can view the bitmap to try to determine why the error occurred.
During recording, the bitmaps generated for the ctrx_sync_on_bitmap function are saved under the script's data folder. The bitmap name has the format of hash_value.bmp. If synchronization fails during replay, the generated bitmap is written to the script's output folder, or if you are running it in a scenario, to wherever the output files are written. You can examine the new bitmap to determine why synchronization failed.
Show Vusers
To show Vusers during a scenario, enter the following in the Vuser command line box: -lr_citrix_
vuser_view. In the Controller, open the Vuser Details dialog box and click More to expand the dialog box. Note that this will affect the scalability of the test, so this should only be done to examine a problematic Vuser's behavior.
To reduce the effect on the script's scalability, you can show the details for an individual Vuser by adding the Vuser's ID at the end of the command line: -lr_citrix_vuser_view <VuserID>.
To open multiple Vusers, place a comma-separated list of IDs after the command line. Do not use spaces, but you may use commas or dashes. For example, 1,3-5,7 would show Vusers 1,3,4,5, and 7, but would not show Vuser 2, 6 or any Vuser with an ID higher than 7.
When recording with Xenapp 5.0 using a Citrix and Web multi-protocol script, manual modifications are needed to ensure proper recording.
Record using XenApp 5.0
1. Modify XenApp Settings a. Connect to the XenApp server through Internet Explorer.
b. Log in using the same account that will be used during recording.
c. Select Preferences > Session Settings and set Window Size to No Preference.
2. Update Correlation Rules a. Open the HTTP Correlation node of the Recording Options dialog box.
Page 469 of 1812 HP LoadRunner (11.50)
User Guide
VuGen b. Make sure that the Citrix_XenApp rule is selected.
3. Modify Recording Options a. Open the General > Recording node of the Recording Options dialog box.
b. Select Advanced HTML to open the Advanced HTML dialog box.
c. Select A script containing explicit URL's only.
COM Protocol
COM Protocol Overview
When you record COM client applications, VuGen generates functions that describe COM clientserver activity. The recorded script contains interface declarations, API calls and instance calls to methods. Each COM function begins with an lrc prefix. You can configure the programming language in which to create a Vuser script as either C or Visual Basic.
For each COM Vuser script, VuGen creates the following: l
Interface pointer and other variable declarations in the interfaces.h file.
l
Function calls that you can record in the vuser_init, actions or vuser_end sections of the Vuser file.
l
A user.h file containing the translation of the Vuser script into low level calls.
COM Technology Overview
This section provides an outline of COM technology. This should be enough to get you started with
COM Vuser scripts. See Microsoft Developer's Network (MSDN) and other documentation for further details.
COM (Component Object Model) is a technology for developing reusable software components
("plug-ins"). DCOM (Distributed COM) allows use of COM components on remote computers.
Microsoft transaction servers (MTS), Visual Basic and Explorer all use COM/DCOM technology.
Thus, the application you are testing may use COM technology indirectly, even though you don't know it. You will probably have to include some, but certainly not all, of the COM calls made by your application in the Vuser script.
Objects, Interfaces and Type Libraries
COM objects are binary code modules. Each COM object implements one or more interfaces that allow client programs to communicate with it. You need to know about these interfaces in order to follow the COM calls in the Vuser scripts. Type libraries, used as a reference for accessing COM interface methods and parameters, contain descriptions of COM objects and interfaces. Each COM class, interface, and type library is identified by a Global Unique Identifier (GUID).
COM Interfaces
A COM interface provides a grouped collection of related methods. For example, a Clock object may have Clock, Alarm and Timer interfaces. Each interface has one or more methods. For example the Alarm interface may have AlarmOn and AlarmOff methods.
Page 470 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
An interface may also have one or more properties. Sometimes, the same function may be performed by calling a method or by setting or getting the value of a property. For example, you can set the Alarm Status property to On or call the AlarmOn method.
A COM object may support many interfaces. The IUnknown interface is implemented by all components and is used to find out about other interfaces. Many components also implement the
IDispatch interface, which exposes all other interfaces and methods of the object, allowing implementation of COM automation in scripting languages.
COM Class Context and Location Transparency
COM objects can run on the same machine as the client application, or on a remote server. COM objects that an application creates may be in a local library, a local process or a remote machine
("Remote Object Proxy"). The location of the COM object, known as the "Context," can be transparent to the application. Most users apply the Vusers to check the load on remote servers.
Therefore, objects accessed by Remote Object Proxy are usually the most relevant for these tests.
COM Data Types
COM also provides several special data types, including safe arrays, BSTR strings and variants.
You may need to use these data types for debugging, parameterization and similar tasks.
COM Vuser Script Structure
VuGen COM Vuser scripts are structured in a special way to meet the needs of COM interfaces.
Interface Methods
Calls to interface methods have the following names and syntax conventions: lrc_<interface name>_<method name>(instance,...);
Note that the instance is always the first parameter passed.
The vendors of the respective COM components usually supply documentation for the interface functions.
Interface Pointers
The interface header file defines the interface pointers, as well as other variables, that can be used in the script. Each interface has an Interface ID (IID) which uniquely identifies the interface.
The format of the interface definition is:
<interface type>*<interface name> = 0; //"{<IID of the interface type>}"
In the following example, the interface type is IDispatch, the name of the interface instance is
IDispatch_0, and the IID of IDispatch type is the long number string:
IDispatch* IDispatch_0= 0;//"{00020400-0000-0000-C000-000000000046}"
Vuser Script Statements
The COM Vuser script consist of code that creates object instances, retrieves interface pointers and calls the interface methods. Each user action may generate one or more COM calls. Each
COM call is coded by VuGen as a group of statements. Each such group is contained in a separate scope enclosed in braces. Several different statements prepare for the main call by assigning
Page 471 of 1812 HP LoadRunner (11.50)
User Guide
VuGen values and performing type conversions. For example, the group of calls needed to create an object may look like this:
{
GUID pClsid = lrc_GUID("student.student.1");
IUnknown * pUnkOuter = (IUnknown*)NULL; unsigned long dwClsContext = lrc_ulong("7");
GUID riid = IID_IUnknown; lrc_CoCreateInstance(=;pClsid, pUnkOuter, dwClsContext, =;riid,
(void**)=;IUnknown_0, CHECK_HRES);
}
Error Checking
Each COM method or API call returns an error value. VuGen will set a flag to check or not to check errors during replay, depending upon whether the call succeeded during the original recording. The flag appears as the last argument of the function call and has these values:
CHECK_HRES
This value is inserted if the function passed during recording and errors should be checked during replay.
DONT_
CHECK_HRES
This value is inserted if the function failed during recording and errors should not be checked during replay.
COM Sample Vuser Scripts
This section shows examples of how VuGen emulates a COM client application. It is divided up into the basic COM script operations. Each type of operation is done within a separate scope.
Instantiation of the Object
To use a COM object, the application must first instantiate it and get a pointer to an interface of that object.
VuGen does the following to instantiate an object
1. VuGen calls lrc_GUID to get a unique ProgID for the object, to be stored in pClsid:
GUID pClsid = lrc_GUID("student.student.1");
pClsid is the unique global CLSID of the object, which was converted from the
student.student.1 ProgID.
2. If the unknown interface pointer is a pointer to an aggregated object, VuGen retrieves the pointer to that object, or else it sets it to NULL:
IUnknown * pUnkOuter = (IUnknown*)NULL;
3. VuGen sets the contexts of the object to be created: unsigned long dwClsContext = lrc_ulong("7");
dwClsContext contains the context of the object (in process, local, remote or combinations of these.)
Page 472 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
4. VuGen sets a variable to hold the requested interface ID, which is IUnknown in this case:
GUID riid = IID_IUnknown;
riid contains the interface ID of the IUnknown interface.
5. After the input parameters are prepared, a call to lrc_CoCreateInstance creates an object using the parameters defined in the preceding statements. A pointer to the IUnknown interface is assigned to output parameter IUnknown_0. This pointer is needed for subsequent calls: lrc_CoCreateInstance(=;pClsid, pUnkOuter, dwClsContext, =;riid,
(void**)=;IUnknown_0, CHECK_HRES);
The input parameters were prepared and explained above. Since the call succeeded, VuGen sets error checking on during the user simulation by inserting the CHECK_HRES value. The call returns a pointer to the IUnknown interface in IUnknown_0, that can be used in subsequent calls.
Retrieving an Interface
After creating an object, VuGen has access only to the IUnknown interface . VuGen will use the
IUnknown interface for communicating with the object. This is done using the QueryInterface method of the IUnknown standard interface. The first parameter in a VuGen method call is the interface instance. In this case it is the IUnknown_0 pointer set previously by CoCreateInstance.
The QueryInterface call requires as input the ID of the interface to be retrieved, and returns a pointer to the interface designated by that ID.
Get the interface
1. First, VuGen sets a parameter, riid, equal to the ID of the Istudent interface:
GUID riid = IID_Istudent;
2. A call to QueryInterface assigns a pointer to the Istudent interface to output parameter
Istudent_0 if the Istudent object has such an interface: lrc_IUnknown_QueryInterface(IUnknown_0, =;riid, (void**)=;Istudent_
0, CHECK_HRES);
Using an Interface to Set Data
Here is an example of using the methods of the interface to set data. Suppose that in the application, the user is supposed to input a name. This activates a method for setting the name.
VuGen records this in two statements. One statement is used for setting up the name string and the second one sets the name property.
Set up the entire function call
1. First, VuGen sets a variable (Prop Value) equal to the string. The parameter is of type BSTR, a string type used in COM files:
BSTR PropValue = lrc_BSTR("John Smith");
In subsequent stages, you will probably parameterize this call, replacing "John Smith" with a parameter, so that different names are used each time the Vuser script is run.
2. Next, VuGen calls the Put_Name method of the Istudent interface to enter the name: lrc_Istudent_put_name(Istudent_0, PropValue, CHECK_HRES);
Page 473 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Using an Interface to Return Data
Returning data from an application is different than entering the data, because you might want to store these values and use them as inputs in subsequent calls for parameterization.
The following is an example of what VuGen may do when the application retrieves data
1. Create a variable of the appropriate type (in this case a BSTR) that will contain the value of the property.
BSTR pVal;
2. Get the value of the property, in this case a name, into the pVal variable created above, using the get_name method of the Istudent interface in this example.
lrc_Istudent_get_name(Istudent_0, =;pVal, CHECK_HRES);
3. VuGen then generates a statement for saving the values.
//lrc_save_BSTR("param-name",pVal);
The statement is commented out. You can remove the comments and change <param-name> to a variable with a meaningful name to be used for storing this value. VuGen will use the variable to save the value of pVal returned by the previous call. You can then use the variable as a parameterized input in subsequent calls to other methods.
The IDispatch Interface
Most COM objects have specific interfaces. Many of them also implement a general-purpose interface called IDispatch, which VuGen translates in a special way. IDispatch is a
"superinterface" that exposes all of the other interfaces and methods of a COM object. Calls to the
IDispatch:Invoke method from VuGen scripts are implemented using lrc_Disp functions. These calls are constructed somewhat differently from calls to other interfaces.
The IDispatch interface Invoke method can execute a method, it can get a property value, or it can set a value or reference value for a property. In the standard IDispatch:Invoke method these different uses are signalled in a wflags parameter. In the VuGen implementation they are implemented in different procedure calls that invoke a method or put or get a property.
For example, a call to IDispatch to activate the GetAgentsArray method may look like this: retValue = lrc_DispMethod1((IDispatch*)IDispatch_0, "GetAgentsArray",
/*locale*/1033, LAST_ARG, CHECK_HRES);
The parameters in the above call are:
IDispatch_0
This is the pointer to the IDispatch interface returned by a previous call to the
IUnknown:Queryinterface method.
GetAgentsArray
This is the name of the method to invoke. Behind the scenes, VuGen will get the ID of the method from the name.
1033
This is the language locale.
LAST_ARG
This is a flag to tell the IDispatch interface that there are no more arguments.
CHECK_HRES
This flag turns on checking of HRES, since the call succeeded when it was recorded.
Page 474 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
In addition, there might be another parameter, OPTIONAL_ARGS. This signals that in addition to any standard parameters, VuGen is sending some optional arguments. Each optional argument consists of a pair giving the ID or name of the argument and its value. For example, the following call to lrc_DispMethod passes optional arguments "#3" and "var3":
{
GUID riid = IID_IDispatch;
lrc_IOptional_QueryInterface(IOptional_0, =;riid,
(void**)=;IOptional_0, CHECK_HRES);
}
{
VARIANT P1 = lrc_variant_short("47");
VARIANT P2 = lrc_variant_short("37");
VARIANT P3 = lrc_variant_date("3/19/1901");
VARIANT var3 = lrc_variant_scode("4");
lrc_DispMethod((IDispatch*)IOptional_0, "in_out_optional_ args", /*locale*/1024, =;P1, =;P2, OPTIONAL_ARGS, "#3", =;P3, "var3",
=;var3, LAST_ARG, CHECK_HRES);
}
The different lrc_Disp methods that use the IDispatch interface are detailed in the .
Type Conversions and Data Extraction
As shown in the above example, many COM parameters are defined as variants. To extract these values, VuGen uses a number of conversion functions, derived from the equivalent COM functions.
The full list is given in the . Previously, we showed how the lrc_DispMethod1 call was used to retrieve an array of name strings:
VARIANT retValue = lrc_variant_empty(); retValue = lrc_DispMethod1((IDispatch*)IDispatch_0, "GetAgentsArray",
/*locale*/1033, LAST_ARG, CHECK_HRES);
The following example now shows how VuGen gets the strings out of retValue, which is a variant that will be read as an array of strings.
First, VuGen extracts the BSTR array from the variant:
BstrArray array0 = 0; array0 = lrc_GetBstrArrayFromVariant(=;retValue);
With all the values in array0, VuGen provides you with code that you can use to extract the elements from the array for later use in parameterization, as in the example below:
//GetElementFrom1DBstrArray(array0, 0); // value: Alex
//GetElementFrom1DBstrArray(array0, 1); // value: Amanda
....
VuGen has numerous type conversion functions and functions for extracting conventional types from variants. These are detailed in the Function Reference (Help > Function Reference).
Selecting COM Objects to Record
The application you are testing may use a great many COM objects. Only a few may actually create load and may be important for the load test. Thus, before you record a COM application, you should
Page 475 of 1812 HP LoadRunner (11.50)
User Guide
VuGen select the objects you want to record for the load test. VuGen allows you to browse for objects from type libraries that it can read on the local machine and on other computers in the network.
Deciding Which Objects to Use
There are several ways to decide which COM objects should be included in the test. Try to determine which remote objects are used by the software. If you are unsure which objects to use, try using the default filter. The Environments branch of the filter includes calls to three sets of objects (ADO, RDS and Remote) that are likely to generate load on remote servers.
You can also check the actual calls to refine the filter. After you have recorded the test, you can save the file and look in the data folder that VuGen creates for a file named lrc_debug_list_
<nnn>.log", where nnn is the process number. This log file contains a listing of each COM object that was called by the recorded application, regardless of whether or not the recording filter included that object. Only calls that generate load on the server should be included for recording.
For example, the following is a local COM of the Visual Basic library:
Class JetES {039EA4C0-E696-11D0-878A-00A0C91EC756} was loaded from type library "JET Expression Service Type Library"
({2358C810-62BA-11D1-B3DB-00600832C573} ver 4.0)
It should not be added since it does not generate load on the server.
Likewise, since the OLE DB and Microsoft Windows Common Controls are local objects, the following are examples of classes and libraries that are not going to place any load on the server and should not be recorded:
Class DataLinks {2206CDB2-19C1-11D1-89E0-00C04FD7A829} was loaded from type library "Microsoft OLE DB Service Component 1.0
Type Library"
({2206CEB0-19C1-11D1-89E0-00C04FD7A829} ver 1.0)
Class DataObject {2334D2B2-713E-11CF-8AE5-00AA00C00905} was loaded from type library "Microsoft Windows Common Controls 6.0
(SP3)"
({831FDD16-0C5C-11D2-A9FC-0000F8754DA1} ver 2.0)
However, for example, a listing such as the following indicates a class that should be recorded since it does generate load on the server:
Class Order {B4CC7A90-1067-11D4-9939-00105ACECF9A} was loaded from type library "FRS"
({B4CC7A8C-1067-11D4-9939-00105ACECF9A} ver 1.0)
Calls to classes of the FRS library, used for instance in the flight_sample that is installed with
VuGen, use server capacity and should be recorded.
If a COM object itself calls other COM objects, all the calls will be listed in the type information log file. For example, every time the application calls an FRS class function, the FRS library calls the
ActiveX Data Object (ADO) library. If several functions in such a chain are listed in a filter, VuGen records only the first call that initiates the chain. If you selected both FRS and ADO calls, only the
FRS calls will be recorded.
On the other hand, if you select only the ADO library in the filter, then calls to the ADO library will be recorded. It is often easier to record the call to the first remote object in the chain. In some cases,
Page 476 of 1812 HP LoadRunner (11.50)
User Guide
VuGen however, an application may use methods from several different COM objects. If all of them use a single object that puts a load on the server, you could only record the final common object.
Which Objects Can Be Selected
VuGen can only record objects if it can read their type libraries. If the type libraries were not installed in the system or VuGen cannot find them, the COM objects will not be listed in the
Recording Options dialog box. If they are used by your application, VuGen will not be able to identify these objects and will identify them as INoTypeInfo in the files.
Which Interfaces Can Be Excluded
For each object, the Recording Options dialog box will show you all interfaces that are listed in the
Type Library, and allow you to specify inclusion or exclusion of each one. However, ADO, RDS and Remote Objects can be included in the filter as a group. The filter will not show the individual objects of those environments or their interfaces. Objects that you included from type libraries may also have interfaces that are not listed in the type library and therefore not shown in the Recording
Options dialog. After generating a VuGen script, you can identify these interfaces in the script and get their GUID numbers from the interfaces.h file that VuGen generates. Using this information, you can exclude the interfaces as explained in
"COM/DCOM > Filter Node" on page 288 .
Database Protocols
Database Protocols Overview
Suppose that you have a database of customer information that is accessed by customer service personnel located throughout the country. You use Database Vusers to emulate the situation in which the database server services many requests for information. A Database Vuser could: l connect to the server l submit an SQL query l retrieve and process the information l disconnect from the server
You distribute several hundred Database Vusers among the available load generators, each Vuser accessing the database by using the server API. This enables you to measure the performance of your server under the load of many users.
The program that contains the calls to the server API is called a Database Vuser script. It emulates the client application and all of the actions performed by it. The Vusers execute the script and emulate user load on the client/server system. The Vusers generate performance data which you can analyze in report and graph format.
VuGen supports the following database types: CtLib, DbLib, Informix, Oracle, ODBC, and DB2-
CLI. The resulting script contains LRD functions that describe the database activity.
VuGen Database Recording Technology
VuGen creates Database Vuser scripts by recording all the activity between a database client and a server. VuGen monitors the client end of the database and traces all the requests sent to and received from the database server.
Page 477 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Like all other Vusers created using VuGen, Database Vusers communicate with the server without relying on client software. Instead, each Database Vuser executes a script that executes calls directly to server API functions.
You create Database Vuser scripts in a Windows environment using VuGen. Once you create a script, you can assign it to Vusers in both Windows and Linux environments.
Users working in a Linux only environment can create Database Vuser scripts through programming using VuGen templates as the basis for a script. For information about programming
Database Vuser scripts on Linux, see
"Creating and Running Scripts in Linux" on page 820
Database Grids
When you record or replay a Vuser script, the data that is returned by each query is displayed in a data grid. In a Vuser script, the existence of a data grid is indicated by a GRID statement. VuGen displays data grids in either the Data Grids pane or the Snapshot pane.
l
For an introduction to the Snapshot pane, see
"Snapshot Pane - Overview" on page 85
.
l
For details on how to work with the Snapshot pane, see
"How to Work with Snapshots" on page
88
.
l
For details on the Snapshot pane UI, see
"Snapshot Pane" on page 119 .
To correlate a value in a data grid:
Display the data grid in the Snapshot pane, right-click in a cell inside the data grid, and select
Create Correlation.
To save the data in a data grid to a file:
Display the data grid in the Snapshot pane or the Data Grids pane, right-click in any cell in the data
Page 478 of 1812 HP LoadRunner (11.50)
User Guide
VuGen grid, and select Save Grid To File
To copy the text from a cell in a data grid to the clipboard:
Display the data grid in the Snapshot pane or in the Data Grids pane, right-click in the cell in the data grid, and select Copy Selection.
To search for data inside a data grid:
1. Display the data grid in the Snapshot pane, and click Search > Quick Find to open the Search dialog box.
2. Click Include in Search, and then select the Snapshots check box.
Oracle Applications
Oracle Applications is a two-tier ("fat" client) packaged application, made up of 35 different modules
(Oracle Human Resources, Oracle Financials, and so forth).
There are a number of issues that you should be aware of while recording and replaying Vuser scripts for Oracle Applications: l
A typical script contains thousands of events, binds, and assigns.
l
A typical script has many db connections per user session.
l
Scripts almost always require correlated queries.
Page 479 of 1812 HP LoadRunner (11.50)
User Guide
VuGen l
Oracle Applications' clients are 16-bit only (developed with Oracle Developer 2000). This means that for debugging, if you don't have the Oracle 32bit client, you need to use VuGen's Force 16bit options.
When a new window is created, the application retrieves an .xpf file from the file system for display.
Currently, VuGen does not take this into consideration since it records at the client/server level.
Therefore, there is a fairly significant inaccuracy in performance measurements since in most cases performance problems are related to the network bottleneck between clients and file server.
We are currently thinking about this problem and how, if at all, to solve it.
Handling Database Errors
You can control how database Vusers handle errors when you run a database Vuser script. By default, if an error occurs during script execution, the script execution is terminated. To change the default behavior, you can instruct the Vuser to continue when an error occurs. You can apply this behavior in different ways as described below.
Globally Modifying Error Handling
You can change the way that Vusers handle errors by issuing an LRD_ON_ERROR_CONTINUE or LRD_ON_ERROR_EXIT statement. By default, a Vuser aborts the script execution when it encounters any type of error—database, parameter related, and so on. To change the default behavior, insert the following line into your script: style="font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline">LRD_ON_ERROR_CONTINUE;
From this point on, the Vuser continues script execution, even when an error occurs.
You can also specify that the Vuser continue script execution when an error occurs only within a segment of the script. For example, the following code tells the Vuser to continue script execution even if an error occurs in the lrd_stmt or lrd_exec functions:
LRD_ON_ERROR_CONTINUE; lrd_stmt(Csr1, "select..."...); lrd_exec(...);
LRD_ON_ERROR_EXIT;
Use the LRD_ON_ERROR_CONTINUE statement with caution, as significant and severe errors may be missed.
Locally Modifying Error Handling
You can set error handling for a specific function by modifying the severity level. Functions such as
lrd_stmt and lrd_exec, which perform database operations, use severity levels. The severity level is indicated by the function's final parameter, miDBErrorSeverity. This parameter tells the Vuser whether or not to continue script execution when a database error occurs (error code 2009). The default, 0, indicates that the Vuser should abort the script when an error occurs.
For example, if you reference a table that does not exist, the following database statement fails and the script execution terminates.
lrd_stmt(Csr1, "insert into EMP values ('Smith',301)\n", -1, 1
/*Deferred*/,
1 /*Dflt Ora Ver*/, 0);
Page 480 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
To tell a Vuser to continue script execution, even when a database operation error occurs for that function, change the statement's severity parameter from 0 to 1.
lrd_stmt(Csr1, "insert into EMP values ('Smith',301)\n", -1, 1
/*Deferred*/,
1 /*Dflt Ora Ver*/,
1);
When the severity is set to 1 and a database error occurs, a warning is issued. Note that the severity level set for a particular function applies only to that function.
CtLib Result Set Errors
In CtLib recording, the application retrieves all of the available result sets after executing a statement. If the returned result set contains fetchable data, the application performs bind and fetch operations on the data as indicated in the following example: lrd_stmt(Csr15, "select * from all_types", -1, 148, -99999, 0); lrd_exec(Csr15, 0, 0, 0, 0, 0); lrd_result_set(Csr15, 1 /*Succeed*/, 4040 /*Row*/, 0); lrd_bind_col(Csr15, 1, =;tinyint_D41, 0, 0);
...
lrd_fetch(Csr15, -9, 0, 0, PrintRow3, 0);
If a result set does not contain fetchable data, bind and fetch operations cannot be performed.
When you parameterize your script, result data may become unfetchable (depending on the parameters). Therefore, a CtLib session that recorded bind and fetch operations for a particular statement, may not be able to run, if the new data is unfetchable. If you try to execute an lrd_bind_
col or an lrd_fetch operation, an error will occur (LRDRET_E_NO_FETCHABLE_DATA — error code 2064) and the Vuser will terminate the script execution.
You can override the error by telling the Vuser to continue script execution when this type of error occurs. Insert the following line into your script:
LRD_ON_FETCHABLE_SET_ERR_CONT;
To return to the default mode of terminating the script execution, type the following line into your script:
LRD_ON_FETCHABLE_SET_ERR_EXIT;
Use this option with caution, as significant and severe errors may be missed.
Debugging Database Applications
The following tips apply to database applications only (Oracle, ODBC, Ctlib):
Generating Debugging Information
Note: You can now set options to view most of the information described in this section using
VuGen's user interface.
VuGen contains an inspector "engine." You can force VuGen recorder to create "inspector" output by editing \WINDOWS_DIR\vugen.ini as follows:
Page 481 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
[LogMode]
EnableAscii=ASCII_LOG_ON
When this option is enabled, VuGen creates a file, vuser.asc in the Data folder at the end of the recording. Note that this option should be used for debugging purposes only. This output file can become very large (several MB) and have serious effects on machine performance and disk space.
For cases like ODBC-based applications, it is possible to configure the ODBC Administrator
(located in the Windows Control Panel) to provide a similar trace output. Open the ODBC options, and select `Trace ODBC calls' to ON. Similarly the ODBC Developer Kit provides a Spy utility for call tracing.
To enable further debug information, add the following section to the \WINDOWS_DIR\vugen.ini
file:
[INSPECTOR]
TRACE_LEVEL=3
TRACE_FILENAME=c:\tmp\sqltrace.txt
The file (sqltrace.txt) will include useful internal information regarding the hooking calls made during recording. The trace_level is between 1 and 3, with 3 representing the most detailed debug level.
Note that in VuGen versions 5.02 and higher, you can set the trace level from the user interface.
Examining Compiler Information
You can view information about each stage of code generation, preprocessing and compilation to determine the source of any errors.
Code Generation Information
Look at the vuser.log file under the Data folder. This file, which contains a log of the code generation phase, is automatically created at the end of every lrd recording (i.e. all database protocols).
The following is an example of a log file: lrd_init: OK lrd_option: OK lrd_option: OK lrd_option: OK
Code generation successful lrd_option: OK lrd_end: OK
If any of the messages are not OK or successful, then a problem occurred during the code generation.
Preprocessing and Compilation Information
During runtime, VuGen displays information about both the preprocessing and compilation processes.
Troubleshooting and Limitations
This section describes troubleshooting and limitations for database protocols.
Page 482 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Troubleshooting all database protocols
IE crashes when recording Oracle NCA/11i scripts
This can occur due to an incompatible dll file.
Replace the incompatible dll
1. Open the C:\program files\oracle\JInitiator_1.3.1.18\bin\hotspot folder.
2. Back up the jvm.dll file.
3. Delete the jvm.dll file and replace it with a different version of the file.
Evaluating Error Codes
When a Vuser executes an LRD function, the function generates a return code. A return code of
0 indicates that the function succeeded. For example, a return code of 0 indicates that another row is available from the result set. If an error occurs, the return code indicates the type of error.
For example, a return code of 2014 indicates that an error occurred in the initialization.
There are four types of return codes, each represented by a numerical range:
Type of Return Code Range
Informational 0 to 999
Warning 1000 to 1999
Error
Internal Error
2000 to 2999
5000 to 5999
For more detailed information on the return codes, see the Function Reference (Help >
Function Reference).
You can evaluate the return code of an LRD function to determine if the function succeeded.
The following script segment evaluates the return code of an lrd_fetch function: static int rc; rc=lrd_fetch(Csr15, -13, 0, 0, PrintRow4, 0); if (rc==0)
lr_output_message("The function succeeded"); else
lr_output_message("The function returned an error code:%d",rc);
Two-tier Database Scripting Tips
The following section offers solutions for two-tier database scripts.
Question 1: Why does the script fail when it is data driven, while the same values work with the application itself?
Answer: The failure may be a result of trailing spaces in your data values. Even though the data values that you type directly into the GUI are probably truncated, you should manually eliminate
Page 483 of 1812 HP LoadRunner (11.50)
User Guide
VuGen them from your data file. Tab-delimited files can hide trailing spaces and therefore obscure problems. In general, comma-delimited files are recommended. You can view the files in Excel to see if things are correct.
Question 2: Why does an SQL error of an invalid cursor state occur on the second iteration?
Answer: The lrd_close_cursor function may not have been generated or it may be in the end section instead of the action section. You will need to add a cursor close function or move it from the end section to make the script iterate successfully.
Opening a new cursor may be costly in terms of resources. Therefore, we recommend that you only open a cursor once in the actions section during the first iteration. You can then add a new parameter that contains the iteration number as a string by using the Iteration Number type. Call this parameter IterationNum. Then, inside the actions section replace a call to open a new cursor, for example, lrd_open_cursor(=;Csr1, Con1, 0); with if (!strcmp(lr_eval_string("<IterationNum>"), "1")) lrd_open_cursor(=;Csr1, Con1, 0);
Question 3: How can I fix code produced by VuGen that will not compile because of data declarations in the vdf.h file?
Answer: The problem, most likely, is an SQL data type that is not supported by VuGen. For
Microsoft SQL, you can often work around this issue by replacing the undefined error message in
vdf.h with "DT_SZ" (null terminated string). Although this is not the actual datatype, VuGen can compile the script correctly. Please report the problem and send the original script to customer support.
Question 4: What is the meaning of LRD Error 2048?
Answer: VuGen is failing because it is trying to bind a variable with a longer length than what was allocated during recording. You can correct this by enlarging the variable definition in vdf.h to receive a longer string back from the database. Search this file for the unique numeric identifier. You will see its definition and length. The length is the third element in the structure. Increase this length as required and the script will replay successfully.
For example, in the following script, we have: lrd_assign(=;_2_D354, "<ROW_ID>", 0, 0, 0);
In vdf.h, we search for _2_D354 and find static LRD_VAR_DESC _2_D354 = {
LRD_VAR_DESC_EYECAT, 1, 10, LRD_BYTYPE_ODBC,
{0 ,0, 0}, DT_SZ, 0, 0, 15, 12};
We change it to: static LRD_VAR_DESC _2_D354 = {
LRD_VAR_DESC_EYECAT, 1, 12, LRD_BYTYPE_ODBC,
Page 484 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
{0,0, 0}, DT_SZ, 0, 0, 15, 12};
The complete definition of LRD_VAR_DESC appears in lrd.h. You can find it by searching for typedef struct LRD_VAR_DESC
.
Question 5: How can I obtain the number of rows affected by an UPDATE, INSERT or DELETE when using ODBC and Oracle?
Answer: You can use lrd functions to obtain this information. For ODBC, use lrd_row_count. The syntax is:
.
.
int rowcount;
.
lrd_row_count(Csr33, =;rowcount, 0);
Note that lrd_row_count must immediately follow the pertinent statement execution.
For Oracle you can use the fourth argument of lrd_exec.
lrd_exec(Csr19, 1, 0, =;rowcount, 0, 0);
If you are using Oracle's OCI 8, you can use the fifth argument of lrd_ora8_exec.
lrd_ora8_exec(OraSvc1, OraStm3, 1, 0, =;uliRowsProcessed, 0, 0, 0, 0, 0);
Question 6: How can I avoid duplicate key violations?
Answer: Occasionally, you will see a duplicate key violation when performing an Insert. You should be able to find the primary key by comparing two recordings to determine the problem. Check whether this or earlier UPDATE or INSERT statement should use correlated queries. You can use the data dictionary in order to find the columns that are used in the violated unique constraint.
In Oracle you will see the following message when a unique constraint is violated:
ORA-00001: unique constraint (SCOTT.PK_EMP) violated
In this example SCOTT is the owner of the related unique index, and PK_EMP is the name of this index. Use SQL*Plus to query the data dictionary to find the columns. The pattern for this query is: select column_name from all_ind_columns where index_name =
'<IndexName> and index_owner = '<IndexOwner>'; select column_name from all_ind_columns where index_name = 'PK_EMP' and index_owner = 'SCOTT';
Since the values inserted into the database are new, they might not appear in earlier queries, but they could be related to the results of earlier queries, such as one more than the value returned in an earlier query.
For Microsoft SQL Server you will see one of these messages:
Cannot insert duplicate key row in object 'newtab' with unique index
'IX_newtab'.
Page 485 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Violation of UNIQUE KEY constraint 'IX_Mark_Table'. Cannot insert duplicate key in object 'Mark_Table'.
Violation of PRIMARY KEY constraint 'PK_NewTab'. Cannot insert duplicate key in object 'NewTab'.
You can use the Query Analyzer to find out which columns used by the key or index. The pattern for this query is: select C.name
from sysindexes A, sysindexkeys B, syscolumns C
where C.colid = B.colid and C.id = B.id and
A.id = B.id and A.indid = B.indid
and A.name = '<IndexName>' and A.id = object_id('<TableName>') select C.name
from sysindexes A, sysindexkeys B, syscolumns C
where C.colid = B.colid and C.id = B.id and
A.id = B.id and A.indid = B.indid
and A.name = 'IX_newtab' and A.id = object_id('newtab')
For DB2 you might see the following message:
SQL0803N One or more values in the INSERT statement, UPDATE statement, or foreign key update caused by a DELETE statement are not valid because they would produce duplicate rows for a table with a primary key, unique constraint, or unique index. SQLSTATE=23505
If you still encounter problems, be sure to check the number of rows changed for Updates and
Inserts for both recording and replay. Very often, an UPDATE fails to change any rows during replay, because the WHERE clause was not satisfied. This does not directly result in an error, but it causes a table not to be properly updated, and can cause a later SELECT to select the wrong value when correlating the query.
Also verify that there are no problems during multi-user replay. In certain instances, only one user will successfully perform an UPDATE. This occurs with Siebel, where it is necessary to manually write a loop to overcome the problem.
Question 7: The database does not appear to be modified after replaying a script which should have modified the database.
Answer: Through the user application's UI, check if the updated values appear when trying to see the current data accessible to the application. If the values have not been updated, you need to determine they were not changed. Possibly, an UPDATE statement changed one or more rows when the application was recorded, and did not change any during replay.
Check these items: l
Verify statement. If there is a WHERE clause in the UPDATE statement, verify that it is correct.
l
Check for correlations. Record the application twice and compare the UPDATE statements from each of the recordings to make sure that the necessary correlations were performed.
l
Check the total number of rows. Check the number of rows that were changed after the
UPDATE
. For Oracle, this information is stored in the fourth parameter of lrd_exec. For ODBC,
Page 486 of 1812 HP LoadRunner (11.50)
User Guide
VuGen use lrd_row_count to determine the number of rows updated. You can also add code to your script that prints the number of rows that were updated. If this value is 0, the UPDATE failed to modify the database.
l
Check the SET clause. Check the SET clause of the UPDATE statement. Make sure that you correlated any necessary values here instead of hard-coding them. You can see this by comparing two recordings of the UPDATE.
It certain cases, the UPDATE works when replaying one Vuser, but not for multiple Vusers. The
UPDATE of one Vuser might interfere with that of another. Parameterize each Vuser so that each one uses different values during the UPDATE, unless you want each vuser to update with the same values. In this case try adding retry logic to perform the UPDATE a second time.
Question 8: How do I avoid the unique column name error when replaying a statement recorded with an Oracle Application. For example: lrd_stmt(Csr9, "SELECT UOM_CODE, UOM_CODE, DESCRIPTION FROM "
"MTL_UNITS_OF_MEASURE "
"WHERE NVL(DISABLE_DATE, SYSDATE + 1) > "
"SYSDATE ORDER BY UOM_CODE", -1, 1, 1, 0);
The following error message was issued:
"lrdo.c/fjParse: "oparse" ERROR return-code=960, oerhms=ORA-00960: ambiguous column naming in select list".
Answer: Change the statement by adding an alias to at least one of the non-unique columns, thereby mapping it to a new unique name. For example: lrd_stmt(Csr9,"SELECT UOM_CODE,UOM_CODE second, DESCRIPTION FROM"
"MTL_UNITS_OF_MEASURE "
"WHERE NVL(DISABLE_DATE, SYSDATE + 1) > "
"SYSDATE ORDER BY UOM_CODE", -1, 1, 1, 0);
Troubleshooting Oracle 2-Tier Vusers
This section contains a list of common problems that you may encounter while working with Oracle
Vusers, and suggested solutions.
ORA-20001 and ORA-06512
Errors ORA-20001 and ORA-06512 appear during replay when the lrd_stmt contains the pl/sql block: fnd_signon.audit_responsibility(...)
This statement fails during replay because the sign-on number is unique for each new connection.
Solution
In order to solve this problem you need to use the new correlation tool for the sign-on number. This is second assigned value in the statement.
Page 487 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
After you scan for possible values to correlate, highlight the value of the second lrd_assign_bind() for the failed statement. Note that the values in the "correlated query" window may not appear in the same order as the actual recorded statements.
The grid containing the substitution value should appear after the lrd_stmt which contains the pl/sql block: fnd_signon.audit_user(...).
Note: Since the sign-on number is unique for every connection, you need to use correlation for each new connection that you record.
Example of Solution
The following statement failed in replay because the second value, "1498224" is the unique sign-on number for every new connection.
lrd_stmt(Csr6, "begin fnd_signon.audit_responsibility(:s,:l,:f,:a,:r,:t,:p)"
"; end;", -1, 1, 1, 0); lrd_assign_bind(Csr6, "s", "D", =;s_D216, 0, 0, 0); lrd_assign_bind(Csr6, "l", "1498224", =;l_D217, 0, 0, 0); lrd_assign_bind(Csr6, "f", "1", =;f_D218, 0, 0, 0); lrd_assign_bind(Csr6, "a", "810", =;a_D219, 0, 0, 0); lrd_assign_bind(Csr6, "r", "20675", =;r_D220, 0, 0, 0); lrd_assign_bind(Csr6, "t", "Windows PC", =;t_D221, 0, 0, 0); lrd_assign_bind(Csr6, "p", "", =;p_D222, 0, 0, 0); lrd_exec(Csr6, 1, 0, 0, 0, 0);
The sign-on number can be found in the lrd_stmt with "fnd_signon.audit_user". The value of the first placeholder "a" should be saved. The input of "a" is always "0" but the output is the requested value.
Modified code:
lrd_stmt(Csr4, "begin fnd_signon.audit_user(:a,:l,:u,:t,:n,:p,:s); end;", -1, 1, 1, 0); lrd_assign_bind(Csr4, "a", "0", =;a_D46, 0, 0, 0); lrd_assign_bind(Csr4, "l", "D", =;l_D47, 0, 0, 0); lrd_assign_bind(Csr4, "u", "1001", =;u_D48, 0, 0, 0); lrd_assign_bind(Csr4, "t", "Windows PC", =;t_D49, 0, 0, 0); lrd_assign_bind(Csr4, "n", "OraUser", =;n_D50, 0, 0, 0); lrd_assign_bind(Csr4, "p", "", =;p_D51, 0, 0, 0); lrd_assign_bind(Csr4, "s", "14157", =;s_D52, 0, 0, 0); lrd_exec(Csr4, 1, 0, 0, 0, 0);
Page 488 of 1812 HP LoadRunner (11.50)
User Guide
VuGen lrd_save_value(=;a_D46, 0, 0, " saved_a_D46");
Grid0(17); lrd_stmt(Csr6, "begin fnd_signon.audit_responsibility(:s,:l,:f,:a,:r,:t,:p)"
"; end;", -1, 1, 1, 0); lrd_assign_bind(Csr6, "s", "D", =;s_D216, 0, 0, 0); lrd_assign_bind(Csr6, "l", " <saved_a_D46>", =;l_D217, 0, 0, 0); lrd_assign_bind(Csr6, "f", "1", =;f_D218, 0, 0, 0); lrd_assign_bind(Csr6, "a", "810", =;a_D219, 0, 0, 0); lrd_assign_bind(Csr6, "r", "20675", =;r_D220, 0, 0, 0); lrd_assign_bind(Csr6, "t", "Windows PC", =;t_D221, 0, 0, 0); lrd_assign_bind(Csr6, "p", "", =;p_D222, 0, 0, 0); lrd_exec(Csr6, 1, 0, 0, 0, 0);
Working with large numbers
Large numbers (NUMBER data type) sometimes appear in different format in the GRID and in the
ASCII file. This difference makes it more difficult to identify numbers while searching for values to save for correlation.
For example, you could have a value appear as 1000003 in the grid, but as 1e+0006 in the
Recording Log (ASCII file).
Workaround
If you have an error during replay and the correlation tool cannot locate the value in previous results, look for this value in the other format in grid.
ORA-00960
This error may occur with non-unique column names. For example: lrd_stmt(Csr9, "SELECT UOM_CODE, UOM_CODE, DESCRIPTION FROM "
"MTL_UNITS_OF_MEASURE "
"WHERE NVL(DISABLE_DATE, SYSDATE + 1) > "
"SYSDATE ORDER BY UOM_CODE", -1, 1, 1, 0);
In this case you receive the following error:
"lrdo.c/fjParse: "oparse" ERROR return-code=960, oerhms=ORA-00960: ambiguous column naming in select list".
Workaround
Page 489 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Change the statement by adding an alias to at least one of the non-unique columns, thus mapping it to a new unique name. For example: lrd_stmt(Csr9,"SELECT UOM_CODE,UOM_CODE second, DESCRIPTION FROM"
"MTL_UNITS_OF_MEASURE "
"WHERE NVL(DISABLE_DATE, SYSDATE + 1) > "
"SYSDATE ORDER BY UOM_CODE", -1, 1, 1, 0);
Alternate Workaround: remove ORDER BY from the lrd statement.
ORA-2002
Error 2002 appears when you try to use an unopened cursor. It occurs when you replay a user more than one iteration and you recorded into more than one section of the script.
Specifically, if a cursor is opened in the vuser_init section and closed in the Actions section, then you will encounter this error on the second iteration if you try to use the cursor. This is because it was closed but not re-opened.
For example: You have lrd_open_cursor in the vuser_init section and lrd_close_cursor in the
Actions section. If you replay this user more than one iteration, you are going to get an error in the second iteration because you try using an unopened cursor (it was closed in first iteration, but not re-opened in the second).
Workaround
The easiest way to solve this is to move the lrd_close_cursor or/and lrd_close_connection of the problem cursor to the vuser_end section.
Database Protocols (lrd)
Replay of recorded asynchronous operations is not supported.
Wrong Client Version
You may receive an error message when running the wrong Oracle client version:
"Error: lrdo_open_connection: "olog" LDA/CDA return-code_019: unable to allocate memory in the user side"
Workaround
You need to modify the library information in the lrd.ini file, located in the your product's bin folder.
This file contains the settings that indicate which version of database support is loaded during recording or replay. The file contains a section for each type of host. For example, the following section of the lrd.ini file is for Oracle on HP/UX:
[ORACLE_HPUX]
;816=liblrdhpo816.sl
;81=liblrdhpo81.sl
;80=liblrdhpo80.sl
Page 490 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
73=liblrdhpo73.sl
72=liblrdhpo72.sl
These settings indicate that Vusers should use the LoadRunner library liblrdhpo816.sl if the client uses Oracle 8.1.6, liblrdhpo81.sl for Oracle 8.1.5, and so on.
During replay on Linux, the settings in the lrd ini file must indicate the correct version of the database to use. Suppose it is necessary to replay a Vuser for HP/UX using Oracle 8.1.5. In that case the previous lines for other versions of Oracle should be commented out with a ";" at the beginning of the line.
This section of the lrd.ini file will now look like:
[ORACLE_HPUX]
;816=liblrdhpo816.sl
81=liblrdhpo81.sl
;80=liblrdhpo80.sl
73=liblrdhpo73.sl
72=liblrdhpo72.sl
You also may need to make a change for Win32 if the application does not use the DLL mentioned in the lrd.ini file. For example, PowerBuilder 6.5 uses Oracle 8.0.5, but it uses the ora803.dll, not the ora805.dll. In that case, either comment out the 805 and 804 sections of the ORACLE_WINNT section, or change the 805 section from:
805=lrdo32.dll+ora805.dll
to
805=lrdo32.dll+ora803.dll
Enterprise Java Beans (EJB) Protocol
EJB Testing Overview
VuGen provides several tools for developing a script that tests Java applications. For generating a
Vuser script through recording, use the Java Record and Replay Vuser. For creating a script through programming, use the Custom Java Vuser type.
EJB Testing Vusers differ from the standard Java Vusers in that VuGen automatically creates a script to test or tune EJB functionality without recording or programming. Before you generate a script, you specify the JNDI properties and other information about your application server.
VuGen's EJB Detector scans the application server and determines which EJBs are available. You select the EJB that you want to test or tune, and VuGen generates a script that emulates each of the EJB's methods.
It creates transactions for each method so that you can measure its performance and locate problems. In addition, each method is wrapped in a try and catch block for exception handling.
Note that in order to create EJB testing scripts, the EJB Detector must be installed and active on the application server host. The Detector is described in the following sections.
Page 491 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
VuGen also has a built-in utility for inserting methods into your script. Using this utility, you display all of the available packages, select the desired methods, and insert them into your script. For more information, see
"How to Run an EJB Vuser Script" on page 496 .
EJB Detector Output and Log Files
You can examine the output of the EJB Detector to see if it has detected all the active EJBs. The output log shows the paths being checked for EJBs. At the end of the scan, it displays a list of the
EJBs that were found, their names and locations. For example:
Checking EJB Entry: f:/weblogic/myserver/ejb_basic_beanManaged.jar...
Checking EJB Entry: f:/weblogic/myserver/ejb_basic_ statefulSession.jar...
Checking EJB Entry: f:/weblogic/myserver/ejb_basic_ statelessSession.jar...
------------------------- Found 3 EJBs ---------------------------
** PATH: f:/weblogic/myserver/ejb_basic_beanManaged.jar
- BEAN: examples.ejb.basic.beanManaged.AccountBean
** PATH: f:/weblogic/myserver/ejb_basic_statefulSession.jar
- BEAN: examples.ejb.basic.statefulSession.TraderBean
** PATH: f:/weblogic/myserver/ejb_basic_statelessSession.jar
- BEAN: examples.ejb.basic.statelessSession.TraderBean
If no EJBs were detected (that is, "Found 0 EJBs"), check that the EJB jar files are listed in the
"Checking EJB Entry:..." lines. If they are not listed, check that the search root dir path is correct. If they are being inspected but still no EJBs are detected, check that these EJB jar files are deployable (can be successfully deployed into an application server). A deployable jar file should contain the Home Interface, Remote Interface, Bean implementation, the Deployment Descriptor files (xml files, or .ser files), and additional vendor-specific files.
If you still encounter problems, set the debug properties in the detector.properties file, located in the DETECTOR_HOME\classes directory, to retrieve additional debug information.
After the EJBs are detected, the HTTP Server is initialized and waits for requests from the VuGen
EJB-Testing Vuser. If there are problems in this communication process, enable the property
webserver.enableLog in the webserver.properties file located in the DETECTOR_
HOME\classes directory.
This enables printouts of additional debug information, and other potentially important error messages in the webserver.log file.
How to Create an EJB Vuser Script
Creating an EJB Vuser Script differs from creating Vuser Scripts using other protocols. This task describes how to create an EJB Vuser Script.
1. Select File > New Script and Solution or click the New script button. The Create a New
Script dialog box opens.
Page 492 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
2. Select EJB (Enterprise Java Beans) from the Protocol list and then click Create. VuGen opens a blank EJB Vuser script.
3. Click Record > Record. The Generate EJB Script dialog box opens.
Page 493 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
4. Specify a machine on which VuGen's EJB Detector is installed. Note that the Detector must be running in order to connect. Click Connect. The JNDI properties section is enabled.
5. The EJB Detector automatically detects the default JNDI properties. You can manually modify these properties in the appropriate edit boxes. The properties you can modify are a string for the
Initial Context Factory and the Provider URL.
If your application server requires authentication, enter the user name in the Security Principal box and a password in the Security Credentials box.
Here are the default values of the two JNDI mandatory properties:
Type Initial Context Factory
WebLogic weblogic.jndi.
WLInitialContextFactory
WebSphere
3.x
com.ibm.ejs.ns.jndi.
CNInitialContextFactory
Provider URL
t3://<appserver_host>:7001 iiop://<appserver_host>:900
WebSphere
4.x
com.ibm.websphere.naming.
WsnInitialContextFactory iiop://<appserver_host>:900
Sun J2EE com.sun.enterprise.naming.
SerialInitContextFactory
N/A
Oracle com.evermind.server.
AppplicationClient
InitialContextFactory ormi://<appserver_host>/
<application_name> (the app.
name of the EJB in
<oc4j>/config/server.xml)
6. To set advanced properties for the JNDI, click Advanced to open the JNDI Advanced
Properties dialog box.
Page 494 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Specify the desired properties: Object Factory, State Factory, URL Package Prefixes,
Security Protocol, and Security Authentication. Click OK.
7. In the EJB section of the dialog box, click Select to select the EJB for which you want to create a test. A dialog box opens with a list of all the EJBs currently available to you from the application server.
8. Highlight the EJB you want to test and click Select.
9. In the Generate EJB Script dialog box, click Generate. VuGen creates a script with Java Vuser functions. The script contains code that connects to the application server and executes the
EJB's methods.
10. Save the script.
Page 495 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Note that you cannot generate test code for an additional EJB, within an existing script. To create a test for another EJB, open a new script and repeat steps 2-9.
How to Run an EJB Vuser Script
After you generate a script for your EJB testing, and make the necessary modifications, you are ready to run your script. The EJB script allows you to perform two types of testing: functional and load. The functional testing verifies that the EJB, functions properly within your environment. The load testing allows you to evaluate the performance of the EJB when executing many users at one time.
Run a functional test
1. Modify the default values that were automatically generated.
2. Insert value checks using the lr.value_check method. These methods were generated as comments in the script (see
"Invoking the EJB Methods" on page 503 ).
3. Insert additional methods, and modify their default values. For more information, see the section on inserting Java functions in
"Java Protocol" on page 517
.
4. Configure the Run-Time Settings. For more information, see
"Run-Time Settings" on page 346
.
5. Make sure you have a valid Java environment. For more information, see
"How to Set and
Verify the Java Environment" on page 498
.
6. Run the script. Click the Run button or select Replay > Run. View the Execution Log node to view any run-time errors. The execution log is stored in the mdrv.log file in the script's folder.
A Java compiler (Sun's javac), checks it for errors and compiles the script.
How to Install and Run the EJB Detector
This task describes how to install and run the EJB Detector. The EJB Detector is a separate agent that must be installed on each machine that is being scanned for EJBs. This agent detects the
EJBs on the machine. Before installing the EJB Detector, verify that you have a valid JDK environment on the machine.
1. Install the EJB Detector a. Verify that you have a valid JDK environment on the machine.
b. Create a home directory for the EJB Detector on the application server machine, or on the client machine (and mount the file systems as mentioned).
c. Unzip the <LR_root>\ejbcomponent\ejbdetector.jar file into the EJB Detector directory.
2. Run the EJB Detector
The EJB Detector must be running before you start the EJB script generation process in
VuGen. You can either run the EJB detector on the application server or on the client machine
(in this case, make sure to mount to the application server from the EJB Detector (client) machine, specify the mount directory in the search root directory, and change the generated script to connect to the mounted machine, instead of the local machine).
Page 496 of 1812 HP LoadRunner (11.50)
User Guide
VuGen n
To run the EJB Detector from the command line, see
"How to Run the EJB Detector from the command line" below
.
n
To run the EJB Detector from a batch file, see
"How to Run the EJB Detector from a batch file" below .
How to Run the EJB Detector from the command line
This task describes how to run the EJB Detector from the command line
1. Add the DETECTOR_HOME\classes and the DETECTOR_HOME\classes\xerces.jar to the
CLASSPATH environment variable.
2. If you are working with EJB1.0 (Weblogic 4.x, WebSphere 3.x), add the classes of EJBs that are being tested as well as the following vendor EJB classes to the CLASSPATH:
3. For WebLogic 4.x: <WebLogic directory>\lib\weblogicaux.jar
4. For WebSphere 3.x: <WebSphere directory>\lib\ujc.jar
5. If your EJBs use additional classes directory or .jar files, add them to the CLASSPATH.
6. Enter the following string in the command line: java EJBDetector [search root dir] [listen port]
search root dir
One or more directories or files in which to search for EJBs (separated by semicolons). Follow these guidelines:
BEA WebLogic Servers 4.x and 5.x. Specify the application server root directory.
BEA WebLogic Servers 6.x. Specify full path of the domain folder.
WebSphere Servers 3.x. Specify the full path of the deployed EJBs folder.
WebSphere Servers 4.0. Specify the application server root directory.
Oracle OC4J. Specify the application server root directory.
Sun J2EE Server. Specify the full path to the deployable .ear file or directory containing a number of .ear files.
If unspecified, the classpath will be searched.
listen port
The listening port of the EJB Detector. The default port is 2001. If you change this port number, you must also specify it in the Host name box of the Generate EJB
Test dialog box.
For example, if your host is metal, if you are using the default port, you can specify metal. If you are using a different port, for example, port 2002, enter metal:2002.
How to Run the EJB Detector from a batch file
You can launch the EJB detector using a batch file, EJB_Detector.cmd. This file resides in the root folder of the EJB Detector installation, after you unzip ejbdetector.jar.
Run the EJB Detector from a batch file
1. Open env.cmd in the EJB Detector root folder, and modify the following variables according to
Page 497 of 1812 HP LoadRunner (11.50)
User Guide
VuGen your environment:
JAVA_
HOME
The root folder of JDK installation
DETECTOR_
INS_DIR
The root folder of the Detector installation
The drive hosting the application server installation
APP_
SERVER_
DRIVE
APP_
SERVER_
ROOT
Follow these guidelines:
BEA WebLogic Servers 4.x and 5.x. Specify the application server root folder.
BEA WebLogic Servers 6.x. Specify full path of the domain folder.
WebSphere Servers 3.x. Specify the full path of the deployed EJBs folder.
WebSphere Servers 4.0. Specify the application server root folder.
Oracle OC4J. Specify the application server root folder.
Sun J2EE Server. Specify the full path to the deployable .ear file or folder containing a number of .ear files.
EJB_DIR_
LIST
(optional)
List of directories/files, separated by `;' and containing deployable .ear/.jar
files, and any additional classes folder or .jar files or used by your EJBs under test.
2. Save env.cmd.
3. If you are working with EJB1.0 (Weblogic 4.x, WebSphere 3.x), add the classes of EJBs that are being tested, as well as the following vendor EJB classes, to the CLASSPATH in the env file: n
For WebLogic 4.x: <WebLogic directory>\lib\weblogicaux.jar
n
For WebSphere 3.x: <WebSphere directory>\lib\ujc.jar
4. Run the EJB_Detector.cmd or EJB_Detector.sh (Linux platforms) batch file to collect information about the deployable applications containing EJBs, for example:
C:\>EJB_Detector [listen_port] where listen_port is an optional argument specifying a port number on which the EJB
Detector will listen for incoming requests (default is 2001).
How to Set and Verify the Java Environment
This task describes the methods of setting and verifying the java environment.
1. For Websphere 3.x users: a. Using the IBM JDK 1.2 or higher: o
Add the <WS>\lib\ujc.jar to the classpath.
Page 498 of 1812 HP LoadRunner (11.50)
User Guide
VuGen b. Using the Sun JDK 1.2.x: o
Remove the file <JDK>\jre\lib\ext\iiimp.jar
o
Copy the following files from the <WS>\jdk\jre\lib\ext folder to the <JDK>\jre\lib\ext directory: iioprt.jar, rmiorb.jar.
o
Copy the 'ujc.jar' from the <WS>\lib folder, to <JDK>\jre\lib\ext.
o
Copy the file <WS>\jdk\jre\bin\ioser12.dll to the <JDK>\jre\bin folder.
where <WS> is the home folder of the WebSphere installation and <JDK> is the home folder of the JDK installation.
Clear the Use -Xbootclasspath VM parameter check box to turn off this option.
2. For WebSphere 4.0 users:
Make sure that you have valid Java environment on your machine of IBM JDK1.3. Open the
Run-Time Settings dialog box and select the Java VM node. Add the following entries to the
Additional Classpath section:
<WS>/lib/webshpere.jar;
<WS>/lib/j2ee.jar;
Where <WS> is the home folder of the WebSphere installation.
Clear the Use -Xbootclasspath VM parameter check box to turn off this option.
Note: If your application server is installed on a Linux machine or if you are using
WebSphere 3.0.x, you must install IBM JDK 1.2.x on the client machine to obtain the required files.
3. For Oracle OC4J users:
Make sure that you have valid Java environment on your machine of JDK1.2 or higher (JDK1.3
preferable). Open the Run-Time Settings dialog box and select the Java VM node. Add the following entries to the Additional Classpath section:
<OC4J>/orion.jar;<OC4J>/ejb.jar;<OC4J>/jndi.jar; ;<OC4J>/xalan.jar;
<OC4J>/crimson.jar
where <OC4J> is the home folder of the application server installation.
4. For Sun J2EE users:
Make sure that you have valid Java environment on your machine of JDK1.2 or higher. Open the Run-Time Settings dialog box and select the Java VM node. Add the following entries to the Additional Classpath section:
<J2EE>/j2ee.jar;<AppClientJar> where <J2EE> is the home folder of the application server installation and <AppClientJar> is the full path to the application client jar file created automatically by the sdk tools during the deployment process.
5. For WebLogic 4.x - 5.x Users:
Page 499 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Make sure that you have valid Java environment on your machine (path =; classpath). Open the Run-Time Settings dialog box and select the Java VM node. Add the following two entries to the Additional Classpath section:
<WL>/classes;<WL>/lib/weblogicaux.jar
where <WL> is the home folder of the WebLogic installation.
6. For WebLogic 6.x and 7.0 users:
Make sure that you have valid Java environment on your machine (path =; classpath).
WebLogic 6.1 requires JDK 1.3. Open the Run-Time Settings dialog box and select the Java
VM node. Add the following entry to the Additional Classpath section:
<WL>/lib/weblogic.jar; // Weblogic 6.x
<WL>/server/lib/weblogic.jar // Weblogic 7.x
where <WL> is the home folder of the WebLogic installation.
Clear the Use -Xbootclasspath VM parameter check box to turn off this option.
Generate EJB Script Dialog Box
Enables you to begin recording an EJB script.
To Access
Relevant Tasks
File > New Script > EJB (Enterprise Java Beans)
"How to Install and Run the EJB Detector" on page 496
User interface elements are described below:
UI Element Description
Opens the JNDI Advanced Properties dialog box. Specify the desired properties.
Opens relevant recording options dialog box. For more information see
"Recording Options" on page 276 .
Connects to and disconnects from the server. You must be connect to the server to generate a script.
Generates the Vuser script.
Opens the Select EJB dialog box.
EJB Name
Host Name
The name of EJB for which you want to create a test.
The machine on which the EJB Detector is installed. The detector must be running in order to connect.
JNDI Properties
The EJB Detector automatically detects the default JNDI properties. You can manually modify these properties in the appropriate edit boxes. The
Page 500 of 1812 HP LoadRunner (11.50)
User Guide
VuGen properties you can modify are a string for the Initial Context Factory and the Provider URL.
EJB Vuser Script Examples
VuGen generates a script that tests your EJB, based on the JNDI (Java Naming and Directory
Interface) properties you specified when creating the Vuser script. JNDI is Sun's programming interface used for connecting Java programs to naming and folder services such as DNS and
LDAP.
Each EJB Vuser script contains three primary parts: l
Locating the EJB Home Using JNDI l
Creating an Instance l
Invoking the EJB Methods
Locating the EJB Home Using JNDI
The first section of the script contains the code that retrieves the JNDI properties. Using the specified context factory and provider URL, it connects to the application server, looks up the specified EJB and locates the EJB Home.
In the following example, the JNDI Context Factory is weblogic.jndi.WLInitialContextFactory, the
URL of the provider is t3://dod:7001 and the JNDI name of the selected EJB is carmel.CarmelHome.
public class Actions
{
public int init() {
CarmelHome _carmelhome = null;
try {
// get the JNDI Initial Context
java.util.Properties p = new java.util.Properties();
p.put(javax.naming.Context.INITIAL_CONTEXT_FACTORY,
"weblogic.jndi.WLInitialContextFactory");
p.put(javax.naming.Context.PROVIDER_URL, "t3://dod:7001");
javax.naming.InitialContext _context = new javax.naming.InitialContext(p);
// lookup Home Interface in the JNDI context and narrow it
Object homeobj = _context.lookup("carmel.CarmelHome");
_carmelhome =
(CarmelHome)javax.rmi.PortableRemoteObject.narrow(homeobj,
CarmelHome.class);
} catch (javax.naming.NamingException e) {
e.printStackTrace();
}
If the script is generated with an EJB Detector running on the client rather than an application server, you must manually modify the URL of the provider. For example, in the following line, the provider specifies dod as the EJB detector host name:
Page 501 of 1812 HP LoadRunner (11.50)
User Guide
VuGen p.put(javax.naming.Context.PROVIDER_URL, "t3://dod:7001")
Replace the recorded host name with the application server name, for example: p.put(javax.naming.Context.PROVIDER_URL, "t3://bealogic:7001")
You can specify the provider URL before recording, so you don't have to modify it manually, in the
JDNI Properties section of the Generate EJB Script dialog.
Creating an Instance
Before executing the EJB methods, the script creates a Bean instance for the EJB. The creation of the instance is marked as a transaction to allow it to be analyzed after the script is executed. In addition, the process of creating an instance is wrapped in a try and catch block providing exception handling.
For Session Beans. Use the EJB home 'create' method to get a new EJB instance.
In the following example, the script creates an instance for the Carmel EJB.
// create Bean instance
Carmel _carmel = null;
try {
lr.start_transaction("create");
_carmel = _carmelhome.create();
lr.end_transaction("create", lr.AUTO);
} catch (Throwable t) {
lr.end_transaction("create", lr.FAIL);
t.printStackTrace();
}
For Entity Beans - use the findByPrimaryKey method to locate the EJB instance in an existing database, and if not found, then use the create method, to create it there.
In the following example, the script attempts to locate an instance for the account EJB, and if it fails then creates it.
// find Bean instance try {
com.ibm.ejs.doc.account.AccountKey _accountkey = new com.ibm.ejs.doc.account.AccountKey();
_accountkey.accountId = (long)0;
lr.start_transaction("findByPrimaryKey");
_account = _accounthome.findByPrimaryKey(_accountkey);
lr.end_transaction("findByPrimaryKey", lr.AUTO);
} catch (Throwable thr) {
lr.end_transaction("findByPrimaryKey", lr.FAIL);
lr.message("Couldn't locate the EJB object using a primary key.
Attempting to manually create the object... ["+thr+"]");
// create Bean instance
try {
lr.start_transaction("create");
_account = _
Page 502 of 1812 HP LoadRunner (11.50)
User Guide
VuGen accounthome.create((com.ibm.ejs.doc.account.AccountKey)null);
lr.end_transaction("create", lr.AUTO);
} catch (Throwable t) {
lr.end_transaction("create", lr.FAIL);
t.printStackTrace();
}
}
You can use other find methods, supplied by your Entity Bean, to locate the EJB instance. For example:
// get an enumeration list of all Email EJB instances that represents
// the name 'John' in the database.
Enumeration enum = home.findByName("John");
while (enum.hasMoreElements()) {
...
Email addr = (Email)enum.nextElement();
}
Invoking the EJB Methods
The final part of the script contains the actual methods of the EJB. Each method is marked as a transaction to allow it to be analyzed after running the script. In addition, each method is wrapped in a try and catch block providing exception handling. When there is an exception, the transaction is marked as failed, and the script continues with the next method. VuGen creates a separate block for each of the EJB methods.
// ------- Methods ------------
int _int1 = 0;
try {
lr.start_transaction("buyTomatoes");
_int1 = _carmel.buyTomatoes((int)0);
//lr.value_check(_int1, 0, lr.EQUALS);
lr.end_transaction("buyTomatoes", lr.AUTO);
} catch (Throwable t) {
lr.end_transaction("buyTomatoes", lr.FAIL);
t.printStackTrace();
}
VuGen inserts default values for the methods, for example, 0 for an integer, empty strings ("") for
Strings, and NULL for complex Java objects. If necessary, modify the default values within the generated script.
_int1 = _carmel.buyTomatoes((int)
0);
The following example shows how to change the default value of a non-primitive type using parameterization:
Detail details = new Details(<city>,<street>,<zip>,<phone>);
JobProfile job = new JobProfile(<department>,<position>,<job_type>);
Employee employee=new Employee(<first>,<last>, details, job,
Page 503 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
<salary>);
_int1 = _empbook.addEmployee((Employee)employee);
For methods that return a primitive, non-complex value or string, VuGen inserts a commented method lr.value_check. This method allows you to specify an expected value for the EJB method.
To use this verification method, remove the comment marks (//) and specify the expected value.
For example, the carmel.buyTomatoes method returns an integer.
_int1 = _carmel.buyTomatoes((int)0);
//lr.value_check(_int1, 0, lr.EQUALS);
If you expect the method to return a value of 500, modify the code as follows:
_int1 = _carmel.buyTomatoes((int)0);
lr.value_check(_int1,
500, lr.EQUALS);
If you want to check if the method does not return a certain value, modify the code as follows:
_int1 = _carmel.buyTomatoes((int)0);
lr.value_check(_int1,
10, lr.NOT_EQUALS);
If the expected value is not detected, an exception occurs and the information is logged in the output window.
System.err: java.lang.Exception: lr.value_check failed.[Expected:500
Actual:5000]
EJB Vuser scripts support all of the standard Java conventions. For example, you can insert a comment by preceding the text with two forward slashes "//".
The Java Vuser script runs as a scalable multi-threaded application. If you include a custom class in your script, make sure that the code is thread-safe. Code that is not thread-safe may cause inaccurate results. For code that is not thread-safe, run the Java Vusers as processes. (see Run-
Time settings) This creates a separate Java Virtual Machine for each process, resulting in a script that is less scalable.
Flex (RTMP/AMF) Protocol
Flex Overview
Flex is a collection of technologies that provides developers with a framework for building RIAs
(Rich Internet Applications) based on the Flash Player.
RIAs are lightweight online programs that provide users with more dynamic control than with a standard Web page. Like Web applications built with AJAX, Flex applications are more responsive, because the application does not need to load a new Web page every time the user performs an action. However, unlike working with AJAX, Flex is independent of browser implementations such as JavaScript or CSS. The framework runs on Adobe's cross-platform Flash Player.
Flex applications consist of many MXML and ActionScript files. They are compiled into a single
SWF movie file which can be played by the Flash player installed on the client's browser.
Flex supports a variety of client/server communication methods, such as RPC, Data Management, and Real-Time messaging. It supports several data formats such as HTTP, AMF, and SOAP.
Page 504 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
VuGen lets you create a Vuser script that emulates communication with Flex 2 RPC services.
VuGen's Flex protocol lets you create scripts that emulate Flex applications working with AMF0 and AMF3 or HTTP data. For Flex applications working with SOAP data, use the Web Services
Vuser protocol.
Flex Correlations
Support for correlations has been added for the following steps: l flex_login l flex_logout l flex_ping l flex_amf_call l flex_remoting_call l flex_rtmp_tunnelled_connect l flex_rtmp_tunnelled_send
In addition, a new snapshot has been designed to show data in several views: l
Raw Data l
Response Body l
Request Body l
Header Body
If the Response Body and the Request Body are in XML format, the data can be displayed as: l
Text l
Hex l
XML
Support has been added for the following features:
Page 505 of 1812 HP LoadRunner (11.50)
User Guide
VuGen l
Correlations rules
DSid, jsessionid, and RTMPT ID have been added.
l
Correlations Studio
l
Manual correlation using the API web_reg_save_param_xpath.
For details, see
"How to Correlate Scripts Using Design Studio" on page 163
.
Code Generation Notification
If a Flex, Silverlight, or Java over HTTP script encounters an error during the code generation phase, VuGen automatically issues a warning. This warning appears in the Errors pane, when the
Warnings button is selected, and the Define Available Categories filter is set to All or Code
Generation Notification.The list of warnings displays details about each error, as well as recommended actions for resolving the problem. Follow the recommended actions and regenerate the script.
To manually open the Errors pane at any time, select View > Errors.
Parsing Responses in Flex Scripts
When generating a Flex script, LoadRunner attempts to parse responses for any of the following steps:
• flex_amf_call
• flex_remoting_call
• flex_login
• flex_logout
• flex_ping
If the parsing fails, the following attribute is dynamically added to the step:
IsParseResponse = No
This instructs LoadRunner not to parse the responses for that step during script replay. Every time you regenerate the script, LoadRunner will attempt to parse again, and will set this parameter to false if it fails. If needed, you can delete this line, or set the value to = 'Yes' to force LoadRunner to parse responses for that step during replay.
Additionally, you can manually add the attribute and set the value to 'No' in a generated script, even if the parse is successful, as it may enhance replay performance.
RTMP Tunneled
l
Messaging support. The Flex protocol now supports enhanced record and replay of messaging and has been verified for Adobe LiveCycle Data Services ES2 Version 3.1.
l
Streaming support. The Flex protocol now supports enhanced record and replay of streaming.
Page 506 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
When you record a Flex stream, by default, LoadRunner now generates a single flex_rtmp_
tunneled_send step in place of many flex_rtmp_tunneled_send steps. The flex_rtmp_ tunneled_send step makes your script more readable (eliminating tens or hundreds of lines) and makes the replay more reliable.
Note: The new flex_rtmp_tunneled_send step is generated when the Generate single
RTMP/T step option is selected in the Flex:RTMP pane of the Recording Options dialog box. Although this step makes the script more reliable, it does not replay certain actions you may perform while recording your script, such as pause and seek. It also does not replay the automatic requests that the client performs when Dynamic Stream is in use.
If it is important to replay these actions, you can clear the Generate single RTMP/T step option in the Flex:RTMP pane of the Recording Options dialog box, which causes LoadRunner to generate the steps for all of the raw streaming data.
However, to ensure proper replay, you must manually modify the generated script as described below in Manually Adjusting Recorded Flex RTMPTunneled Steps.
The above functionality has been verified for Flash Media Server versions 3.5 and 4.
l
Externalizable objects. LoadRunner supports externalizable objects over RTMP Tunneled.
l
User Data Points. LoadRunner now generates a number of new data points that provide more useful information for analysis.
l
The Flex RTMP-Tunneled protocol supports manual correlation using web_reg_save_param_
xpath API.
Manually Adjusting Recorded Flex RTMP Tunneled Steps
When the Generate single step for RTMP/T stream handling option is cleared in the
Flex:RTMP pane of the Recording Options dialog box, LoadRunner generates flex_rtmp_
tunneled_send step for every send request to the server. This ensures that user actions such as pause and seek, as well as automatic requests that the client performs when Dynamic Stream is in use, are included in the script. But this method also captures less-necessary lines of code that are difficult to read and may not be reliable during replay.
If you choose to clear the Generate single step for RTMP/T stream handling option in order to capture user data, follow the instructions below to remove the unnecessary steps from your script.
1. Search for the flex_rtmp_tunneled_send step containing the initial play argument. For example: flex_rtmp_tunneled_send("send_step2",
"SessionID=1",
"Snapshot=t36.inf",
MESSAGE,
...
...
MESSAGE,
...
...
"Argument=<arguments><string>play</string><number>0</number><null/>"
...
Page 507 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
LAST);
2. Remove certain flex_rtmp_tunneled_send steps that are not related to user actions, such as
"user control message" types. For example:
// flex_rtmp_tunneled_send("send_step3",
// "SessionID=10",
// "Snapshot=t15.inf",
// MESSAGE,
// "DataType=user control message",
// "EventType=set buffer length",
// "MessageStreamID=1",
// "BufferLength=100",
// LAST);
3. When you find a flex_rtmp_tunneled_send step that represents a user action that you want to keep in your script, do the following: a. Add ContinueToNexStepAfter = <msec> argument to the previous step.
ContinueToNexStepAfter = <msec> argument controls the minimum play duration of the stream to download before continuing to the next step. For example: flex_rtmp_tunneled_send("send_step2",
"SessionID=1",
"Snapshot=t36.inf",
//Read the stream until at least 15 seconds of media
//have been downloaded
"ContinueToNexStepAfter = 15000",
MESSAGE,
...
...
MESSAGE,
...
...
"Argument=<arguments><string>play</string><number>0</number><null/>"
...
LAST); b. Determine the flex_rtmp_tunneled_send steps that represent the user actions you want to keep. These will likely include arguments such as pauseRaw, pause, seek and play2 (for
Dynamic Stream). For example: flex_rtmp_tunneled_send("send_step5",
"SessionID=10",
"Snapshot=t16.inf",
MESSAGE,
"DataType=command message amf3",
"ChunkStreamID=8",
"MessageStreamID=1",
Page 508 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
"Argument=<arguments><string>pauseRaw</string><number>0</number><null/>"
"<boolean>true</boolean><number>12000</number></arguments>",
LAST); c. Determine whether there are some extra flex_rtmp_tunneled_send steps that you can remove. For example, if you dragged a button to seek in the stream, subtle jerks in the motion may be recorded as separate pause and seek actions. In these cases, may not need all of them. Keep only those that describe the desired operations.
4. Repeat steps 2 - 3 for each set of unnecessary send data and required user actions in your script.
For additional details on flex_rtmp_tunneled_send including a complete example, see the
Function Reference (Help > Function Reference).
Externalizable Objects in Flex Scripts
When recording a Flex application, information is usually passed between the client and server using known serialization methods (AMF). If this is the case, VuGen creates a flex_amf_call and both the request and response are parsed.
However, when a given AMF object uses a custom serialization method (externalizable), VuGen automatically issues a warning. This warning displays details about the exception, as well as recommended actions for resolving it.
The following are some examples of the exceptions that the generated script may include when an
AMF object uses a custom serialization method: l
Request and response not parsed. This exception is automatically displayed in the Errors pane when the Warnings button is selected, and the Define Available Categories filter is set to All or Code Generation Notification. Details about the exception are listed, as well as recommended actions. For details, see
"Errors Pane" on page 123
.
l
Request parsed but response is not parsed. VuGen generates a IsParseResponse=No statement. Additionally, VuGen issues a warning that is automatically displayed in the Errors pane when the Warnings button is selected, and the Define Available Categories filter is set to All or Code Generation Notification. The list of warnings displays details about the exception, as well as recommended actions. For details, see
"Errors Pane" on page 123 .
For details on configuring the Recording Options > Flex > Externalizable Objects Node, see
"Flex > Externalizable Objects Node (Recording)" on page 305
.
The following flowchart illustrates the steps to resolve externalizable objects in Flex scripts:
Page 509 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
For details on how to serialize externalizable objects, see: l
"Flex > Externalizable Objects Node (Recording)" on page 305
l
"How to Serialize Using External Java Serializer" on page 512
l
"How to Serialize Scripts with the LoadRunner Serializer" on page 513
How to Query an XML Tree
VuGen provides a Query Builder that lets you create and execute queries on the XML.
Page 510 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
VuGen displays the XML code in an expandable tree. You can perform a query on your XML document, and search for a specific Namespace URI, value, or attribute. Note that all queries are case-sensitive.
Perform a query
1. In the Snapshot pane, select on the node that you want to search. Click the Find XML button.
The Find XML dialog button opens.
2. Select Request or Response. Enter an XPath query and click OK. To formulate a query, click
Query Builder button. The XML Node Query dialog box opens.
3. Enable one or more items for searching.
Page 511 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
4. Enable the Name section to search for the name of a node or element.
5. Enable the Namespace URI section to search for a namespace.
6. Enable the Text section to search for the value of the element indicated in the Name box.
7. Enable the Attributes section to search for an attribute.
8. Enter the search text in the appropriate boxes. To add an attribute, click the Add button. The
Attribute Properties box opens. Enter an attribute name and value. Click OK.
9. Click OK in the XML Node Query dialog box. VuGen places the text of the query in the Find
XML box.
10. Click Find Next to begin the search.
How to Serialize Using External Java Serializer
You can use the Java classes from the Flex server to serialize AMF messages in your script. This process has been simplified so that you need to include the application JAR files only if the AMF objects implement an externalizable interface.
Handle externalizable objects using an external serializer
1. In the Recording Options > Flex > Externalizable Objects node, select Serialize objects
using and select Custom Java Classes from the drop-down menu.
2. Add the relevant files by using the Add all classes in folder buttons. Add the following files: or Add JAR or Zip file a. For Adobe BlazeDS or Adobe LCDS, add the following JAR files:
Page 512 of 1812 HP LoadRunner (11.50)
User Guide
VuGen o flex-messaging-common.jar
o flex-messaging-core.jar
b. Regenerate the script and note any errors. Open the recording options dialog box using the
Generation Options button and add the necessary application JAR files.
3. Ensure that the added files exist in the same location both on the VuGen machine and on all load generators.
Notes and Limitations for the Java Serializer
n
Supported JDK versions: 1.6 and earlier.
n
Supported servers: Adobe BlazeDS and Adobe Livecycle DS.
n
Microsoft .NET classes are not supported.
n
During code generation VuGen performs a validity test of the request buffers by verifying that the buffer can be read and written using the provided jars. Failure in this validity test indicates that the classes are incompatible with LoadRunner.
How to Serialize Scripts with the LoadRunner Serializer
You can attempt to serialize externalizable objects using the LoadRunner serializer. Ensure that you have saved all open scripts because this option may result in unexpected errors or invalid steps.
Use the LoadRunner serializer
1. Save all open scripts in VuGen.
2. In the Recording Options > Flex > Externalizable Objects node, select Serialize objects
using and select LoadRunner AMF serializer from the Reference
Flex AMF Example Scripts
In the following AMF0 example, the flex_amf_call function accesses a gateway and sends a message to the server.
flex_amf_call("EchoAny",
"Gateway=http://<host>/gateway.aspx",
"Snapshot=t1.inf",
"IsParseResponse=No",
MESSAGE,
"Method=EchoAMF.EchoAMF.EchoAny",
"TargetObjectId=/1",
BEGIN_ARGUMENTS,
"<boolean>true</boolean>",
END_ARGUMENTS,
LAST);
Page 513 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
In the following AMF3 example, the flex_remoting_call function sends the server an AMF call that can be serialized.
flex_remoting_call(
"product::getProductsByName",
URL=http://<HOST>:<PORT>/amf;jsessionid={CorrelationParameter}",
"Snapshot=t1.inf",
"IsParseResponse=No",
INVOCATION,
"Target=/2",
"Operation=getProductsByName",
"Destination=product",
"DSEndpoint=my-amf",
"DSId=8E3759E5-E51A-3906-0EAB-6119CD1E26BF",
"Argument="
"<arguments>"
"<string>A</string>"
LAST);
"</arguments>",
For detailed syntax information on these functions, see the Function Reference (Help > Function
Reference).
Setting the Flex Recording Mode
You can instruct VuGen how to generate a script from a Flash Remoting session using the Flex and
Web Protocols.
Example
Use Web HTTP technology to generate web_custom_request functions with the Flash Remoting information.
web_url("flash",
"URL=http://<HOST>:<PORT>/flash/",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
EXTRARES,
"Url=movies/XMLExample.swf", "Referer=", ENDITEM,
"Url=movies/JavaBeanExample.swf", "Referer=", ENDITEM,
LAST); web_link("Sample JavaBean Movie Source",
"Text=Sample JavaBean Movie Source",
"Snapshot=t2.inf",
EXTRARES,
"Url=XMLExample.swf", "Referer=", ENDITEM,
"Url=JavaBeanExample.swf", "Referer=", ENDITEM,
Page 514 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
LAST); web_custom_request("gateway",
"URL=http://<HOST>:<PORT>/flashservices/gateway",
"Method=POST",
"Resource=0",
"RecContentType=application/x-amf",
"Referer=",
"Snapshot=t3.inf",
"Mode=HTML",
"EncType=application/x-amf",
"BodyBinary=\\x00\\x00\\x00\\x01\\x00\\x10amf_server_ debug\\x01\\x00\\x00\\x00`\\x03\\x00\ncoldfusion\\x01\\x01\\x00\namfheaders\\x01\\x00\\x00\\x03amf\\x01\\x00\\x00\\x0Bhttpheaders\\x01\\x00\\x00\trecordset\\x01\\x01\\x00\\x05error\\x01\\x01\\x00\\x05trace\\x01\\x01\\x00\\x07m_ debug\\x01\\x01\\x00\\x00\t\\x00\\x01\\x00/flashgateway.samples.FlashJavaBean.testDocument\\x00\\x02/1\\x00\\x00\\x004\n\\x00\\x00\\x00\\x01\\x0F\\x00\\x00\\x00*<TEST message=\"test\"><INSIDETEST /></TEST>",
LAST);
Flex Functions and Examples
When you record a Flex application, VuGen generates Flex Vuser script functions that emulate your application. The following functions represent some of the Flex remoting steps:
Function Name
flex_amf_call flex_amf_define_envelope_ header_set flex_amf_define_header_set flex_login flex_logout flex_ping flex_remoting_call
Description
Sends an AMF request.
Defines a set of envelope headers.
Defines a set of AMF headers.
Logs on to a password-protected Flex application.
Logs off of a password-protected Flex application.
Checks if a Flex application is available.
Invokes one or more methods of a server-side Remote object (RPC).
Example:
In the following example, flex_ping checks for the availability of a service. The flex_remoting_call function invokes the service remotely.
flex_ping("1",
"URL=http://<HOST>/weborb.aspx",
"Snapshot=t6.inf",
LAST);
flex_remoting_call("getProductEdition::GenericDestination",
"URL=http://testlab1/weborb30/console/weborb.aspx",
"Snapshot=t1.inf",
INVOCATION,
Page 515 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
"Target=/2",
"Operation=getProductEdition",
"Destination=GenericDestination",
"DSEndpoint=my-amf",
"Source=Weborb.Management.LicenseService",
"Argument=<arguments/>",
LAST);
RTMP Functions
Function Name
flex_rtmp_connect
Description
Connects a client to an RTMP server and sets connection options.
flex_rtmp_disconnect
Disconnects a client from an RTMP server
flex_rtmp_receive_stream
Receives streaming data from an RTMP server
flex_rtmp_receive flex_rtmp_send
Receives responses from an RTMP server
Sends a request to an RTMP server
Example:
In the following example, flex_rtmp_receive receives data.
flex_rtmp_receive("recv_step0",
"ConnectionID=19",
"Snapshot=tRTMP44.inf",
CHANNEL,
"ChunkStreamID=2",
CHANNEL,
"ChunkStreamID=2",
LAST);
RTMP Tunneled Functions
Function Name Description
flex_rtmp_tunneled_connect
Connects a client to an RTMP server over HTTP.
flex_rtmp_tunneled_ disconnect
Disconnects a client from session over HTTP with an RTMP server
flex_rtmp_tunneled_send
Sends a request to an RTMP server over HTTP
Example:
In the following example, flex_rtmp_tunneled_send sends an RTMP tunneled request.
flex_rtmp_tunneled_send(
"send_step0",
"SessionID=0",
"Snapshot=t30.inf",
Page 516 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
MESSAGE,
"DataType=command message amf3",
"ChunkStreamID=3",
"MessageStreamID=0",
"Argument="
"<arguments>"
...
LAST);
"</arguments>",
For detailed syntax information about all of the Flex functions, see the Function Reference (Help >
Function Reference).
Java Protocol
Java Protocol Recording Overview
Using VuGen, you can record a Java application or applet. VuGen creates a pure Java script enhanced with Vuser API Java-specific functions. After recording, you can enhance or modify the script with standard Java code using JDK libraries or custom classes.
After you prepare your script, you run it in standalone mode from VuGen. Sun's standard Java compiler, javac.exe, checks the script for errors and compiles it. Once you verify that the script is functional, you incorporate it into a LoadRunner scenario or Business Process Monitor configuration.
When you create a script through recording and manual enhancements, all of the guidelines and limitations associated with Java Vuser scripts apply. In addition, any specific classes used in the script must be present on the machine executing the Vusers and indicated by the classpath environment variable. See
"Java Protocol - Manually Programming Scripts" on page 532
for important information about function syntax and system configuration.
Before recording a CORBA session, verify that your application or applet functions properly on the recording machine.
Make sure that you have properly installed a JDK version from Sun on the machine running
VuGen—JRE alone is insufficient. You must complete this installation before recording a script.
Verify that the classpath and path environment variables are set according to the JDK installation instructions.
Note: When you load an applet or application from VuGen during recording, it may take several seconds longer than if you were to load it independent of VuGen.
VuGen provides a tool that enables you to convert a Vuser script created for Web, into Java. For more information, see
"How to Convert Web Vuser Scripts into Java" on page 664
.
After recording, you can enhance or modify the script with standard Java code using JDK libraries or custom classes.
Page 517 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
After you prepare your script, you run it in standalone mode from VuGen. Sun's standard Java compiler, javac.exe, checks the script for errors and compiles it.
You integrate finished scripts into your environment: a LoadRunner scenario, Performance Center load test, or Business Process Monitor configuration. For more information, see the Function
Reference, Performance Center, or documentation.
Java Vuser Script Overview
When you record a session, VuGen logs all calls to the server and generates a script with functions.
These functions describe all of your actions within the application or applet. The script also contains supplementary code required for proper playback, such as property settings, and naming service initialization (JNDI).
The recorded script is comprised of three sections: l
Imports l
Code l
Variables
The Imports section is at the beginning of the script. It contains a reference to all the packages required for compiling the script. The Code section contains the Actions class and the recorded code within the init, actions, and end methods. The Variables section, after the end method, contains all the type declarations for the variables used in the code.
After you finish recording, you can modify the functions in your script, or add additional Java or
LoadRunner functions to enhance the script. Note that if you intend to run Java Vusers as threads, the Java code you add to your script must be thread-safe. For details about function syntax, see the
Function Reference (Help > Function Reference). In addition, you can modify your script to enable it to run as part of another package. For more information, see
"Compiling and Running a
Script as Part of a Package" on page 535
.
RMI over IIOP Overview
The Internet Inter-ORB Protocol (IIOP) technology was developed to allow implementation of
CORBA solutions over the World Wide Web. IIOP lets browsers and servers exchange complex objects such as arrays, unlike HTTP, which only supports transmission of text.
RMI over IIOP technology makes it possible for a single client to access services which were only accessible from either RMI or CORBA clients in the past. This technology is a hybrid of the JRMP protocol used with RMI and IIOP used with CORBA. RMI over IIOP allows CORBA clients to access new technologies such as Enterprise Java Beans (EJB) among other J2EE standards.
VuGen provides full support for recording and replaying Vusers using the RMI over IIOP protocol.
Depending on what you are recording, you can utilize VuGen's RMI recorder to create a script that will optimally emulate a real user: l
Pure RMI client. recording a client that uses native JRMP protocol for remote invocations l
RMI over IIOP client. recording a client application that was compiled using the IIOP protocol instead of JRMP (for compatibility with CORBA servers).
Page 518 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Corba Recording Options
For recording a CORBA session, you need to set the following options in the Recording Options: l
JNDI l
Use DLL hooking to attach VuGen support
CORBA Application Vendor Classes
Running CORBA applications with JDK1.2 or later, might load the JDK internal CORBA classes instead of the specific vendor CORBA classes. To force the virtual machine to use the vendor classes, specify the following java.exe command-line parameters:
Visigenic 3.4
-Dorg.omg.CORBA.ORBClass=com.visigenic.vbroker.orb.ORB
-Dorg.omg.CORBA.ORBSingletonClass=com.visigenic.vbroker.orb.
ORBSingleton
Visigenic 4.0
-Dorg.omg.CORBA.ORBClass=com.inprise.vbroker.orb.ORB
-Dorg.omg.CORBA.ORBSingletonClass=com.inprise.vbroker.orb.ORBSingleton
OrbixWeb 3.x
-Dorg.omg.CORBA.ORBClass=IE.Iona.OrbixWeb.CORBA.ORB
-Dorg.omg.CORBA.ORBSingletonClass=IE.Iona.OrbixWeb.CORBA.
singletonORB
OrbixWeb 2000
-Dorg.omg.CORBA.ORBClass=com.iona.corba.art.artimpl.ORBImpl
-Dorg.omg.CORBA.ORBSingletonClass=com.iona.corba.art.artimpl.
ORBSingleton
Recording RMI
Before recording an RMI session, verify that your application or applet functions properly on the recording machine.
Before you record, verify that your environment is configured properly. Make sure that the required classes are in the classpath and that you have a full installation of JDK. For more information on the required environment settings, see
"How to Manually Create a Java Script" on page 535
.
Recording a Jacada Vuser
The Jacada Interface Server provides an interface layer for mainframe applications. This layer separates the user interface from the application logic in order to insulate the organization from changes in standards and technologies. Instead of working with green-screen applications, the
Jacada server converts the environment to a user friendly interface.
VuGen records Jacada's Java thin-client. To record communication with the Jacada server through the HTML thin-client, use the Web HTTP/HTML type Vuser. For more information, see
"Web
Protocols" on page 655
Page 519 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Before replay, you must also download the clbase.jar file from the Jacada server. All classes used by the Java Vuser must be in the classpath—either set in the machine's classpath environment variable or in the Classpath Entries list in the Classpathnode of the Run-Time settings.
During replay, the Jacada server may return screens from the legacy system, in a different order than they appear in the recorded script. This may cause an exception in the replay. For information on how to handle these exceptions, contact HP support.
Working with CORBA
CORBA-specific scripts usually have a well-defined pattern. The first section contains the ORB initialization and configuration. The next section indicates the location of the CORBA objects. The following section consists of the server invocations on the CORBA objects. The final section includes a shutdown procedure which closes the ORB. Note that pattern is not mandatory and that each one of these sections may appear multiple times within a script.
In the following segment, the script initializes an ORB instance and performs a bind operation to obtain a CORBA object. Note how VuGen imports all of the necessary classes.
import org.omg.CORBA.*; import org.omg.CORBA.ORB.*; import lrapi.lr; public class Actions {
// Public function: init
public int init() throws Throwable {
// Initialize Orb instance...
MApplet mapplet = new MApplet("http://chaos/classes/", null);
orb = org.omg.CORBA.ORB.init(mapplet, null);
// Bind to server...
grid = grid_dsi.gridHelper.bind("gridDSI", "chaos");
return lr.PASS;
}
The org.omg.CORBA.ORB function makes the connection to ORB. Therefore, it should only be called once. When running multiple iterations, place this function in the init section.
In the following section, VuGen recorded the actions performed upon a grid CORBA object.
// Public function: action public int action() throws Throwable {
grid.width();
grid.height();
grid.set(2, 4, 10);
grid.get(2, 4);
return lr.PASS;
}
At the end of the session, VuGen recorded the shutdown of the ORB. The variables used throughout the entire recorded code appear after the end method and before the Actions class closing curly bracket.
Page 520 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
// Public function: end public int end() throws Throwable { if (lr.get_vuser_id() == -1) orb.shutdown(); return lr.PASS;
}
// Variable section org.omg.CORBA.ORB orb; grid_dsi.grid grid;
}
Note that the ORB shutdown statement was customized for this product. This customization prevents a single Vuser's shutdown from shutting down all other Vusers.
Working with RMI
This section describes the elements of the Java Vuser script that are specific to RMI. RMI does not have constructs (as in CORBA)—instead it uses Serializable Java objects. The first section performs a Naming Registry initialization and configuration. The next section is generated when
Java objects (both Remote and Serializable) are located and casted. The following section consists of the server invocations on the Java objects. In RMI there is no specific shutdown section (unlike
CORBA). Note that objects might appear multiple times within the script.
The following segment locates a naming registry. This is followed by a lookup operation to obtain a specific Java object. Once you obtain the object, you can work with it and perform invocations such as set_sum, increment, and get_sum. The following segment also shows how VuGen imports all of the necessary RMI classes.
:
:
Import java.rmi.*;
Import java.rmi.registry.*;
// Public function: action public int action() throws Throwable {
_registry = LocateRegistry.getRegistry("localhost",1099);
counter = (Counter)_registry.lookup("Counter1");
counter.set_sum(0);
counter.increment();
counter.increment();
counter.get_sum();
return lr.PASS;
}
:
When recording RMI Java, your script may contain several calls to lr.deserialize, which deserializes all of the relevant objects. The lr.deserialize calls are generated because the object being passed to the next invocation could not be correlated to a return value from any of the previous calls. VuGen therefore records its state and uses lr.deserialize call to represent these values during replay. The deserialization is done before VuGen passes the objects as parameters to
Page 521 of 1812 HP LoadRunner (11.50)
User Guide
VuGen invocations. For more information, see
"How to Correlate Scripts - Java Scripts - Serialization" on page 180 .
Working with Jacada
The Actions method of a Java Vuser script using Jacada, has two main parts: properties and body.
The properties section gets the server properties. VuGen then sets the system properties and connects to the Jacada server.
// Set system properties...
_properties = new Properties(System.getProperties());
_properties.put("com.ms.applet.enable.logging", "true");
System.setProperties(_properties);
_jacadavirtualuser = new cst.client.manager.JacadaVirtualUser(); lr.think_time(4);
_jacadavirtualuser.connectUsingPorts("localhost", 1100,
"LOADTEST", "", "", "");
...
The body of the script contains the user actions along with the exception handling blocks for the checkFieldValue and checkTableCell methods.
/* try { l...
_jacadavirtualuser.
checkFieldValue(23, "S44452BA");
}catch(java.lang.Exception e) { lr.log_message(e.getMessage());
}
*/ l...
/* try {
_jacadavirtualuser.
checkTableCell(41, 0, 0, "");
}catch(java.lang.Exception e) { lr.log_message(e.getMessage());
}
*/ l...
The checkField method has two arguments: field ID number and expected value. The
checkTableCell method has four arguments: table ID, row, column, and expected value. If there is a mismatch between the expected value and the received value, an exception is generated.
By default, the try-catch wrapper blocks are commented out. To use them in your script, remove the comment markers.
In addition to the recorded script, you can add any of the Java Vuser API functions. For a list of these functions and information on how to add them to your script, see
"Java Protocol - Manually
Programming Scripts" on page 532
Page 522 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Java Custom Filters - Overview
This section describes the background information necessary to create custom Java filters. For task details, see
"How to Create a Custom Java Filter" on page 529
.
When testing your Java application, your goal is to determine how the server reacts to client requests. When load testing, you want to see how the server responds to a load of many users.
With VuGen's Java Vuser, you create a script that emulates a client communicating with your server.
VuGen provides filter files that define hooking properties for commonly used methods. There are filter definitions for RMI, CORBA, JMS, and JACADA protocols. You can also define custom filters.
When you record a method, the methods which are called from the recorded method either directly or indirectly, will not be recorded.
In order to record a method, VuGen must recognize the object upon which the method is invoked, along with the method's arguments. VuGen recognizes an object if it is returned by another recorded method provided that: l the construction method of that object is hooked.
l it is a primitive or a built-in object.
l
It supports a serializable interface.
You can create a custom filter to exclude unwanted methods. When recording a Java application, your script may include calls to methods that do not affect the server, such as calls to a local utility or the GUI interface. These calls are usually not relevant to your testing goals, and it would be correct to filter them out.
The built-in filters for RMI, CORBA, JMS, and JACADA protocols were designed to record only the server related traffic relevant to your testing goals. In some instances, however, you may need to customize filters to capture your JAVA application's calls or exclude unnecessary calls. Custom
JAVA protocols, proprietary enhancements and extensions to the default protocols, and data abstraction all require a custom filter definition.
Before creating a test, we recommend that you become familiar with your application and determine its primary classes and methods, so that you will know which ones to include in your recording.
If you are not familiar with your application's classes, VuGen allows you to record with a stack trace that logs all of the methods that were called by your application. In order to record with stack trace set the log level to Detailed.
Java Custom Filters - Determining which Elements to
Include
When designing a custom filter, we recommend that you start by choosing the appropriate built-in filter as a base filter. You can then customize the filter using one of the following approaches: l
Top Down Approach. An approach in which you include the relevant package and exclude
Page 523 of 1812 HP LoadRunner (11.50)
User Guide
VuGen specific classes that are not part of the client-server activity. This is recommended if you are familiar with your application and you can identify a well-defined layer which implements all client-server activity without involving any GUI elements.
l
Bottom up Approach. An approach in which you use the default filter and refine it by adding individual methods or classes. Use this approach if you cannot identify a well-defined layer or if you are not familiar with your application. Do not add all AUT packages and then try to remove extra component one by one.
The following section provides guidelines on when to include or exclude elements.
l
If, as a result of your including a class, your script has many unrelated method calls, try modifying the filter to exclude the irrelevant methods.
l
If you identify a non-client/server call in your script, exclude its method in the filter.
l
During recording, VuGen may detect an unknown input argument, for example, an argument whose construction it had never encountered before. If this argument supports serialization,
VuGen serializes it by saving it to a file in a special format. During replay, VuGen reconstructs the argument by deserializing it.
l
VuGen serializes objects passed as arguments that were not included by the filter. We recommend that you include this object in the filter in order to track its construction and activity instead of using it in its serialized form. You can identify serialized objects in the script by searching for calls to the lr.deserialize() method in your script. For more information see
"How to Correlate Scripts - Java Scripts - Serialization" on page 180
.
l
Exclude all activity which involves GUI elements.
l
Add classes for utilities that may be required for the script to be compiled.
How to Record a Java Vuser Script
This task describes how to record a Java vuser script.
1. Prerequisites
Make sure that you have properly installed a JDK version from Sun on the machine running the
Vusers—JRE alone is insufficient. Verify that the classpath and path environment variables are set according to the JDK installation instructions. Before you replay a Vuser script, verify that your environment is configured properly for the JDK and relevant Java classes.
2. Create a new Java Record Replay Protocol script
Select File > New and select JAVA Record Replay from the Java category.
3. Complete the Start Recording dialog box
Enter the details of your application in the Start Recording dialog box. For user interface details, see
"Record Dialog Box" on page 140 .
4. Set the Recording Options
In the Start Recording dialog box, click Options to open the Recording Options dialog box. In the Recorder Options node, the Recorded Protocol field configures the main protocol you will be recording. If you are recording more than one Java protocol, enter the additional
Page 524 of 1812 HP LoadRunner (11.50)
User Guide
VuGen protocols in the Extension List field.
How to Record Java Scripts Using Windows XP and 2000
Server
When recording on Windows XP and Windows 2000 servers, the Java plug-in may be incompatible with VuGen's recorder. To insure proper functionality, perform the following procedure after the installation of the java plug-in, before recording a script.
Configure your machine for recording CORBA or RMI sessions
1. Open the Java Plug-in from the Control Panel. Select Start > Settings > Control Panel and open the Java Plug-in component. The Basic tab opens.
2. Clear the Enable Java Plug-In check box and click Apply. Then, reselect the Enable Java
Plug-In check box and click Apply.
3. Open the Browser tab. Clear the Microsoft Internet Explorer check boxand click Apply.
Then, reselect the Microsoft Internet Explorer check box and click Apply.
How to Run a Script as Part of a Package
This section is not relevant for Jacada type scripts.
When creating or recording a Java script, you may need to use methods from classes in which the method or class is protected. When attempting to compile such a script, you receive compilation errors indicating that the methods are not accessible.
To use the protected methods, add the Vuser to the package of required methods. At the beginning of your script, add the following line: package a.b.c; where a.b.c represents a folder hierarchy. VuGen creates the a/b/c folder hierarchy in the user folder and compiles the Actions.java file there, thus making it part of the package. Note that the
package statement is not recorded—you need to insert it manually.
How to Manually Insert Java Methods
You use the Java Function navigator to view and add Java functions to your script. You can customize the function generation settings by modifying the configuration file. For more information, see
"General > Script Node" on page 309
.
Insert Java functions
1. Click within your script at the desired point of insertion.
2. Select Insert > Insert Java Function. The Insert Java Function dialog box opens. The lower part of the dialog box displays a description of the Java object.
3. Click Locations. The Locations dialog box opens. By default, VuGen lists the paths defined in the CLASSPATH environment variable.
Page 525 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
4. Click Browse to add another path or archive to the list. To add a path, select Browse >
Folder. To add an archive (jar or zip), select Browse > File. When you select a folder or a file,
VuGen inserts it in the Add Location box.
5. Click Add to add the item to the list.
6. Repeat steps 4 and 5 for each path or archive you want to add.
7. Select or clear the check boxes to the left of each item in the list. If an item is checked, its members will be listed in the Java Class navigator.
8. Click OK to close the Locations dialog box and view the available packages.
9. Click the plus and minus signs to the left of each item in the navigator, to expand or collapse the trees.
10. Select an object and click Paste. VuGen places the object at the location of the cursor in the script. To paste all the methods of a class into your script, select the class and click Paste.
11. Repeat the previous step for all of the desired methods or classes.
12. Modify the parameters of the methods. If the script generation setting DefaultValues is set to
true, you can use the default values inserted by VuGen. If DefaultValues is set to false, you must add parameters for all methods you insert into the script.
In addition, modify any return values. For example, if your script generated the following statement "(String)=LavaVersion.getVersionId();", replace (String) with a string type variable.
13. Add any necessary statements to your script such as imports or Vuser API Java functions
Page 526 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
(described in
"Java Protocol - Manually Programming Scripts" on page 532
).
14. Save the script and run it from VuGen.
How to Manually Configure Script Generation Settings
You can customize the way the navigator adds methods to your script.
To view the configuration setting, open the jquery.ini file in VuGen's dat folder.
[Display]
FullClassName=False
[Insert]
AutoTransaction=False
DefaultValues=True
CleanClassPaste=False
Class Name Path
The FullClassName option displays the complete package and class name in the Java Function navigator. This option does not affect the way the functions are added into the script—it only affects the way the classes are displayed in the navigator. By default, this option is set to false. If your packages have many classes and you are unable to view the package and class names at the same time, you should enable this option.
FullClassName enabled FullClassName disabled
Automatic Transactions
The AutoTransaction setting creates a Vuser transaction for all methods. When you enable this option, VuGen automatically encloses all Java methods with lr.start_transaction and lr.end_
transaction functions. This allows you to individually track the performance of each method. This option is disabled by default.
Page 527 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Default Parameter Values
The DefaultValues setting includes default values for all methods you paste into your script. This option is enabled by default and inserts a null for all objects. If you disable this option, you must manually insert parameter values for all functions in the script. The following table illustrates the
DefaultValues flag enabled and disabled.
DefaultValues enabled
lr.message((String)"");
lr.think_time((int)0);
lr.enable_
redirection((boolean)false);
lr.save_data((byte[])null,
(String)"");
DefaultValues disabled
lr.message((String));
lr.think_time((int));
lr.enable_
redirection((boolean));
lr.save_data((byte[]),
(String));
Class Pasting
The CleanClassPaste setting pastes a class so that it will compile cleanly: with an instance returning from the constructor, with default values as parameters, and without a need for import statements. Using this option, you will most likely be able to run your script without any further modifications. If you disable this option (default), you may need to manually define parameters and include import statements. Note that this setting is only effective when you paste an entire class into your script—not when you paste a single method.
The following segment shows the toString method pasted into the script with the CleanClassPaste option enabled.
_class.toString();
// Returns: java.lang.String
The same method with the CleanClassPaste option disabled is pasted as follows:
(String) = toString();
Page 528 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
The next segment shows the NumInserter Constructor method pasted into the script with the
CleanClassPaste option enabled.
utils.NumInserter _numinserter = new utils.NumInserter
((java.lang.String)"", (java.lang.String)"",
(java.lang.String)""...);
// Returns: void
The same method with the CleanClassPaste option disabled is pasted as: new utils.NumInserter((String)"", (String)"", (String)"",...);
How to Create a Custom Java Filter
This task describes how to create a custom Java filter. For background information, see
"Java
Custom Filters - Overview" on page 523
.
For details of the Hook File structure, see
"Hook File Structure" on next page
.
When preparing a script, you may need to customize the filter several times in order to achieve the optimal filter. An optimal filter records the relevant methods without introducing a large number of irrelevant calls to the script.
Note: If you plan to add manual code to your script such as control flow or message statements, make sure to do so after you have a functional script that runs inside VuGen. The reason for this, is that if you rerecord a script after modifying the filters, it will overwrite all manual changes.
Define a custom java filter
1. Create a new filter based on one of the built-in filters by modifying the user.hooks file which is located in the product's classes folder. For structural details about the user.hook file, see
"Hook File Structure" on next page .
2. Open the Recording Options (Ctrl+F7) and select the Log Options node. Select the Log Level to Detailed.
3. Record your application. Click Start Record (Ctrl + R) to begin and Stop (Ctrl + F5) to end.
4. View the script's steps. If you can determine the business logic from the steps and apply correlation, you may not need to create custom filters. If, however, the script is very long or hard to maintain and correlate, you should customize the script's filter.
5. Try to identify the high-level method in the call that captures or wraps one or more client server calls. You can do this by opening the AUT source files (if they are available) or by viewing a
Stack Trace of the script.
6. Set the filter to include the relevant methods. For more information, see
"Java Custom Filters -
Determining which Elements to Include" on page 523 .
7. Record the application again. You should always rerecord the application after modifying the filter.
8. Repeat steps 4 through 7 until you get a simple script which can be maintained and correlated.
Page 529 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
9. Correlate the script. In order for your test to run properly, you may need to insert a correlation to capture a value and use it at a later point in the script. For more information about the built-in correlation mechanism, see
"How to Correlate Scripts - Java Scripts - Serialization" on page
180
and
"How to Correlate Scripts - Java Scripts - Serialization" on page 180 .
Note: Do not modify any of the other .hooks file as it might damage the VuGen recorder.
Adding custom hooks to the default recorder is a complicated task and should be considered thoroughly as it has both functional and performance consequences.
Incorrect hooking definitions can lead to incorrect scripts, slow recording, and application freeze-up.
Hook File Structure
The following section describes the structure of a typical .hooks file:
[Hook-Name] class = MyPackage.MyClass
method = MyMethod signature = ()V ignore_cl = ignore_mtd = ignore_tree = cb_class = mercury.ProtocolSupport
cb_mtd = general_cb = true deep_mode = soft | hard make_methods_public = true | false lock = true | false
The hook files are structured as .ini files where each section represents a hook definition. Regular expressions are supported in some of the entries. Any entry that uses regular expression must start with a '!'.
Hook-Name
Specifies the name of this section in the hooks file. Hook-Name must be unique across all hooks files. A good practice is to give the fully qualified class name and method. For example:
[javax.jms.Queue.getQueueName]
Class
A fully qualified class name. Regular expression can be used to include several classes from the same package, a whole package, several packages, or any class that matches a name. For example:
Class = !javax\.jms\.*
Method
The simple name of the method to include. Regular expressions can be used to include more than one method from the class. For example:
Page 530 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Method = getQueueName
Signature
The standard Java internal type signature of the method. To determine the signature of a method, run the command javap -s class-name where class name is the fully qualified name of the class. Regular expressions can be used to include several methods with the same name, but with different arguments. For example:
Signature = !.* ignore_cl
A specific class to ignore from the classes that match this hook. This can be a list of comma separated class names. Each item in the list can contain a regular expression. If an item in the list contains a regular expression, prepend a '!' to the class name. For example:
Ignore_cl = !com.hp.jms.Queue,!com\.hp\..* ignore_mtd
A specific method to ignore. When the loaded class method matches this hook definition, this method will not be hooked. The method name must be the simple method name followed by the signature (as explained above). To ignore multiple methods, list them in a comma separated list. To use a regular expression, prepend a '!' to the method name. For example:
Ignore_cl = open, close ignore_tree
A specific tree to ignore. When the name of the class matches the ignore tree expression, any class that inherits from it will not be hooked, if it matches this hooks definition. To ignore multiple trees, list them in a comma separated list. To use a regular expression, prepend a '!' to the class name.
This option is relevant only for hooks that are defined as deep.
cb_class
The callback class that gets the call from the hooked method. It should always be set to
mercury.ProtocolSupport.
cb_mtd
A method in the callback class that gets the call from the hooked method. If omitted, it uses the default, general_rec_func. For cases where you just need to lock the subtree of calls, use
general_func instead.
general_cb
The general callback method. This value should always be set to true.
Deep_mode
Deep mode refers to classes and interfaces that inherit or implement the class or interface that the hook is listed for. The inherited classes will be hooked according to the type of hook: Hard, Soft, or
Off.
l
Hard. Hooks the current class and any class that inherits from it. If regular expressions exist, they are matched against every class that inherits from the class in the hook definition. Interface
Page 531 of 1812 HP LoadRunner (11.50)
User Guide
VuGen inheritance is treated the same as class inheritance.
l
Soft. Hooks the current class and any class that inherits from it, only if the methods are overridden in the inheriting class. If the hook lists an interface, then if a class implements this interface those methods will be hooked. If they exist in classes that directly inherit from that class they will also be hooked. However, if the hook lists an interface and a class implements a second interface that inherits from this interface, the class will not be hooked.
Note: Regular expressions are not inherited but converted to actual methods.
l
Off. Only the class listed in the hook definition and the direct inheriting class will be hooked. If the hook lists an interface, only classes that directly implement it will be hooked.
make_methods_public:
Any method that matches the hook definition will be converted to public. This is useful for custom hooks or for locking a sub tree of calls from a non-public method.
Note that this applies only during record. During replay, the method will use the original access flags. In the case of non-public methods, it will throw java.lang.VerifyError.
Lock
When set to true, it locks the sub tree and prevents the calling of any method originating from the original method.
When set to false, it will unlock the sub tree, record any method originating from the current method
(if it is hooked), and invoke the callback.
Java Icon Reference List
The following table describes the icons that represent the various Java objects:
Icon Item
Package
Class
Example java.util
public class Hashtable extends java.util.Dictionary
implements java.lang.Cloneable, java.io.Serializable
public interface Enumeration Interface Class
(gray icon)
Method
Static Method
(yellow icon)
Constructor Method public synchronized java.util.Enumeration keys () public static synchronized java.util.TimeZone
getTimeZone public void Hashtable ()
Java Protocol - Manually Programming Scripts
Page 532 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Manually Programming Java Scripts - Overview
To prepare Vuser scripts using Java code, use the Java type Vusers. This Vuser type supports
Java on a protocol level. The Vuser script is compiled by a Java compiler and supports all of the standard Java conventions. For example, you can insert a comment by preceding the text with two forward slashes "//".
"Java Protocol" on page 517
explains how to create a script through recording using the Java
Record Replay Vuser. To prepare a Java coded script through programming, see the following sections.
The first step in creating a Java compatible Vuser script, is to create a new Vuser script template of the type Java Vuser. Then, you program or paste the desired Java code into the script template.
You can add Java Vuser functions to enhance the script and parameterize the arguments to use different values during iterations.
The Java Vuser script runs as a scalable multi-threaded application. If you include a custom class in your script, make sure that the code is thread-safe. Code that is not thread-safe may cause inaccurate results. For code that is not thread-safe, run the Java Vusers as processes. This creates a separate Java Virtual Machine for each process, resulting in a script that is less scalable.
After you prepare a script, run it as a standalone test from VuGen. A Java compiler (Sun's javac), checks it for errors and compiles the script.
After you create a script, you integrate it into your environment: a LoadRunner scenario,
Performance Center load test, or Business Process Monitor configuration. For more information, see the Function Reference, Performance Center, or documentation.
Java Protocol Programming Tips
When programming a Java Vuser script, you can paste ready-made code segments into scripts or import ready-made classes in order to invoke their methods. If Vusers need to run as threads under the Controller (for scalability reasons), you need to make sure that all of the imported code is threadsafe.
Thread-safety is often difficult to detect. A Java Vuser may run flawlessly under VuGen and under the Controller with a limited number of Vusers. Problems occur with a large number of users. Code that is not thread-safe is usually the result of static class member usage as shown in the following example: import lrapi.*; public class Actions
{
private static int iteration_counter = 0;
public int init() {
return 0;
}
public int action() {
iteration_counter++;
return 0;
}
public int end() {
Page 533 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
lr.message("Number of Vuser iterations: "+iteration_counter);
return 0;
}
}
When you run one Vuser, the iteration_counter member determines the number of iterations that were executed. When multiple Vusers run together as threads on a single virtual machine, the static class member iteration_counter is shared by all threads, resulting in an incorrect counting. The total number of all Vusers iterations is counted.
If code is known to be non thread-safe and you still want to import it into your script, you can run the
Vusers as processes. For more information on running Vusers as threads or processes, see
"Run-
Time Settings" on page 346
When you run a basic Java Vuser script, it usually consists of a single thread—the main thread.
Only the main thread can access the Java Vuser API. If a Java Vuser spawns secondary worker threads, using the Java API may cause unpredictable results. Therefore, we recommend that you use the Java Vuser API only in the main thread. Note that this limitation also affects the lr.enable_
redirection function.
The following example illustrates where the LR API may and may not be used. The first log message in the execution log indicates that the value of flag is false. The virtual machine then spawns a new thread set_thread. This thread runs and sets flag to true, but will not issue a message to the log, even though the call to lr.message exists. The final log message indicates that the code inside the thread was executed and that flag was set to true.
boolean flag = false; public int action() {
lr.message("Flag value: "+flag);
Thread set_thread = new Thread(new Runnable();{
public void run() {
lr.message("LR-API NOT working!");
try {Thread.sleep(1000);} catch(Exception e) {}
flag = true;
}
});
set_thread.start();
try {Thread.sleep(3000);} catch(Exception e) {}
lr.message("Flag value: "+flag);
return 0;
}
Running Java Vuser Scripts
Java Vuser scripts differ from C Vuser scripts in that they are first compiled and then executed; C
Vuser scripts are interpreted. VuGen locates the javac compiler from within the JDK installation and compiles the Java code inside the script. This stage is indicated by the Compiling... status message in the bottom of the VuGen window. If errors occur during compilation, they are listed in the execution log. To go to the code in your script that caused the error, double-click on the error message containing the line number of the error. Fix the error and run the script again.
Page 534 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
If the compilation succeeds, the status message Compiling... changes to Running... and VuGen begins to execute the script. When you run the script again, VuGen runs the script without recompiling it, provided that no changes were made to the script. To debug your script further, you can use breakpoints and animated run type execution using the step option.
Note: If you are making calls to JNDI extensions within your script, you may encounter problems trying to run your Vusers as threads. This happens because JNDI requires each thread to have its own context class loader. In order to run as threads, instruct each Vuser to run with its own context class loader, by adding the following line to the beginning of the init section:
DummyClassLoader.setContextClassLoader();
Compiling and Running a Script as Part of a Package
When creating a Java Vuser script, you may need to use methods in other classes in which the class or method is protected. If you try to compile this type of script, you will receive errors in the compilation stage indicating that the methods are inaccessible. To make sure that your script can access these methods, insert the package name containing these methods at the top of the script, just as you would do in a standard Java program— <package_name>. In the following example, the script defines the just.do.it package which consists of a path: package my.test; import lrapi.*; public class Actions
{
:
}
In the above example, VuGen automatically creates the my/test folder hierarchy under the Vuser folder, and copies the Actions.java file to my/test/Actions.java, allowing it to compile with the relevant package. Note that the package statement must be the first line in the script, similar to
Java (excluding comments).
How to Manually Create a Java Script
This task describes how to manually create and edit a custom Java script.
1. Create a new script a. Open VuGen.
b. Select File > New or click the New button. The New Virtual User dialog box opens.
c. Select Custom > Java Vuser from the Select Vuser type list, and click OK. VuGen displays a blank Java Vuser script.
d. Click the Actions section in the left frame to display the Actions class.
2. Insert your code into the script
After generating an empty template, you can insert the desired Java code. When working with
Page 535 of 1812 HP LoadRunner (11.50)
User Guide
VuGen this type of Vuser script, you place all your code in the Actions class. To view the Actions class, click Actions in the left pane. VuGen displays its contents in the right pane.
import lrapi.*; public class Actions
{
public int init() {
return 0;
}
public int action() {
return 0;
}
public int end() {
return 0;
}
}
The Actions class contains three methods: init, action, and end. The following table shows what to include in each method and when each method is executed.
Script method
init action end
Used to emulate...
a login to a server client activity a log off procedure
Is executed when...
the Vuser is initialized (loaded) the Vuser is in "Running" status the Vuser finishes or is stopped
Init Method
Place all the login procedures and one-time configuration settings in the init method. The init method is only executed once—when the Vuser begins running the script. The following sample init method initializes an applet. Make sure to import the org.omg.CORBA.ORB function into this section, so that it will not be repeated for each iteration.
import org.omg.CORBA.*; import org.omg.CORBA.ORB.*; import lrapi.lr;
// Public function: init public int init() throws Throwable {
// Initialize Orb instance...
MApplet mapplet = new MApplet("http://chaos/classes/", null);
orb = org.omg.CORBA.ORB.init(mapplet, null);
...
Action Method
Place all Vuser actions in the action method. The action method is executed according to the number of iterations you set in the runtime settings. For more information on the iteration settings, see
"Run-Time Settings" on page 346
The following sample action method retrieves and prints the Vuser ID.
Page 536 of 1812 HP LoadRunner (11.50)
User Guide
VuGen public int action() {
lr.message("vuser: " + lr.get_vuser_id() + " xxx");
return 0;
}
End Method
In the end method, place the code you want the Vuser to execute at the end of the script, such as logging off from a server, cleaning up the environment, and so forth.
The end method is only executed once—when the Vuser finishes running the script. In the following example, the end method closes and prints the end message to the execution log.
public int end() { lr.message("End"); return 0;
}
3. Insert additional LoadRunner API functions
VuGen provides a specific Java API for Java Vuser scripts. These functions are all static methods of the lrapi.lr class.
The Java API functions are classified into several categories: Transaction, Command Line
Parsing, Informational, String, Message, and Run-Time functions.
For further information about each of these functions, see the Function Reference (Help >
Function Reference). Note that when you create a new Java Vuser script, the import lrapi.* is already inserted into the script.
4. Insert additional Java functions
To use additional Java classes, import them at the beginning of the script as shown below.
Remember to add the classes folder or relevant jar file to the classpath. Make sure that the additional classes are thread-safe and scalable.
import java.io.*; import lrapi.*; public class Actions
{
...
}
5. Add script enhancements
You add script enhancements such as rendezvous points, transactions, and output messages.
For more information, see
"How to Enhance a Java Script" on next page
.
6. Set the Java environment
Before running your Java Vuser script, make sure that the environment variables, path and classpath, are properly set on all machines running Vusers: n
To compile and replay the scripts, you must have complete JDK installation, either version
1.1 or 1.2, or 1.3. The installation of the JRE alone is not sufficient. It is preferable not to
Page 537 of 1812 HP LoadRunner (11.50)
User Guide
VuGen have more than one JDK or JRE installation on a machine. If possible, uninstall all unnecessary versions.
n
The PATH environment variable must contain an entry for JDK/bin.
n
For JDK 1.1.x, the CLASSPATH environment variable must include the classes.zip path,
(JDK/lib subfolder) and all of the VuGen classes (classes subfolder).
n
All classes used by the Java Vuser must be in the classpath—either set in the machine's
CLASSPATH environment variable or in the Classpath Entries list in the Classpathnode of the Run-Time settings.
How to Enhance a Java Script
This task describes how to enhance custom Java scripts.
Inserting Transactions
You define transactions to measure the performance of the server. Each transaction measures the time it takes for the server to respond to specified requests. These requests can be short or complex tasks. When working with LoadRunner, you can analyze the performance per transaction during and after the scenario run, using online monitor and graphs.
You can also specify a transaction status: lr.PASS or lr.FAIL. You can let the Vuser automatically determine if the transaction was successful, or you can incorporate it into a conditional loop. For example, in your code you can check for a specific return code. If the code is correct, you issue a lr.PASS status. If the code is wrong, you issue an lr.FAIL status.
Mark a transaction
1. Insert lr.start_transaction into the script, at the point where you want to begin measuring the timing of a task.
2. Insert lr.end_transaction into the script, at the point where you want to stop measuring the task. Use the transaction name as it appears in the lr.start_transaction function.
3. Specify the desired status for the transaction: lr.PASS or lr.FAIL.
public int action() { for(int i=0;i<10;i++)
{
lr.message("action()"+i);
lr.start_transaction("trans1");
lr.think_time(2);
lr.end_transaction("trans1",lr.PASS);
}
return 0;
}
Inserting Rendezvous Points
The following section does not apply to the HP Business Availability Center.
To emulate heavy user load on your client/server system, you synchronize Vusers to perform a task at exactly the same moment by creating a rendezvous point. When a Vuser arrives at the rendezvous point, it is held by the Controller until all Vusers participating in the rendezvous arrive.
Page 538 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
You designate the meeting place by inserting a rendezvous function into your Vuser script.
Insert a Rendezvous Point l
Insert an lr.rendezvous function into the script, at the point where you want the Vusers to perform a rendezvous.
public int action() {
for(int i=0;i<10;i++)
{
lr.rendezvous("rendz1");
lr.message("action()"+i);
lr.think_time(2);
}
return 0;
}
Obtaining Vuser Information
You can add the following functions to your Vuser scripts to retrieve Vuser information:
lr.get_attrib_
string
Returns a string containing command line argument values or runtime information such as the Vuser ID or the load generator name.
lr.get_group_
name lr.get_host_
name
Returns the name of the Vuser's group.
Returns the name of the load generator executing the Vuser script.
lr.get_master_
host_name
Returns the name of the machine running the LoadRunner Controller or
Business Process Monitor.
Returns the ID of the current scenario. (LoadRunner only)
lr.get_
scenario_id lr.get_vuser_
id
Returns the ID of the current Vuser. (LoadRunner only)
In the following example, the lr.get_host_name function retrieves the name of the computer on which the Vuser is running.
String my_host = lr.get_host_name();
For more information about the above functions, see the Function Reference (Help > Function
Reference).
Issuing Output Messages
When you run a scenario, the Controller Output window displays information about script execution.
You can include statements in a Vuser script to send error and notification messages to the
Controller. The Controller displays these messages in the Output window. For example, you could insert a message that displays the current state of the client application. You can also save these messages to a file.
Page 539 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Note: Do not send messages from within a transaction. Doing so lengthens the transaction execution time and may skew the actual transaction results.
You can use the following message functions in your Vuser script:
lr.debug_message
Sends a debug message to the Output window.
lr.log_message
Sends a message to the Vuser log file.
lr.message
lr.output_
message
Sends a message to a the Output window.
Sends a message to the log file and Output window with location information.
In the following example, lr.message sends a message to the output indicating the loop number: for(int i=0;i<10;i++)
{
lr.message("action()"+i);
lr.think_time(2);
}
For more information about the message functions, see the Function Reference (Help > Function
Reference).
You can instruct the Vusers to redirect the Java standard output and standard error streams to
VuGen's Execution log. This is especially helpful when you need to paste existing Java code or use ready-made classes containing System.out and System.err calls in your Vuser scripts. In the execution log, standard output messages are colored blue, while standard errors are shown in red.
The following example shows how to redirect specific messages to the standard output and standard error using lr.enable_redirection:
lr.enable_redirection(true);
System.out.println("This is an informatory message..."); //
Redirected
System.err.println("This is an error message..."); // Redirected
lr.enable_redirection(false);
System.out.println("This is an informatory message..."); // Not redirected
System.err.println("This is an error message..."); // Not redirected
Note: When you set lr.enable_redirection to true, it overrides all previous redirections. To restore the former redirections, set this function to false.
For additional information about this function, see the Function Reference (Help > Function
Reference).
Emulating User Think Time
The time that a user waits between performing successive actions is known as the think time.
Vusers use the lr.think_time function to emulate user think time. In the following example, the
Page 540 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Vuser waits two seconds between loops: for(int i=0;i<10;i++)
{
lr.message("action()"+i);
lr.think_time(2);
}
You can use the think time settings as they appear in the script, or a factor of these values. To configure how Vusers handle think time functions, open the runtime settings dialog box. For more information, see
"Run-Time Settings" on page 346
For more information about the lr.think_time function, see the Function Reference (Help >
Function Reference).
Handling Command Line Arguments
You can pass values to a Vuser script at runtime by specifying command line arguments when you run the script. You insert command line options after the script path and filename in the Controller or
Business Process Monitor. There are three functions that allow you to read the command line arguments, and then to pass the values to a Vuser script:
lr.get_attrib_double
lr.get_attrib_long
lr.get_attrib_string
Retrieves double precision floating point type arguments
Retrieves long integer type arguments
Retrieves character strings
Your command line should have the following format, where the arguments and their values are listed in pairs after the script name: script_name - argument argument_value -argument argument_value
The following example shows the command line string used to repeat script1 five times on the machine pc4: script1 -host pc4 -loop 5
For more information on the command line parsing functions, see the Function Reference (Help >
Function Reference). For more information on how to insert the command line options, see the
LoadRunner Controller, Performance Center, or HP Business Availability Center documentation.
Java over HTTP Protocol
Java over HTTP Protocol Overview
The Java over HTTP protocol is designed to record java-based applications and applets. It produces a Java language script using web functions. This protocol is distinguished from other
Java protocols in that it can record and replay Java remote calls over HTTP.
Page 541 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Viewing Responses and Requests in XML Format
For each request and response, you can view the corresponding XML that represents the binary java object during the recording phase.
View xml data
1. Locate the target request or response section in the code. Right-click the commented
RequestBodyX.xml or ResponseBodyX.xml.
2. Select View XML. The XML is displayed in a separate window.
How to Record with Java over HTTP
To recording with Java over HTTP you must specify which .jar files to use in order to deserialize the recorded data.
This task describes how to locate the relevant .jar files and add them to the classpath.
Recording Java Applets
If your application uses Java Applets, you need to find the relevant .jar files and enable them in the classpath.
1. Clear the JAR cache by selecting Control Panel > Java > General Tab > Temporary
Internet Files > Settings > Delete Files.
2. Open your application and perform a few business processes to repopulate the JAR cache with
.jar files from your application. When you are finished, close your application
3. Select Control Panel > Java > General Tab > Temporary Internet Files > View. This lists the JAR cache and should only contain the .jar files used by your application.
4. Download the files. Try the options in the order in which they appear. When you succeed, proceed to the next step to Add the .jar files to the classpath.
a. Option 1: For each .jar file, go to the listed URL and download the file. If you cannot
Page 542 of 1812 HP LoadRunner (11.50)
User Guide
VuGen download one or all of the .jar files, continue with the next option.
b. Option 2: Clear the cache again by selecting Control Panel > Java > General Tab >
Temporary Internet Files > Settings > Delete Files. Open your application again and perform a few business processes. Do not close your application. Open the Java Console .
There should be a message for each .jar file telling you the location it is stored in a temporary file on your computer. The files are usually hashed and don't have .jar extensions. Change the name (including changing each extension to .jar) and copy the file to a known location.
c. Option 3: If the files don't show up in the Java console, locate the temporary folder as listed in Control Panel > Java > General Tab > Temporary Internet Files > Settings >
Location. Open the specified location and rename all the files in the sub-folders to .jar. Do not rename all the files in the main folder.
5. Add the .jar files to the classpath in the Recording Options > Java Environment Settings >
Classpath node. For more information, see
"Java > Classpath Node" on page 317 .
Recording Local Java Applications
If you are recording a local Java application (not an applet), all of the .jar files already exist on your computer.
1. Look in the batch file that launched the application. All of the .jar files that are referenced should be added to the classpath.
2. If you cannot locate or understand the batch file, add all of the .jar files from the application folder and subfolders to the classpath.
3. Add the .jar files to the classpath in the Recording Options > Java Environment Settings >
Classpath node. For more information, see
"Java > Classpath Node" on page 317 .
How to Debug Java over HTTP scripts
This task describes how to debug Java over HTTP scripts by comparing the request and response data from both the record and replay stages.
1. Add arguments to the VM Param Node
Select Replay > Run-Time Settings > Java VM node. In the Additional VM Parameters field, enter the following string:
-DdumpServerRequests=true -DdumpServerResponses=true
2. Compare record and replay data
While in script view, right-click and select Open Script Directory. The data from the recording phase is in the main folder. The data from the replay phase is in the replay folder.
The files that follow the format RequestBodyX contain the request data. The files that follow the format ResponseBodyX contain the response data.
To compare the record and replay data for the purposes of debugging, compare the files with identical names from the recording and replay phases. For example, compare the
RequestBody1 file from the main folder (recording phase) to the RequestBody1 file from the
Page 543 of 1812 HP LoadRunner (11.50)
User Guide
VuGen replay folder. Normally, the files should be identical. Cases where the files are not identical may indicate problems in the script.
3. Remove arguments before load testing
Return to the Java VM node and the items you added to the Additional VM Parameters field.
How to Insert Parameters into Java over HTTP Scripts
Parameter functions can be added for each response or request body text in a specific location.
This location is indicated by a blank line usually one to two lines below the start of the response or request body. In the example below, parameter functions can be added to the blank lines in each requestBody section.
Troubleshooting and Limitations
This section describes troubleshooting and limitations for the Java over HTTP protocol.
Limitations l
JDK 1.5 or higher is required.
l
Lazy evaluating objects are not supported, for example hibernate in lazy mode.
l
If there are stateful serialization mechanisms on the application server, this can interfere with
LoadRunner deserialization and result in unserialized data and unexpected errors.
l
The following menu items are not available for this protocol: n
Insert > New Step / Start Transaction / End Transaction / Rendezvous
Page 544 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Disable Exception Error Checking
If you are receiving exception errors and you are sure that the error is irrelevant, VuGen allows you to disable all such error messages. To do this, select Replay > Run-Time Settings > Java VM node. In the Additional VM Parameters field, and append the following string to the end of the current entry:
-DvalidateServerResponse=false
Additionally, you can change the error checking behavior of a specific step by adding a closing argument to the sendSerialized function in script view. For more information, see the Function
Reference.
Cannot Correlate Private Object Members
When you need to correlate or parameterize data that is a private member of an object, you can use the lrapi.lr2.fieldSetter and lrapi.lr2.fieldGetter functions.
RemoteInvocation RemoteInvocation2 = (RemoteInvocation)
JavaHTTP.readObject(RemoteInvocationBA0);
RemoteInvocation.methodName="applyToSchool";
Student student=RemoteInvocation.arguments[0];
Map grades=lr2.fieldGetter(student,"grades");//grades is a private member of Student grades.put("Math","95"); lr2.fieldSetter(student,"super.name","Tom");
//Student class inherits the name field from Person. name field is a string lr2.fieldSetter(student,"super.ID","98764321");
//Student class inherits the ID field from Person. ID field is an int
RemoteInvocationResult RemoteInvocationResult_ArrayList2 =
(RemoteInvocationResult)
JavaHTTP.sendSerialized(RemoteInvocation2, 2,
"ObjectsDeserializerDefaultImpl",....
LDAP Protocol
LDAP Protocol Overview
LDAP, the Lightweight Directory Access Protocol, is a protocol used to access a folder listing. The
LDAP folder is composed of many LDAP entries. Each LDAP entry is a collection of attributes with a name, called a distinguished name (DN). For more information about DN, see
"Defining
Distinguished Name Entries" on page 547 .
LDAP folder entries are arranged in a hierarchical structure that reflects political, geographic, and/or organizational boundaries. Entries representing countries appear at the top of the tree. Below them are entries representing states or national organizations. Below them might be entries representing people, organizational units, printers, documents, or just about anything else.
Page 545 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
VuGen records communication over LDAP servers. It creates a script, with functions that emulate your actions. This includes logging in and out of the server, adding and deleting entries, and querying an entry.
LDAP Protocol Example Script
All LDAP functions come in pairs—one for global sessions and one where you can indicate a specific session. To apply the action to all sessions, use the version without the ex suffix. To apply the action to a specific session, use the version with the session identifier with the ex suffix. For example, mldap_logon logs on to the LDAP server globally, while mldap_logon_ex logs on to the
LDAP server for a specific session.
In the following example, the user logs on to an LDAP server, ldap1. It adds an entry and then renames the OU attribute from Sales to Marketing.
Action()
{
// Logon to the LDAP server mldap_logon("Login",
"URL=ldap://johnsmith:tiger@ldap1:80",
LAST);
// Add an entry for Sally R. Jones mldap_add("LDAP Add",
"DN=cn=Sally R. Jones,OU=Sales, DC=com",
"Name=givenName", "Value=Sally", ENDITEM,
"Name=initials", "Value=R", ENDITEM,
"Name=sn", "Value=Jones", ENDITEM,
"Name=objectClass", "Value=contact", ENDITEM,
LAST);
// Rename Sally's OU to Marketing mldap_rename("LDAP Rename",
"DN=CN=Sally R. Jones,OU=Sales,DC=com",
"NewDN=OU=Marketing",
LAST);
// Logout from the LDAP server mldap_logoff();
return 0;
}
Page 546 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Defining Distinguished Name Entries
The LDAP API references objects by its distinguished name (DN). A DN is a sequence of
relative distinguished names (RDN) separated by commas.
An RDN is an attribute with an associated value in the form attribute=value. The attribute names are not case-sensitive. The following table lists the most common RDN attribute types.
String
DC
CN
OU
Attribute Type domainComponent commonName organizationalUnitName
O
organizationName
STREET
streetAddress
L
localityName
ST
C
UID
stateOrProvinceName countryName userid
The following are examples of distinguished names:
DN=CN=John Smith,OU=Accounting,DC=Fabrikam,DC=COM
DN=CN=Tracy White,CN=admin,DC=corp,DC=Fabrikam,DC=COM
The following table lists reserved characters that cannot be used in an attribute value.
\
<
+
"
;
>
,
Character Description space or # character at the beginning of a string space character at the end of a string comma plus sign double quote backslash left angle bracket right angle bracket semicolon
Page 547 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
To use a reserved character as part of an attribute value, you must precede it with an escape character, a backslash (\). If an attribute value contains other reserved characters, such as the equal sign (=) or non-UTF-8 characters, you must encode it in hexadecimal format—a backslash followed by two hex digits.
The following are examples of DNs that include escaped characters. The first example is an organizational unit name with an embedded comma; the second example is a value containing a carriage return.
DN=CN=Bitwise,OU=Docs\, Support,DC=Fabrikam,DC=COM
DN=CN=Before\0DAfter,OU=Test,DC=North America,DC=Fabrikam,DC=COM
LDAP Connection Options
Using the mldap_logon[_ex] function, you control the way you login to the LDAP server.
When specifying the URL of the LDAP server, you specify how to connect and with what credentials.
When specifying the server's URL, use the following format: ldap[s][username:[password]@][server[:port]]
The following table shows several examples of connections to LDAP servers.
Syntax Description ldap://a:[email protected]:389 Connects to the server (to 389 port) and then binds with username
"a" , password "b" ldap://:@server.com
Connects to server (to default unsecured port 389) then binds anonymously with a NULL username and password ldaps://a:@server.com
Connects to server (to default secured port 636)and then binds with username "a", password ""
Connects to server without binding ldap://@server.com, ldap://server.com
ldap://a:b@ ldap://:@
Binds with username "a", password "b, executing a bind on the existing session without reconnecting
Binds anonymously with a NULL username and password
(executes bind on existing session without reconnecting)
You can also specify LDAP modes or SSL certificates using the following optional arguments: l
Mode. The LDAP call mode: Sync or Async l
Timeout. The maximum time in seconds to search for the LDAP server.
l
Version. The version of the LDAP protocol version 1,2, or 3 l
SSLCertDir. The path to the SSL certificates database file (cert8.db) l
SSLKeysDir. The path to the SSL keys database file (key3.db)
Page 548 of 1812 HP LoadRunner (11.50)
User Guide
VuGen l
SSLKeyNickname. TheSSL key nickname in the keys database file l
SSLKeyCertNickname. TheSSL key's certificate nickname in the certificates database file l
SSLSecModule. The path to the SSL security module file (secmod.db) l
StartTLS. Requires that the StartTLS extension's specific command must be issued in order to switch the connection to TLS (SSL) mode
For detailed information about these arguments, see the Function Reference (Help > Function
Reference).
Mailing Service Protocols
Mailing Service Protocols Overview
The Mailing Service protocols emulate a user working with an email client, viewing and sending emails. The following mailing services are supported: l
Internet Messaging (IMAP) l
MS Exchange (MAPI) l
Post Office Protocol (POP3) l
Simple Mail Transfer Protocol (SMTP)
The mail protocols support both record and replay, with the exception of MAPI that only supports replay.
IMAP Protocol Overview
IMAP Vuser script functions record the Internet Mail Application Protocol. Recording is not supported for this protocol.
Each IMAP function begins with an imap prefix. For detailed syntax information on these functions, see the Function Reference (Help > Function Reference).
In the following example, the imap_create function creates several new mailboxes: Products,
Solutions, and FAQs.
style="font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline">Actions()
{
imap_logon("ImapLogon",
"URL=imap://johnd:[email protected]",
LAST);
imap_create("CreateMailboxes",
"Mailbox=Products",
"Mailbox=Solutions",
"Mailbox=FAQs",
LAST);
imap_logout();
Page 549 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
return 1;
}
MAPI Protocol Overview
MAPI Vuser script functions record activity to and from an MS Exchange server. Each MAPI function begins with a mapi prefix. For detailed syntax information on these functions, see the
Function Reference (Help > Function Reference).
Note: To run MAPI scripts, you must define a mail profile on the machine running the script.
For example, install Outlook Express, set it as the default mail client, and create a mail account. Alternatively, install Microsoft Outlook, set it as the default mail client, create a mail account and create a mail profile. To create a mail profile in Microsoft Outlook, select Settings
> Control Panel > Mail > Show Profiles and add a mail profile.
In the following example, the mapi_send_mail function sends a sticky note through an MS
Exchange server.
Actions()
{
mapi_logon("Logon",
"ProfileName=John Smith",
"ProfilePass=Tiger",
LAST);
//Send a Sticky Note message
mapi_send_mail("SendMail",
"[email protected]",
"[email protected]",
"Subject=<GROUP>:<VUID> @ <DATE>",
"Type=Ipm.StickyNote",
"Body=Please update your profile today.",
LAST);
mapi_logout();
return 1;
}
POP3 Protocol Overview
POP3 Vuser script functions emulate actions using the Post Office Protocol, POP3. Each function begins with a pop3 prefix. For detailed syntax information on these functions, see the Function
Reference (Help > Function Reference).
In the following example, the pop3_retrieve function retrieves five messages from the POP3 server.
Actions()
{ pop3_logon("Login", "
URL=pop3://user0004t:[email protected]",
LAST);
// List all messages on the server and receive that value
Page 550 of 1812 HP LoadRunner (11.50)
User Guide
VuGen totalMessages = pop3_list("POP3", LAST);
// Display the received value (It is also displayed by the pop3_list function) lr_log_message("There are %d messages.\r\n\r\n", totalMessages);
// Retrieve 5 messages on the server without deleting them pop3_retrieve("POP3", "RetrieveList=1:5", "DeleteMail=false", LAST); pop3_logoff();
return 1;
}
SMTP Protocol Overview
SMTP Vuser script functions emulate the Single Mail Transfer Protocol traffic. Each SMTP function begins with an smtp prefix. For detailed syntax information on these functions, see the Function
Reference (Help > Function Reference).
In the following example, the smtp_send_mail function sends a mail message, through the SMTP mail server, techno.
Actions()
{
smtp_logon("Logon",
"URL=smtp://[email protected]",
"CommonName=Smtp Test User 0001",
NULL);
smtp_send_mail( "SendMail",
"[email protected]",
"Subject=MIC Smtp: Sample Test",
"MAILOPTIONS",
"X-Priority: 3",
"X-MSMail-Priority: Medium",
"X-Mailer: Microsoft Outlook Express
5.50.400\r\n",
"X-MimeOLE: By Microsoft MimeOLE V5.50.00\r\n",
"MAILDATA",
"MessageText="
"Content-Type: text/plain;\r\n"
"\tcharset=\"iso-8859-1\"\r\n"
"Test,\r\n"
"MessageBlob=16384",
NULL);
smtp_logout();
return 1;
}
Page 551 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Mobile Protocols Overview
The VuGen Mobile protocols expand LoadRunner's capability of recreating user activity from mobile applications, both
native
1 and
browser-based
2
. With this solution you can: l
Simulate users working on mobile devices l
Create scripts based on the recording of mobile devices or emulators
Protocol Options for Mobile
You can record user activity on a mobile device and generate scripts in VuGen using one of two protocols: l
Mobile App (HTTP/HTML): ]: A protocol enabling you to develop scripts using mobile devices or device emulators communicating with servers over HTTP. You can record network traffic into a capture file (PCAP file) and create a VuGen script. Additionally, you can use a mobile emulator on your VuGen machine to develop your scripts.
l
Mobile TruClient: A protocol enabling you to record user activity in browser-based mobile applications using Ajax TruClient technology. The Ajax TruClient browser is modified to emulate the display of your mobile browser.
The following table can help you determine which protocol is most suitable for your needs:
Application Type
Browser-based applications
Mobile TruClient Mobile App (HTTP/HTML)
Native applications
Network Speed Simulation
Network Simulation for mobile protocols models the behavior of the cellular network. This enables you to test an applications taking into consideration end-to-end response time from device to server. Three configuration options are available:
Maximum bandwidth
This option is provided in cases where you do not wish to emulate a cellular network. This is the default setting.
Standard bandwidth
Network Speed Simulation for mobile protocols provides predefined settings suitable for known
1
A mobile application, such as a new service, where the application resides on the device, but communicates with the server at various intervals.
2
A browser-based application that has been configured for the display of the mobile device.
Page 552 of 1812 HP LoadRunner (11.50)
User Guide
VuGen cellular networks: l
General Packet Radio Service (GPRS) l
Enhanced Data rates for GSM Evolution (EDGE) l
Universal Mobile Telecommunications System (UMTS) l
High-Speed Downlink Packet Access (HSDPA) l
High-Speed Downlink Packet Access Phase 2 (HSDPA phase 2) l
High-Speed Uplink Packet Access (HSUPA)
Each network type has both a maximum and expected rate. The maximum rate represents the technology's best case performance rate while the expected rate more accurately reflects real time performance.
Custom bandwidth
Network Speed Simulation enables you to set custom download and upload speeds, defined in bits.
You can set either a single value or range for either upload or download speed. A case where this option would be useful is when you have expected network speed from your cellular provider for a specific area.
For details, see
"Network > Speed Simulation Node " below
Network > Speed Simulation Node
This dialog box enables you to configure bandwidth for the mobile protocol.
To access
Important information
Run-time settings > Network > Speed Simulation
This option is only available for mobile protocols.
"Network Speed Simulation" on previous page
User interface elements are described below:
UI Element
Use maximum bandwidth
Description
Vusers run at the maximum bandwidth that is available over the network.
Default value: enabled.
Use standard bandwidth
Select a bandwidth associated with a cellular technology.
Use custom bandwidth
Download speed:Indicate a custom download speed in bits. Can be defined as a range or single value.
Upload speed:Indicate a custom upload speed in bits. Can be defined as a range or single value.
Note:
Page 553 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
UI Element Description
l
If you select custom bandwidth and both upload speed and download speed are left blank, the default setting of maximum bandwidth will be used.
l
If you select custom bandwidth and either upload speed or download speed are left blank, the empty value is automatically set to the defined value.
Recording Methods
The Mobile App (HTTP/HTML) protocol provides two methods for script generation: l
Create a script with a capture file
You can analyze a capture file that was created with either an external capture file utilities, such as Wireshark, or VuGen's Mobile Sniffer Agent. The Recording Wizard > Analyze Traffic option enables you to point to the capture file, specify the source or destination IP address to include, and generate the script.
For details see:
"Recording Traffic Into A Capture (Sniffer) File" below
"Analyzing Traffic" on page 559
"Recording Wizard" on page 563
l
Create a script using an emulator
For many mobile devices, there are third party emulators that you can install on your computer.
Once installed, you can use the Emulate Record method to record and generate a script.
For details see:
"Recording with Emulation" on page 560
"Recording Wizard" on page 563
Recording Traffic Into A Capture (Sniffer) File
Recording application traffic to a capture file is effective when you are unable to record an application using VuGen as is the case with mobile applications. A capture file is a trace file containing a log of all TCP traffic over the network. Using a sniffer application, you obtain a dump of all of the network traffic. The sniffer captures all of the events on the network and saves them to a capture file. To generate a smaller, more manageable script, try to capture the network traffic only for the time that you perform actions in your application.
Depending on your OS and device, you have many options on where and how to record a capture file. The table below lists the some of the locations and their related advantages and disadvantages:
Page 554 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Capture File
Source
Mobile device
VuGen with configured "
hot spot
1
"
Server
Supported by Mobile
Sniffer Agent Advantages
Record the real traffic that comes from the device l
Easy and intuitive l
Administrator permission not an issue
Record real traffic (both
WiFi and cellular network traffic)
Disadvantages
Requires administrator permissions on most devices l
Not all devices support “ad hoc” l
Captures WiFi only
(Not capturing cellular network traffic) l
Requires administrator permissions l
Requires installation of a software on the server.
You have the flexibility to record traffic with LoadRunner's mobile sniffer agent or record traffic with an external sniffer agent. The following flow chart illustrates the workflow for both methods:
1
A WiFi connection
Page 555 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Record Traffic with VuGen's Mobile Sniffer Agent
Recording traffic on remote servers
To record traffic on a remote server you first must manually install the mobile sniffer agent on your server by copying the relevant folder from <LR installation directory>\mobileRemoteAgent\ to a location of your choice on your server. The following table lists the supported operating systems and their corresponding file directories:
OS Folder
Windows OS Win32
Linux LinuxRH3
Mac Mac
Page 556 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Once you have copied the folder, you initiate the process by typing a command line argument. For example, if you are recording in a Windows environment the command line string may look something like this: mongoose-2.11.exe -e errorLog.txt -r "C:\Program
Files\HP\LoadRunner\mobileRemoteAgent\win32" -C ".cgi" -p 80
Common command arguments and their descriptions:
-c Identify the remote sniffer agent extensions. Always "cgi"
-p Identify the port and optionally the ip address that you want the mobile sniffer agent to listen on
-r Location of the mobile sniffer agent. Path must be absolute or the process will fail.
-l Restricts access to the mobile sniffer agent to a specific client identified by the client's IP
-e Name of the error log
Note: Do not use –g option. (“digest user/password” ) There is a defect with this option.
Once a sniffer agent is installed, you manually start the agent and continue the Record and
Analyze method from the Recording Wizard.
For details, see
"Recording Wizard" on page 563
Mongoose Details and MIT License
For more information on using Mongoose, see Mongoose Manual
Mongoose License information
Copyright (c) 2004-2010 Sergey Lyubka
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER
Page 557 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
CGI Configuration File Options
The CGI configuration file is located in <LR installation
directory>\mobileRemoteAgent\<win32/Mac/LinuxRH3>/cgi-bin/mobileCGI.conf
You can configure the following options: l
timeout-seconds
Default =1800
The timeout session check stops when the process is sleeping due to traffic inactivity; the timeout session resumes as soon as the adapter is recording events.
l
max-pcap-file-size-kb
Default = 102400
Maximum file size check stops when the process is sleeping due to traffic inactivity; the timeout session resumes as soon as the adapter is recording events.
Since traffic is first written to a buffer file and flashed to the hard drive, the maximum size may be exceeded.
l
log-file-enable
Default = 0
Example of CGI configuration file
timeout-seconds 1800 max-pcap-file-size-kb 102400 log-file-enable 0
Recording Traffic on local hosts
In certain circumstances,capturing traffic directly on the application sever may not be practical. In this instance, you can capture traffic to your local computer by connect your mobile device to local host. Clicking Connect will launch the mobile sniffer agent. Continue the Record and
Analyzemethod through the Recording Wizard.
Configuring a "hotspot" on your local host
In order to record using a local host, you must first configure your machine as a hotspot. There are two ways to accomplish this, either by adhoc or softapp.
For information on Adhoc click here.
From information on SoftApp click here.
Notes:
Page 558 of 1812 HP LoadRunner (11.50)
User Guide
VuGen l
Not all the devices support adhoc. For example, some versions of Andoid don't support it.
l
Since our agent is using libpcap ( the same package used by Wireshark) not all network configurations will be supported by the mobile sniffer agent.
l
In order for a hotspot to work, you first need to configure your firewall to support it.
l
The hotspot may be implemented with NAT thus the address of the mobile will be identical to the hotspot machine.
Once hotspot as been configured on your local host, you continue to Record and Analyze method using the Recording Wizard.
For details, see
"Recording Wizard" on page 563
Capture Traffic With an External SnifferTool
Most UNIX operating systems have a built-in version of a capture tool. In addition, there are many downloadable capture tools such as Wireshark/tcpdump. When using external tools, make sure that all packet data is being captured and none of it is being truncated. Certain capture utilities require additional arguments. For example, tcpdump requires the -s 0 argument in order to capture the packets without truncating their data. You can also manually create a capture file using the command line utility.
The VuGen command line utility, lrtcpdump, is located in the product's bin folder. There is a separate utility for each of the platforms: l lrtcpdump.exe (Windows) l lrtcpdump.hp9
l lrtcpdump.ibm
l lrtcpdump.Linux
l lrtcpdump.solv4
In addition, there are many downloadable capture tools such as Wireshark/tcpdump. Once the capture file has been created, you can generate the script by using the Analyze Traffic method from the Recording Wizard.
For details, see
"Recording Wizard" on page 563
Analyzing Traffic
You will need to specify which IP address the Recording Wizard should analyze. The
AnalyzeTraffic option from the Recording Wizard provides two methods to specify which IP address's traffic to include in the script VuGen is generating. As illustrated in the graphic , traffic is identified either from the server side or from the client side. You will need to specify which IP address's traffic, either client or server side, to include in the script.
Server Side (Destination)
You can configure multiple IP addresses on one server. For example you may be running SMTP ,
FTP and a web server all on the same computer with unique IP addresses. When the sniffer agent
Page 559 of 1812 HP LoadRunner (11.50)
User Guide
VuGen creates the capture file it will include all events to all the services on the server. However, by configuring server side traffic, you can specify the IP address and port where your application under test resides. This method is useful when you are certain that only one client is communicating with the server.
Client Side (Source)
You can identify the client that has been communicating with the server as the IP address to analyze. This way, only the events from the client's IP address will be included in the script VuGen will generate.
Filter Options
You can specify additional IP addresses to either include or exclude during code generation
Recording Options > Traffic Analysis > Traffic Filters. For details, see
"Traffic Analysis >
Traffic Filter" on page 344
Recording with Emulation
Testing mobile applications with a emulator is a solid solution for many mobile devices. You can install a third party emulation application on our local computer and record events with the Record
Emulator method from the Recording Wizard.
The Record Emulator method requires three settings in order to start the emulator: l
Emulator to record l
Command line l
Working directory
For details, see
"Record Emulation Dialog Box " on page 565
Below is a table including emulator download site and Record Emulator settings for Web OS:
Page 560 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Mobile
OS
Link to
Download
SDK
Web
OS
Web OS
Emulator
Download
Emulator to record
(example)
C:\Program
Files\Palm\SDK\bin\palmemulator.bat
Command line (example)
Working directory
(example)
empty C:\Program
Files\Palm\SDK\bin
Recording with a Mac iPhone Emulator
Using the Record and Analyze method from the Recording Wizard, you can record an iPhone script using an emulator.
l
Download the iPhone emulator and install your Mac.
iPhone Emulator Download.
l
Use the Record and Analyze method from the Recording Wizard to create capture file.
How to Create a Script by Analyzing Traffic
This task describes how to create a script using a network traffic file (capture file).
1.
Create a capture file on a Windows Platform - optional
Create a capture file containing a log of all TCP traffic over the network on a Windows platform.
Use a downloadable capture tool or use the tool provided in the product's bin folder, lrtcpdump.<platform>.
a. Run the capture utility in a command window lrtcpdump -f<file_name>.cap. lrtcpdump prompts you to select a network card.
b. Type in the number of the interface card (if there are multiple ones.) and click Enter.
c. Perform typical actions within your application.
d. Return to the command window and click Enter to end the capture session.
e. Place the capture file on the network in a location accessible to the machine running
VuGen.
2.
Create a capture file on a UNIX Platform - optional
Create a capture file containing all TCP traffic over the network on a UNIX platform.
a. Locate the appropriate lrtcpdump utility for your platform in the product's bin folder. Copy it to a folder that is accessible to your UNIX machine. For example, for an HP platform, copy lrtcpdump.hp9. If using FTP, make sure to use the binary transfer mode.
b. Switch to the root user to provide execution permissions: chmod 755 lrtcpdump.<platform> c. If there are multiple interface cards, lrtcpdump uses the first one in alphabetical order. To get a complete list of the interfaces, use the ifconfig command.
d. Run the utility with its complete syntax, specifying the interface and file name. For example, lrtcpdump.hp9 -ietho -f<file_name>.cap. The capturing of the network traffic begins.
e. Perform typical actions within your application.
Page 561 of 1812 HP LoadRunner (11.50)
User Guide
VuGen f. Return to the window running lrtcpdump and follow the instructions on the screen to end the capture session.
g. Place the capture file on the network in a location accessible to the machine running
VuGen.
3.
Start the Recording Wizard
Click the Start Record button. Select the Analyze Traffic method.
For details, see "Recording Wizard" on next page
4.
Specify the location of the Capture File
Enter or browse to the location of the capture file.
5.
Specify traffic information
Specify a capture file and the section of the script into which you want to load the traffic: vuser_init, Action, or vuser_end.
Indicate whether you want to analyze server or client side traffic.
For details on analyzing traffic, see
"Analyzing Traffic" on page 559 .
6.
Configure the SSL-optional
Click the SSL Configuration button to add SSL certificates. This is necessary in order to analyze traffic from a secure server.
For details, see the SSL Configuration Dialog Box in the HP Virtual User Generator User
Guide.
How to Record and Analyze a Script for Mobile Applications
This task describes how to record and analyze a script with the Recording Wizard
1.
Prerequisites
If you are recording the capture file on a remote server, you must manually start the mobile sniffer agent.
If you are recording the capture file on the local host, you must connect your mobile device to the local host.
For details, see
"Recording Traffic Into A Capture (Sniffer) File" on page 554
2.
Create new Mobile App (HTTP/HTML) script
Click the Start Record button.
Select the Record and Analyze method.
For details, see
"Recording Wizard" on next page
3.
Specify mobile sniffer agent location
Enter the URL where the mobile sniffer agent resides. For example, if the mobile sniffer agent
Page 562 of 1812 HP LoadRunner (11.50)
User Guide
VuGen is on the local machine enter http:\\localhost.
4.
Configure mobile sniffer agent
Specify the Record network interface. This is the network adapter to which you want the mobile sniffer agent to listen.
Specify which section of the script into which you want to load the traffic: vuser_init, Action, or vuser_end.
5.
Select Start Recording
Record the desired business process.
6.
Select Stop Recording
VuGen will generate the capture file.
Save capture file on the local machine when you are prompted.
7.
Analyze Traffic
For details, see
"How to Create a Script by Analyzing Traffic" on page 561
starting with Step 4.
Recording Wizard
This wizard enables you to configure record and analyze setting for the Mobile App (HTTP/HTML) protocol.
To access
Important information
Click the Start Record button
"Recording Traffic Into A Capture (Sniffer) File" on page 554
"Analyzing Traffic" on page 559
Wizard map:
Analyze Traffic
The following is the wizard map if you select Analyze Traffic in the
Recording Method page:
"Recording Method Dialog Box" on next page
>
"Analyze Traffic Dialog
Box " on next page
Wizard map:
Record and Analyze
Traffic
The following is the wizard map if you select Record and Analyze in the
Recording Method page:
"Recording Method Dialog Box" on next page
>
"Configure and Record
Dialog Box " on page 565
>
"Analyze Traffic Dialog Box " on next page
Wizard map:
Record Emulator
The following is the wizard map if you select Record Emulator in the
Recording Method page:
"Recording Method Dialog Box" on next page
>
"Record Emulation
Dialog Box " on page 565
Relevant tasks
"How to Create a Script by Analyzing Traffic" on page 561
"How to Record and Analyze a Script for Mobile Applications" on previous page
Page 563 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Recording Method Dialog Box
This dialog box enables you to select a recording method
To access
Start Record button
Relevant tasks
"How to Create a Script by Analyzing Traffic" on page 561
"How to Record and Analyze a Script for Mobile Applications" on page 562
User interface elements are described below:
UI Element Description
Analyze Traffic
Create script by converting an existing capture file . For details, see
"Recording Traffic Into A Capture (Sniffer) File" on page 554
Record and
Analyze Traffic
Record
Emulator
Create script by recording server traffic and converting the resulting capture file.
Create script by recording events with a device emulator installed on your local machine running VuGen.
Analyze Traffic Dialog Box
This dialog box enables you to configure settings for script generation from an existing capture file.
To access
Relevant tasks
Recording Method > Next
Add list of cross references using bullets for multiple entries. Do not use periods.
User interface elements are described below:
UI Element Description
Capture File
The name of a capture file containing the server traffic, usually with a cap extension.
Browse. Allows you to select a capture file to import.
Filter based on server side
The IP address and port of the server whose traffic you want to examine.
Filter based on client side
The IP address of the client whose traffic you want to examine.
Record into
Action
The section into which you want to record: vuser_init, Action, or vuser_end. For actions you want to repeat, use the Action section. For initialization steps, use vuser_init.
Page 564 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
UI Element Description
Filter Options
Opens the Traffic Filters node in the Recording Options dialog box. This allows you to specify which IP addresses to include or exclude from the script during script generation.
SSL
Configuration
Opens the SSL Configuration Dialog Box which allows you to add SSL certificates to analyze traffic from a secure server.
Configure and Record Dialog Box
This dialog box enables you to configure settings to record traffic to a pcap file.
To access Recording Wizard > Recording Method > Next
Relevant tasks
"How to Create a Script by Analyzing Traffic" on page 561
"How to Record and Analyze a Script for Mobile Applications" on page 562
User interface elements are described below:
UI Element Description
Mobile sniffer agent location
Host URL. URL where the mobile sniffer agent resides.
Port. Specify the port for the mobile sniffer agent to listen.
Mobile sniffer configuration:
Record Network Interface. Servers and computers can have multiple network adapters. The setting enables you to select the network adapter you want the mobile agent to listen on.
Record into Action. The section into which you want to record: vuser_init,
Action, or vuser_end. For actions you want to repeat, use the Action section.
For initialization steps, use vuser_init.
Recording
Start Recording. Begin recording traffic.
Stop Recording: Stop recording traffic.
Record Emulation Dialog Box
This dialog box enables you to configure the settings to use a mobile emulator to record a script.
To access Recording Wizard > Recording method > Next
User interface elements are described below:
Page 565 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
UI Element
Emulator to record
Command line
Description
Specify the location of the emulator application executable.
Specify the arguments that the emulator application requires to run the emulator.
Specify the location of the of the emulator application.
Working directory
Action to record into
Specify the section into which you want to record: vuser_init, Action, or vuser_end.
For actions you want to repeat, use the Action section. For initialization steps, use vuser_init.
Options button
Access the Recording Options pane.
Mobile TruClient Protocol
Based on LoadRunner's innovative Ajax TruClient technology, Mobile TruClient enables you to test web applications designed for mobile devices.
With this protocol you can: l
Simulate various mobile browsers.
l
Develop scripts that are recorded on the user level making them clear and easily maintained.
The following flow chart illustrates the workflow for using the Mobile TruClient protocol:
How to Record a Script with Mobile TruClient
1. Create new Mobile TruClient script
2.
Select Start Script Development
Define mobile device, user agent and display size in the Mobile Settings Dialog Box which opens automatically.
For details,
"Mobile TruClient Device Manager Dialog Box" on next page
3.
Record business process
For details on using TruClient's functionality, see
"Ajax TruClient Protocol" on page 405
Page 566 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
How to Add, Remove, and Import Mobile Device Settings for Mobile
TruClient
How to create a custom device using the Mobile Device Manager
The Mobile TruClient device manager is delivered with the settings for many popular mobile devices, however, you can easily add a custom device.
1. Click the Mobile TruClientDevice Manager from the VuGen toolbar.
2. Select Add Mobile Device. This opens the Add Mobile Device dialog box.
3. Enter the name of the device you would like to add or select an an existing device from the drop-down list to customize.
4. Specify the User Agent. For details,
"Mobile TruClient Device Manager Dialog Box" below
5. Specify the Display. For details,
"Mobile TruClient Device Manager Dialog Box" below
How to remove a Mobile Device
1. Click the Mobile TruClientDevice Manager from the VuGen toolbar.
2. Select Remove Mobile Device. This opens the Remove Mobile Devicedialog box.
3. Highlight the unwanted device and click remove.
How to import a mobile device settings to your script
The import feature can be used to import mobile devices created in other users' scripts.
1. Open a script that contains custom device settings.
2. Click the Mobile TruClientDevice Manager from the VuGen toolbar.
3. Select the Import Device Settings. This opens the Import Device Settings dialog box.
4. Highlight the custom device and select import.
Mobile TruClient Device Manager Dialog Box
This utility enables you to configure, add and import mobile device settings that are used with the
Mobile TruClient Protocol.
To access
Use one of the following: l
Script development button l
Tools > Mobile TruClient Device Manager
l
Mobile Settings button
Page 567 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Relevant tasks
"How to Add, Remove, and Import Mobile Device Settings for Mobile TruClient" on previous page
"How to Record a Script with Mobile TruClient " on page 566
UI
Element Description
Mobile
Device
User
Agent
Select the mobile device type you want to test.
Specify the header string that is sent to server to identify your mobile device. Once you have a selected a device, the default header value will appear. However, this header string can be modified.
Display
Specify the height and width of your mobile device screen. Mobile TruClient will open browser window according to the display settings.
.NET Protocol
.NET Protocol Overview
Microsoft .NET Framework provides a foundation for developers to build various types of applications such as ASP.NET, Windows Forms, Web Services, distributed applications, and applications that combine several of these models.
VuGen supports .NET as an application level protocol. VuGen allows you to create Vuser scripts that emulate users of Microsoft .NET client applications created in its .NET Framework. VuGen records all of the client actions through methods and classes, and creates Vuser scripts in C Sharp or VB .NET.
By default, the VuGen environment is configured for .NET Remoting, ADO.NET, Enterprise
Services, and WCF (Windows Communication Foundation) applications. Contact Customer
Support for information on how to configure VuGen to record applications created with other clientserver activity.
For more information about .NET and the above environments, see the MSDN Web site, http://msdn2.microsoft.com.
Viewing Data Sets and Grids
When you record a method returning a dataset, data table, or data reader action, VuGen generates a grid for displaying the data.
When working with a data reader, VuGen collects the data retrieved from each Read operation and converts it to the replay helper function, DoDataRead.
For example, after recording the following application code,
Page 568 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
SqlDataReader reader = command.ExecuteReader();
while( reader.Read() )
{
// read the values, e.g., get the string located in column
1
string str = reader.GetString(1)
}
VuGen generates the following lines in the script:
SqlDataReader_1 = SqlCommand_1.ExecuteReader();
LrReplayUtils.DoDataRead(SqlDataReader_1, out valueTable_1, true, 27); where the two parameters indicate that during recording, the Application read all 27 available records. Therefore, during replay the script will read all available records.
In addition, VuGen generates a data grid containing all the information retrieved by the Read operations.
During replay you can use the output data table, containing the actual retrieved values, for correlation and verification. For more information regarding the DoDataRead function, see the
Function Reference (Help > Function Reference).
When applicable, VuGen displays grid steps in the Step Navigator, and displays the associated grids in the Snapshot pane.
The dataset is stored in an XML file. You can view this XML file in the script's data/datasets folder.
The data files are represented by an <index_name>.xml file, such as 20.xml. Since one file may contain several data tables, see the file datasets.grd, which maps the script index to the file index to determine which XML contains the data.
Recording WCF Duplex Communication
WCF (Windows Communication Foundation) is a programming model that unifies Web Services,
.NET Remoting, Distributed Transactions, and Message Queues into a single Service-oriented programming model for distributed computing.
WCF creates a proxy object to provide data for the service. It also marshalls the data returned by the service into the form expected by the caller.
In addition to general support for the WCF environment, VuGen provides specialized support for applications that use WCF's duplex communication. In duplex communication, the client proxy contacts the service, and the service invokes the callback handler on the client machine. The callback handler implements a callback interface defined by the server. The server does not have to
Page 569 of 1812 HP LoadRunner (11.50)
User Guide
VuGen respond in a synchronous manner—it independently determines when to respond and invoke the callback handler.
Communication Between Client and Server
The communication between the client and server is as follows: l
The server defines the service contract and an interface for the callback.
l
The client implements the callback interface defined by the server.
l
The server calls the callback handler in the client whenever needed.
When trying to record and replay duplex communication, you may encounter problems when the script calls the original callback methods. By default, the callback handlers are not included in the filter. You could customize the filter to include those callback handlers. However, the standard playback would be ineffective for a load test, since many of the callbacks are local operations such as GUI updates. For an effective load test you cannot replay the original callback method invoked by the server.
VuGen's solution is based on replacing the original callback handler with a dummy implementation.
This implementation performs a typical set of actions that you can customize further for your application.
You instruct VuGen to replace the original callbacks by activating the Generate Dummy Callback
Handler recording option. For more information, see
"Remote Objects Property" on page 325
VuGen Implementation of a Duplex Callback
As part of the duplex communication solution, VuGen generates two support files: l
DuplexCallbackHelper.<
language> l
Callback_Name.<language>
The following example shows the generated files for a Calculator application using duplex communication:
Page 570 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
The Helper file serves as a general template for working with duplex callback handlers. It serves as a base class for the implementation of the callback.
The second file, Callback_Name, contains the implementation of the callback. The name of the callback implementation class is Vuser<xxxx> where xxxx is the name of the callback interface and it inherits from the VuserDuplexCallbackHelper class defined in the Helper file. VuGen creates separate implementation files for each interface.
This file performs two primary tasks:
Set Response. It stores the data that came from the server in a map. It stores them with sequential
IDs facilitating their retrieval. This method is called from the implementation of the callback interface. The following sample code demonstrates the dummy implementation of a callback method named Result. The method's arguments are stored in the map as an object array.
// -----------------------------------------------------------------
-------public virtual void Result(string operation, double result) {
// Add here your own callback implementation and set the response data
SetResponse(responseIndex++, new object[] { operation, result});
} l
Get Response. Waits for the next response to arrive. The implementation of GetNextResponse retrieves the next response stored in the map using a sequential indexer, or waits until the next response arrives.
The scipt calls GetNextResponse at the point that the original callback handler was called during recording. At that point, the script prints a warning:
// Wait here for the next response.
// The original callback during record was:
Page 571 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Replacement of the Callback in the Script
When you enable the Dummy Callback option (enabled by default), VuGen replaces the original duplex callback handlers with dummy implementations. The dummy implementation is called Vuser
<Callback Name>. At the point of the original callback handler, the script prints a warning indicating that it was replaced.
Customizing the Dummy Implementation
You can modify the implementation file to reflect your environment. This section contains several suggested customizations.
Timeouts
The default timeout for which the callback waits for the next response is 60000 msec, or one minute. To use a specific timeout, replace the call to GetNextResponse with the overloading method which gets the timeout as an argument as shown below. This method is implemented in the callback implementation file <Callback_Name> listed in the left pane after the
DuplexCallbackHelper file.
// Get the next response.
// This method waits until receiving the response from the server
// or when the specified timeout is exceeded.
public virtual object GetNextResponse(int
millisecondsTimeout)
{ return base.GetResponse(requestIndex++,
millisecondsTimeout);
}
To change the default threshold for all callbacks, modify the DuplexCallbackHelper file.
// Default timeout threshold while waiting for response protected int millisecondsTimeoutThreshold =
60000;
Key Identifier
Many applications assign key identifiers to the data, which connects the request and response to one another. This allows you to retrieve the data from the map using its ID instead of the built-in incremental index. To use a key identifier instead of the index, modify the file <Callback_Name> replacing the first base template parameter, named ID, with the type of your key identifier. For example, if your key identifier is a string you may change the first template argument from int to
string: public class VuserXXX : VuserDuplexCallbackHelper<string, object>
In addition, you may remove the implementation of GetNextResponse() and replace it with calls to
GetResponse(ID) defined in the base class.
Return Values
By default, since VuGen supports OneWay communication, the implementation callback does not return any value or update an output parameter when it is invoked.
Page 572 of 1812 HP LoadRunner (11.50)
User Guide
VuGen public virtual
void Result(string operation, double result) {
// Add here your own callback implementation and set the response data
If your application requires that the callback return a value, insert your implementation at that point.
Get Response Order
In VuGen's implementation, a blocking method waits for each response. This reflects the order of events as they occurred during recording—the server responded with data. You can modify this behavior to execute without waiting for a response or to implement the blocking only after the completion of the business process.
Find Port
The FindPort method in the Helper file is a useful utility that can be used in a variety of implementations. The Helper class uses this method to find unique ports for running multiple instances of the script. You can utilize this utility method for other custom implementations.
Recording Server Hosted By Client Applications
If the communication in your system is a server hosted by a client, VuGen's default solution for duplex communication will not be effective. In server hosted by client environments, it is not true duplex communication since the client opens the service and does not communicate through the
Framework. For example, in queuing, the client sends a message to the service and opens a response queue to gather the responses.
To emulate a server hosted by a client, use the pattern depicted in the above solution—replace the original response queues with dummy callbacks and perform synchronization as required. For more information, contact HP support.
Asynchronous Calls
When VuGen records asynchronous calls on remote objects, you can specify how the calls are handled in the
".NET > Recording - Recording Node" on page 323
. These options are particularly relevant for .NET Remoting and WCF environments.
You can configure VuGen to one of the following options: l
Call original callbacks by default. Uses the recorded application's original callback when generating and replaying the script. If the callback method is explicitly excluded by a filter, the callback will be excluded even if you enable this option. If your callbacks perform actions that are not directly related to the business process, such as updating the GUI, then make sure to disable this option.
l
Generate asynchronous callbacks. This option defines how VuGen will handle callbacks when the original callbacks are not recorded. This is relevant when the above option, Call
original callbacks is disabled or when the callbacks are explicitly excluded.
When you enable this option, it creates a dummy method which will be called during replay instead of the original callback. This dummy callback will be generated in the callbacks.cs section of the script.
Page 573 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
When you disable this option, VuGen inserts a NULL value for the callback and records the events as they occur.
The following segment shows script generation for a Calculator client, when Generate
asynchronous callbacks is enabled.
To display the callback method, OnComplete1, you click on the callback.cs file in the left pane.
The following segment shows script generation when the option is disabled. VuGen generates a
NULL in place of the callback and records the events of the callback as they occur.
Note: If you recorded a script with specific recording options, and you want to modify them, you do not need to re-record the script. Instead you can regenerate the script with the new settings.
For more information, see
".NET > Recording - Recording Node" on page 323 .
Recording Dual HTTP Bindings
If your application employs dual HTTP Binding, since HTTP is inherently not a duplex protocol, the framework uses a standard port to receive response data being passed to the callback. When you attempt to run multiple instances of your application, you may be unable to do so using the same port number. VuGen provides you with an option of replacing the original client base address's port number with a unique port.
When you enable the Generate Unique Client Base Address recording option, VuGen checks the type of communication used by the application. If it detects dual HTTP communication,
WSDualHttpBinding, it runs the FindPort utility (provided in LrReplayUtils) in the Helper file and finds unique ports for each instance of the callback.
This option is enabled by default. It is only relevant when you enable the above option, Generate
dummy callback handler.
When you enable this option, VuGen generates the following code in the script:
#warning: Code Generation Warning
// Override the original client base address with a unique port number
DualProxyHelper.SetUniqueClientBaseAddress<XXXX>(YYYYY);
For more information, see
".NET > Recording - Recording Node" on page 323 .
Connection Pooling
ADO.NET providers deploy a feature called connection pooling which can significantly influence load test accuracy. Whenever only one app domain is used for all Vusers, connection pooling is turned on—.NET Framework keeps the database connections open and tries to reuse them when a new connection is requested. Since many Vusers are executed in the context of a single application domain, they may interfere with one another. Their behavior will not be linear and that may decrease their accuracy.
In the .NET run-time settings, the AppDomain Per Vuser property enables execution of each Vuser in a separate app domain (true by default). This means that there is connection pooling in the scope
Page 574 of 1812 HP LoadRunner (11.50)
User Guide
VuGen of each Vuser, but the Vusers will not interfere with one another. This setting provides more accuracy, but lower scalability.
If you disable this option, you need to manually disable connection pooling for the database.
The following table describes how to manually disable connection pooling:
Provider
.NET
Framework
Data
Provider for SQL
Server
Option
"Pooling=false" or "Pooling=no"
.NET
Framework
Data
Provider for Oracle
"Pooling=false" or "Pooling=no"
.NET
Framework
Data
Provider for ODBC
Connection pooling is managed by an ODBC Driver Manager. To enable or disable connection pooling, use the ODBC Data Source Administrator (found in
Control Panel or the Administrative Tools folder). The Connection Pooling tab allows you to specify connection pooling parameters for each of the installed
ODBC drivers.
.NET
Framework
Data
Provider for OLE DB
"OLE DB Services=-2"
Oracle Data
Provider for .NET
"Pooling=false"
Adaptive
Server
Enterprise
ADO.NET
Data
Provider
"Pooling=False"
Debugging .NET Vuser Scripts
You can compile a .NET Vuser script to check its syntax, without running the script. To compile the script directly from VuGen, press Shift+F5 or select Vuser > Compile. If VuGen detects a compilation error, it displays the error in the Output window. Double-click on the error to go to the problematic line in the script.
Page 575 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
To run the script directly from VuGen, press F5 or select Replay > Run. Breakpoints and step-bystep replay are not supported in VuGen's editor window for .NET Vusers. To debug a script and run it with breakpoints or step-by-step, run it from within Visual Studio .NET as described below.
Viewing Scripts in Visual Studio
Visual Studio provides you with additional tools to view, edit, and debug your Vuser scripts. You can add breakpoints, view variable values, add assembly references, and edit the script using
Visual Studio's IntelliSense. You can also run the script in a step-by-step mode for debugging.
When you save your script, VuGen creates a Visual Studio 2010 solution file, Script.sln, in your script's folder. You can open the solution file in Visual Studio .NET and view all of its components in the Solution Explorer.
To open the Vuser script in Visual Studio 2010, select Design > Open Script in Visual Studio or click the Visual Studio button on the VuGen toolbar.
Note that if the Vuser script was created with a version of LoadRunner 11 or older, LoadRunner will open the script in Visual Studio 2005.
Double-click the appropriate section in the Solution Explorer, such as vuser_init.cs, to view the contents of the script.
Note that VuGen automatically loads all of the necessary references that were required during recording. You can add additional references for use during compilation and replay through the
Solution Explorer. Select the Reference node and select Add Reference from the right-click menu.
Click on globals.cs or globals.vb in the Solution Explorer to view a list of the variables defined and used by your script.
.NET Filters Overview
Recording filters indicate which assemblies, interfaces, namespaces, classes, or methods to include or exclude during the recording and script generation.
By default, VuGen provides built-in system filters for .NET Remoting, ADO.NET, Enterprise
Services, and WCF (Windows Communication Foundation). These filters were designed to include the relevant interfaces for standard ADO.NET, Remoting, Enterprise Services, and WCF. VuGen also allows you to design custom filters.
Custom filters provide several benefits: l
Remoting. When working with .NET Remoting, it is important to include certain classes that allow you to record the arguments passed to the remote method.
l
Missing Objects. If your recorded script did not record a specific object within your application, you can use a filter to include the missing interface, class or method.
l
Debugging. If you receive an error, but you are unsure of it's origin, you can use filters to exclude methods, classes, or interfaces in order to pin-point the problematic operation.
l
Maintainability. You can record script in higher level, make script more easy to maintain and to correlate.
A filter manager lets you manipulate existing custom filters. It displays the assemblies, namespaces, classes, methods, and properties in a color-coded tree hierarchy.
Page 576 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
The bottom pane provides a description of the assembly, namespace, class, method, property, or event. It also indicates whether or not it is included or excluded and a reason for the inclusion or exclusion.
.NET Filters - Advanced
In the Filter Manager's tree hierarchy, it only displays public classes and methods. It does not show non-public classes or delegates.
You can add classes or methods that are not public by manually entering them in the filter's definition file.
The filter definition files, <filter_name>.xml reside in the dat\DotnetFilters folder of your installation. The available Action properties for each element are: Include, Exclude, or Totally
Exclude. For more information, see
"Filter Manager [.NET Protocol]" on page 319 .
By default, when you exclude a class, the Filter Manager applies Exclude, excluding the class, but including activity generated by the excluded class. When you exclude a method, however, it applies Totally Exclude, excluding all referenced methods.
Page 577 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
For example, suppose Function A calls function B. If Function A is Excluded, then when the service calls Function A, the script will include a call to Function B. However, if function A is
Totally Excluded, the script will not include a call to Function B. Function B would only be recorded if called directly—not through Function A.
VuGen saves a backup copy of the filter as it was configured during the recording,
RecordingFilterFile.xml, in the script's data folder. This is useful if you made changes to the filter since your last recording and you need to reconstruct the environment.
Guidelines for Setting .NET Filters
When testing your .NET application, your goal is to determine how the server reacts to requests from the client. When load testing, you want to see how the server responds to a load of multiple users.
When recording a .NET application, your script may include calls to methods that do not affect the server, such as calls to a local utility or the GUI interface. These calls are usually not relevant to your testing goals, and it would be correct to filter them out.
The built-in filters, .NET Remoting, ADO.NET, Enterprise Services, and WCF, were designed to record only the server related traffic relevant to your testing goals. In some instances, however, you may need to customize filters to capture your .NET application's calls or exclude unnecessary calls. Using the Filter Manager, you can design custom filters to exclude the irrelevant calls and capture the server related calls.
Page 578 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Before creating a test, we recommend that you become familiar with your application and determine its primary classes and methods, so that you will know which ones to include in your recording.
If you are not familiar with your application's classes, you can use Visual Studio or a Stack Trace to help you determine which methods are being called by your application in order to include them in the filter. VuGen allows you to record with a stack trace that logs all of the methods that were called by your application.
Once you determine the required methods and classes, you include them using the Filter Manager.
When preparing a script, you may need to customize the filter several times in order to achieve the optimal filter. An optimal filter records the relevant methods without introducing a large number of irrelevant calls to the script.
Tip: Strive to modify the filter so that your script will compile (Shift+F5) inside VuGen—a test with correct syntax. Then customize the filter further to create a functional script that runs inside VuGen.
Note that if you plan to add manual code to your script such as control flow or message statements, make sure to do so after you have a functional script that runs inside VuGen. The reason for this is that if you re-record a script or regenerate the script, you will lose all of the manual changes.
Determining which Elements to Include or Exclude
When designing a custom filter, we recommend that you start by choosing the appropriate built-in filter as a base filter. You can then customize the filter using one of the following approaches: l
Top Down Approach. An approach in which you include the relevant namespace and exclude specific classes that are not part of the client-server activity. This is recommended if you are familiar with your application and you can identify a well-defined assembly which implements all client-server activity without involving any GUI elements, such as MyDataAccessLayer.dll.
l
Bottom up Approach. An approach in which you use the default filter and refine it by adding individual methods or classes. Use this approach if you cannot identify a well-defined layer or if you are not familiar with your application. Do not add all AUT assemblies and then try to remove extra component one by one.
The following section provides guidelines on when to include or exclude elements.
l
If, as a result of your including a class, your script has many unrelated method calls, try modifying the filter to exclude the irrelevant methods.
l
If you identify a non-client/server call in your script, exclude its method in the filter.
l
During recording, VuGen may detect an unknown input argument, for example, an argument whose construction it had never encountered before. If this argument supports serialization,
VuGen serializes it by saving it to a file in a special format. During replay, VuGen reconstructs the argument by deserializing it.
l
VuGen serializes objects passed as arguments that were not included by the filter. We recommend that you include this object in the filter in order to track its construction and activity instead of using it in its serialized form. You can identify serialized objects in the script by searching for calls to the LrReplayUtils.GetSerializedObject method or, in WCF environments, LrReplayUtils.GetSerializedDataContract. VuGen stores serialized objects in
Page 579 of 1812 HP LoadRunner (11.50)
User Guide
VuGen the script's \data\SerializedObjects folder as XML files with indexes: Serialization_1.xml,
Serialization_2.xml and so forth.
l
When no rules are specified for a method, it is excluded by default. However, when the remoting environment is enabled, all remote calls are included by default, even if they are not explicitly included. To change the default behavior, you can add a custom rule to exclude specific calls which are targeted to the remote server.
l
Arguments passed in remoting calls whose types are not included by the filter, are handled by the serialization mechanism. To prevent the arguments from being serialized, you can explicitly include such types in order to record the construction and the activity of the arguments.
l
Exclude all activity which involves GUI elements.
l
Add assemblies for utilities that may be required for the script to be compiled.
For information on how to include and exclude elements, see
"Filter Manager [.NET Protocol]" on page 319 .
Defining an Effective Filter
When preparing a script, you may need to customize the filter several times in order to achieve the optimal filter. An optimal filter records the relevant methods without introducing a large number of irrelevant calls to the script.
Define an effective filter
1. Create a new filter based on one of the built-in filters. If you know that the AUT (Application
Under Test) does not use ADO.NET, Remoting, WCF, or Enterprise Services, clear that option since unnecessary filters may slow down the recording.
2. Set the Stack Trace option to true for both recording and code generation. Open the Recording
Options ( ctrl+f7) and select the Recording node. Enable Debug Options: Stack Trace and
Code Generation: Show Stack Trace.
3. Record your application. Click Start Record ( ctrl + r) to begin and Stop ( ctrl + f5) to end.
4. View the script's steps. If you can determine the business logic from the steps and apply correlation, you may not need to create custom filters. If, however, the script is very long or hard to maintain or correlate, you should customize the script's filter.
5. Try to identify the high-level method in the call that captures or wraps one or more client server calls. You can do this by opening the AUT source files (if they are available) in Visual Studio or by viewing a Stack Trace of the script.
6. Set the filter to include the relevant methods—you may need to add their assembly beforehand.
For tips about including and excluding elements in the filter, see
"Guidelines for Setting .NET
Filters" on page 578
.
7. Record the application again. You should always rerecord the application after modifying the filter.
8. Repeat steps 4 through 7 until you get a simple script which can be maintained and correlated.
9. After creating an optimal script, turn off the Stack Trace options and regenerate the script.
Open the Recording Options ( ctrl+f7) and select the Recording node. Disable Debug
Page 580 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Options: Stack Trace and Code Generation: Show Stack Trace. This will improve the performance of subsequent recordings.
10. Correlate the script. In order for your test to run properly, you may need to insert a correlation to capture a value and use it at a later point in the script. For more information, see
"How to
Correlate Scripts - Microsoft .NET" on page 179
.
How to Configure Application Security and Permissions
A Security Exception that occurs while recording an application is usually due to a lack of permissions—the recording machine does not have sufficient permissions to record the application.
This is common where your application is not local, but on the Intranet or network.
To solve this problem, you need to allow the recording machine to access the application and the script with Full Trust.
One solution is to copy the application and save your script locally, since by default, users have Full
Trust permissions to all local applications and folders.
An additional solution is to create new code groups that gives Full Trust to each application folder, and the script folder.
Grant Full Trust permissions to a specific folder (Visual Studio NOT installed
1. From the command prompt, run the caspol.exe application.
2. Set the desired permission.
Grant Full Trust permissions to a specific folder (Visual Studio installed)
1. Open the .NET Configuration settings. Select Start > All Programs > Administrative Tools
> Microsoft .NET Framework 2.0 Configuration. The .NET Configuration window opens.
2. Expand the Runtime Security Policy node to show the Code Groups of the machine.
3. Select the All_Code node.
4. Select Action > New. The Create New Code Group dialog box opens.
5. Enter a name for a new Code Group for your application or script. Click Next.
6. Select the URL condition type. In the URL box, specify the full path of the application or script in the format file://... and click Next.
7. Select the FullTrust permission set. Click Next.
8. Click Finish in the Completing the Wizard dialog box. The configuration tool adds your Code
Group to the list of existing groups.
9. Repeat the above procedure for all .NET applications that you plan to record.
10. Repeat the above procedure for the Vuser script folder.
Note: Make sure that the script folder has FullTrust permissions on all Load Generator machines that are participating in the test (LoadRunner only).
Page 581 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Troubleshooting and Limitations
This section describes troubleshooting and limitations for .NET Vuser scripts.
Limitations
The following limitations apply to the VuGen recording of a Microsoft .NET application: l
.NET Vuser scripts support only single-protocol recording in VuGen.
l
Direct access to public fields is not supported—the AUT must access fields through methods or properties.
l
VuGen does not record static fields in the applications—it only records methods within classes.
l
Multi-threaded support is dependent on the client application. If the recorded application supports multi-threading, then the Vuser script will also support multi-threading.
l
In certain cases, you may be unable to run multiple iterations without modifying the script.
Objects that are already initialized from a previous iteration, cannot be reinitialized. Therefore, to run multiple iterations, make sure to close all of the open connections or remoting channels at the end of each iteration.
l
Recording is not supported for Enterprise Services communication based on MSMQ and
Enterprise Services hosted in IIS.
l
VuGen partially supports the recording of WCF services hosted by the client application.
l
Recording is not supported for Remoting calls using a custom proxy.
l
Recording is not supported for ExtendedProperties property of ADO.NET objects, when using the default ADO.NET filter.
l
Applications created with .NET Framework 1.1 which are not compatible with Framework 2.0, cannot be recorded. To check if your Framework 1.1 application is compatible, add the following
XML tags to your application's .config file: style="font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline"><configuration>
<startup>
<supportedRuntime version="v2.0.50727"/>
</startup>
</configuration>
Invoke the application (without VuGen) and test its functionality. If the application works properly,
VuGen can record it. Remove the above tags before recording the AUT with VuGen. For more information regarding this solution, see the MSDN Knowledge Base.
Oracle NCA Protocol
Oracle NCA Protocol Overview
Oracle NCA is a protocol that handles communication with the Oracle Forms server. Using your browser, you launch the database client, an applet viewer. You perform actions on the NCA
Page 582 of 1812 HP LoadRunner (11.50)
User Guide
VuGen database through its applet viewer. This eliminates the need for client software and allows you to perform database actions from all platforms that support the applet viewer.
The NCA environment is a three-tier environment. The user first sends an http call from his browser to a Web server. This call accesses the startup HTML page which invokes the Oracle Applications applet. The client (applet viewer) communicates through the proprietary NCA protocol with the application server (Oracle Forms server) which then submits information to the database server.
VuGen records and replays the NCA communication between the client and the Forms server
(application server).
The Oracle NCA protocol is commonly used as a multi protocol in combination with Web
(HTTP/HTML) or Web (Click & Script). This is the recommended way to record with Oracle NCA. If you are using Oracle NCA as a single protocol, web events are recorded but steps are not generated (or replayed) by default.
If you initially created a single protocol script for Oracle NCA, and at a later stage you require the
Web functions for testing, you can regenerate your script in VuGen to add the Web functions, without having to re-record the session. You indicate this from the Protocols node in the Recording
Options.
Oracle NCA Protocol Example Scripts
In the following example, the user selected an item from a list (nca_list_activate_item), pressed a button (nca_button_press), retrieved a list value (nca_lov_retrieve_items), and performed a click in an edit field (nca_edit_click). The logical names of the objects are the parameters of these functions.
...
nca_lov_select_item("Responsibilities","General Ledger, Vision
Operations"); nca_list_activate_item("FNDSCSGN.NAVIGATOR.LIST.0","+ Journals"); nca_list_activate_item("FNDSCSGN.NAVIGATOR.LIST.0"," nca_button_press("GLXJEENT.TOOLBAR.LIST.0");
Enter"); nca_lov_find_value("Batches",""); nca_lov_retrieve_items("Batches",1,9); nca_lov_select_item("Batches","AR 1020 Receivables 2537: A 1020"); nca_edit_click("GLXJEENT.FOLDER_QF.BATCH_NAME.0");
...
Page 583 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
In certain tests, such as those performed on Oracle Configurator applications, information returned by one function is required throughout the session. VuGen automatically saves the dynamic information to a parameter, by inserting a web_reg_save_param function into the script. In the following example, the connection information is saved to a parameter called NCAJServSessionID.
web_reg_save_param ("NCAJServSessionId", "LB=\r\n\r\n", "RB=\r",
LAST); web_url("f60servlet",
"URL=http://usscifforms05.sfb.na/servlet/f60servlet\?config
=mult", LAST);
In the above example, the right boundary is \r. The actual right boundary may differ between systems.
Note: We recommend that the user not modify the web_reg_save_param parameters if it was generated automatically. Alternatively, you can manually add a new web_reg_save_param function or add a new correlation rule.
Oracle NCA Record and Replay Tips
When recording an Oracle NCA Vuser script, follow these guidelines: l
We recommend installing Jinitiator before recording a script.
l
Close all browsers before you begin recording.
l
Due to a Netscape limitation, you cannot launch an Oracle NCA session within Netscape when another Netscape browser is already running on the machine.
l
Record the login procedure in the vuser_init section. Record a typical business process in the
Actions section. When you run the script, you can then specify multiple iterations for a specific business process. For more information, see
"Solution Explorer - Overview " on page 81 .
l
VuGen supports the recording of Oracle Forms applications using the Forms Listener Servlet in multi-protocol mode. The application server uses the Forms Listener Servlet to create a runtime process for each client. The runtime process, Forms Server Runtime, maintains a persistent connection with the client and sends information to and from the server.
To support Forms 4.5 in replay, modify the mdrv_oracle_nca.dat file in the dat > mdrv folder to match the following example:
[Oracle_NCA]
ExtPriorityType=protocol
WINNT_EXT_LIBS=ncarp110.dll
WIN95_EXT_LIBS=ncarp110.dll
LINUX_EXT_LIBS=liboranca.so
SOLARIS_EXT_LIBS=liboranca.so
HPUX_EXT_LIBS=liboranca.sl
AIX_EXT_LIBS=liboranca.so
LibCfgFunc=oracle_gui_configure
UtilityExt=lrun_api
To restore Forms support for versions later than 4.5, restore the original values.
Page 584 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Pragma Mode
The client side of the Oracle NCA Vuser can be configured to send an additional header to the server named Pragma. The header is a counter that behaves in the following way: the initial message of the NCA handshake has a value of 1.
The messages that follow the handshake are counted, beginning with 3. The counter is incremented by 1 for each message sent by the client.
If the message received from the server is the type plain\text and the body of the message begins with ifError:#/#00, the client sends a 0 byte message to the server and the Pragma value changes its sign to a minus. This sign changes back after the client succeeds in receiving the information from the server.
Recording of the Pragma header is only supported in the multi-protocol mode (Oracle NCA and
Web). You can identify the Pragma mode within the script's default.cfg file. When operating in
Pragma mode, the UseServletMode is set to 2.
[HttpConnectMode]
UseHttpConnectMode=1
RelativeURL=<NCAJServSessionId>
UseServletMode=
2
For information on the Pragma related run-time settings, see
"Oracle NCA > Client Emulation
Node" on page 387 .
To identify the Pragma mode, you can perform a WinSock level recording and check the buffer contents. In the first example, the buffer contains the Pragma values as a counter: send buf108
"POST
/ss2servlet/oracle.forms.servlet.ListenerServlet?JServSessionIdss2ser"
"vlet=gk5q79uqy1 HTTP/1.1\r\n"
"Pragma: 1\r\n"
...
send buf110
"POST
/ss2servlet/oracle.forms.servlet.ListenerServlet?JServSessionIdss2ser"
"vlet=gk5q79uqy1 HTTP/1.1\r\n"
"Pragma: 3\r\n"
...
In the following example, the buffer contains the Pragma values as an error indicator: recv buf129 281
"HTTP/1.1 200 OK\r\n"
"Date: Tue, 21 May 2002 00:03:48 GMT\r\n"
"Server: Oracle HTTP Server Powered by Apache/1.3.19 (Unix) mod_ fastcgi/2.2"
".10 mod_perl/1.25 mod_oprocmgr/1.0\r\n"
"Content-Length: 13\r\n"
"Content-Type: text/plain\r\n"
"\r\n"
"ifError:8/100"
Page 585 of 1812 HP LoadRunner (11.50)
User Guide
VuGen send buf130
"POST
/ss2servlet/oracle.forms.servlet.ListenerServlet?JServSessionIdss2ser"
"vlet=gk5q79uqy1 HTTP/1.1\r\n"
"Pragma: -12\r\n"
...
How to Enable the Recording of Objects by Name
When recording an Oracle NCA script, you must record the session using object names instead of the standard object ID. If the script is recorded using the object ID, replay may fail because the ID is generated dynamically by the server and may differ between iterations. You can verify that your script is being recorded with object names by examining the nca_connect_server function.
nca_connect_ server("199.35.107.119","9002"/*version=11i*/,"module=/d1/oracle
/visappl/fnd/11.5.0/forms/US/FNDSCSGN userid=APPLSYSPUB/PUB@VIS fndnam=apps
record=names ");
If the record=names argument does not appear in the nca_connect_server function, you may be recording object IDs. You can instruct VuGen to record object names by modifying one of the following:
Startup HTML File
If you have access to the startup HTML file, you instruct VuGen to record object names instead of its object ID by setting the record=names flag in the startup file, the file that is loaded when you start the Oracle NCA application. The following steps describe how to enable the recording of object names using the startup HTML file.
1. Edit the startup file that is called when the applet viewer begins by modifying the line shown below.
<PARAM name="serverArgs ... fndnam=APPS">
2. Add the Oracle key record=names as shown below.
<PARAM name="serverArgs ... fndnam=APPS
record=names">
Forms Configuration File
If the application has a startup HTML file that references a Forms Web CGI configuration file
formsweb.cfg (a common reference), you may encounter problems if you add record=names to the Startup file. In this situation, you should modify the configuration file. The following steps describe how to enable the recording of object names using the configuration file.
1. Go to the Forms Web CGI configuration file.
2. Define a new parameter in this file (see sample Web CGI configuration file below for this change).
serverApp=forecast serverPort=9001
Page 586 of 1812 HP LoadRunner (11.50)
User Guide
VuGen serverHost=easgdev1.dats.ml.com
connectMode=socket archive=f60web.jar
archive_ie=f60all.cab
xrecord=names
3. Open the startup HTML file and locate PARAM NAME="serverArgs".
4. Add the variable name as an argument to the ServerArgs parameter, for example,
record=%xrecord% as shown below.
<PARAM NAME="serverArgs" VALUE="module=%form% userid=%userid%
%otherParams%
record=%xrecord%">
5. Alternatively, you can edit the basejini.htm file in the Oracle Forms installation folder. This file is the default HTML file for running a form on the web using JInitiator-style tags to include the
Forms applet. In the basejinin.htm file add the following line to the parameter definitions:
<PARAM NAME="recordFileName" VALUE="%recordFileName%">
In the <EMBED> tag, add the following line: serverApp="%serverApp%" logo="%logo%" imageBase="%imageBase%" formsMessageListener="%formsMessageListener%"
recordFileName="%recordFileName%"
The drawback in editing this file instead of the servlet configuration file formsweb.cfg, is that this file is replaced when you reinstall Oracle Forms. To avoid this, you can create a copy of the
basejini.htm file and store it at another location. In the servlet configuration file, edit the
baseHTMLJinitiator parameter to point to the new file.
URL to Record
If you do not have access to the startup HTML file, you can still have Oracle NCA record object names instead of its object ID by modifying the URL to record. The following solution only works if the startup HTML file does not reference another file while loading.
For this solution, you add "?record=names" after the URL in the Start Recording dialog box, after the URL name to record.
Page 587 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
How to Launch Oracle Applications via the Personal
Home Page
When launching Oracle Forms applications (versions 6i and higher) by logging in through the
Personal Home Page, you must set several system profile options at the user level. It is desirable to pass such variables at the user level, and not at the site level, where it will affect all users. The following steps describe how to configure the "ICX: Forms Launcher" profile.
1. Sign on to the application and select the "System Administrator" responsibility.
2. Select Profile/System from the Navigator menu.
3. Within the Find System Profile Values form: a. Select the Display > Site option b. Users = <your user logon> for example, operations, mfg, and so on) c. Enter Profile =%ICX%Launch% d. Click Find.
4. Update the User value to the ICX:Forms Launcher profile: n
If no parameter has been passed to the URL, append the following string to the end of the
URL of the user value: ?play==;record=names n
If a parameter has been passed to the URL, append the following string to the end of the URL of the user value: =;play==;record=names
5. Save the transaction.
6. Log out of the Oracle Forms session.
7. Log out of the Personal Home Page session.
8. Sign on again via the Personal Home Page using your username.
Page 588 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
If you were unable to update the ICX: Forms Launcher profile option at the user level, open the
Application Developer responsibility and select the Updatable option for the ICX_FORMS_
LAUNCHER profile.
The first parameter passed to the URL must begin with a question mark (?). You pass all subsequent parameters with an ampersand (=;). In most cases, the URL already contains parameters, which you can identify by searching for a question mark.
Troubleshooting and Limitations
This section describes troubleshooting and limitations for Oracle NCA protocol scripts.
Testing Secure Oracle NCA Applications l
In the Port Mapping node of the Recording Options dialog box, delete any existing entries for port
443 and create a new entry for the Oracle server name:
Service ID: HTTP
Target Server: Oracle Forms Server IP address or long host name
Target Port: 443
Connection Type: SSL
SSL Version: Active SSL version. If in doubt, select SSL 2/3.
Note that the Service ID is HTTP and not NCA.
For more information, see
"Network > Port Mapping Node" on page 327 .
l
If you encounter problems when replaying an NCA HTTPS script during the nca_connect_
server command, insert the following function at the beginning of the script.
web_set_sockets_option("SSL_VERSION","3");
Testing Servlets and other Oracle NCA Applications
Certain NCA sessions use servlets: l the Forms Listener servlet l applications or modules that use both NCA and HTTP communications, such as the Oracle
Configurator l the initializing of the NCA application (downloading the applet, jar, and gif files)
When recording servlets, you must record both Oracle NCA and Web functions. You can do this by using the Oracle Apps IIi protocol or creating an Oracle NCA multi-protocol script. Alternatively, if you created a single protocol script for Oracle NCA, open the General >Protocols node in the
Recording Options, and enable the Web protocol. Then you can begin recording.
Page 589 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
If you are unsure whether your application uses servlets, you can check the default.cfg file in the script folder after recording a script. Locate the entry "UseServletMode="
If the value is 1 or 2, then servlets are being used and you must enable HTTP recording in addition to Oracle NCA.
If you already recorded a script, you can regenerate the code automatically to include the Web functions without having to re-record. Select Record > Regenerate Script, and select the Web protocol in the Protocols section.
Determining the Recording Mode
When recording Oracle NCA scripts: VuGen automatically determines the correct connection mode: HTTP or Socket mode. Generally, you are not required to modify any of the recording settings as VuGen auto-detects the system configuration (unless you are working with Forms
Server 4.5). In systems where the standard port mapping are reserved by other applications, you may need to modify the Port Mapping settings, depending on the recording mode.
You can determine the recording mode in one of the following ways: l
When using the NCA application, open the Java Console.
proxyHost=null proxyPort=0 connectMode=HTTP
Forms Applet version is: 60812
The connectMode entry indicates HTTP, HTTPS, or socket.
l
After recording an NCA session, open the default.cfg file in the Vuser folder and check the value of the UseHttpConnectMode entry.
[HttpConnectMode]
UseHttpConnectMode= 2
// 0 = socket 1 = http 2 = https
Page 590 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
When defining a new port mapping in the Server Entry dialog box, use a Service ID of HTTP for
HTTP or HTTPS modes. For Socket mode, use a Service ID of NCA.
For more information about Port Mapping settings, see
"Network > Port Mapping Node" on page
327
Recording Trace Information for Oracle DB
To debug your script, you can use the Oracle DB breakdown graphs. To gather data for this graph, you turn on the trace mechanism before running the script.
To manually turn on the tracing mechanism, use the nca_set_custom_dbtrace function. For more information, see the Function Reference (Help > Function Reference).
RDP Protocol
RDP Protocol - Overview
The Microsoft RDP (Remote Desktop Protocol) allows users to connect to computers remotely .
For example, users can use RDP to connect to a central and powerful server for working on specific business applications or graphic terminals. This provides users with the same look and feel as if they are working on standalone PCs.
Note: RDP versions 5.1 and later have an Experience tab that allows you to set various options. This tab is not supported by VuGen recording. All options are set to the ON position.
RDP Recording Tips
When recording an RDP Vuser script, follow these guidelines in order to create an effective script.
Single vs. Multi-Protocol Scripts
When creating a new script, you may create a single protocol or multi-protocol script. For example, to record both RDP traffic and Web responses, create a multi-protocol script for RDP and Web to enable the recording of both protocols.
Record into Appropriate Sections
Record the connection process into the vuser_init section, and the closing process into the vuser_
end section. This will prevent you from performing iterations on the connecting and disconnecting processes. For more information about recording into sections, see
"Solution Explorer - Overview " on page 81 .
Run a Clean Session
When recording a session, make sure to perform the complete business process, starting with the connection and ending with the cleanup. End your session at a point from where you could start the entire process from the beginning. Do not leave any client or application windows open.
You should also configure your terminal server to end disconnected sessions. Select
Administrative Tools > Terminal Services Configuration > Connection Properties >
Sessions > Override User Settings and set the server to end disconnected sessions.
Page 591 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Explicit Clicks
When opening expanded menu options, click explicitly on each option—do not depend on the expanding menu. For example, when choosing Start > All Programs > Microsoft Word, be sure to click on the word Programs.
Working with Clipboard Data (RDP Protocol)
VuGen allows you to copy and paste the text of a clipboard during an RDP session. You can copy the contents locally and paste them remotely, or vice versa—copy the contents from the remote machine and paste them locally. The copying of text is supported in TEXT, LOCALE, and
UNICODE formats.
VuGen generates separate functions when copying or saving the clipboard data.
Code sample #1
The following example illustrates a copy operation on a local machine and a paste operation on a remote machine:
//Notifies the Remote Desktop that new data is available in the Local machine's
//clipboard.The data can be provided in three formats: TEXT, UNICODE and LOCALE rdp_notify_new_clipboard_data(
"StepDescription=Send local clipboard formats 1",
"Snapshot=snapshot1.inf",
"FormatsList=RDP_CF_TEXT|RDP_CF_UNICODE|RDP_CF_LOCALE",
RDP_LAST ); rdp_key(
"StepDescription=Key Press 2",
"Snapshot=snapshot_9.inf",
"KeyValue=V",
"KeyModifier=CONTROL_KEY",
RDP_LAST );
//Provides clipboard data to the Remote Desktop when it requests the data.
rdp_send_clipboard_data(
"StepDescription=Set Remote Desktop clipboard 1",
"Snapshot=snapshot1.inf",
"Timeout=20",
REQUEST_RESPONSE, "Format=RDP_CF_UNICODE", "Text=text for clipboard",
RDP_LAST);
Code sample #2
This example illustrates a copy operation on a remote machine and a paste operation on a local machine: rdp_key(
"StepDescription=Key Press 2",
"Snapshot=snapshot_9.inf",
"KeyValue=C",
"KeyModifier=CONTROL_KEY",
Page 592 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
RDP_LAST);
// The function requests the Remote Desktop UNICODE text and saves it to a //parameter rdp_receive_clipboard_data(
"StepDescription=Get Remote Desktop clipboard 1",
"Snapshot=snapshot1.inf",
"ClipboardDataFormat=RDP_CF_UNICODE",
"ParamToSaveData=MyParam",
RDP_LAST);
Normally, the Remote Desktop clipboard data is saved in UNICODE format. If the Remote
Desktop requests data in the TEXT or LOCALE formats, the rdp_send_clipboard_data function automatically converts the content of MyParam from UNICODE into the requested format and sends it to the Remote Desktop. The Replay log indicates this conversion with an informational message. If the conversion is not possible, the step fails.
For more information about the rdp functions, see the Function Reference (Help > Function
Reference).
Correlating Clipboard Parameters
During a recording session, if the client sends the server the same data that it received, VuGen replaces the sent data with a parameter during code generation. VuGen performs this correlation only when the received and sent data formats are the same.
Code sample #3
The following example shows how the same parameter, MyParam, is used for both receiving and sending the data.
// Receive the data from the server rdp_receive_clipboard_data("StepDescription=Get Remote Desktop clipboard 1",
"Snapshot=snapshot_9.inf",
"Timeout=0",
"ClipboardDataFormat=RDP_CF_UNICODETEXT",
"ParamToSaveData=MyParam",
RDP_LAST);
...
// Send the data to the server rdp_send_clipboard_data("StepDescription=Get Remote Desktop clipboard
1",
"Snapshot=snapshot_9.inf",
"Timeout=10",
REQUEST_RESPONSE, "Format=RDP_CF_UNICODETEXT", "Text={MyParam}",
RDP_LAST);
RDP Snapshots - Overview
Vuser scripts based on the RDP protocol utilize VuGen's Snapshot pane.
Page 593 of 1812 HP LoadRunner (11.50)
User Guide
VuGen l
For an introduction to the Snapshot pane, see
"Snapshot Pane - Overview" on page 85
.
l
For details on how to work with the Snapshot pane, see
"How to Work with Snapshots" on page
88
.
l
For details on the Snapshot pane UI, see
"Snapshot Pane" on page 119 .
When you open an RDP Vuser script, VuGen's standard Snapshot pane functionality is available.
The Snapshot pane displays snapshots of the remote display, saved during recording and playback of the Vuser script. Typically, these snapshots are used to synchronize playback of the Vuser script.
In addition to the basic Snapshot pane functionality, the Snapshot pane for RDP Vuser scripts lets you display snapshots in one of the following views: l
Image. Displays only the image of the snapshot and is ideal for visually comparing two images.
This view displays the snapshot faster and requires less memory than the Full view. You can synchronize two snapshots in the Snapshot pane if both snapshots are displayed in the Image view. The Image view does not automatically scroll to show the area of a snapshot that is used for synchronization.
l
Full. Scrolls to display the area that is used for synchronization. This view displays the snapshot slower and requires more memory than the Image view. You cannot synchronize two snapshots displayed in the Snapshot pane if either of the snapshots is displayed in the Full view.
By default, snapshots are displayed in the Full view.
To display a specific synchronization snapshot in the Snapshot pane, do one of the following: l
In the Editor, select the step that contains a reference to the snapshot.
l
In the Step Navigator, double-click the step that contains a reference to the snapshot.
When working with RDP Vuser scripts, the Snapshot pane lets you copy a snapshot to the clipboard, and display a snapshot of the most recent replay error. For more information on how to use the Snapshot pane, see
"How to Work with Snapshots" on page 88 .
Image Synchronization Overview
An RDP session executes remotely. All keyboard and mouse handling is done on the server, and it is the server that reacts to them. For example, when you double-click an application on the desktop, it is the server that realizes a double-click took place and that the application must be loaded and displayed.
When an RDP client connects to a server, it does two things: l
It sends the server coordinates of actions. For example, 'clicked the left mouse button at coordinates (100, 100) on the screen'.
l
It receives images from the server showing the current status of the screen after the action took place
The RDP client (and therefore, LoadRunner) does not know that the screen contains windows, buttons, icons, or other objects. It only knows the screen contains an image and at what coordinates the user performed the action. To allow the server to correctly interpret the actions, you set synchronization points within the script. These points instruct the script to wait until the screen on the server matches the stored screen before continuing.
Page 594 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
The next time you replay the script, it will wait until the image returned by the server matches the image you selected.
Image Synchronization Tips (RDP Protocol)
Use the following guidelines for effective image synchronization:
Synchronize on the Smallest Significant Area
When synchronizing on an image, try to synchronize only the part of the image that is necessary.
Additional details within the image may not be reproduced during replay and could result in a synchronization failure.
For example, when synchronizing on an image of a button, select only the text itself and not the dotted lines around the text as they may not appear during replay.
When synchronizing a highlighted area, try to capture only the part of the image that is not effected by the highlighting. In the following example, perform a synchronization on the Log Off icon, but not the entire button, since the highlighting may not appear during replay, and the color could vary with different color schemes.
Synchronize Before Every User Action
It is recommended that you synchronize before every mouse operation. You should also synchronize before the first rdp_key or rdp_type operation that follows a mouse operation.
Page 595 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Image Synchronization - Shifted Coordinates (RDP
Protocol)
When replaying a script, a recorded object may appear at different coordinates on the screen. The object is the same, but its placement has been shifted. For example, during recording a window opened at coordinates (100, 100), but during replay at (200, 250).
In this case, the synchronization point will automatically find the new coordinates without any intervention on your part. It will automatically note the difference of 100 pixels in the horizontal axis and 150 pixels in the vertical axis.
All subsequent mouse operations that are coordinate dependent will use the modified coordinates, so that a mouse click recorded at (130, 130) will be replayed to (230, 280) = (130 + 100, 130 + 150).
You control the shifting of the coordinates through the AddOffsetToInput parameter in the rdp_
sync_on_image step. You can override this parameter to either add or not add the differences in location during replay to the recorded coordinates for any further operations. If you do not override this parameter, VuGen takes its value from the default setting in the run-time settings.
The corresponding parameter in the operations (for example rdp_mouse_click or rdp_mouse_
drag) is Origin. This parameter decides whether the operation should take its coordinates only from the 'clean' values that were recorded, or whether it should take into account the differences that were added by the last synchronization point. If not explicitly specified, VuGen takes the value for this parameter from the run-time settings.
RDP Agent (Agent for Microsoft Terminal Server)
Overview
The Agent for Microsoft Terminal Server is an optional utility that you can install on the RDP server.
It provides enhancements to the normal RDP functionality. It is provided in the LoadRunner installation DVD and you can install it on any RDP server. The agent provides you with more intuitive and readable scripts, built-in synchronization, and detailed information about relevant objects. Note that when you run RDP Vusers with the agent installed, each Vuser runs its own process of lrrdpagent.exe. This results in a slight reduction in the number of Vusers that can run on the server machine.
Tips for Using the Agent for Microsoft Terminal Server
l
When opening application menus (e.g. File, Edit...) with the mouse, sync steps will sometimes fail. To avoid this issue, use the keyboard to select menu items when recording.
l
When you add a sync_on_object_mouse_click step manually, the coordinates given are absolute coordinates (relating to the entire screen). To create the synchronization point, you need to calculate the offset in the window (relative coordinates) of the desired click location and modify the absolute coordinates accordingly for the synchronization to successfully replay.
l
If a synchronization object exists at the correct location and time during replay, but is covered by another window (such as a pop-up), then the synchronization step will pass and a click will be executed on the window which is covering the synchronization point and therefore harm the
Page 596 of 1812 HP LoadRunner (11.50)
User Guide
VuGen script flow.
l
During recording, if you want to return the application window to the foreground, either click on the title bar, or use the keyboard (ALT+TAB). Note that if you click inside the application window to return it to the foreground, the RDP session may terminate unexpectedly.
The Agent for Microsoft Terminal Server provides the following enhancements to the normal RDP functionality:
Object Detail Recording
When the Agent for Microsoft Terminal Server is installed, VuGen can record specific information about the object that is being used instead of general information about the action. For example,
VuGen generates sync_object mouse_click and sync_object_mouse_double_click steps instead of mouse_click and mouse_double_click that it generates without the agent.
The following example shows a double-mouse-click action recorded with and without the agent installation. Note that with the agent, VuGen generates sync_object functions for all of the mouse actions.
rdp_sync_object_mouse_double_click("StepDescription=Mouse Double Click on Synchronized Object 1",
"Snapshot=snapshot_12.inf",
"WindowTitle=RDP2",
"Attribute=TEXT",
"Value=button1",
"MouseX=100",
"MouseY=71",
"MouseButton=LEFT_BUTTON",
RDP_LAST); rdp_mouse_double_click("StepDescription=Mouse Double Click 1",
"Snapshot=snapshot_2.inf",
"MouseX=268",
"MouseY=592",
"MouseButton=LEFT_BUTTON",
"Origin=Default",
RDP_LAST);
Expanded Right-Click Menu
When you click within a snapshot, you can insert several functions into the script using the rightclick menu. When the agent is not active, you are limited to inserting only mouse_click, mouse_
double_click, and sync_on_Image steps. When the agent is installed, you are able to insert all possible steps that involve the RDP agent: l
get_object_info and Sync_on_object_iInfo. Provides information about the state of the object, and synchronize on a specific object property such as: ENABLED, FOCUSED, CONTROL_ID,
ITEM_TEXT, TEXT, CHECKED, and LINES.
l
insert_sync_on_text and get_text. For details, see the Function Reference (Help > Function
Reference).
Code sample
In the following example, the rdp_sync_on_object_info function provides synchronization by
Page 597 of 1812 HP LoadRunner (11.50)
User Guide
VuGen waiting for the Internet Options dialog box to come into focus.
rdp_sync_on_object_info("StepDescription=Sync on Object Info 0",
"Snapshot=snapshot_30.inf",
"WindowTitle=Internet Options",
"ObjectX=172",
"ObjectY=155",
"Attribute=FOCUSED",
"Value={valueParam}",
"Timeout=10",
"FailStepIfNotFound=No",
RDP_LAST);
How to Install / Uninstall the RDP Agent
The installation file for the Agent for Microsoft Terminal Server is located on the LoadRunner installation disk, under the Additional Components\ Agent for Microsoft Terminal Server folder.
Note that the agent should be installed on your RDP server machine only, not on Load Generator machines.
If you are upgrading the agent, make sure to uninstall the previous version before installing the new one (see uninstallation instructions below).
Install the RDP Agent
1. If your server requires administrator permissions to install software, log in as an administrator to the server.
2. If you are using a Remote Desktop connection (RDP) to install the agent onto a machine running Windows 2003, run the following command on the target machine before starting the installation:
Change user /install
3. Locate the installation file, Setup.exe, on the LoadRunner DVD in the Additional
Components\ Agent for Microsoft Terminal Server folder.
4. Follow the installation wizard to completion.
To use the agent, you must set the recording options before recording a Vuser script. In the Start
Recording dialog box, click Options. In the Advanced Code Generation node, select the Use RDP
Agent check box.
Uninstall the RDP Agent
1. If your server requires administrator privileges to remove software, log in to the server as an administrator.
2. Select Control Panel > Add/Remove Programs > HP Software Agent for Microsoft
Terminal Server and click Change/Remove.
Page 598 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
How to Add Image Synchronization Points to a Script
1. Select an operation to which you would like to add a synchronization point in your script.
2. Right-click on the image snapshot and select Insert Synch On Image from the menu. The cursor will change to a cross-hair.
3. Mark the area on the screen that you would like to synchronize upon by clicking on the left button and dragging the box to enclose the area. When you release the mouse button, the Sync on Image dialog box opens.
4. Click OK. VuGen adds a new Sync on Image step before the selected step. When you select this step, VuGen displays a snapshot that contains a pink box around the area you selected for synchronization.
The next time you replay the script, it will wait until the image returned by the server matches the image you selected.
Failed Image Synchronization Dialog Box (RDP Protocol)
This dialog box opens when an image synchronization fails during the replay of a script. You can stop the script or continue the replay despite the error.
To access
Opens automatically when an image synchronization fails.
Important information
The content of this dialog box varies depending on the reason for the failed synchronization:
l
Append Snapshot. The Failed Image Synchronization - Append Snapshot dialog box opens when the replay image is so different from the record image that changing the tolerance level will not help.
l
Raise Tolerance. The Failed Image Synchronization - Raise Tolerance dialog box opens when the script replay failed to find the exact image requested, but if the tolerance level for performing synchronization on images was relaxed, then it would have succeeded in finding the image.
l
Lower Tolerance. The Failed Image Synchronization - Lower Tolerance dialog box opens when the script replay fails to meet the NotAppear or Change conditions. VuGen detected an image match where you expected it not to detect one. If the tolerance level was reduced, the recorded and replay images would not match, and the NotAppear or Change conditions would be met resulting in a successful replay.
l
Non Specified. The Failed Image Synchronization dialog box opens when the script replay fails to meet any of the synchronization conditions such as
NotAppear or Change. VuGen did not find another image at the original coordinates that could be appended to the script.
See also
Image Synchronization Overview
User interface elements are described below:
UI Description
Page 599 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Element
Stop
Consider the mismatch between the snapshots to be an error. This error will be handled like all other errors and halt the execution of the script.
Continue
This button performs different actions depending on the type of dialog box: l
Append Snapshot. Accept the mismatch. VuGen appends the replay snapshot as a "record" snapshot for the step. In future replays of the step, VuGen uses all existing record snapshots and the appended snapshot as the basis for comparison between screens. If the replay returns any of the record snapshots, the Vuser will not fail. You can view the original and appended snapshots for a step by clicking the navigation arrows in the Snapshot pane toolbar.
l
Lower Tolerance. Accept the mismatch and lower the tolerance level so that
VuGen permits a smaller mismatch between the record images and those displayed during replay.
l
Raise Tolerance. Accept the mismatch and raise the tolerance level so that
VuGen permits a greater mismatch between the record images and those displayed during replay.
l
Non-specified. Accept the mismatch, and do not make any changes in the script.
Continue script execution despite the mismatch.
Note: Raising or lowering the tolerance level from the dialog box changes the level for the current step only. To change the tolerance level for the whole script, change the Default tolerance for image synchronization setting in the Run-Time
Settings > RDP > Synchronization node.
Troubleshooting and Limitations
This section describes troubleshooting information for RDP scripts using the Agent for Microsoft
Terminal Server.
Replay fails on rdp_sync_object_mouse_click/double_click steps.
If the replay fails on specific rdp_sync_object_mouse_click or rdp_sync_object_mouse_
double_click steps, there are workarounds to resolve the issue. We recommend that you try the workarounds in the order they are listed.
Workaround: Modify RDPAgentCodeGen.cfg file
The RDPAgentCodeGen.cfg file can configure VuGen to automatically create an rdp_sync_on_
image and rdp_mouse_click step the next time the script is generated for each rdp_sync_
object_mouse_click/double_click steps which occur within a given window. To do this, you specify the name of the window, update a variable which counts the total number of windows for which this process occurs, and regenerate the script.
Modify the RDPAgentCodeGen.cfg file
1. Open the RDPAgentCodeGen.cfg file in the Script Directory > data folder.
2. Open the Step Navigator and double-click the step that failed.
Page 600 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
3. Copy the name of the window
4. In the RDPAgentCodeGen.cfg file, increase the value of NumberOfTitles by 1.
5. Add a line as follows:
WindowTitleX=<name of window> where X is the new value of NumberOfTitles.
6. Regenerate the script.
Note: The RDPAgentCodeGen.cfg file can be used to automatically produce rdp_
sync_on_image and rdp_mouse_click steps in a similar way for rdp_sync_object_
mouse_click/double_click steps which are specified in different ways as well. Steps can be targeted based on the class attribute of the control. For more information, contact
HP software support.
Workaround: Manually insert a new step
You can manually perform the workaround, by inserting an rdp_sync_on_image and rdp_mouse_
click step for each step that fails. We do not recommend using this workaround because steps added in this way will be lost if the script is regenerated.
RTE Protocol
RTE Protocol Overview
An RTE Vuser types character input into a terminal emulator, submits the data to a server, and then waits for the server to respond. For instance, suppose that you have a server that maintains customer information for a maintenance company. Each time a field service representative makes a repair, he accesses the server database by modem using a terminal emulator. The service representative accesses information about the customer and then records the details of the repair that he performs.
You could use RTE Vusers to emulate this case. An RTE Vuser would:
1. Type 60 at the command line to open an application program.
2. Type F296, the field service representative's number.
3. Type NY270, the customer number.
4. Wait for the word "Details" to appear on the screen. The appearance of "Details" indicates that all the customer details are displayed on the screen.
5. Type Changed gasket P249, and performed Major Service the details of the current repair.
6. Type Q to close the application program.
You use VuGen to create RTE Vuser scripts. The script generator records the actions of a human user on a terminal emulator. The script generator records the keyboard input from the terminal window, generates the appropriate statements, and inserts them into the Vuser script. While you record, the script generator automatically inserts synchronization functions into the script. For details, see
"RTE Synchronization Overview" on page 608 .
Page 601 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
The functions developed to emulate a terminal communicating with a server are called TE Vuser functions. Each TE Vuser function has a TE prefix. VuGen automatically records most of the TE functions listed in this section during an RTE recording session. You can also manually program any of the functions into your script.
For syntax and examples of the TE functions, see the Function Reference (Help > Function
Reference).
An RTE Vuser emulates the actions of a real user. Human users use terminals or terminal emulators to operate application programs.
In the RTE Vuser environment, a Vuser replaces the human. The Vuser operates PowerTerm, a terminal emulator.
PowerTerm works like a standard terminal emulator, supporting common protocols such as IBM
3270 =; 5250, VT100, VT220, and VT420-7.
Working with Ericom Terminal Emulation
VuGen supports record and replay with Ericom Terminal Emulators.
The Ericom support handles escape sequences during record and replay. Ericom's PowerTerm lets you map PC keys to custom escape sequences. For information about mapping, see the
PowerTerm help.
When a user presses mapped keys while recording an Ericom VT session, VuGen generates TE_
send_text functions instead of the standard TE_type. This allows the script to handle custom escape sequences in a single step. For more information, see the Function Reference (Help >
Function Reference) for the TE_send_text function.
SSL and SSH Support for Ericom
VuGen also supports SSL/SSH record and replay for the RTE Ericom library. To work with SSL or
SSH, you select the type in the Security section of the Connect dialog box.
When working with SSH Security, by default VuGen opens a popup dialog box prompting you for more information. We recommend that you disable the Show options to prevent the pop-ups from being issued. If you enable these pop-ups, it may affect the replay. You can access the advanced security options by clicking the Details button.
Page 602 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Typing Input into a Terminal Emulator
Two TE Vuser functions enable Vusers to "type" character input into the PowerTerm terminal emulator: l
TE_type sends characters to the terminal emulator. When recording, the VuGen automatically generates TE_type functions for keyboard input to the terminal window. For details, see below.
l
TE_typing_style determines the speed at which the Vuser types. You can manually define the typing style by inserting a TE_typing_style function into the Vuser script. For details, see
"Typing Input into a Terminal Emulator" above . Alternatively, you can set the typing style by
using the run-time settings. For more information, see
"Run-Time Settings" on page 346
.
Note: While recording an RTE Vuser script, do not use the mouse to relocate the cursor
Page 603 of 1812 HP LoadRunner (11.50)
User Guide
VuGen within the terminal emulator window. VuGen does not record these cursor movements.
Using the TE_type Function
When you record a script, the VuGen records all keyboard input and generates appropriate TE_type functions. During execution, TE_type functions send formatted strings to the terminal emulator.
Keyboard input is defined as a regular text string (including blank spaces). For example:
TE_type ("hello, world");
Input key names longer than one character are represented by identifiers beginning with the letter k, and are bracketed within greater-than/less-than signs (< >).
For example, the following function depicts the input of the Return key followed by the Control and y keys:
TE_type("<kReturn><kControl-y>");
Some other examples include: <kF1>, <kUp>, <kF10>, <kHelp>, <kTab>.
To determine a key name, record an operation on the key, and then check the recorded statement for its name.
Note: When you program a TE_type statement (rather than recording it), use the key definitions provided in the Function Reference (Help > Function Reference).
Setting the Timeout Value for TE_type
If a Vuser attempts to submit a TE_type statement while the system is in X SYSTEM (or input inhibited) mode, the Vuser will wait until the X SYSTEM mode ends before typing. If the system stays in X SYSTEM mode for more than TE_XSYSTEM_TIMEOUT milliseconds, then the TE_
type function returns a TE_TIMEOUT error.
You can set the value of TE_XSYSTEM_TIMEOUT by using TE_setvar. The default value for TE_
XSYSTEM_TIMEOUT is 30 seconds.
Allowing a Vuser to Type Ahead
Under certain circumstances you may want a Vuser to submit a keystroke even though the system is in X SYSTEM (or input inhibited) mode. For example, you may want the Vuser to press the
Break key. You use the TE_ALLOW_TYPEAHEAD variable to enable the Vuser to submit a keystroke even though the system is in X SYSTEM mode.
Set TE_ALLOW_TYPEAHEAD to zero to disable typing ahead, and to any non-zero number to permit typing ahead. You use TE_setvar to set the value of TE_ALLOW_TYPEAHEAD. By default,
TE_ALLOW_TYPEAHEAD is set to zero, preventing keystrokes from being sent during
X SYSTEM mode.
For more information about the TE_type function and its conventions, see the Function Reference
(Help > Function Reference).
Page 604 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Setting the Typing Style
You can set two typing styles for RTE Vuser: FAST and HUMAN. In the FAST style, the Vuser types input into the terminal emulator as quickly as possible. In the HUMAN style, the Vuser pauses after typing each character. In this way, the Vuser more closely emulates a human user typing at the keyboard.
You set the typing style using the TE_typing_style function. The syntax of the TE_typing_style function is: int TE_typing_style (char * style ); where style can be FAST or HUMAN. The default typing style is HUMAN. If you select the
HUMAN typing style, the format is:
HUMAN, delay [, first_delay]
The delay indicates the interval (in milliseconds) between keystrokes. The optional parameter first_ delay indicates the wait (in milliseconds) before typing the first character in the string. For example,
TE_typing_style ("HUMAN, 100, 500");
TE_type ("ABC"); means that the Vuser will wait 0.5 seconds before typing the letter A; it will then wait 0.1 seconds before typing "B" and then a further 0.1 seconds before typing "C".
For more information about the TE_typing_style function and its conventions, see the Function
Reference (Help > Function Reference).
In addition to setting the typing style by using the TE_typing_style function, you can also use the run-time settings. For details, see
"Run-Time Settings" on page 346
Generating Unique Device Names
Some protocols, such as APPC, require a unique device name for each terminal that logs on to the system. Using the run-time settings, you can specify that the TE_connect function generate a unique 8-character device name for each Vuser, and connect using this name. Although this solves the requirement for uniqueness, some systems have an additional requirement: The device names must conform to a specific format. See
"Run-Time Settings" on page 346
for more information.
To define the format of the device names that the TE_connect function uses to connect a Vuser to the system, add an RteGenerateDeviceName function to the Vuser script. The function has the following prototype: void RteGenerateDeviceName(char buf[32])
The device name should be written into buf.
If an RteGenerateDeviceName function exists in a Vuser script, the Vuser calls the function each time a new device name is needed. If no RteGenerateDeviceName function is defined in the script—and unique device names are required—the TE_connect function generates the required names.
In the following example, the RteGenerateDeviceName function generates unique device names with the format "TERMx". The first name is TERM0, followed by TERM1, TERM2, and so forth.
Page 605 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
RteGenerateDeviceName(char buf[32])
{
static int n=0;
sprintf(buf, "TERM%d", n);
n=n+1;
}
Setting the Field Demarcation Characters
Some terminal emulators use demarcation characters to mark the beginning and the end of each field. These demarcation characters are not visible—appearing on the screen as spaces. In the terminal emulator shown below, the colors in the middle section of the screen have been inverted to display the field demarcation characters. These characters are surrounded by ellipses.
The TE_wait_text, TE_get_text, and TE_find_text functions operate by identifying the characters in a specified portion of the screen. If a field demarcation character is located within the specified section, you can identify the character as a space or an ASCII character. You use the TE_FIELD_
CHARS system variable to specify the method of identification. You can set TE_FIELD_CHARS to 0 or 1:
Page 606 of 1812 HP LoadRunner (11.50)
User Guide
VuGen l
0 specifies that the character in the position of the field demarcation characters is returned as a space.
l
1 specifies that the character in the position of the field demarcation characters is returned as an ascii code (ascii 0 or ascii 1).
By default, TE_FIELD_CHARS is set to 0.
You retrieve and set the value of TE_FIELD_CHARS by using the TE_getvar and TE_setvar functions.
Reading Text from the Terminal Screen
There are several Vuser functions that RTE Vusers can use to read text from the terminal screen.
You can use these functions, TE_find_text and TE_get_text_line, to check that the terminal emulator is responding correctly, or to enhance the logic in your scripts.
After recording, you can manually insert TE_find_text and TE_get_text_line statements directly into your RTE Vuser scripts.
Searching for Text on the Screen
The TE_find_text function searches for a line of text on the screen. The syntax of the function is: int TE_find_text (char *pattern, int col1, int row1, int col2, int row2,
int *retcol, int *retrow, char *match );
This function searches for text matching pattern within the rectangle defined by col1, row1, col2, row2. Text matching the pattern is returned to match, and the actual row and column position is returned to retcol and retrow. The search begins in the top-left corner. If more than one string matches pattern, the one closest to the top-left corner is returned.
The pattern can include a regular expression. See the Function Reference for details on using regular expressions.
You must manually type TE_find_text statements into your Vuser scripts. For details on the syntax of the TE_find_text function, see the Function Reference (Help > Function Reference).
Reading Text from the Screen
The TE_get_text_line function reads a line of text from the area of the screen that you designate.
The syntax of the function is: char *TE_get_text_line (int col, int row, int width, char * text );
This function copies a line of text from the terminal screen to a buffer text. The first character in the line is defined by col, row. The column coordinate of the last character in the line is indicated by width. The text from the screen is returned to the buffer text. If the line contains tabs or spaces, the equivalent number of spaces is returned.
In addition, the TE_get_cursor_position function can be used to retrieve the current position of the cursor on the terminal screen. The TE_get_line_attribute function returns the character formatting
(for instance, bold or underline) of a line of text.
Page 607 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
You must manually type TE_get_text_line statements into your Vuser scripts. For details on the syntax of the TE_get_text_line function, see the Function Reference (Help > Function
Reference).
RTE Synchronization Overview
Depending on the system you are testing, you may need to synchronize the input that a Vuser sends to a terminal emulator with the subsequent responses from the server. When you synchronize input, you instruct the Vuser to suspend script execution and wait for a cue from the system, before the Vuser performs its next action. For instance, suppose that a human user wants to submit the following sequence of key strokes to a bank application:
1. Type 1 to select "Financial Information" from the menu of a bank application.
2. When the message "What information do you require?" appears, type 3 to select "Dow Jones
Industrial Average" from the menu.
3. When the full report has been written to the screen, type 5 to exit the bank application.
In this example, the input to the bank application is synchronized because at each step, the human user waits for a visual cue before typing.
This cue can be either the appearance of a particular message on the screen, or stability of all the information on the screen.
You can synchronize the input of a Vuser in the same way by using the TE-synchronization functions, TE_wait_sync, TE_wait_text, TE_wait_silent, and TE_wait_cursor. These functions effectively emulate a human user who types into a terminal window and then waits for the server to respond, before typing in the next command.
The TE_wait_sync function is used to synchronize block-mode (IBM) terminals only. The other TEsynchronization functions are used to synchronize character-mode (VT) terminals.
When you record an RTE Vuser script, VuGen can automatically generate and insert TE_wait_
sync, TE_wait_text, and TE_wait_cursor statements into the script. You use VuGen's recording options to specify which synchronization functions VuGen should insert.
Note: Do not include any synchronization statements in the Vuser_end section of a Vuser script. Since a Vuser can be aborted at any time, you cannot predict when the Vuser_end section will be executed.
Synchronizing Block-Mode (IBM) Terminals
The TE_wait_sync function is used for synchronization RTE Vusers operating block-mode (IBM) terminals. Block-mode terminals display the "X SYSTEM" message to indicate that the system is in Input Inhibited mode. When a system is in the Input Inhibited mode no typing can take place because the terminal emulator is waiting for a transfer of data from the server.
When you record a script on a block-mode terminal, by default, VuGen generates and inserts a TE_
wait_sync function into the script each time the "X SYSTEM" message appears. You use VuGen's recording options to specify whether or not VuGen should automatically insert TE_wait_sync functions.
Page 608 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
When you run a Vuser script, the TE_wait_sync function checks if the system is in the X SYSTEM mode. If the system is in the X SYSTEM mode, the TE_wait_sync function suspends script execution. When the "X SYSTEM" message is removed from the screen, script execution continues.
Note: You can use the TE_wait_sync function only with IBM block-mode terminals emulators
(5250 and 3270).
In general, the TE_wait_sync function provides adequate synchronization for all block-mode terminal emulators. However, if the TE_wait_sync function is ineffective in a particular situation, you can enhance the synchronization by including a TE_wait_text function. For more information on the TE_wait_text function, see
"Synchronizing Character-Mode (VT) Terminals" on next page
, and the Function Reference (Help > Function Reference).
In the following script segment, the Vuser logs on with the user name "QUSER" and the password
"HPLAB". The Vuser then presses Enter to submit the login details to the server. The terminal emulator displays the X SYSTEM message while the system waits for the server to respond.
The TE_wait_sync statement causes the Vuser to wait until the server has responded to the login request, that is, for the X SYSTEM message to be removed—before executing the next line of the script.
TE_type("QUSER"); lr_think_time(2);
TE_type("<kTab>HPLAB"); lr_think_time(3);
TE_type("<kEnter>");
TE_wait_sync();
....
When a TE_wait_sync function suspends the execution of a script while an X SYSTEM message is displayed, the Vuser continues to monitor the system—waiting for the X SYSTEM message to disappear. If the X SYSTEM message does not disappear before the synchronization timeout expires, the TE_wait_sync function returns an error code. The default timeout is 60 seconds.
Set the TE_wait_sync synchronization timeout
1. Select Vuser > Run-Time Settings. The Run-Time Settings dialog box appears.
2. Select the RTE:RTE node in the Run-Time setting tree.
3. Under X SYSTEM Synchronization, enter a value (in seconds) in the Timeout box.
4. Click OK to close the Run-Time Settings dialog box.
After a Vuser executes a TE_wait_sync function, the Vuser waits until the terminal is no longer in the X S YSTEM mode . When the terminal returns from the X S YSTEM mode, the Vuser continues to monitor the system for a short period to verify that the terminal is fully stable, that is, that the system does not return to the X S YSTEM mode. Only then does the TE_wait_sync function terminate and allow the Vuser to continue executing its script. The period that the Vuser continues to monitor the system, after the system has returned from the X SYSTEM mode, is known as the stable time. The default stable time is 1000 milliseconds.
You may need to increase the stable time if your system exhibits the following behavior:
Page 609 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
When a system returns from the X SYSTEM mode, some systems "flickers" to and from the X
SYSTEM for a short period of time until the system stabilizes. If the system remains out of the
X SYSTEM mode for more than one second, and then returns to the X SYSTEM mode, the TE_
wait_sync function will assume that the system is stable. If a Vuser then tries to type information to the system, the system will shift into keyboard-locked mode.
Alternatively, if your system never flickers when it returns from the X SYSTEM mode, you can reduce the stable time to less than the default value of one second.
Change the stable time for TE_wait_sync functions
1. Select Vuser > Run-Time Settings. The Run-Time Settings dialog box appears.
2. Select the RTE:RTE node.
3. Under X SYSTEM Synchronization, enter a value (in milliseconds) in the Stable time box.
4. Click OK to close the Run-Time Settings dialog box.
For more information on the TE_wait_sync function, see the Function Reference (Help >
Function Reference).
You can instruct VuGen to record the time that the system remains in the X SYSTEM mode each time that the X SYSTEM mode is entered. To do so, VuGen inserts a TE_wait_sync_ transaction function after each TE_wait_sync function, as shown in the following script segment:
TE_wait_sync();
TE_wait_sync_transaction("syncTrans1");
Each TE_wait_sync_transaction function creates a transaction with the name "default." This allows you to analyze how long the terminal emulator waits for responses from the server during a scenario run. You use the recording options to specify whether VuGen should generate and insert TE_wait_sync_transaction statements.
Instruct VuGen to insert TE_wait_sync_transaction statements
1. Select Vuser > Recording Options. The Recording Settings dialog box appears.
2. Select the Generate Automatic X SYSTEM transactions option, and then click OK.
Synchronizing Character-Mode (VT) Terminals
There are three types of synchronization that you can use for character-mode (VT) terminals. The type of synchronization that you select depends on: l the design of the application that is running in the terminal emulator l the specific action to be synchronized
Waiting for the Cursor to Appear at a Specific Location
The preferred method of synchronization for VT type terminals is cursor synchronization. Cursor synchronization is particularly useful with full-screen or form-type applications, as opposed to scrolling or TTY-type applications.
Cursor synchronization uses the TE_wait_cursor function. When you run an RTE Vuser script, the
TE_wait_cursor function instructs a Vuser to suspend script execution until the cursor appears at a
Page 610 of 1812 HP LoadRunner (11.50)
User Guide
VuGen specified location on the screen. The appearance of the cursor at the specified location means that the application is ready to accept the next input from the terminal emulator.
The syntax of the TE_wait_cursor function is: int TE_wait_cursor (int col, int row, int stable, int timeout );
During script execution, the TE_wait_cursor function waits for the cursor to reach the location specified by col , row.
The stable parameter specifies the time (in milliseconds) that the cursor must remain at the specified location. If you record a script using VuGen, stable is set to 100 milliseconds by default. If the client application does not become stable in the time specified by the timeout parameter, the function returns TIMEOUT. If you record a script using VuGen, timeout is set by default to the value of TIMEOUT, which is 90 seconds. You can change the value of both the stable and timeout parameters by directly editing the recorded script.
The following statement waits for the cursor to remain stable for three seconds. If the cursor doesn't stabilize within 10 seconds, the function returns TIMEOUT.
TE_wait_cursor (10, 24, 3000, 10);
For more information on the TE_wait_cursor function, see the Function Reference (Help >
Function Reference).
You can instruct VuGen to automatically generate TE_wait_cursor statements, and insert them into a script, while you record the script. The following is an example of a TE_wait_cursor statement that was automatically generated by VuGen:
TE_wait_cursor(7, 20, 100, 90);
Instruct VuGen to automatically generate TE_wait_cursor statements, and insert them into a script while recording
1. Select Vuser > Recording Options. The Recording Settings dialog box appears.
2. Under Generate Automatic Synchronization Commands select the Cursor check box, and then click OK.
Waiting for Text to Appear on the Screen
You can use text synchronization to synchronize an RTE Vuser running on a VT terminal emulator.
Text synchronization uses the TE_wait_text function. During script execution, the TE_wait_text function suspends script execution and waits for a specific string to appear in the terminal window before continuing with script execution. Text synchronization is useful with those applications in which the cursor does not consistently appear in a predefined area on the screen.
Note: Although text synchronization is designed to be used with character mode (VT) terminals, it can also be used with IBM block-mode terminals. Do not use automatic text synchronization with block-mode terminals.
The syntax of the TE_wait_text function is: int TE_wait_text (char * pattern, int timeout, int col1, int row1, int col2, int row2,
int * retcol, int * retrow, char * match );
Page 611 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
This function waits for text matching pattern to appear within the rectangle defined by col1, row1, col2, row2. Text matching the pattern is returned to match, and the actual row and column position is returned to retcol and retrow. If the pattern does not appear before the timeout expires, the function returns an error code. The pattern can include a regular expression. See the Function
Reference for details on using regular expressions. Besides the pattern and timeout parameters, all the other parameters are optional.
If pattern is passed as an empty string, the function will wait for timeout if it finds any text at all within the rectangle. If there is no text, it returns immediately.
If the pattern does appear, then the function waits for the emulator to be stable (finish redrawing, and not display any new characters) for the interval defined by the TE_SILENT_SEC and TE_
SILENT_MILLI system variables. This, in effect, allows the terminal to become stable and emulates a human user.
If the terminal does not become stable within the interval defined by TE_SILENT_TIMEOUT, script execution continues. The function returns 0 for success, but sets the TE_errno variable to indicate that the terminal was not silent after the text appeared.
To modify or retrieve the value of any of the TE_SILENT system variables, use the TE_getvar and
TE_setvar functions. For more information, see the Function Reference (Help > Function
Reference).
In the following example, the Vuser types in its name, and then waits for the application to respond.
/* Declare variables for TE_wait_text */ int ret_row; int ret_col; char ret_text [80];
/* Type in user name. */
TE_type ("John");
/* Wait for teller to respond. */
TE_wait_text ("Enter secret code:", 30, 29, 13, 1, 13, =;ret_col,
=;ret_row,
ret_text);
You can instruct VuGen to automatically generate TE_wait_text statements, and insert them into a script, while you record the script.
Instruct VuGen to automatically generate TE_wait_text statements, and insert them into a script while recording
1. Select Vuser > Recording Options. The Recording Settings dialog box appears.
2. Under Generate Automatic Synchronization Commands, select the Prompt check box, and then click OK.
The following is an example of a TE_wait_text statement that was automatically generated by
VuGen. The function waits up to 20 seconds for the string "keys" to appear anywhere on the screen. Note that VuGen omits all the optional parameters when it generates a TE_wait_text function.
TE_wait_text("keys", 20);
Page 612 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Waiting for the Terminal to be Silent
In instances when neither cursor synchronization nor text synchronization are effective, you can use "silent synchronization" to synchronize the script. With "silent synchronization," the Vuser waits for the terminal emulator to be silent for a specified period of time. The emulator is considered to be silent when it does not receive any input from the server for a specified period of time.
Note: Use silent synchronization only when neither cursor synchronization nor text synchronization are effective.
You use the TE_wait_silent function to instruct a script to wait for the terminal to be silent. You specify the period for which the terminal must be silent. If the terminal is silent for the specified period, then the TE_wait_silent function assumes that the application has stopped printing text to the terminal screen, and that the screen has stabilized.
The syntax of the function is: int TE_wait_silent (int sec, int milli, int timeout );
The TE_wait_silent function waits for the terminal emulator to be silent for the time specified by sec (seconds) and milli (milliseconds). The emulator is considered silent when it does not receive any input from the server. If the emulator does not become silent (i.e. stop receiving characters) during the time specified by the time timeout variable, then the function returns an error.
For example, the following statement waits for the screen to be stable for three seconds. If after ten seconds, the screen has not become stable, the function returns an error.
TE_wait_silent (3, 0, 10);
For more information, see the Function Reference (Help > Function Reference).
How to Map Terminal Keys to PC Keyboard Keys
Because you are using a terminal emulator, you will be using a PC keyboard in place of a terminal keyboard. Many keys that are found on the terminal keyboard are not available on a PC keyboard.
Examples of such keys are HELP, AUTOR, and PUSH, which are found on the IBM 5250 keyboard. To successfully operate the terminal emulator and any associated application programs, you may have to map certain terminal keys to keys on the PC keyboard.
Map a terminal key to a key on the PC keyboard
1. In the terminal emulator, select Options > Keyboard Map, or click the Keyboard Mapping button . The Keyboard Mapping dialog box opens.
Page 613 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
2. Click the Keyboard Mapping button on the toolbar. To map a terminal key to a PC key, drag a key from the upper terminal keyboard to a PC key on the lower keyboard.
You can click the Shift and/or Control keys on the upper keyboard to display additional key functions that can be viewed only by first selecting either of these keys. You can then drag the required key from the upper terminal keyboard to a key on the lower PC keyboard.
To cancel a definition, drag the PC key definition to the wastebasket. This restores the default function of the PC key.
To restore the default mappings, click Defaults.
How to Record RTE Scripts
You use VuGen to record Windows-based RTE Vuser scripts. VuGen uses the PowerTerm terminal emulator to emulate a wide variety of terminal types.
This task describes how to record RTE scripts. This procedure differs from the general recording procedure in
"Recording" on page 131 .
1. Record the terminal setup and connection a. Open an existing RTE Vuser script, or create a new one.
b. In the Sections box, select the vuser_init section to insert the recorded statements.
c. In the Vuser script, place the cursor at the location where you want to begin recording.
d. Click the Start Record button . The PowerTerm main window opens.
Page 614 of 1812 HP LoadRunner (11.50)
User Guide
VuGen e. From the PowerTerm menu bar, select Terminal > Setup to display the Terminal Setup dialog box.
f. Select the type of emulation from the VT Terminal and IBM Terminal types, and then click
OK.
Note: Select an IBM terminal type to connect to an AS/400 machine or an IBM mainframe; select a VT terminal type to connect to a Linux workstation.
g. Select Communication > Connect to display the Connect dialog box.
h. Under Session Type, select the type of communication to use.
i. Under Parameters, specify the required options. The available parameters vary depending on the type of session that you select. For details on the parameters, click Help.
Tip: Click Save As to save the parameter-sets for re-use in the future. The parametersets that you save are displayed in the Sessions List box.
j. Click Connect. PowerTerm connects to the specified system, and VuGen inserts a TE_
connect function into the script, at the insertion point. The TE_connect statement has the following form:
/* *** The terminal type is VT 100. */
TE_connect(
"comm-type = telnet;"
"host-name = alfa;"
"telnet-port = 992;"
"terminal-id = ;"
"set-window-size = true;"
"security-type = ssl;"
"ssl-type = tls1;"
"terminal-type = vt100;"
"terminal-model = vt100;"
"login-command-file = ;"
"terminal-setup-file = ;"
, 60000); if (TE_errno != TE_SUCCESS)
return -1;
The inserted TE_connect statement is followed by an if statement that checks whether or not the TE_connect function succeeds during replay.
Note: Do not record more than one connection to a server (TE_connect) in a Vuser script.
2. Record typical user actions
After recording the setup procedure, you perform typical user actions or business processes.
You record these processes into the Actions section of the Vuser script. Only the Actions
Page 615 of 1812 HP LoadRunner (11.50)
User Guide
VuGen section of a Vuser script is repeated when you run multiple iterations of the script.
When recording a session, VuGen records the text strokes and not the text. Therefore, it is not recommended that you copy and paste commands into the PowerTerm window—instead, type them in directly.
a. Select the Actions section in the Section box.
b. Proceed to perform typical user actions in the terminal emulator. VuGen generates the appropriate statements, and inserts them into the Vuser script while you type. If necessary, you can edit the recorded statements while you record the script.
3. Record the log-off procedure a. Make sure that you have performed and recorded the typical user actions as described in the previous section.
b. In the VuGen main window, click vuser_end in the Section box.
c. Perform the log off procedure. VuGen records the procedure into the vuser_end section of the script.
d. Click Stop
Recording on the Recording toolbar. The main VuGen window displays all the recorded statements.
e. Click Save to save the recorded session. After recording a script, you can manually edit it in VuGen's main window.
How to Implement Continue on Error
To configure the Continue on Error functionality in RTE Scripts: l
To continue running the script on error, insert the following function:
TE_setvar(TE_IGNORE_ERRORS, 1)
l
To restore the default behavior of failing the script on error, insert the following function:
TE_setvar(TE_IGNORE_ERRORS, 0)
SAP Protocols
Selecting an SAP Protocol Type
To test the SAP GUI user operating only on the client, use the SAP GUI Vuser type. To test a SAP
GUI user that also uses a Web browser, use the SAP (Click & Script) or SAP-Web protocol.
To record a SAP GUI session that uses browser controls, create a multi-protocol Vuser script with the SAP GUI and SAP-Web protocols. This allows VuGen to record Web-specific functions when encountering the browser controls. This will not work if you attempt to combine SAP GUI and Web protocols.
Before recording a session, verify that your modules and client interfaces are supported by VuGen.
The following table describes the SAP client modules for SAP Business applications and the relevant tools:
Page 616 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
SAP module
SAP Web Client or mySAP.com.
VuGen support
Use the SAP-Web protocol.
SAP GUI for Windows.
Use the SAP GUI protocol. This also supports APO module recording (requires patch level 24 for APO 3.0 for SAP 6.20).
Use the SAP (Click & Script) protocol.
SAP GUI for Windows and a web browser.
SAP GUI for Java.
This client is not supported.
SAP GUI Protocol
The SAP GUI Vuser script typically contains several SAP transactions which make up a business process. A business process consists of functions that emulate user actions. Open the Step
Navigator to see each user action as a Vuser script step.
The following example shows a typical recording of a SAP GUI client. The first section, vuser_init, contains the opening of a connection and a logon.
Note that the Open Connection step uses one of the connection names in the SAP Logon
Descriptions list. If the specified connection name is not in the list, the Vuser looks for a server with that name.
Page 617 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
In the following section, the functions emulate typical user operations such as menu selection and the setting of a check box.
The final section, vuser_end, illustrates the logoff procedure.
Page 618 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
When recording a multi- protocol script for both SAP GUI and Web, VuGen generates steps for both protocols. In the Script view, you can view both sapgui and web functions.
The following example illustrates a multi-protocol recording in which the SAP GUI client opens a
Web control. Note the switch from sapgui to web functions.
sapgui_tree_double_click_item("Use as general WWW browser, REPTITLE",
"shellcont/shell",
"000732",
"REPTITLE",
BEGIN_OPTIONAL,
"AdditionalInfo=sapgui1020",
END_OPTIONAL);
...
sapgui_set_text("",
"http:\\\\yahoo.com",
"usr/txtEDURL",
BEGIN_OPTIONAL,
"AdditionalInfo=sapgui1021",
END_OPTIONAL);
...
web_add_cookie("B=7pt5cisv1p3m2=;b=2; DOMAIN=www.yahoo.com"); web_url("yahoo.com",
"URL=http://yahoo.com/",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
EXTRARES,
"URL=http://srd.yahoo.com/hpt1/ni=17/ct=lan/sss=1043752588/t1=1043752575385/d1=1251
/d2=1312/d3=1642/d4=4757/0.4097009487287739/*1",
"Referer=http://www.yahoo.com/", ENDITEM,
LAST);
Page 619 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
SAP Web Protocol
The SAP-Web Vuser script typically contains several SAP transactions which make up a business process. The business process consists of functions that emulate user actions. For information about these functions, see the Web functions in the Function Reference (Help > Function
Reference).
Example:
The following example shows a typical recording for an SAP Portal client: vuser_init()
{
web_reg_find("Text=SAP Portals Enterprise Portal 5.0",
LAST);
web_set_user("junior{UserNumber}",
lr_decrypt("3ed4cfe457afe04e"),
"sonata.hplab.com:80");
web_url("sapportal",
"URL=http://sonata.hplab.com/sapportal",
"Resource=0",
"RecContentType=text/html",
"Snapshot=t1.inf",
"Mode=HTML",
EXTRARES,
"Url=/SAPPortal/IE/Media/sap_mango_ polarwind/images/header/branding_image.jpg",
"Referer=http://sonata.hplab.com/hrnp$30001/sonata.hplab.coml:80/Action/26011[header]"
, ENDITEM,
"Url=/SAPPortal/IE/Media/sap_mango_ polarwind/images/header/logo.gif",
"Referer=http://sonata.hplab.com/hrnp$30001/sonata.hplab.com:80/Action/26011[header]",
ENDITEM,
...
LAST);
The following section illustrates an SAP Web and SAP GUI multi-protocol recording in which the
Portal client opens an SAP control. Note the switch from web_xxx to sapgui_xxx functions.
web_url("dummy",
"URL=http://sonata.hplab.com:1000/hrnp$30000/sonata.hplab.com:
1000/Action/dummy?PASS_PARAMS=YES=;dummyComp=dummy=;
Tcode=VA01=;draggable=0=;CompFName=VA01=;Style=sap_mango_polarwind",
"Resource=0",
"RecContentType=text/html",
"Referer=http://sonata.hplab.com/sapportal",
"Snapshot=t9.inf",
"Mode=HTML",
LAST);
Page 620 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
sapgui_open_connection_ex(" /H/Protector/S/3200 /WP",
"",
"con[0]");
sapgui_select_active_connection("con[0]");
sapgui_select_active_session("ses[0]");
/*Before running script, enter password in place of asterisks in logon function*/
sapgui_logon("JUNIOR{UserNumber}",
"ides",
"800",
"EN",
BEGIN_OPTIONAL,
"AdditionalInfo=sapgui102",
END_OPTIONAL);
SAP (Click & Script) Protocol
VuGen can create test scripts for SAP Enterprise portal7 and SAP ITS 6.20/6.40 environments using specialized test objects and methods that have been customized for SAP. The objects are
APIs based on HP QuickTest or Unified Functional Testing support for SAP.
As you record a test or component on your SAP application, VuGen records the operations you perform. VuGen recognizes special SAP Windows objects such as frames, table controls, iViews, and portals.
VuGen supports recording for the following SAP controls: button, checkbox, drop-down menu, edit field, iview, list, menu, navigation bar, OK code, portal, radio group, status bar, tab strip, table, and tree view.
VuGen uses the control handler layer to create the effect of an operation on a GUI control. During recording, when encountering one of the supported SAP objects, VuGen generates a function with an sap_xxx prefix.
Example:
In the following example, a user selected the User Profile tab. VuGen generated an sap_portal function.
web_browser("Close_2",
"Snapshot=t7.inf",
DESCRIPTION,
"Ordinal=2",
ACTION,
"UserAction=Close",
LAST); lr_think_time(7); web_text_link("Personalize",
"Snapshot=t8.inf",
DESCRIPTION,
"Text=Personalize",
ACTION,
"UserAction=Click",
Page 621 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
LAST);
lr_think_time(6); sap_portal("Sap Portal_2",
"Snapshot=t9.inf",
DESCRIPTION,
"BrowserOrdinal=2",
ACTION,
"DetailedNavigation=User Profile",
LAST);
Note: When you record an SAP (Click & Script) session, VuGen generates standard Web
(Click & Script) functions for objects that are not SAP-specific. You do not need to explicitly specify the Web protocol. In the example above, VuGen generated a web_text_link function when the user clicked the Personalize button.
Replaying SAP GUI Optional Windows
When working with SAP GUI Vuser Scripts, you may encounter optional windows in the SAP GUI client—windows that were present during recording, but do not exist during replay. If you try to replay your recorded script as is, it will fail when it attempts to find the missing windows.
VuGen's optional window mechanism performs the actions on a window only after verifying that it exists. The Vuser checks if the window indicated in the Select active window step exists. If the window is found during replay, it performs the actions as they were recorded in the script. If it does not exist, the Vuser ignores all window actions until the next Select active window step. Note that only SAP GUI steps (beginning with a sapgui prefix) are ignored.
To use this feature, in Tree view select the appropriate Select Active Window step and select Run
steps for window only if it exists from the right-click menu.
To disable this feature and attempt to run these steps at all times, regardless of whether the Vuser finds the window or not, select Always run steps for this window from the right-click menu.
How to Configure the SAP Environment
This task describes configure and verify the SAP environment for use with VuGen.
VuGen support for the SAP GUI for Windows client, is based on SAP's Scripting API. This API allows Vusers to interact with the SAP GUI client, receive notifications, and perform operations.
The Scripting API is available only in recent versions of the SAP Kernel. In kernel versions that support scripting, the option is disabled by default. In order to use VuGen, first make sure that the
SAP servers support the Scripting API, and enable the API on both the server and clients. For more information and to download patches, see the SAP OSS note #480149.
VuGen provides a utility that checks if your system supports scripting. The utility,
VerifyScript.exe, is located on DVD in the Additional Components\SAP_Tools\VerifySAPGUI folder. For more information, see the file VerifyScripting.htm provided with this utility.
Checking the SAP GUI for Windows client patch level
You can check the patch level of your SAP GUI for Windows client from the About box. The lowest
Page 622 of 1812 HP LoadRunner (11.50)
User Guide
VuGen patch level supported is version 6.20 patch 32.
Check the patch level
1. Open the SAP GUI logon window. Click the top left corner of the SAP Logon dialog box and select About SAP Logon from the menu.
2. The SAP version information dialog box opens. Verify that the Patch Level entry is 32 or higher.
Check the kernel patch level
1. Log in to the SAP system
2. Select System > Status
3. Click the Other kernel information button.
4. In the Kernel Information section, check the value of the Sup. Pkg. lvl.
The level must be greater than the level listed in the following chart depending on the SAP version you are using.
Software Component SAP Release Kernel Patch Level
SAP_APPL 31I Kernel 3.1I level 650
SAP_APPL 40B Kernel 4.0B level 903
SAP_APPL
SAP_BASIS
SAP_BASIS
SAP_BASIS
SAP_BASIS
45B
46B
46C
46D
610
Kernel 4.5B level 753
Kernel 4.6D level 948
Kernel 4.6D level 948
Kernel 4.6D level 948
Kernel 6.10 level 360
Check the R/3 support packages
1. Log on to the SAP system and run the SPAM transaction.
2. In the Directory section, select All Support Packages, and click the Display button.
3. Verify that the correct package is installed for your version of SAP according to the table below.
Software Component Release Package Name
SAP_APPL
SAP_APPL
SAP_APPL
31I
40B
45B
SAPKH31I96
SAPKH40B71
SAPKH45B49
SAP_BASIS
SAP_BASIS
46B
46C
SAPKB46B37
SAPKB46C29
Page 623 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
SAP_BASIS
SAP_BASIS
46D
610
SAPKB46D17
SAPKB61012
If the correct version is installed, a green circle appears in the Status column.
If you do not have the OCS package installed, download it the from the www.sap.com Web site and install it. For more information, see the SAP OSS note #480149.
Enable scripting on the SAP application server
A user with administrative permissions enables scripting by setting the sapgui/user_scripting profile parameter to TRUE on the application server. To enable scripting for all users, set this parameter on all application servers. To enable scripting for a specific group of users, only set the parameter on application servers with the desired access restrictions. The following steps describe how to change the profile parameter.
1. Open transaction rz11. Specify the parameter name sapgui/user_scripting and click
Display. The Display Profile Parameter Attributes window opens.
Page 624 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
If Parameter name is unknown appears in the status bar, this indicates that you are missing the current Support Package. Import the Support Package that corresponds to the SAP BASIS and kernel versions of the application server, as described in the steps above.
2. If Profile Val is FALSE, you need to modify its value. Click the Change value button in the toolbar. The Change Parameter Value window opens. Enter TRUE in the ProfileVal box and click the Save button.
Page 625 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
When you save the change, the window closes and ProfileVal is set to TRUE.
3. Restart the application server, since this change only takes effect when you log onto the system.
If the updated ProfileVal did not change, even after restarting the server, then the kernel of the application server is outdated. Import the required kernel patch, as specified in the steps above.
Note that the Profile Value may be dynamically activated in the following kernel versions, using transaction rz11, without having to restart the application server.
Release
4.6B, 4.6C, 4.6D
4.6D
6.10
6.10
6.20
Kernel Version Patch Level
all versions
972
391 all levels
Enable scripting on SAP GUI 6.20 client
To allow VuGen to run scripts, you must also enable scripting on the SAP GUI client. You should also configure the client not to display certain messages, such as when a connection is established, or when a script is attached to the GUI process. The following steps describe how to configure the SAP GUI client to work with .
Page 626 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
1. During installation. While installing the SAP GUI client, enable the SAP GUI Scripting option.
2. After installation. Suppress warning messages. Open the Options dialog box in the SAP GUI client. Select the Scripting tab and clear the following options: n
Notify when a script attaches to a running GUI
n
Notify when a script opens a connection
You can also prevent these messages from popping up by setting the values WarnOnAttach and WarnOnConnection in the following registry key to 0:
HKCU\SOFTWARE\SAP\SAPGUI Front\SAP Frontend Server\Security.
How to Record SAP GUI Scripts
The following steps describe some prerequisites to recording a SAP GUI script.
Close SAPLogon application when recording with multi
When recording a multi-protocol script in which the SAP GUI client contains Web controls, close the SAPLogon application before recording.
Use modal dialog boxes for F1 help
Instruct the SAP GUI client to open the F1 help in a modal dialog box as follows:
1. Select Help > Settings.
2. Click the F1 Help tab.
3. Select in modal dialog box in the Display section.
Use modal dialog boxes for F4 help.
Note: This procedure can only be performed by the administrator.
Instruct the SAP GUI client to open the F4 help in a modal dialog box:
1. Make sure that all users have logged off from the server.
2. Select Help > Settings. Click the F4 Help tab.
Page 627 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
3. In the Display section, select System defaults.
4. In the Display portion of the System defaults section, select Dialog.
5. Save the changes by clicking Copy initial system setting.
6. Verify that the status bar displays the message Data was saved.
7. Close the session and restart the service through the SAP Management Console.
How to Replay SAP GUI Scripts
The following steps describe prerequisites to replaying SAPGUI scripts.
Replace encrypted password
Replace the encrypted password in the sapgui_logon function generated during recording, with the real password. It is the second argument of the function, after the following user name sapgui_logon("user", "pswd", "800", "EN");
For additional security, you can encrypt the password within the code. Select the password text
(the actual text, not *****) and select Encrypt string from the right-click menu. VuGen inserts an lr_
decrypt function at the location of the password as follows: sapgui_logon("user", lr_decrypt("3ea037b758"), "800", "EN");
Page 628 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Display SAP GUI user interface during replay (optional)
When running a script for the first time, configure VuGen to show the SAP GUI user interface during replay, in order to see the operations being performed through the UI. Select Replay > Run-Time
Settings > SAPGUI > General node and select Show SAP Client During Replay. During a load scenario, disable this option, since it uses a large amount of system resources in displaying the UI for multiple Vusers.
How to Run SAP GUI Scripts in a Scenario
The following steps describe tips for running SAP GUI scripts in a scenario.
LoadRunner Controller settings
When working with a LoadRunner scenario, set the following values when running your script in a load test configuration: l
Ramp-up. One by one (to insure proper logon) in the Scheduler.
l
Think time. Random think time in the Run-Time settings.
l
Users per load generator. 50 Vusers for machine with 512 MB of memory in the Load
Generators dialog box.
Make sure the agent is running in process mode
Make sure that the LoadRunner (or Performance Center) Remote Agent is running in Process mode. Service mode is not supported.
To check this, move your mouse over the agent's icon in the Windows task bar area, and read the description. If the description reads LoadRunner Agent Service, it is running as a service.
The following steps describe how to restart the agent as a process.
1.
Stop the agent. Right-click the LoadRunner Agent icon and select Close.
2. Run magentproc.exe, located in the launch_service\bin folder, under the LoadRunner installation.
3. To make sure that the correct Agent is launched the next time you start your machine, change the Start type of the Agent Service from Automatic to Manual. Then add a shortcut to
magentproc.exe to the Windows Startup folder.
n
Terminal Sessions. Machines running SAP GUI Vusers may be limited in the number of
Vusers that can run, due to the graphic resources available to that machine. To increase the number of Vusers per machine, open additional terminal server sessions on the Load
Generator machines. Select Agent Configuration from Start > All Programs > <product_
name> > Advanced Settings, and select the Enable Terminal Service option. You specify the number of terminal sessions in the Load generator machine properties. For more information, see Configuring Terminal Services in the .
Page 629 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Note: When the LoadRunner Agent is running in a terminal session, and the terminal session's window is minimized, no snapshots will be captured on errors.
How to Enhance SAP GUI Scripts
The following steps describe addition options that are available to enhance SAP GUI scripts.
Record at the cursor
VuGen allows you to record actions into an existing script by either inserting new actions or replacing existing actions. You may decide to record into an existing script for several reasons: l
You made a mistake in the actions that you performed during recording.
l
Your actions were correct, but you need to add additional information such as the handling of popup windows. For example the SAP server may issue an inventory warning, which did not apply during the recording session.
The following steps describe how to record at the cursor.
1. Open the Vuser script in the Editor and click in the left margin adjacent to an existing function.
2. Click the Recording at the Cursor button. VuGen prompts you to make a selection.
3. Select Insert steps into action or Overwrite the rest of the script.
a. Insert steps into action inserts the newly recorded steps at the cursor without overwriting any existing steps. The new segment is enclosed with comments indicating the beginning and end of the added section. This option is ideal for handling occasional popup windows that were not present during the recording.
b. Overwrite the rest of the script replaces all steps from the point of the cursor onward. This option overwrites the remainder of the current Action and deletes all other Actions. It does not affect the vuser_init or vuser_end sections.
4. Click OK. VuGen replays the script until the point of the cursor.
5. Wait for the floating recording toolbar to open.
6. Perform the required actions in the SAP GUI client, switching between sections and actions as required.
7. To end the recording session, click the Stop button on the floating toolbar.
Insert Steps Interactively into a SAP GUI Script
After recording, you can manually add steps to the script in either the Editor or Step Navigator. In addition to manually adding new functions, you can add new steps interactively for SAP GUI
Vusers, directly from the snapshot. Using the right-click menu, you can add object-related steps.
When adding a step from within a snapshot, VuGen uses the Active Screen capability and determines the ID of each object in the SAP GUI client window (unless you disabled Active Screen snapshots in the
"SAPGUI > General Node" on page 340
). The following steps describe how to insert a step interactively for a specific object.
Page 630 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
1. Verify that you recorded the script when Active Screen snapshots were selected in the
SAPGUI General node of the Recording Options (enabled by default).
2. Click within the Snapshot pane.
3. Move the mouse over the object for which you want to add a function. Make sure that VuGen recognizes the object and encloses it with a box.
4. Right-click the object, click Insert New Step, and then select a step from the list of steps that
Page 631 of 1812 HP LoadRunner (11.50)
User Guide
VuGen are available for the object.
The step's Properties dialog box opens, with the Control ID of the object when relevant. For example, if you add a Press Button step, for the normal center button as shown above, the
Properties box displays the following ID:
5. Enter a name for the object in the Description box. Click OK. VuGen inserts the new step after the selected step.
Note: You can get the Control ID of the object for the purpose of pasting it into a specific location. To do this, select Copy Control ID from the right-click menu. You can past it into a Properties box or directly into the code from the Script view.
Add verification functions
When working with optional or dynamic windows or frames, you can use verification functions to determine if the window or object is available. An optional window is a window that does not consistently open during the SAP session. This function allow the Vuser script to continue running even if an optional window opens or an exception occurs.
The first example checks if a window is available. If the window is available, the Vuser closes it before continuing.
if (!sapgui_is_object_available("wnd[1]"))
sapgui_call_method("{ButtonID}",
"press",
LAST,
AdditionalInfo=info1011"); sapgui_press_button(.....)
The next example illustrates a dynamic object in the ME51N transaction. The Document overview frame is optional, and can be opened/closed by the Document overview on/off button.
The code checks the text on the Document overview button. If the text on the button shows
Document overview on, we click the button to close the Document overview frame.
if(sapgui_is_object_available("tbar[1]/btn[9]"))
{
sapgui_get_text("Document overview on/off button",
"tbar[1]/btn[9]",
"paramButtonText",
Page 632 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
LAST);
if(0 == strcmp("Document overview off", lr_eval_ string("{paramButtonText}")))
sapgui_press_button("Document overview off",
"tbar[1]/btn[9]",
BEGIN_OPTIONAL,
"AdditionalInfo=sapgui1013",
END_OPTIONAL);
}
Retrieve information
When working with SAGUI Vusers, you can retrieve the current value of a SAP GUI object using the sapgui_get_<xxx> functions. You can use this value as input for another business process, or display it in the output log.
The following example illustrates how to save part of a status bar message in order to retrieve the order number.
1. Navigate to the point where you want to check the status bar text, and select Insert New
Step. Select the sapgui_status_bar_get_type function. This verifies that the Vuser can successfully retrieve text from the status bar.
2. Insert an if statement that checks if the previous statement succeeded. If so, save the value of the argument using sapgui_status_bar_get_param.
This sapgui_status_bar_get_param function saves the order number into a user-defined parameter. In this case, the order number is the second index of the status bar string.
sapgui_press_button("Save (Ctrl+S)",
"tbar[0]/btn[11]",
BEGIN_OPTIONAL,
"AdditionalInfo=sapgui1038",
END_OPTIONAL); sapgui_status_bar_get_type("Status"); if(0==strcmp(lr_eval_string("{Status}"),"Success")) sapgui_status_bar_get_param("2", " Order_Number ");
During test execution, the Execution log indicates the value and parameter name:
Action.c(240): Pressed button " Save (Ctrl+S)"
Action.c(248): The type of the status bar is "Success"
Action.c(251): The value of parameter 2 in the status bar is "33232"
Save date information
When creating scripts that use dates, your script may not run properly. For example, if you record the script on June 2, and replay it on June 3, the date fields will be incorrect. Therefore, you need to save the date to a parameter during text execution, and use the stored value as input for other date fields. To save the current date or time during script execution, use the lr_save_datetime function.
Insert this function before the function requiring the date information. Note that the format of the date is specific to your locale. Use the relevant format within the lr_save_datetime function. For example, for month.day.year, specify "%m.%d.%Y".
Page 633 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
In the following example, lr_save_datetime saves the current date. The sapgui_set_text function uses this value to set the delivery date for two days later.
lr_save_datetime("%d.%m.%Y", DATE_NOW + (2 * ONE_DAY),
"paramDateTodayPlus2"); sapgui_set_text("Req. deliv.date",
"{paramDateTodayPlus2}",
"usr/ctxtRV45A-KETDAT",
BEGIN_OPTIONAL,
"AdditionalInfo=sapgui1025",
END_OPTIONAL);
Additional SAP Resources
For more information, see the SAP website at www. sap.com or one of the following locations: l
SAP Notes - https://websmp103.sap-ag.de/notes
Note #480149: New profile parameter for user scripting on the front end
Note #587202: Drag =; Drop is a known limitation of the SAP GUI interface l
SAP Patches - https://websmp104.sap-ag.de/patches
SAP GUI for Windows - SAP GUI 6.20 Patch (the lowest allowed level is 32)
Troubleshooting and Limitations
This section describes troubleshooting and limitations for SAP GUI, SAP Web, and SAP (Click &
Script) protocols.
Troubleshooting SAP GUI Vuser Scripts
Question 1: I was able to record a script, but why does replay fail?
Answer: In LoadRunner, make sure that the LoadRunner Remote Agent is running in Process mode. Service mode is not supported. For more information, see
"How to Replay SAP GUI Scripts" on page 628 .
Question 2: Why were certain SAP GUI controls not recorded?
Answer: Some SAP GUI controls are only supported in their menu or toolbar contexts. Try performing the problematic task using a different means—through a menu option, context menu, toolbar, and so on.
Question 3: Why can't I record or replay any scripts in VuGen?
Answer:
1. Verify that you have the latest patch of SAP GUI 6.20 installed. The lowest allowed patch level is patch 32.
2. Make sure that scripting is enabled. See the
"How to Configure the SAP Environment" on page
622 .
Page 634 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
3. Verify that notifications are disabled in the SAP GUI for Windows client. Click the Customizing of Local Layout button or press ALT+F12. Click Options and select the Scripting tab. Clear both Notify options.
Question 4: What is the meaning of the error popup messages that are issued when I try to run the script?
Answer: Certain SAP applications store the last layout for each user (such as which frames are visible or hidden). If the stored layout was changed since the script was recorded, this may cause replay problems. For Example, in the ME52N transaction, the Document overview Off/On button will change the number of visible frames.
If this occurs:
1. Navigate the transaction to the same point as it was during recording, before starting replay.
You can use the Snapshot viewer to see the layout in which it was recorded.
2. Add statements to the script that bring the transaction to the desired layout during replay. For example, if an optional frame interferes with your replay, insert a verification function that checks if the frame is open. If it is open, click a button to close it. For verification examples, see
"How to Enhance SAP GUI Scripts" on page 630
.
Question 5: Can I use the single sign-on mechanism when running a script on a remote machine?
Answer: No, VuGen does not support the single sign-on connection mechanism. In your SAP GUI client, open the Advanced Options and clear the Enable Secure Network Communication feature. Note that you must re-record the script after you modify the Connection preferences.
Question 6: Can VuGen record all SAP objects?
Answer: Recording is not available for objects not supported by SAP GUI Scripting. See your recording log for information about those objects.
Question 7: Are all business processes supported?
Answer: VuGen does not support business processes that invoke Microsoft Office module controls, nor those that require the use of GuiXT. You can disable GuiXT from the SAP GUI for
Windows client Options menu.
Question 8: When I go to the Auto Logon node of the Recording Options, why is the list of server names empty?
Answer: This sometimes occurs when using SAP GUI Client 7.20. To resolve this issue, copy the
saplogon.ini file from %APPDATA%\SAP\Common where %APPDATA% stands for the environment variable specifying the Application Data folder located directly below the user profile folder. Paste the file to the %WINDIR% folder (C:\Windows).
Siebel Web Protocol
Siebel Web Protocol Overview
The Siebel-Web protocol is similar to the standard Web Vuser, with several changes in the default settings to allow it to work with the Siebel Customer Relationship Management (CRM) application.
Page 635 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
You record typical activities in your Siebel session. VuGen records the actions and generates functions with a web_ prefix, that emulate the actions.
Siebel Web Recording Options and Run-Time Settings
Before recording a Siebel Web Vuser, we recommend that you set the following Recording Options: l
Record node: HTML based script
Advanced HTML - Script options: a script containing explicit URLs only
Advanced HTML - Non HTML-generated elements: Do not record l
Advanced node: Clear the Reset context for each action option.
Before replaying or load testing a Siebel Web Vuser, we recommend that you set the following Run-
Time setting: l
In the Run-Time settings, clear the Simulate a new user on each iteration option in the
Browser Emulation node.
How to Record Transaction Breakdown Information
VuGen provides a diagnostic tool for understanding the transaction components in your test—
transaction breakdown. Using transaction breakdown, you can determine where the bottlenecks are and the issues that need to be resolved.
When preparing your script for transaction breakdown, we recommend that you add think time steps at the end of each transaction using the ratio of one second per hour of testing. For more information about adding think time steps, see
"How to Insert Steps into a Script" on page 230 .
In order to record the transaction breakdown information, you need to modify your the parameterization functions in your script.
Prepare your script for transaction breakdown
1. Identify the script parameterization replacement of the Session ID.
style="font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline">/* Registering parameter(s) from source task id 15
// {Siebel_sn_body4} = "28eMu9uzkn.YGFFevN1FdrCfCCOc8c_"
// */
web_reg_save_param("Siebel_sn_body4",
"LB/IC=_sn=",
"RB/IC==;",
"Ord=1",
"Search=Body",
"RelFrameId=1",
LAST);
2. Mark the next web_submit_data function as a transaction by enclosing it with lr_start_
transaction and lr_end_transaction functions.
Page 636 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
3. Before the end of the transactions, add a call to lr_transaction_instance_add_info, where the first parameter, 0 is mandatory and the session ID has a SSQLBD prefix.
lr_start_transaction("LoginSQLSync");
web_submit_data("start.swe_2",
"Action=http://design/callcenter_enu/start.swe",
"Method=POST",
"RecContentType=text/html",
"Referer=http://design/callcenter_enu/start.swe",
"Snapshot=t2.inf",
"Mode=HTML",
ITEMDATA,
"Name=SWEUserName", "Value=wrun", ENDITEM,
"Name=SWEPassword", "Value=wrun", ENDITEM,
"Name=SWERememberUser", "Value=Yes", ENDITEM,
"Name=SWENeedContext", "Value=false", ENDITEM,
"Name=SWEFo", "Value=SWEEntryForm", ENDITEM,
"Name=SWETS", "Value={SiebelTimeStamp}", ENDITEM,
"Name=SWECmd", "Value=ExecuteLogin", ENDITEM,
"Name=SWEBID", "Value=-1", ENDITEM,
"Name=SWEC", "Value=0", ENDITEM,
LAST); lr_transaction_instance_add_info(0,lr_eval_string("SSQLBD:{Siebel_ sn_body4}")); lr_end_transaction("LoginSQLSync", LR_AUTO);
Note: To avoid session ID conflicts, make sure that the Vusers log off from the database at the end of each session.
Troubleshooting and Limitations
This section describes troubleshooting and limitations for Siebel Web Vuser scripts.
Back or Refresh Error
An error message relating to Back or Refresh typically has the following text:
We are unable to process your request. This is most likely because you used the browser back or refresh button to get to this point.
Cause: The possible causes of this problem may be: l
The SWEC was not correlated correctly for the current request.
l
The SWETS was not correlated correctly for the current request.
l
The request was submitted twice to the Siebel server without the SWEC being updated.
l
A previous request should have opened a frame for the browser to download. This frame was not created on the server probably because the SWEMethod has changed since the recording.
Same Values
A typical Web page response to the Same Values error is:
Page 637 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
@0`0`3`3``0`UC`1`Status`Error`SWEC`10`0`1`Errors`0`2`0`Level0`0`ErrMsg`The same values for
'Name' already exist. If you would like to enter a new record, please make sure that the field values are unique.`ErrCode`28591`
Cause: The possible cause of this problem may be that one of the values in the request (in the above example, the value of the Name field) duplicates a value in another row of the database table.
This value needs to be replaced with a unique value to be used for each iteration per user. The recommended solution is to replace the row ID with its parameter instead insuring that it will be unique.
No Content HTTP Response
A typical HTTP response for a No Content HTTP Response type error is:
HTTP/1.1 204 No Content
Server: Microsoft-IIS/5.0
Date: Fri, 31 Jan 2003 21:52:30 GMT
Content-Language: en
Cache-Control: no-cache
Cause: The possible causes of this problem may be that the row ID is not correlated at all or that it is correlated incorrectly.
Restoring the Context
The typical Web page response to the Restoring the Context type error is:
@0`0`3`3``0`UC`1`Status`Error`SWEC`9`0`1`Errors`0`2`0`Level0`0`ErrMsg`An error happened during restoring the context for requested location`ErrCode`27631`
Cause: The possible causes of this problem may be that the rowid is not correlated or that it is correlated incorrectly.
Cannot Locate Record
The typical Web page response to the Cannot locate record type error is:
@0`0`3`3``0`UC`1`Status`Error`SWEC`23`0`2`Errors`0`2`0`Level0`0`ErrMsg`Cannot locate record within view: Contact Detail - Opportunities View applet: Opportunity List Applet.`ErrCode`27573`
Cause: The possible causes of this problem may be that the input name SWERowId does not contain a row ID for a record on the Web page. This input name should have been parameterized.
The parameter's source value may have changed its location.
End of File
The typical Web page response to the End of File type error is:
@0`0`3`3``0`UC`1`Status`Error`SWEC`28`0`1`Errors`0`2`0`Level0`0`ErrMsg`An end of file error has occurred. Please continue or ask your systems administrator to check your application configuration if the problem persists.`ErrCode`28601`
Cause: The possible causes of this problem may be that the input name SWERowId does not contain a row ID for a record on the Web page. This input name should have been parameterized.
The parameter's source value may have changed its location.
Page 638 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Unable to Retrieve Search Categories
The typical Web page response to the Unable to Retrieve Search Categories type error is:
Cause: A possible cause of this problem may be that the search frame was not downloaded from the server. This occurs when the previous request did not ask the server to create the search frame correctly.
SilverLight Protocol
Silverlight Protocol Overview
Microsoft Silverlight is a web application framework that supports graphics, animations, and interactivity. VuGen's Silverlight protocol enables you to record applications built with Microsoft
Silverlight. VuGen's Silverlight protocol includes the Web (HTTP/HTML) protocol as a subset as well as including a number of new functions, recording options, and run-time settings.
In order to record high level scripts, you can import WSDL files used by your application in the recording options.
How to Import WSDL Files
The following steps describe how to import WSDL files into a Silverlight script manually or automatically. Alternatively, you can disable WSDL files and generate soap requests. All of these options are performed in the Silverlight > Services node of the Recording Options Dialog Box.
For user interface details, see
"Silverlight > Services Node" on page 341
.
Automatically locate WSDL files
To configure VuGen to automatically detect the WSDL files used by your script and attempt to locate them, select Use WSDL files included in the script and Automatically detect WSDL
files and import services during code generation. If a WSDL is detected that cannot be imported, you will be notified in the Code Generation Notifications box. Ofra: is that the right name for the dialog box?
Manually locate WSDL files
You can manually locate WSDL files in a number of ways from the Add Service Dialog Box. To locate a WSDL file whose URL is known, use the URL option. If the WSDL file is on your local machine, you the File option. To search for the WSDL in the WSDL History (a list of previously imported WSDLs), select Previously Imported and click ... to open the list.
For user interface details, see
"Add / Edit Services Dialog Box" on page 342 .
Disable WSDL files
You can disable WSDL files and generate SOAP requests instead. This results in a lower level script, however it does increase the performance of your script. To disable WSDL files, select Do
not use WSDL files.
Advanced Security Settings
You can modify security and password settings in the Protocol and Security Scenario Data dialog box. For details, see
"Protocol and Security Scenario Data Dialog Box" on page 343
.
Page 639 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Troubleshooting and Limitations
While recording a site developed in Silverlight, the Install Silverlight step is recorded even though recording process did not inlcud intalling the Silverlight plug-in.
Workaround
Configure the Run-time Settings to exclude the following address: http://go.microsoft.com/fwlink/?LinkId=108181
1. Select the Run-time settings > Internet Protocol > Download Filters Node.
2. Select the Exclude addresses in list radio button.
3. Click Add and add http://go.microsoft.com/fwlink/?LinkId=108181 to the list.
Note: The ?LinkId=108181 portion of the URL address may not be static over time and may need to be updated.
Tuxedo Protocols
Tuxedo Protocol - Overview
When you record a Tuxedo application, VuGen generates LRT functions that describe the recorded actions. These functions emulate communication between a Tuxedo client and a server. Each
Tuxedo function begins with an lrt,tp, tx, or F prefix.
In the following example, VuGen recorded a client's actions in a Tuxedo bank application. The client performed an action of opening a bank account and specifying all the necessary details. The session was aborted when the client specified a zero opening balance.
style="font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline">lrt_abort_on_error(); lr_think_time(65); tpresult_int = lrt_tpbegin(30, 0); data_0 = lrt_tpalloc("FML", "", 512); lrt_Finitialize((FBFR*)data_0);
/* Fill the data buffer data_0 with new account information */ lrt_Fadd_fld((FBFR*)data_0, "name=BRANCH_ID", "value=8", LRT_END_OF_
PARMS); lrt_Fadd_fld((FBFR*)data_0, "name=ACCT_TYPE", "value=C", LRT_END_OF_
PARMS); lrt_Fadd_fld((FBFR*)data_0, "name=MID_INIT", "value=Q", LRT_END_OF_
PARMS); lrt_Fadd_fld((FBFR*)data_0,"name=PHONE","value=123-456-7890",
LRT_END_OF_PARMS); lrt_Fadd_fld((FBFR*)data_0, "name=ADDRESS", "value=1 Broadway
New York, NY 10000", LRT_END_OF_PARMS); lrt_Fadd_fld((FBFR*)data_0,"name=SSN","value=111111111", LRT_END_OF_
Page 640 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
PARMS); lrt_Fadd_fld((FBFR*)data_0,"name=LAST_NAME", "value=Doe",LRT_END_OF_
PARMS); lrt_Fadd_fld((FBFR*)data_0,"name=FIRST_NAME", "value=BJ",LRT_END_OF_
PARMS); lrt_Fadd_fld((FBFR*)data_0, "name=SAMOUNT", "value=0.00",LRT_END_OF_
PARMS);
/* Open a new account */ tpresult_int = lrt_tpcall("OPEN_ACCT", data_0, 0, =;data_0, =;olen_2,
0); lrt_tpabort(0); lrt_tpcommit(0); lrt_tpfree(data_0); lrt_tpterm();
Notes About Working with Tuxedo Scripts
The following important notes should be reviewed before recording and running a tuxedo script: l
We recommend using the Tuxedo 6 protocol for recording Tuxedo 6.x and earlier, and the
Tuxedo protocol for Tuxedo 7.x and higher.
l
Before you record, verify that the Tuxedo folder, %TUXDIR%\bin is in the path.
l
If the environment variables have changed since the last time you restarted VuGen, VuGen may record the original variable value rather than the current value.
l
To avoid any inconsistencies, you should restart VuGen before recording Tuxedo applications.
l
To run PeopleSoft-Tuxedo Vusers with Tuxedo 7.x, you must change the library extension in the
mdrv.dat file as follows:
[PeopleSoft-Tuxedo]
WINNT_EXT_LIBS=lrt7.dll
Defining Environment Settings for Tuxedo Vusers
The following section describes the system variable settings for Tuxedo Vusers running on
Windows and Linux platforms. You define the system variables in your Control Panel/System dialog box (NT) or .cshrc or .login file (Linux).
TUXDIR
the root folder for Tuxedo sources.
FLDTBLDIR
list of directories containing FML buffer information. In Windows, separate the names of directories with semi-colons. On Linux platforms, separate the names of the directories with a colon.
FIELDTBLS
list of files containing FML buffer information. On both Windows and Linux platforms, separate the file names with commas.
Page 641 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
For example:
SET FLDTBLDIR=%TUXDIR%\udataobj;%TUXDIR%\APPS\WS (PC)
SET FIELDTBLS=bankflds,usysflds (PC) setenv FLDTBLDIR $TUXDIR/udataobj:$TUXDIR/apps/bankapp (Linux) setenv FIELDTBLS bank.flds,Usysflds (Linux)
You must define the following system variables for Tuxedo clients using Tuxedo/WS workstation extensions during execution:
WSNADDR
specifies the network address of the workstation listener process. This enables the client application to access Tuxedo. Note that to define multiple addresses in a
WSNADDR statement, each address must be separated by a comma.
WSDEVICE
specifies the device that accesses the network. Note that you do not need to define this variable for some network protocols.
For example:
SET WSNADDR=0x0002ffffc7cb4e4a (PC) setenv WSNADDR 0x0002ffffc7cb4e4a (Linux) setenv WSDEVICE /dev/tcp (Linux)
Tuxedo Buffer Data
When you use VuGen to create a Tuxedo Vuser script, your actions are recorded into the three sections of the script: vuser_init, Actions, and vuser_end.
The data that is received or transmitted is stored in data buffers, which can be very large. In order to simplify the appearance of the script, the actual data is stored in external files—not in the C file.
When a data transfer occurs, the data is copied from the external file into a temporary buffer.
The external file is called replay .vdf , and it contains the contents of all the temporary buffers. The buffers' contents are stored as sequential records. The records are marked by identifiers indicating whether the data was sent or received, and the buffer descriptor. The LRT functions use the buffer descriptors to access the data.
You can use VuGen to view the contents of the data file by selecting the replay.vdf file in the
Solution Explorer.
The option to view a data file is available by default for Tuxedo scripts.
Page 642 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Troubleshooting and Limitations
This section describes troubleshooting and limitations for Tuxedo and Tuxedo 6 Vusers.
l
If you encounter problems recording or replaying Tuxedo applications, or the script is missing a call to lrt_tpinitialize, contact Customer Support to check which DLLs are used with the application.
l
If the application uses wtuxws32.dll, instead of libwsc.dll, contact Customer Support to obtain a patch to enable the recording.
l
If you encounter problems recording or running Tuxedo applications, check that the Tuxedo application runs without VuGen, and that the environment variables have been defined correctly.
For more information, see
"Tuxedo Buffer Data " on previous page
. Note that after you set or modify the Tuxedo variables, you should restart VuGen and your application, in order for the changes to take effect. If your application is 16-bit, then you also need to kill the NTVDM process.
l
If you experience problems during execution, check the Tuxedo log file on the side of the server for error messages. By default, this file is found in the folder indicated by the environment variable APPDIR. The file name has the form ULOG.mmddyy, where mmddyy indicates the current month, day, and year. The file for March 12, 1999 would be ULOG.031299. The default
Page 643 of 1812 HP LoadRunner (11.50)
User Guide
VuGen location of this file can be changed by setting the environment variable ULOGPFX on the server.
A log file can also be found on the client side, in the current folder, unless the ULOGPFX variable changes its location.
Web (Click & Script) Protocol
Web (Click & Script) Protocol
Web (Click & Script) Enhancements
The following section describes several enhancements that can assist you in creating your script.
Most of the features described below are enhancements to the API functions. For detailed information about the functions and their arguments, see the Function Reference (Help > Function
Reference) or click F1 on any function.
Adding conditional steps
The Web (Click & Script) functions, web_xxxx, allow you to specify conditional actions during replay. Conditions are useful, for example, if you need to check for an element and perform an action only if the element is found.
For example, suppose you perform an Internet search and you want to navigate to all of the result pages by clicking Next. Since you do not know how many result pages there will be, you need to check if there is a Next button, indicating another page, without failing the step. The following code adds a verification step with a notification—if it finds the Next button, it clicks on it.
While (web_text_link("Next",
DESCRIPTION,
"Text=Next",
VERIFICATION,
"
NotFound=Notify",
ACTION, "UserAction=Click",
LAST) == LR_PASS);
For details about the syntax and use of the VERIFICATION section, see the Function Reference
(Help > Function Reference).
Checking a page title
In web_browser steps, you can use the title verification recording option to make sure that the correct page is downloaded. You can instruct the Vuser to perform this check automatically for every step or every navigation to a new top level window.
In addition, you can manually add title verifications to your script at the desired locations, using both exact and regular expression matches.
web_browser("test_step",
DESCRIPTION,
...
VERIFICATION,
"BrowserTitle=Title",
Page 644 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
ACTION,]
,
LAST);
For more information, see theFunction Reference (Help > Function Reference).
You can set title verification options directly from within the Recording options. For more information, see the section about recording with Click & Script.
Text check verification
Using text checkpoints, you can verify that a text string is displayed in the appropriate place on a
Web page or application and then perform an action based on the findings. You can check that a text string exists (ContainsText),or that it does not exist (DoesNotContainText),using exact or regular expression matching.
For example, suppose a Web page displays the sentence "Flight departing from New York to San
Francisco". You can create a text checkpoint that checks that the words "New York" are displayed between "Flight departing from" and "to San Francisco". (In this example, you would need to use regular expression criteria.)
To implement these checkpoints, you add the Text Check related arguments to the
VERIFICATION section of the step. During replay, Vusers search the innerText of the browser's
HTML document and any child frames. The NotFound argument specifies the action to take if verification fails, either because the object was not found or because the text verification failed:
Error, Warning, or Notify.
You can manually add text verifications to your script for existing steps. Place the text verification after the step that generated the element.
The text validation arguments are valid for the following Action functions: web_browser, web_
element, web_list, web_text_link, web_table, and web_text_area.
Note: You can use the same type of text verification only once per step (for example,
ContainsText twice). If you want to check for multiple texts, separate them into several steps.
You can, however, use different verifications in the same step (for example, ContainsText =;
DoesNotContainText). In this case, all conditions have to be met in order for the step to pass.
In the following example, the verification arguments check that we were not directed from www.acme.com to the French version of the website, acme.com/fr.
web_browser("www.acme.com",
ACTION,
"Navigate=http://www.acme.com/",
LAST); web_browser("Verify",
VERIFICATION,
"ContainsText=Go to Acme France",
"DoesNotContainText=acme.com in English",
LAST);
Saving a Java script value to a parameter
The EvalJavaScript argument lets you evaluate Java Script on the Web page.
Page 645 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Suppose you want to click on a link which has the same name as the page title. The following example evaluates the document title and uses it in the next web_text_link function.
web_browser("GetTitle",
ACTION,
"EvalJavaScript=document.title;",
"EvalJavaScriptResultParam=title",
LAST); web_text_link("Link",
DESCRIPTION,
"Text={title}",
LAST);
Working with custom descriptions
Suppose you want to randomly click a link that belongs to some group. For example, on hp.com you want to randomly select a country. Regular description matching will not allow this type of operation. However, using a custom description argument, you can identify the group with an attribute that is common to all the links in the group.
Using the custom description argument, you specify any attribute of the element, even those that are not predefined for that element. During replay, the Vuser searches for those attributes specified in the DESCRIPTION section. Replay will not fail on any unknown argument in the
DESCRIPTION section.
For example, to find the following hyperlink:
<a href="yahoo.com" my_attribute="bar">Yahoo</a>, use: web_text_link("yahoo",
DESCRIPTION,
"Text=yahoo",
"my_attribute=bar",
LAST);
In the following example, since all the relevant links have the same class name, newmerc-left-ct, you can perform a random click using the following code: web_text_link("Click",
DESCRIPTION,
"Class=newmerc-left-ct",
"Ordinal=random",
LAST);
The following functions do not support the custom description arguments: web_browser, web_
map_area, web_radio_group, and web_reg_dialog.
Copying text to the clipboard
When you work with Web (Click & Script) Vuser scripts, VuGen lets you copy text from a snapshot to the clipboard. This functionality is available in both the Page view and Page Source view. For details on how to copy the text to the clipboard, see
"How to Work with Snapshots" on page 88
.
Page 646 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Web (Click & Script) Example Script
Click & Script Vuser scripts typically contain several actions which make up a business process.
By viewing the recorded functions that were generated on a GUI level, you can determine the user's exact actions during the recorded session.
For example, in a typical recording, the first stage may contain a sign-in process. The browser opens on the sign-in page, and a user signs in by submitting a user name and password and clicking
Sign In.
For Web (Click & Script) Vuser scripts, VuGen generates a web_edit_field function that represents the data entered into an edit field. In the example that follows, a user entered text into the userid field, and a password into the pwd field which is encrypted.
vuser_init() {
web_browser("WebTours",
DESCRIPTION,
ACTION,
"Navigate=http://localhost:1080/WebTours/",
LAST);
web_edit_field("username",
"Snapshot=t2.inf",
DESCRIPTION,
"Type=text",
"Name=username",
"FrameName=navbar",
ACTION,
"SetValue=jojo",
LAST);
web_edit_field("password",
"Snapshot=t3.inf",
DESCRIPTION,
"Type=password",
"Name=password",
"FrameName=navbar",
ACTION,
"SetEncryptedValue=440315c7c093c20e",
LAST);...
Web (Click & Script) API Notes
This section lists general notes about the Web functions. Note that you can specify a regular expression for most object descriptions, by preceding the text with "/RE" before the equals sign.
See the Function Reference (Help > Function Reference) for more details. For example: web_text_link("Manage Assets",
DESCRIPTION,
"Text/RE=(Manage Assets)|(Configure Assets)",
ACTION,
Page 647 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
"UserAction=Click",
LAST);
Ordinals
The Ordinal attribute is a one-based index to distinguish between multiple occurrences of objects with identical descriptions. In the following example, the two recorded web_text_link functions have identical arguments, except for the ordinal. The ordinal value of 2, indicates the second occurrence.
web_text_link("Manage Assets",
DESCRIPTION,
"Text=Manage Assets",
"FrameName=main",
ACTION,
"UserAction=Click",
LAST); web_text_link("Manage Assets_2",
DESCRIPTION,
"Text=Manage Assets",
"Ordinal=2",
"FrameName=main",
ACTION,
"UserAction=Click",
LAST);
Empty Strings
There is a difference between not specifying an argument and specifying it as an empty string.
When you do not specify an argument, VuGen uses the default value or ignores it. When you list an argument, but assign it an empty string as a value, VuGen attempts to find a match with an empty string or no string at all. For example, in a web_text_link function, omitting the id argument instructs VuGen to ignore the id property of the HTML element. Specifying "ID=" searches for
HTML elements with no id property or with an empty ID.
web_text_link("Manage Assets_2",
DESCRIPTION,
"Text=Manage Assets",
"Id=",
"FrameName=main",
ACTION,
"UserAction=Click",
LAST);
Click & Script - Recording Tips
This section lists tips for recording click-and-script Vuser scripts.
Page 648 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Use the mouse and not the keyboard
It is preferable to click on an object with the mouse rather than using the keyboard. During recording, use only GUI objects that are within the browser's pane. Do not use any browser icons, controls, the Stop button, or menu items, such as View > Refresh. You may, however, use the
Refresh, Home, Back and Forward buttons and the address bar.
Do not record over an existing script
It is best to record into a newly created script—not an existing one.
Avoid context menus
Avoid using context menus during recording. Context menus are right-click menus which pop up when clicking certain objects in a graphical user interface.
Avoid working in another browser while recording
While recording, do not work in any browser window other than the browser windows opened by
VuGen.
Wait for downloads
Wait for all downloads to complete before doing any action, such as clicking on a button or filling in a text field.
Wait for pages to load
During recording, it is best to wait for the page to load completely before doing the next step. If you did not wait for all of the pages to load, record the script again.
Navigate to the start page
If the last page in an action does not contain the links and buttons that were available at the start of the iteration, then the next iteration will fail. For example, if the first page has a text link Book A
Flight, make sure to navigate to the appropriate page at the end of your recording, so that the same link will be visible at the end of the business process.
Use a higher event configuration level
Record the business process again using the High event configuration level. For more information on changing the event configuration level, see
"Click and Script - Troubleshooting and Limitations" on page 651 .
Disable socket level recording
In certain cases, the capturing of the socket level messages disrupts the application. For most recordings, socket level data is not required. To prevent the recording of socket level data, disable the option in the recording options. For more information, see
"GUI Properties > Advanced Node" on page 322 .
Enable the "Record rendering-related property values" option
If the client-side scripts of the application use a lot of styling activities, enable the Record
rendering-related property values option before recording the script. For example, enable this option to record additional DOM properties such as offsetTop. Note that enabling this option may decrease the recording speed. You can enable the option by selecting Recording Options > GUI
Properties > Advanced. For more information, see
"GUI Properties > Advanced Node" on page
Page 649 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
322 .
Click & Script - Replay Tips
This section lists tips for replaying click-and-script Vuser scripts.
Do not reorder statements in a recorded script
Do not change the order of the statements within a recorded script. Also, copying segments of code from one Action to another is not recommended.
Convert non-ASCII characters
If your links contain non-ASCII characters, you should instruct VuGen to convert the data to or from the UTF-8 format.
Enable UTF-8 conversion
1. Click Record > Recording Options to open the Recording Options dialog box.
2. Select Replay > Run-Time Settings and select the Internet Protocol > Preferences node.
3. Click Options to open the Advanced Options dialog box.
4. Locate the Convert from/to UTF-8 option and set it to Yes.
Alternatively, view the list of options that is displayed when a link is not found. Enter the displayed text as-is, such as the hex escape sequences \xA0 or any other non-standard format.
Run the same sequence of actions twice
In some cases, you can perform a certain process only once—such as deleting a user from the database. Replay will fail after the first iteration because the action is no longer valid. Verify that your business process can be repeated more than once with the same data.
Set unique image properties
In the Step Navigator, double click on the previous image step to open its properties. If the Id,
Name, and Alt properties are empty, provide further identification of the image, such as its file name in the Src property.
Alternatively, you can add an Ordinal argument to specify the occurrence number of the image on that page. The Ordinal argument uniquely identifies each image on the page where all other identification arguments are not unique. For more information, see the Function Reference
(Help > Function Reference).
Check the step's description
If you receive a GUI Object is not found error, check the Output pane for a list of the objects in the problematic step. In some cases, the object description changes slightly from run to run.
There are several solutions: l
If the new value is stable, open the script in the Editor and manually modify the value of the step's DESCRIPTION argument.
l
If the description changes from run to run, you can use a regular expression in the
DESCRIPTION argument. For more information, see the Function Reference (Help > Function
Page 650 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Reference).
l
Alternatively, replace the problematic object description property, such as Name, with the
Ordinal property. For more information, see the Function Reference (Help > Function
Reference).
Click & Script - Miscellaneous Tips
The following additional tips may help you in troubleshooting problems that you experience with click-and-script Vuser scripts:
Search for warnings
Search for warnings or alerts in the Output pane.
Verify the response
Verify the response of the previous step is correct using web_reg_find. For more information, see the Function Reference (Help > Function Reference).
Use alternate navigation
For problematic steps or those using Java applets, use Alternative Navigation to replace the Web step with an HTTP level step. Note that the HTTP level steps may require manual correlations. To perform Alternative Navigation, select a step in the Step Navigator, or the text in Script View, and select Replace with alternative navigation from the right-click menu.
Working with the Kerberos Protocol
If you are using the Kerberos Protocol for authentication, you must customize VuGen to properly convene authorization sessions. Advanced users can attempt to perform this customization themselves.
In order for the Kerberos Protocol to work properly, create a krb5.ini file and put it in an available folder. Save the full path name of krb5.ini into the KRB5_CONFIG environment variable.
The krb5.ini file should contain detailed information about each domain (KDS and AS addresses) and trust chains.
For more information, contact HP software support.
Click and Script - Troubleshooting and Limitations
This section describes troubleshooting and limitations for click-and-script protocols. Some items apply to specific click-and-script protocols only.
Recording Issues and Limitations
Firefox is not supported
Only Internet Explorer is supported for Web (Click & Script). To record browser activity on Firefox, use the Web (HTTP/HTML) protocol.
Page 651 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Application behaves differently while being recorded
If your application behaves differently during recording, than it does without recording, you should determine if the recording problem is unique to Web. The effect may be that a Web page will not load, part of the content is missing, a popup window does not open, and so forth.
Create a new Web (HTTP/HTML) script and repeat the recording.
In the event that the recording fails in Web (HTTP/HTML), we recommend that you disable socket level recording (see
"Click & Script - Recording Tips" on page 648 ).
The problem may be the result of an event listener. Use trial and error to disable event listeners in the Web Event Configuration Recording Options, and then re-record your session as a Web user.
Certain Click and Script steps do not generate properly
After recording a script, if not all steps are correctly generated, the problem may be due to the
Windows Component > Internet Explorer Enhanced Security Configuration.
Remove Internet Explorer Enhanced Security Configuration by selecting Control Panel >
Add or Remove Programs > Add or Remove Windows Components and re-record your script.
Disable an event listener
1. Click Record > Recording Options to open the Recording Options dialog box.
2. Select Recording > Recording Options and select the GUI Properties > Web Event
Configuration node.
3. Click Custom Settings and expand the Web Objects node. Select an object.
4. Select Disabled from the list in the Record column for the relevant Web object. If the recording still does not work, enable the listener you previously disabled, and try disabling another one. Repeat these steps until your recording succeeds.
Dynamic menu navigation was not recorded
A dynamic menu is a menu that dynamically changes depending on where you select it. If the dynamic menu navigation was not recorded, record again using "high" event configuration mode.
These settings can be found in the Recording Options > GUI Properties > Web Event
Configuration node.
Certain user actions were not recorded
Check if there is a Java applet running inside the browser. If not, record the script with the Web
(HTTP/HTML) protocol.
Page 652 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Replay Issues
GUI object not found
Does the error occur at the beginning of the second iteration?
If the error occurs at the beginning of the second iteration's Action section, it is probably the result of a starting page that was present for the first iteration, but missing for the second one. If the last page in an action does not contain the links and buttons that were available at the start of the iteration, then the next iteration will fail. For example, if the first page has a text link Book A Flight, make sure to navigate to the appropriate page, so that the same link will be visible at the end of the business process.
Is it a text link containing non-ASCII characters?
If the problem occurs with non-ASCII characters, you should instruct VuGen to covert the data to a suitable character set.
Enable data conversion on Windows machines
1. Click Record > Recording Options to open the Recording Options dialog box.
2. Select Replay > Run-Time Settings and select the Internet Protocol > Preferences node.
3. Click Options to open the Advanced Options dialog box.
4. Locate Charset Conversions by HTTP in the Web (Click & Script) > General options, and set it to Yes.
Enable UTF-8 conversion for Linux machines
1. Click Record > Recording Options to open the Recording Options dialog box.
2. Select Replay > Run-Time Settings and select the Internet Protocol > Preferences node.
3. Click Options to open the Advanced Options dialog box.
4. Locate Convert from/to UTF-8 in the General options and set it to Yes.
Alternatively, view the list of alternatives that are displayed when a link is not found. Enter the displayed text as-is, such as hex escape sequences \xA0 or any other non-standard format.
Can you run the same sequence of actions twice in the application?
In some cases, you can only perform a certain process once, such as deleting a user from the database. Replay will fail after the first iteration, because the action is no longer valid. Verify that your business process can be repeated in the application more than once with the same data, without recording again.
Were the image properties 'Id', 'Name' and 'Alt' empty?
In the Step Navigator, double click on the previous image step to open its properties. If the Id,
Name, and Alt properties are empty, provide further identification of the image, such as its file name in the Src property.
Alternatively, you add an Ordinal argument to specify the occurrence number of the image on
Page 653 of 1812 HP LoadRunner (11.50)
User Guide
VuGen that page. The Ordinal argument uniquely identifies each image on the page where all other identification arguments are not unique. For more information, see the Function Reference
(Help > Function Reference).
Did the step's description change?
Check the Output pane for a list of the objects in the problematic step. In some cases, the object description changes slightly from run to run.
There are several solutions: n
If the new value is stable, open the Script View and manually modify the value of the step's
DESCRIPTION argument(s).
n
If the description changes from run to run, you can use a regular expression in the
DESCRIPTION argument(s). For more information, see the Function Reference (Help >
Function Reference).
n
Alternatively, replace the problematic object description property, such as Name, with the
Ordinal property For more information, see the Function Reference (Help > Function
Reference).
Did the page load completely during recording?
During recording, it is best to wait for the page to load completely before doing the next step. If you did not wait for all of the pages to load, record the script again.
Replay failure
If the replay is failing at a particular step, check the step description. VuGen sometimes reads a single space as a double space. Make sure that there are no incorrect double spaces in the string.
Miscellaneous Issues
Out of memory error in JavaScript
Increase the JavaScript memory in the Run-Time settings.
Increase the JavaScript memory size
1. Click Record > Recording Options to open the Recording Options dialog box.
2. Select Replay > Run-Time Settings and select the Internet Protocol > Preferences node.
3. Click Options to open the Advanced Options dialog box.
4. Locate the Memory Management JavaScript Runtime Memory Size (Kb) and Memory
Management JavaScript Stack Memory Size (Kb) options.
5. Increase the memory sizes to 512Kb or higher.
Page 654 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
VuGen displays JavaScript errors
If VuGen displays JavaScript errors in the Output pane, enable IE (Internet Explorer) script errors in order to verify that the Javascript itself does not contain errors.
Show script errors
1. Open Internet Explorer.
2. Select Tools > Internet Options and click the Advanced tab.
3. Under Browsing, select the Display a notification about every script error check box.
4. Rerun the application in IE. If IE displays script errors, then there is a problem with the
JavaScript application. If it is not possible to fix the application, you can safely ignore the corresponding replay errors.
Problems following parameterization
If you encounter problems only after you have parameterized values, verify that the values are valid for your application. Perform business process with the value of the parameter and verify that the application accepts it.
Problems with applications that utilize styling actions
If the client-side scripts of the application use a lot of styling activities, you should record the script again after enabling the Record rendering-related property values option. This enables the recording of additional DOM objects.
Enable the "Record rendering-related property values" option
1. Click Record > Recording Options to open the Recording Options dialog box.
2. Select Recording > Recording Options and select the GUI Properties > Advanced node.
3. Select the Record rendering-related property values check box.
Re-record the Vuser script.
Web Protocols
Web Protocols Overview
You use VuGen to develop Web Vuser scripts. While you navigate through a site performing typical user activities, VuGen records your actions and generates a Vuser script. When you run the script, the resulting Vuser emulates a user accessing the Internet.
Suppose you have a web site that displays product information for your company. The site is accessed by customers and potential customers. You want to make sure that the response time for any customer query is less than a specified value (for example, 20 seconds)—even when many users (for example, 200) access the site simultaneously. You use Vusers to emulate this scenario,
Page 655 of 1812 HP LoadRunner (11.50)
User Guide
VuGen where the web server services simultaneous requests for information. Each Vuser could do the following: l
Load the home page l
Navigate to the page containing the product information l
Submit a query l
Wait for a response from the server
You can distribute several hundred Vusers among the available testing machines, each Vuser accessing the server by using its API. This enables you to measure the performance of the server under the load of many Vusers.
Web Vuser Technology
VuGen creates Web Vuser scripts by recording the activity between a browser and a Web server.
VuGen monitors the client (browser) end of the system and traces all the requests sent to, and received from, the server.
When you run a recorded Vuser script, the Vuser communicates directly with the server without relying on client software. Instead, the Vuser script executes calls directly to the Web server via
API functions.
Web Vuser Types
To create a Web Vuser script, select one of the following Web Vuser protocols:
Web (Click & Script)
The Web (Click & Script) protocol records Web sessions on a user-action GUI level. VuGen creates a GUI-level script that intuitively represents actions in the Web interface. For example,
Page 656 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
VuGen generates a web_button function when you click a button to submit information, and VuGen generates a web_edit_field function when you enter text into an edit box.
Web (Click & Script) Vusers support non-HTML code such as Javascript on the client side. VuGen creates an intuitive script that emulates your actions on the web page, and executes the necessary
Javascript code.
Web (Click & Script) Vusers handle most correlations automatically, reducing the time required to create the script. In most cases, you do not need to define rules for correlations or perform manual correlations after the recording.
Web (Click & Script) Vusers allow you to generate detailed Business Process Reports which summarize the script. For example, when you click a button to submit data, VuGen generates a
web_button function. If the button is an image, VuGen generates a web_image_submit function.
In the following example, a Vuser clicks the Login button.
...
web_image_submit("Login",
"Snapshot=t4.inf",
DESCRIPTION,
"Alt=Login",
"Name=login",
"FrameName=navbar",
ACTION,
"ClickCoordinates=31,6",
LAST);}
The next section illustrates a user navigating to the Asset ExpressAdd process under the Manage
Assets branch. The user navigates by clicking the text links of the desired branches, generating
web_text_link functions.
web_text_link("Manage Assets_2",
DESCRIPTION,
"Text=Manage Assets",
"Ordinal=2",
"FrameName=main",
ACTION,
"UserAction=Click",
LAST); web_text_link("Use",
DESCRIPTION,
"Text=Use",
"FrameName=main",
ACTION,
"UserAction=Click",
LAST); web_text_link("Asset ExpressAdd",
DESCRIPTION,
"Text=Asset ExpressAdd",
"FrameName=main",
ACTION,
Page 657 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
"UserAction=Click",
LAST);
In the following example, the web_list function emulates the selection of a list item.
...
web_list("Year",
DESCRIPTION,
"Name=Year",
"FrameName=CalFrame",
ACTION,
"Select=2000",
LAST);
When you click on an image that is associated with an image map, VuGen generates a web_map_
area function.
web_map_area("map2_2",
DESCRIPTION,
"MapName=map2",
"Ordinal=20",
"FrameName=CalFrame",
ACTION,
"UserAction=Click",
LAST);
Note: Web (Click & Script) Vusers do not support applets or VB script. If the web site that is accessed by the Vusers contains these items, use the Web (HTTP/HTML) protocol.
For more information about Web (Click & Script) Vuser scripts, see Click & Script Protocols .
Web (HTTP/HTML)
When recording a Web (HTTP/HTML) Vuser script, VuGen records the HTTP traffic between the browser and the server. The scripts contain detailed information about the recorded traffic.
The Web (HTTP/HTML) Vuser protocol provides two recording levels: HTML-based script and
URL-based script. These levels determine what information to record and which functions to use when generating the Vuser script. For more information about selecting a recording level, see
"Recording Levels Overview" on page 279
.
Tip: For most applications, including those with JavaScript, use the Web (Click & Script)
Vuser protocol. For browser applications that include applets and VB script or for non-browser applications, use the Web (HTTP/HTML) Vuser protocol.
Working with Cache Data
You can save stored data into your browser's cache, and load it at a later point in the script.
To implement this within your script, you manually add the web_dump_cache and web_load_
cache functions.
For task details, see
"How to Insert Caching Functions" on page 665 .
Page 658 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Dumping Information to the Cache
Transferring data to the cache is called dumping the information. You run the web_dump_cache function to create a cache file in the location specified in the FileName argument. You need to run this function only once to generate the cache file.
In the following example, the web_dump_cache function creates a cache file in C:\temp for each
VuserName parameter running the script.
web_dump_cache("paycheckcache","FileName=c:\\temp\\{Vuser
Name}paycheck", "Replace=yes", LAST)
If you run a single Vuser user ten times, VuGen creates ten cache files in the following format, where the prefix is the VuserName value:
Ku001paycheck.cache
Ku002paycheck.cache
Ku003paycheck.cache
...
You can modify the first and second arguments (paycheckcache and paycheck in this example) to reflect the current transaction name. Place this function at the end of your script, after you have loaded all of the resources.
Loading Information from the Cache
The web_load_cache function loads a cache file whose location is specified in the FileName argument. Note that the web_load_cache function requires the cache file to exist. Therefore, you can run this function only after running web_dump_cache.
In the following example, the web_load_cache function loads the paycheck cache files from
C:\temp.
web_load_ cache("ActionLoad","FileName=c:\\temp\\{VuserName}paycheck",LAST)
Text and Image Verification
VuGen enables you to add checks to your Web Vuser scripts. A check verifies the presence of a specific object on a Web page. The object can be a text string or an image.
Web checks enable you to determine whether or not your Web site is functioning correctly while it is being accessed by many Vusers—that is, does the server return the correct Web pages? This is particularly important while your site is under the load of many users, a period when the server is more likely to return incorrect pages.
For example, assume that your Web site displays information on the temperatures in major cities around the world. You use VuGen to create a Vuser script that accesses your Web site.
The Vuser accesses the site and executes a text check on this web page. For example, if the word
Temperature appears on the page, the check passes. If Temperature does not appear because, for example, the correct page was not returned by the server, the check fails. Note that the text check step appears before the URL step. This is because VuGen registers, or prepares in advance, the search information relevant for the next step. When you run the Vuser script, VuGen conducts the check on the web page that follows.
Page 659 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Although the server may display the correct page when you record the script and when a single
Vuser executes the script, it is possible that the correct page will not be returned when the server is under the load of many Vusers. The server may then be overloaded and may therefore return meaningless or incorrect HTML code. Alternatively, in some instances when a server is overloaded, the server returns a 500 Server Error page. In both of these cases, you can insert a check to determine whether or not the correct page is returned by the server.
Note: Web checks increase the work of a Vuser, and therefore you may be able to run fewer
Vusers per load generator. You should use Web checks only where experience has shown that the server sometimes returns an incorrect page.
To add an image or text check, see
"How to Add Text Checks and Image Checks" on page 663
.
Understanding Web Check Functions
When you add a text check, VuGen adds a web_reg_find function to your script. This function registers a search for a text string on an HTML page. Registration means that it does not execute the search immediately—it performs the check only after executing the next Action function, such as web_url. Note that if you are working with a concurrent functions group, the web_reg_find function is executed only at the end of the grouping.
In the following example, the web_reg_find function searches for the text string "Welcome". If the string is not found, the next action function fails and the script execution stops.
web_reg_find("Text=Welcome", "Fail=Found", LAST); web_url("Step", "URL=...", LAST);
In addition to the web_reg_find function, you can use other functions to search for text within an
HTML page:
Several additional functions can be used for searching for text: l web_find l web_global_verification
The web_find function, primarily used for backward compatibility, differs from the web_reg_find function in that web_find is limited to HTML-based scripts (see Recording Options > Recording tab). It also has less attributes, such as instance, allowing you to determine the number of times the text appeared. When performing a standard text search, web_reg_find is the preferred function.
The web_global_verification function allows you to search the data of an entire business process.
In contrast to web_reg_find, which only applies to the next Action function, this function applies to
all subsequent Action functions such web_url. By default, the scope of the search is
NORESOURCE, searching only the HTML body, excluding headers and resources.
The web_global_verification function is ideal for detecting application level errors that are not included the HTTP status codes. This function is not limited to an HTML-Based script (see
Recording Options > Recording tab).
Page 660 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Data Format Extensions
VuGen supports the recording of many different types of data. New formats are constantly being created and VuGen must adapt to support them. Some formats are proprietary and use custom serialization, making it difficult for the user to understand the code due to binary and unformatted data. VuGen has developed a way to use Data Format Extensions (DFEs) to convert the code to more readable formats allowing you to parameterize and correlate this data.
Data Format Extensions work in ordered chains. Chains are comprised of extensions. Each HTTP message has only one Body and Query String section and therefore users can only select the default chain for those section, whereas HTTP messages can contain multiple Headers and
Cookies sections. The user therefore can assign a different chain to each Headers and Cookies section in their message. For VuGen to correctly match the chain to the Headers or Cookies section, the name in the Name column must match the name of the Headers or Cookies section.
VuGen attempts to de-serialize the data using the DFEs in a chain one at a time. The extensions within a chain are each designed to de-serialize/serialize a specific data format. If an extension does not convert the specified data, this data is passed to the next extension in the chain. If an extension does successfully convert the data, you can configure VuGen to either continue to run the rest of the DFE chain on the converted data, or to end the process.
VuGen provides a number of built-in Data Format Extensions. For specific details about each DFE, see
"Data Format Extension List" on page 669 .
Additionally, advanced users can manually add and modify chains, as well as create new Data
Format Extensions.
For more information, see the HP LoadRunner Data Format Extensions Developer Guide.
Google Web Toolkit - Data Format Extension (GWT-DFE) -
Overview
DFE (Data Format Extension) allows easier scripting of modern Web applications by providing the ability to decode and encode formatted data exchanged between the client and server. By providing the decoded format of the data, the information is presented in a readable format that allows for easier correlation and parameterization of the script.
GWT DFE is an addition to the already supported formats of Base64, JSON, URL Encoding, XML and Prefix-Postfix.
Key Features
l
Format the GWT payload data into a readable form that enables you correlate and parameterize data.
l
The formatted structure presents the names of the data fields.
l
GWT- DFE provides automatic solution for GWT specific (STRONG_NAME_HEADER) correlations.
For details, see
"How to use GWT-DFE" on page 668
Additional Information
Page 661 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
GWT-DFE decodes a GWT- RPC (Remote Procedure Call) by converting the request/response payloads into XML based structures.
Web Snapshots - Overview
Vuser scripts based on the Web (HTTP/HTML) and Web (Click & Script) protocols utilize VuGen's
Snapshot pane.
l
For an introduction to the Snapshot pane, see
"Snapshot Pane - Overview" on page 85
.
l
For details on how to work with the Snapshot pane, see
"How to Work with Snapshots" on page
88
.
l
For details on the Snapshot pane UI, see
"Snapshot Pane" on page 119 .
Web (HTTP/HTML) Snapshots
The snapshots show detailed information about some of the steps in the Vuser script. Each snapshot can be displayed using either the Page view or the more detailed HTTP Data view.
The HTTP Data view displays each HTTP transaction in either a tree view or a grid view. The transaction data is broken up into response data, request data, headers, cookies, and query strings.
Data in the snapshots can be displayed in a number of formats: Data view, Text view, and Hex view.
You can split the Snapshot pane to display two snapshots - typically a record snapshot and the corresponding replay snapshot. If both snapshots are displayed in the HTTP Data view, you can click the Sync button on the Snapshot pane toolbar to synchronize the data that is displayed in the two snapshots. For details, see
"How to Work with Snapshots" on page 88 .
Page 662 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Correlations and parameters can be created on response data by selecting the desired text and right-clicking.
For data that is difficult to work with (such as binary data) VuGen offers a variety of Data Format
Extensions that can transform certain data types into more readable formats. Data that has been formatted by a Data Format Extension can be displayed in its original or formatted state. For more information, see
"Data Format Extensions" on page 661 .
XML Pages
VuGen supports record and replay for XML code within Web pages.
The XML code can appear in the script as a regular URL step or as a custom request. VuGen detects the HTML and allows you to view each document type definition (DTD), its entities, and its attributes. VuGen can interpret the XML when the MIME type displayed in the RecContentType attribute or the MIME type returned by the server during replay, ends with xml, such as
application/xml or text/xml. The DTD is color coded, allowing you to identify each one of the elements. You can also expand and collapse the tree view of the DTD.
When you expand the DTD, you can parameterize the attribute values. You can also save the values in order to perform correlation using the standard correlation functions. For more information about the correlation functions, see the Function Reference (Help > Function Reference).
Note: VuGen cannot display a DTD with XML islands, segments of XML embedded inside an
HTML page. VuGen displays only pages that are entirely XML.
How to Add Text Checks and Image Checks
There are a number of different types of checks that VuGen can add to your Web Vuser scripts. For background information, see
"Text and Image Verification" on page 659 .
How to add a text check while recording
1. In the web browser, select the desired text.
2. Click the Insert Text Check button
reg_find function to the script.
on the VuGen Recording toolbar. VuGen adds a web_
How to add a text check after recording
1. In the Snapshot pane, display a snapshot that contains the text you want to verify.
2. In the Snapshot pane toolbar, click HTTP Data to display the HTTP Data view of the snapshot.
3. In the snapshot, select the text you want to verify. The text must be located in a response section of the snapshot - not in a request section.
4. Right-click and select Add Text Check Step from the menu.
5. Modify the options in the Find Text dialog box. For details on the dialog box options, press F1 when in the dialog box to open the Function Reference.
Page 663 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
6. Click OK to insert the function into the Vuser script.
How to add other text checks after recording
1. In the script editor, locate the position where you want to insert the check.
2. Select View > Toolbox to open the Toolbox.
a. To insert a web_reg_find function, in the Toolbox, under Services, select web_reg_find.
b. To insert a web_global_verification function, in the Toolbox, under Services, select the required web_global_verification function.
3. Drag the selected function to the required location in the Editor.
4. Enter the required details in the dialog box that opens. For details on the dialog box options, press F1 when in the dialog box to open the Function Reference.
5. Click OK to insert the function into the Vuser script.
How to add an image check after recording
1. In the Editor, locate the position where you want to insert the check.
2. Select View > Toolbox to open the Toolbox.
3. In the Toolbox, under Web Checks, select web_image_check.
4. Drag the selected web_image_check function to the required location in the Editor.
5. Enter the required details in the Image Check Properties dialog box. For details on the dialog box options, press F1 when in the dialog box to open the Function Reference.
6. Click OK to insert the function into the Vuser script.
How to Convert Web Vuser Scripts into Java
VuGen provides a utility that enables you to convert a script created for a Web Vuser into a script for Java Vusers. This also allows you to create a hybrid Vuser script for both Web and Java.
Convert a Web Vuser script into a Java Vuser script
1. Create an empty Java Vuser script and save it.
2. Create an empty Web Vuser script and save it.
3. Record a Web session using standard HTML/HTTP recording.
4. Replay the Web Vuser script. When it replays correctly, cut and paste the entire script into a text document and save it as a text .txt file. In the text file, modify any parameter braces from the Web type, "{ }" to the Java type,
"< >"
.
5. Open a DOS command window and go to your product's dat folder.
6. Type the following command:
<application_directory>\bin\sed -f web_to_java.sed filename > outputfilename
Page 664 of 1812 HP LoadRunner (11.50)
User Guide
VuGen where filename is the full path and filename of the text file you saved earlier, and
outputfilename is the full path and filename of the output file.
7. Open the output file, and copy its contents into your Java Vuser script action section at the desired location. If you are pasting the contents into an empty custom Java template (Java
Vuser type), modify the line containing public int action() as follows: public int action() throws Throwable
This change is done automatically for recorded Java users (RMI and CORBA).
8. Parameterize and correlate the Vuser script as you would with an ordinary Java script, and run it.
How to Insert Caching Functions
This task describes how to use caching functions. Caching functions allow you to save stored data into your browser's cache, and load it at a later point in the script. For more information, see
"Working with Cache Data" on page 658 . The following steps describe how to use the caching
functions.
1. Insert the web_dump_cache function into your script.
2. Run the script at least once.
3. Insert the web_load_cache function into your script before the Vuser actions.
4. Comment out the web_dump_cache function.
5. Run and save the script.
Example:
The following example illustrates a PeopleSoft Enterprise Vuser viewing the details of his paycheck.
Action()
{
// web_add_cookie("storedCookieCheck=true; domain=pbntas05; path=/"); web_load_ cache("ActionLoad","FileName=c:\\temp\\{VuserName}paycheck",LAST);
web_browser("signon.html",
DESCRIPTION,
ACTION,
"Navigate=http://pbntas05:8200/ps/signon.html",
LAST);
lr_think_time(35);
web_edit_field("userid",
"Snapshot=t1.inf",
DESCRIPTION,
"Type=text",
"Name=userid",
Page 665 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
ACTION,
"SetValue={VuserName}",
LAST);
web_edit_field("pwd",
"Snapshot=t2.inf",
DESCRIPTION,
"Type=password",
"Name=pwd",
ACTION,
"SetValue=HCRUSA_KU0007",
LAST);
lr_start_transaction("login");
web_button("Sign In",
"Snapshot=t3.inf",
DESCRIPTION,
"Type=submit",
"Tag=INPUT",
"Value=Sign In",
LAST);
lr_end_transaction("login", LR_AUTO);
web_image_link("CO_EMPLOYEE_SELF_SERVICE",
"Snapshot=t4.inf",
DESCRIPTION,
"Alt=",
"Name=CO_EMPLOYEE_SELF_SERVICE",
"Ordinal=1",
ACTION,
"ClickCoordinate=10,10",
LAST); ...
web_text_link("Sign out",
"Snapshot=t7.inf",
DESCRIPTION,
"Text=Sign out",
"FrameName=UniversalHeader",
ACTION,
"UserAction=Click",
LAST);
/*web_dump_cache("paycheck","FileName=c:\\{VuserName}paycheck",
"Replace=yes", LAST);*/
return 0;
}
How to Create or Modify Chains of Data Format
Extensions
1. Add or select a chain from the Chains pane
Go to Tools > Recording Options > Data Format Extension > Chain Configuration node.
Page 666 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
For details, see
"Data Format Extension > Chain Configuration Node" on page 298 .
2. Add or modify the Data Format Extensions for the selected chain from the Chain: <chain name> pane
After you add an extension to the chain, select the appropriate option from the Continue
Processing drop-down list.
For details on the Chain: <chain name> pane, see
"Data Format Extension > Chain
Configuration Node" on page 298 .
If you add the Prefix Postfix Extension to your chain, the Add Prefix/Postfix to Chain dialog box opens, enabling you to configure the extension.
For more details, see the Edit DFE row in
"Data Format Extension > Chain Configuration
Node" on page 298 .
How to Apply Chains to Sections of the HTTP Message
1. Set the code generation configuration
After selecting the Enable data format extension check box, select the Format option you want for your code.
You can apply extensions to the code and snapshots or snapshots only. You can also instruct to verify that your code was converted accurately.
For more details, see
"Data Format Extension > Code Generation Node" on page 301 .
2. Apply chains to sections of the HTTP message
Select a section of the HTTP message from the list of sections (Body, Headers, Cookies,
Query String).
In the <message section> pane, add or modify the chains for the selected message section.
You can modify only the default chain for the Body and Query String sections. You can add multiple chains for the Headers and Cookies sections.
For VuGen to correctly match the chain to the Headers or Cookies sections, the name in the
Name column must match the name of the Headers or Cookies section in the message.
For more details, see
"Data Format Extension > Code Generation Node" on page 301 .
Page 667 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
How to use GWT-DFE
This tasks describes how to create and assign a GWT-DFE chain.
Prerequisites
l
LoadRunner includes JRE 1.5. However, many applications are compiled for JVM1.6 and higher. If your application is compiled with JDK1.6 or higher, replace the <LoadRunner>\jre directory with <Program Files>\Java\jre6 before recording a GWT Application .
l
To use the GWT DFE, you must have access to the GWT WAR folder as used by your development team which includes the following file types: n
*.gwt.rpc files n
*.jar files n
*.class files
Configure GWT-DFE headers
1. Create a script using the Web (HTTP/HTML) protocol.
2. Select Record > Recording Options > HTTP Properties > Advanced > Headers
3. Select Record headers in list
4. Select x-gwt-permutation headercheck box.
Create and Apply GWT-DFE Extension
1. Select Recording Options > Data Format Extensions > Chain Configuration.
Click to create and name a chain.
Click to add a GWT extension.
Page 668 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Specify the Application Classpath
In the Add GWT to Chain dialog box, edit the GWT DFE settings and set the classpath entries to include: n n
Click the
Click the button to add the directory that contains.gwt.rpc files button to add the application classes directory n
Click the button to add the application JAR files from the WEB-INF\lib directory .
If the WAR file is extracted on the server, the directory structure will be as follows:
<Server-
Dir>\<applicationDir>\<MyGWTApplication>\<SomeDirContaining
.gwt.rpc file>
WEB-INF\classes
WEB-INF\lib\gwt-servlet.jar
WEB-INF\lib\gwt-servlet-deps.jar
WEB-INF\lib\log4j.jar
WEB-INF\lib\<AdditionalAUTRelatedJarFile>.jar
2. Select Recording Options > Data Format Extension> Code Generation
Select Enable Data Format Extensioncheck box.
In the Configuration section, select Code and snapshots from Format drop-down list.
Under the Chain Assignment, select Body and assign the chain, select Headers and assign the same chain.
Data Format Extension List
The following table lists the Data Format Extensions that come built-in to VuGen. For more information about Data Format Extensions, see
"Data Format Extensions" on page 661 .
Data
Format
Extension Description
Base64
Extension
Decodes strings that are encoded with as BASE64 encoder.
GWT
Extension
Transforms GWT data to XLM format.
URL
Encoding
Extension
Decodes strings that are encoded with URL encoding format.
JSON Transforms JSON data to XML format.
Page 669 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Extension
XML
Validator
Extension
Receives data and checks to see if it conforms with XML syntax. This check allows
VuGen to perform correlations based on XPath and to display snapshot data in an xml viewer.
Prefix
Postfix
Extension
Enables you to cut data from the beginning and/or end of a string which you do not want decoded. You can add and customize as many prefix/postfix extensions as required. Each postfix/prefix extension created should have a unique display name and tag name.
Web Services
Web Services - Adding Script Content
Web Service Testing Overview
SOA systems are based on Web Services, self-contained applications that can run across the
Internet on a variety of platforms. The services are built using Extensible Markup Language (XML) and Simple Object Access Protocol (SOAP). They serve as building blocks, thereby enabling the rapid development and deployment of new applications.
Using VuGen, you create Vuser scripts for testing your SOA environment. You can use a test generation wizard to automatically generate scripts, or you can create the scripts manually.
Adding Web Service Script Content Overview
Web Services scripts let you test your environment by emulating Web Service clients.
After creating an empty Web Services script, as described in
"Create a New Script Dialog Box" on page 145 , you add content through one of the following methods: recording, manually inserting Web
Service calls, importing SOAP, or by analyzing server traffic.
Recording a Web Services Script
By recording a Web Services session, you capture the events of a typical business process. If you have already built a client that interacts with the Web Service, you can record all of the actions that the client performs. The resulting script emulates the operations of your Web Service client. After recording, you can add more Web Service calls and make other enhancements to the script.
When you record an application, you can record it with or without a Web Service WSDL file. If you include a WSDL file, VuGen allows you to create a script by selecting the desired methods and entering values for their arguments.VuGen creates a descriptive script that can be updated when there are changes in the WSDL.
If you record a script without previously importing a service (not recommended) VuGen creates
SOAP requests instead of Web Service call steps. SOAP request arguments are less intuitive and harder to maintain.
For more information, see
"How to Add Content" on page 678
.
Page 670 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Adding New Web Service Calls
You can create a Web Services script by manually adding Web Service calls. You design the call based on operation, transport, arguments, and other properties.
For more information, see
"How to Add Content" on page 678
.
Importing SOAP Requests
VuGen lets you create Web Service calls from SOAP files. If you have a SOAP request file, you can load it directly into your script. VuGen imports the entire SOAP request (excluding the security headers) with the argument values as they were defined in the XML elements. By importing the
SOAP, you do not need to set argument values manually as in standard Web Service calls.
For example, suppose you have a SOAP request with the following elements:
- <soap:Body soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
- <q1:AddAddr xmlns:q1="http://tempuri.org/AddrBook/message/">
<Addr href="#id1" />
</q1:AddAddr>
- <q2:Addr id="id1" xsi:type="q2:Addr" xmlns:q2="http://tempuri.org/AddrBook/type/">
<name xsi:type="xsd:string">Tom Smith</name>
<street xsi:type="xsd:string">15 Elm Street</street>
<city xsi:type="xsd:string">Pheonix</city>
<state xsi:type="xsd:string">AZ</state>
<zip-code xsi:type="xsd:string">97432</zip-code>
<phone-numbers href="#id2" />
<birthday xsi:type="xsd:date">1983-04-22</birthday>
</q2:Addr>
...
When you import the SOAP request, VuGen imports all of the values to the Web Service call. To view the values, in the Step Navigator, right-click the step and then click Show Arguments.
To create a new Web Service call based on a SOAP request, you must first import a WSDL file. If a
WSDL is not available, or if you want to send the SOAP traffic directly, you can create a SOAP
Request step. You specify the URL of the server, the SOAP action, and the response parameter.
In the Editor, the SOAP Request step appears as a soap_request function, described in the
Function Reference (Help > Function Reference).
For more information, see
"How to Add Content" on page 678
.
Analyzing Server Traffic
The main focus when testing enterprises and complex systems, is to measure the performance from the client end. Ordinarily, VuGen records the actions you perform in the application or browser, and generates a script emulating the client actions and requests to the server.
In certain test environments, you may be unable to record the client application to retrieve the requests to the server. This may be a result of the server acting as a client, or because you do not have access to the client application. In these cases, you can create a script using VuGen's
Analyze Traffic feature.
Page 671 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
The Analyze Traffic feature examines a capture file containing the server network traffic, and creates a script that emulates requests sent to or from the server.
For more information, see
"How to Create a Script by Analyzing Traffic" on page 681 .
Script Integration
You can use the completed script to test your system in several ways: l
Functional Testing. Run the script to see if your Web services are functional. You can also check to see if the Web service generated the expected values. For more information, see
"Web
Services - Preparing Scripts for Replay" on page 697
l
Load Testing. Integrate the script into a LoadRunner Controller scenario to test the performance of your system under load. For more information, see the HP Controller documentation.
l
Production Testing. Check your Web service's performance over time through a Business
Process Monitor configuration. For more information, see the HP Business Process Monitor documentation.
Web Service Call Attachments
When transferring binary files such as images over SOAP, the data must be serialized into XML.
Serialization and deserialization can cause a significant amount of overhead. Therefore, it is common to send large binary files using an attachments mechanism. This keeps the binary data intact, reducing the parsing overhead.
Using attachments, the original data is sent outside the SOAP envelope, eliminating the need to serialize the data into XML and making the transfer of the data more efficient.
The formats used for passing a SOAP message together with binary data are MIME (Multipurpose
Internet Mail Extensions) and the newer, more efficient DIME (Direct Internet Message
Encapsulation) specifications. VuGen supports DIME for all toolkits, but MIME only for the Axis toolkit. To use MIME attachments for the .NET toolkit, see
" User Handler Examples " on page 710
.
VuGen supports the sending and receiving of attachments with SOAP messages. You can send
Input (Request) or save Output (Response) attachments. For task details, see
"How to Add
Content" on page 678
.
Output attachments are used to save the response as an attachment. You can choose one of the following options: Save All Attachments or Save Attachment by Index.
When you specify Save All Attachments, VuGen creates three parameters for each attachment based on the parameter name that your specify: a parameter containing the attachment data, the content type of the attachment, and a unique ID for the attachment.
For example, if you specify the name MyParam in the Content field, the parameter names for the first attachment would be:
MyParam_1
MyParam_1_ContentType
MyParam_1_ContentID
Page 672 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
When you specify Save Attachments by Index, you specify the index number and name of the parameter in which to store the attachment. The parameter name that you specify for Content, is used as a prefix for the Content type and Content ID parameters.
Special Argument Types
VuGen handles special argument types such as derived, recursive, choice, and optional elements.
Derived Types
VuGen supports WSDLs with derived types. When setting the properties for a Web Service Call,
VuGen allows you to use the base type or derived type for the argument. After you select a type,
VuGen updates the argument tree node to reflect the new type. For details, see
"New Web Service
Call Dialog Box" on page 685 .
Abstract Types
Abstract is a declaration type declared by the programmer. When an element or type is declared to be abstract, it cannot be used in an instance document. Instead, a member of the element's substitution group, provided by the XML schema, must appear in the instance document. In such a case, all instances of that element must use the xsi:type to indicate a derived type that is not abstract.
When VuGen encounters an Abstract type, it cannot create an abstract class and replay will fail. In this case, VuGen displays a warning message beneath the Type box, instructing you to replace the
Abstract type with a derived type.
Optional Elements
In WSDL files, optional parameters are defined by one of the following attributes: minoccurs='0' nillable='true'
minoccurs = 0 indicates a truly optional element, that can be omitted. Nillable means that the element can be present without its normal content, provided that the nillable attribute is set to true or
1. By default, the minoccurs and maxoccurs attributes are set to 1.
In the following example, name is mandatory, age is optional, and phone is nillable.
<s:element minOccurs="1" name="
name" type="s:string" />
<s:element minOccurs="0" name="
age" type="s:int" />
<s:element minOccurs="1" name="
phone" nillable="true" type="s:string"
/>
The following table indicates the availability of the options:
Parameter type Nil radio button Include arguments in call
Mandatory disabled disabled
MinOccurs=0
Nillable disabled enabled enabled disabled
Page 673 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
To include a specific optional argument in the service call, click the node and select Include
Argument in Call. The nodes for all included arguments are colored in blue. Arguments that are not included are colored in gray.
If you include an element on a parent level, it automatically includes all mandatory and nillable children elements beneath it. If it is a child element, then it automatically includes the parent element and all other mandatory or nillable elements on that level. If you specify Generate auto-
value to a parent element, VuGen provides values for those child elements that are included beneath the parent.
Note: VuGen interprets whether elements are mandatory or optional through the toolkit implementation. This may not always be consistent with the element's attributes in the WSDL file.
Choice Optional Elements
A Choice element in a WSDL defines a set of elements where only one of them appears in the
SOAP message. In some cases, one of the Choice elements is optional, while the others are not.
You can select the Choice element and still prevent its optional element from appearing in the
SOAP envelope. In the Step Navigator, select the Choice element, and clear the Include
argument in call option. In Script view, delete the line that defines the Choice argument.
Recursive Elements
Using the Properties dialog box, you can control the level of recursive elements to include in the
Web Service call.
To exclude a certain level and exclude those below, select the lowest parent node that you want to include and select Include Argument in Call. VuGen includes the selected nodes, its mandatory children, and all of its parent nodes.
In the following example, three levels of the Choice argument are included—the rest are not.
Excluded nodes are grayed out.
Page 674 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Base 64 Arguments
Base 64 encoding is an encoding method used to represent binary data as ASCII text. Since SOAP envelopes are plain text, you can use this encoding to represent binary data as text within SOAP envelopes.
When VuGen detects a WSDL element of base64Binary type, it lets you provide an encoded value. You can specify a value in two ways: l
Get from file. Reference a file name.
l
Embed encoded text. Specify the text to encode.
For details, see
"Process Base64 Data - Simple Data Dialog Box " on page 692
.
Server Traffic Scripts Overview
The main focus when testing enterprises and complex systems, is to measure the performance from the client end. Ordinarily, VuGen records the actions you perform in the application or browser, and generates a script emulating the client actions and requests to the server.
In certain test environments, you may be unable to record the client application to retrieve the requests to the server. This may be a result of the server acting as a client, or because you do not have access to the client application. In these cases, you can create a script using VuGen's
Analyze Traffic feature.
The Analyze Traffic feature examines a capture file containing the server network traffic, and creates a script that emulates requests sent to or from the server. The steps in creating a script by analyzing server traffic are described in
"How to Create a Script by Analyzing Traffic" on page 681
.
Page 675 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
There are two types of emulations: Incomingtraffic and Outgoing traffic.
Incoming traffic scripts emulate situations in which you want to send requests to the server, but you do not have access to the client application, for example, due to security constraints. The most accurate solution in this case is to generate a script from the traffic going into the server, from the side of the client.
When you specify an Incoming server network traffic, you indicate the IP address of the server and the port number upon which the application is running. VuGen examines all of the traffic going into the server, extracts the relevant messages, and creates a script. In the above diagram, if the client is unavailable, you could create an Incoming script to emulate the requests coming into Server A.
Outgoing Traffic scripts emulate the server acting as a client for another server. In an application server that contains several internal servers, you may want to emulate communication between server machines, for example between Server A and Server B in the above diagram. The solution in this case is to generate a script from the traffic sent as output from a particular server.
When you create an Outgoing traffic script, you indicate the IP address of the server whose outgoing traffic you want to emulate, and VuGen extracts the traffic going out of that server. In the above diagram, an Outgoing script could emulate the requests that Server A submits to the Server
B.
l
"Capture Files" below
l
"Filtering Traffic" on next page
l
"Data on Secure Servers" on page 678
Capture Files
A capture file is a trace file containing a log of all TCP traffic over the network. Using a sniffer application, you obtain a dump of all of the network traffic. The sniffer captures all of the events on the network and saves them to a capture file.
To generate a smaller, more manageable script, try to capture the network traffic only for the time that you perform actions in your application.
Page 676 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Note: Capture files do not contain loopback network traffic.
You can obtain a capture file using the command line utility or any existing capture tool.
The VuGen command line utility, lrtcpdump, is located in the product's bin folder. There is a separate utility for each of the platforms: lrtcpdump.exe (Windows), lrtcpdump.hp9,
lrtcpdump.ibm, lrtcpdump.linux, and lrtcpdump.solv4.
External Capture Tools
Most UNIX operating systems have a built-in version of a capture tool. In addition, there are many downloadable capture tools such as Ethereal/tcpdump.
When using external tools, make sure that all packet data is being captured and none of it is being truncated.
Certain capture utilities require additional arguments. For example, tcpdump requires the -s 0 argument in order to capture the packets without truncating their data.
Filtering Traffic
You can provide a filter to drill down on specific requests going to or from a server, by specifying its
IP address and port.
Tip: Several external capture tools allow you to filter the IP addresses while capturing the traffic.
You filter the requests by choosing the relevant host IP addresses. The filter can be inclusive or exclusive—you can include only those IPs in the list, or include everything except for those IPs that appear in the list.
Page 677 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
For more information, see
"How to Create a Script by Analyzing Traffic" on page 681 .
Data on Secure Servers
To analyze traffic from a secure server, you must provide a certificate containing the private key of the server.
If the traffic is SSL encrypted, you must supply a certificate file and password for decryption. If you want traffic from multiple servers to be reflected in the script, you must supply a separate certificate and password for each IP address that uses SSL.
For more information, see
"How to Create a Script by Analyzing Traffic" on page 681 .
How to Add Content
This topic describes how to add content, such as Web Service calls, to a Web Services Vuser script.
Page 678 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Prerequisites
Create an empty Web Services Vuser script. Click File > New Script and Solution and choose the Web Services protocol. You can create either a single-protocol or multi-protocol Vuser script.
Record a session - optional
1. Click the Start Recording button on the VuGen toolbar or press Ctrl+R to open the Recording
Wizard > Specify Services screen.
For user interface details, see
"Specify Services Screen" on page 683 .
2. Add services to the list. Click Import to load a WSDL for the test. Indicate the location of the
WSDL file.
For user interface details, see
"Import Service Dialog Box" on page 745 .
3. Click Next. Specify the location of the application and any other relevant arguments. See the
"Specify Application to Record Dialog Box" on page 683
.
Add a new service call - optional
1. Import a service. Click Manage Services to access the Import dialog box.
For user interface details, see
"Import Service Dialog Box" on page 745 .
2. Click the cursor at the desired location in your script (Editor) or in the test steps (Step
Navigator).
3. Click the Add Service Call button. The New Web Service Call dialog box opens.
4. In the Select Web Service Call section, select a Service, Port Name, and Operation.
5. To specify an endpoint other than the default Target Address, select Override Address and insert the new endpoint to which you want to submit the requests.
6. Expand the nodes and specify argument values. To create sample values for all Input arguments, select the Input Arguments node and click Generate. To edit, import, or export the element's XML structure, see
"How to Assign Values to XML Elements" on next page .
7. To parameterize an input argument, click the node and select the Value option. Click the ABC icon and proceed with parameterization. For more information, see
"Parameters" on page 247
.
8. Select the Transport Layer Configuration node to specify advanced options, such as JMS transport for SOAP messages (Axis toolkit only), asynchronous messaging, or WS
Addressing. For more information, see
"How to Send Messages over JMS" on page 714 .
Add attachments - optional
1. To add an attachment to an input argument, choose an operation in the left pane. Select Add
to request (Input). VuGen prompts you to enter information about the attachment and adds it to the method's tree structure. For details, see the
"Add Input Attachment Dialog Box " on page
691 .
2. To specify an output attachment through which to store output arguments, choose an operation in the left pane. Select Save received (Output). Select the desired option: Save All
Attachments or Save Attachment by Index based on their index number—beginning with 1.
For details, see
"Web Service Call Attachments" on page 672
.
Page 679 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
3. To edit the properties of either an Input or Output attachment, click the attachment in the left pane, and enter the required information in the right pane.
Specify SOAP headers - optional
Select the CustomSOAP Header node in the left pane and enable the Use SOAP header option.
You must individually specify SOAP headers for each element. To compose your own, click Edit and edit the XML. To import an XML file for the SOAP header, click Import.
Import SOAP - optional
1. Import a service if one is available. Click Manage Services to access the Import dialog box.
For more information, see the
"Import Service Dialog Box" on page 745 .
2. Click the Import SOAP button to open the Import SOAP dialog box.
3. Browse for the XML file that represents your SOAP request.
4. Select the type of step you would like to generate: Create Web Service Call or Create SOAP
Request. In order to create a Web Service Call, you must first import at least one WSDL that describes the operation in the SOAP request file. To view the SOAP before loading it, click
View SOAP.
5. Click Load to import the XML element values.
For a Web Service Call, set the properties for the Service call as described in the
"New Web
Service Call Dialog Box" on page 685 .
For a SOAP Request, provide the URL and the other relevant parameters.
6. For a Web Service Call, if there are multiple services with same operation (method) names, select the service whose SOAP traffic you want to import.
7. Click OK to generate the new step within your script.
Analyze server traffic - optional
To create a script by analyzing a file containing a dump of the server traffic, click Analyze Traffic.
For details, see
"Server Traffic Scripts Overview" on page 675
.
How to Assign Values to XML Elements
This task describes how to work with XML elements by manually editing the code, importing an external file, and exporting the XML for later use.
1. Prerequisites
Import a service and create a new Web Service call. Alternatively, in the Step Navigator, rightclick a step and select Show Arguments.
2. Select the element
In the left pane, select a complex type or array argument. In the right pane, click XML. The
XML field shows the XML code as a single string.
3. Import a file - optional
To import a previously saved XML file, click Import and specify the file's location.
Page 680 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
4. Edit the XML elements - optional
To edit the XML structure and element values, click Edit. The XML Editor opens. To import a previously saved XML file, click Import File. n
To manually edit the code, click the Text View tab.
n
To modify the XML through a graphical interface, click the Step Navigator. Use the shortcut menu to add children and sibling elements and rename the node. Click Insert from the shortcut menu to add a new element before or after the selected one.
5. Export a file - optional
To save your XML data to a file so it can be used for other tests, click Export and specify a location.
How to Generate a Test Automatically
This task describes how to create requirements or tests for checking your service.
1. Open the wizard
Select FIle > New to open the New Virtual User dialog box. Select SOA Test Generator in the left pane and click Create.
2. Add a service
Proceed to the next screen and click Add to import at least one service. If your service is not ready yet, you can use an emulated service. For details, see
"How to Add and Manage
Services " on page 736 . Click Next.
3. Select testing aspects
Expand the nodes and select the desired testing aspects. For aspect details, see "Aspect
Reference" on page 970. Click Next.
4. Specify a location
Specify a test name and a location for the test scripts: HP ALM or a local file system. If you specified ALM, click Connect to log on to the server and Browse to locate the test node.
5. Complete the test generation
Review the summary and include or exclude any scripts from the generation. Click Generate.
6. Open the scripts
In the final screen, review the list of generated scripts and indicate which ones to open. Click
Finish.
How to Create a Script by Analyzing Traffic
This task describes how to create a script using a network traffic file.
1. Create a capture file on a Windows Platform - optional
Create a capture file containing a log of all TCP traffic over the network on a Windows platform.
Page 681 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Use a downloadable capture tool or use the tool provided in the product's bin folder,
lrtcpdump.<platform>. a. Run the capture utility in a command window lrtcpdump -f<file_name>.cap. lrtcpdump prompts you to select a network card.
b. Type in the number of the interface card (if there are multiple ones.) and click Enter.
c. Perform typical actions within your application.
d. Return to the command window and click Enter to end the capture session.
e. Place the capture file on the network in a location accessible to the machine running
VuGen.
2. Create a capture file on a Linux Platform - optional
Create a capture file containing all TCP traffic over the network on a Linux platform.
a. Locate the appropriate lrtcpdump utility for your platform in the product's bin folder. Copy it to a folder that is accessible to your Linux machine. For example, for an HP platform, copy lrtcpdump.hp9. If using FTP, make sure to use the binary transfer mode.
b. Switch to the root user to provide execution permissions: chmod 755
lrtcpdump.<platform> c. If there are multiple interface cards, lrtcpdump uses the first one in alphabetical order. To get a complete list of the interfaces, use the ifconfig command.
d. Run the utility with its complete syntax, specifying the interface and file name. For example, lrtcpdump.hp9 -ietho -f<file_name>.cap. The capturing of the network traffic begins.
e. Perform typical actions within your application.
f. Return to the window running lrtcpdump and follow the instructions on the screen to end the capture session.
g. Place the capture file on the network in a location accessible to the machine running
VuGen.
3. Open the Analyzing Traffic wizard
Click the Analyze Traffic button or select Vuser > Analyze Traffic.For details, see
"Specify
Services Screen" on next page
.
4. Import a Service - optional
Add one or more services to the list (optional). Click Import to load a WSDL file. For details, see the
"Import Service Dialog Box" on page 745 .
Click Next.
5. Specify traffic information
Specify a capture file and the section of the script into which you want to load the traffic:
vuser_init, Action, or vuser_end.
Page 682 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Indicate whether you want to analyze Incoming or Outgoing traffic. Specify the server whose traffic you want to analyze.
For details, see
"Specify Application to Record Dialog Box" below
.
6. Filter the IP addresses - optional
Click the Filter Options button to open the Recording options and indicate which IP addresses to ignore or include.
For details, see
"Recording Options" on page 276
.
7. Configure the SSL - optional
Click the SSL Configuration button to add SSL certificates. This is necessary in order to analyze traffic from a secure server.
For details, see the
"SSL Configuration Dialog Box" on page 696 .
Specify Services Screen
This dialog box enables specify the basic details needed to begin recording a script.
To access
Relevant tasks
Start Record button
"How to Add Content" on page 678
User interface elements are described below (unlabeled elements are shown in angle brackets):
UI Element Description
Opens the Manage Services dialog box for providing further information about the service. For more information, see
"Manage Services Dialog Box" on page 742 .
Opens the Import Service dialog box. For more information, see the
"Import
Service Dialog Box" on page 745 . For user interface details, see the "Import
Service Dialog Box" on page 745 .
Removes the selected service from the list.
<services list>
A list of the available services: l
Service Name. The native name of the service.
l
WSDL Location. The source of the WSDL.
Specify Application to Record Dialog Box
This dialog box enables specify the basic details needed to begin recording a Web Services script.
To access
Relevant tasks
Start Record button, Next
"How to Add Content" on page 678
User interface elements are described below:
Page 683 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
UI Element
Record default Web browser
Record any application
Record into action
Record application startup
Description
Opens the Recording Options dialog box. For user interface details, see
"Recording Options" on page 276 .
Records the default browser actions. Specify the starting URL or click the Browse button to navigate to a location.
Records any Win32 application. You can also specify the following: l
Program to record. Select the browser, internet application, or
Win32 application to record l
Program arguments (Win32 Applications only). Command line arguments for the application. For example, if you specify plus32.exe
with the command line options peter@neptune, it connects the user
Peter to the server Neptune when starting plus32.exe.
l
Working directory. A working folder for the application (only when required by the application).
The section into which you want to record: vuser_init, Action, or vuser_
end. For actions you want to repeat, use the Action section. For initialization steps, use vuser_init.
In the following instances, it may not be advisable to record the startup: l
If you are recording multiple actions, in which case you need to perform the startup in only one action.
l
In cases where you want to navigate to a specific point in the application before starting to record.
l
If you are recording into an existing script.
Import SOAP Dialog Box
This dialog box enables you to create a test step based on a SOAP file.
To access
Relevant tasks
Use one of the following: l
Click l
SOA Tools > Import SOAP
"How to Add Content" on page 678
"Adding Web Service Script Content Overview " on page 670
User interface elements are described below (unlabeled elements are shown in angle brackets):
UI Element Description
Browse. Locate the XML file containing SOAP traffic.
Page 684 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
<Call type>
SOAP Request
Properties
Loads the element values from the SOAP file.
Opens the Manage Services dialog box for importing and configuring services.
Opens the SOAP file in a browser for viewing.
The type of call to generate in the script/test: l
Web Service Call. Requires the import of a service.
l
SOAP Request. Generates a soap_request step in the script.
The properties of the SOAP request (only visible for SOAP Request type calls). Specify the following: l
URL. The URL or IP address of the server to which to submit the request.
l
SOAP Action. The SOAP action to include in the request (applicable if there are multiple actions).
l
Response Parameter. A parameter name to store the response of the
SOAP or Web Service call request.
New Web Service Call Dialog Box
This dialog box lets you create and configure a new Web Service call.
To access
Open a Web Service Vuser script and then click SOA Tools > Add Service Call or click the Add Service Call button on the VuGen toolbar.
Important
Information
To access the Web Service call properties for existing Web Service calls, select a step in the Step Navigator and choose Properties from the shortcut menu.
Relevant tasks
"How to Add Content" on page 678
User interface elements are described below (unlabeled elements are shown in angle brackets):
UI Element
<service argument tree> (left pane)
<parameter values>
Description
An expandable tree hierarchy of the Service containing the following nodes: l
<operation name> l
Transport Layer Configuration l
Custom SOAP Header l
Input Arguments l
Output Arguments
Enables you to set and select values for each of the left pane's
Page 685 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
(right pane)
Select Web Service
Call
nodes.
Lets you set the following items: l
Service. A dropdown list of all of the imported services, with the name derived from the WSDL.
l
Port Name. A dropdown list of available ports through which to send the request.
l
Operation. A dropdown list of the service's operations.
l
Target Address. The default endpoint of the service.
l
Override Address. Allows you to enter an alternate endpoint address in the Target Address box.
<Operation Name> Node
Allows you to generate sample values for the operation's input arguments and add attachments.
User interface elements are described below:
UI Element
Method
Generate auto-values for input arguments
Attachments
Step properties
Description
The name of the selected operation (read-only).
Automatically creates sample values for all of the input arguments, based on their data type.
Handles input and output attachments: l
Add to Request (Input). Attaches a file or parameter value to the request.
l
Save Received (Output). Saves the response to a parameter.
Lists the following service call properties and their values: l
WSDL file location l
Service name l
Port name l
Target address l
SOAP action l
SOAP namespace
Transport Layer Configuration Node
User interface elements are described below:
Description UI
Element
HTTP/S
Sets the transport method to HTTP or HTTPS transport.
Page 686 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Transport
Async
Support
Marks the Web Service call as an asynchronous message activated by an event:
Async Event. An arbitrary name for the event.
Note: Add a Web Service Wait For Event step to the script, to instruct the replay engine to wait for the event.
WSA
Support
Enables WS-Addressing. Use one of the following options for a reply: l
WS-A Reply. An IP address of the server to reply to when the event occurs.
l
Autodetect. Reply to the current host when the event occurs. This is useful when running the same script on several machines.
Tip: To use WS-Addressing calls in synchronous mode, leave the Async Event box empty. In Script view, remove the AsyncEvent argument. This instructs the replay to block script execution until the complete response is received from the server.
JMS
Transport
Sets the transport method to JMS for synchronous messages. For details, see
"Testing Web Service Transport Layers Overview " on page 697 .
Note: For JMS asynchronous messages, manually add a JMS Send Message
Queue or JMS Receive Message Queue step to the script, to set up the message queue information.
Enables you to provide the request and response queues.
Override
JMS
Queues
Request
Queue
The queue name for the request message.
Response
Queue
The queue name for the response message.
Custom SOAP Header Node
Lets you specify additional application-generated header elements to include in the SOAP envelope of an HTTP message. For task details see
"How to Add Content" on page 678
.
User interface elements are described below:
UI Element Description
Opens an XML editor that lets you view and edit the SOAP header XML code.
Opens the Select XML File to Import dialog box.
Use SOAP
Opens the Export SOAP Header into File dialog box.
Opens the Select or Create New Parameter dialog box.
Includes a SOAP header in the HTTP request.
Page 687 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Header
Header
Input Arguments Node
Lets you set the properties and generate values for all input arguments.
User interface elements are described below:
UI Element
The header source: l
For an imported file: Header element as it appears in the imported file.
l
For a parameter: The parameter name (in curly brackets)
Description
Includes all of the method's arguments in the Web Service call.
Resets the arguments to their original state. It removes their inclusion in the call, and sets them to the values in the WSDL.
Generates sample data for all of the input arguments.
Opens the pane for editing the selected argument's value.
Name
The name of the operation (read-only)
Argument List
A list of the input arguments.
l
Simple parameters l
Arrays (shows the top level only).
<Input Argument Name> Node
When selecting an input argument, the right pane allows you to specify argument values.
User interface elements are described below:
UI Element Description
Opens the
"Add Array Elements Dialog Box " on page 692
for adding a new array element to the input argument (only visible when selecting a parent node in the input array). For details, see the
"Add Array Elements Dialog Box " on page 692
.
Removes the selected array element in the input argument (only visible when selecting a parent node in the input array).
Includes the sub-arguments of the selected argument, in the Web Service call.
This is only enabled for an argument with sub-arguments with the Include
argument in call option enabled.
Excludes the sub-arguments of the parent argument, from the Web Service call.
Opens an XML editor for editing the XML code containing the argument values.
Page 688 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
The only changes saved are the element values and the number of array elements.
Opens the Select XML File to Import dialog box,
Opens the Export argument XML into file dialog box.
Opens the Select or Create Parameter dialog box.
Name
The name of the argument or array.
Include argument in call
Include the argument in the call. For arrays, click Include to add the sub arguments to the call. To exclude all omittable arguments, click Exclude.
Type
Nil
The argument type as defined in the WSDL. When the WSDL contains derived types, this box becomes a drop down list. For details, see
"Special Argument
Types" on page 673
.
Sets the Nillable attribute to true.
XML (for arrays only)
l
XML. Enables the Edit, Import, and Export buttons. By editing the XML, you can manually insert argument values. Click on the ABC icon to replace the entire XML structure with a single XML type parameter. Note: This import operation handles XML files that were previously exported—not standard
SOAP files.
l
Generate auto-value for this argument. Inserts automatic values for all children elements.
l
Add/Delete. Adds or removes elements from the array.
The argument value. To parameterize this value, click the abc icon (only available for non-arrays).
Value (for non -array elements)
Generate auto-value for this argument
Generates a sample value for the selected argument.
Output Arguments Node
Lets you see the properties of all output arguments.
User interface elements are described below:
UI Element Description
Opens the pane for editing the selected argument's value.
Page 689 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Name
Negative
Testing
The name of the operation (read-only)
Enables Negative Testing. Confirms that the application did not perform a task that it was not designed to perform. In those cases, you need to verify that the application issued a SOAP Fault, and not a SOAP result response.
Select an Expected Response.
l
SOAP Result. A SOAP response to the request.
l
SOAP Fault. A response indicating that the SOAP request was invalid.
Negative Testing applies only to SOAP faults.
l
HTTP Error. An HTTP error, such as Page Not Found, unrelated to Web
Services.
For details, see Negative Testing Overview .
Argument List
A list of the output arguments and the corresponding parameters storing the values.
<Output Argument Name> Node
Lets you specify a parameter for storing the value of the output argument.
User interface elements are described below:
UI Element Description
Opens the
"Add Array Elements Dialog Box " on page 692
for adding a new array element to the output argument (only visible when selecting a parent node in the output array). For details, see the
"Add Array Elements Dialog Box " on page 692
.
Removes the selected array element in the output argument (only visible when selecting a parent node in the output array).
Name
Save returned value in parameter
The name of the output argument or array.
Saves the value of the selected argument to a parameter. To specify a custom parameter name, modify the default Param_<arg_name> in the Parameter field.
Nil
XML (for arrays only)
Sets the value of the current argument to nil=true.
XML code containing the argument values. To parameterize this value, click the abc icon (only available for arrays).
Output Attachments Node
Lets you set the properties for output attachment parameters. This is only visible if you enabled output attachments in the
"New Web Service Call Dialog Box" on page 685
.
User interface elements are described below:
UI Element Description
Page 690 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Save All
Attachments
Save
Attachments by Index
Adds a new index-based output argument. This is available only when choosing
Save Attachments by Index.
Saves all output attachments to a parameter with the following properties: l
Content. An editable name for the parameter storing the attachment l
Content-type. The type of parameter (read-only).
l
Content-ID. A unique ID for the parameter (read-only).
Saves the output attachments to index-based parameters. To set the index, select one of the parameters and modify the index number in the right pane.
<Output Argument> Node
Lets you set the properties for output attachment parameters. This is only visible if you enabled output attachments in the
"New Web Service Call Dialog Box" on page 685
.
User interface elements are described below:
UI Element
Index
Content
Content-type
Content-ID
Description
Deletes the selected attachment parameter. If you have saved the attachments by index, it only removes the selected item.
An index number for the parameter. This field is only enabled when you select Save Attachments by Index in the
"New Web Service Call Dialog
Box" on page 685 .
An editable name for the parameter storing the attachment
The content type of parameter (read-only).
A unique content ID for the parameter (read-only).
Add Input Attachment Dialog Box
This page enables you to add input attachments to your Web requests.
To access
Important information
Relevant tasks
Click and select the top node—the Operation name. Select
Add to Request (input) in the Attachments section.
You must import a service before adding an attachment to a service call.
For background information, see
"Web Service Call Attachments" on page 672
.
"How to Add Content" on page 678
User interface elements are described below:
Page 691 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
UI
Element
Description
Take data from
The location of the data.
l
File. The file location: n
Absolute Path: The full path of the file. Note that this file must be accessible from all machines running the script.
n
Relative Path: (recommended) A file name. Using this method, during replay,
VuGen searches for the attachment file in the script's folder. To add it to the script's folder, select File > Add Files to Script and specify the file name.
l
Parameter. The name of a parameter containing the data.
Contenttype
The content type of the file containing the data. The Detect Automatically option instructs VuGen to automatically determine the content type. The Value box accepts manual entries and provides a dropdown list of common content types.
Contentid
A unique identifier for the attachment. By default, VuGen generates this automatically. Optionally, you can specify another ID in the Value box.
Add Array Elements Dialog Box
This page enables you to add elements to an argument array with an identical structure to the existing array. This is available for both Input and Output arguments.
For Input elements, you can base the new array's values on an existing element.
To access
Click
Important information
Relevant tasks
User interface elements are described below:
. Select an argument node that is an array.
You must have an array in your argument tree in order to view this dialog box.
"How to Add Content" on page 678
UI Element
Name
Start Index
Elements
Copy values from index
Description
The name and index of the array's parent node.
The index from which to add new array elements.
The number of identical array elements to add to your argument tree.
Creates the new array elements with the values of a specific array element
(only available for Input arguments).
Process Base64 Data - Simple Data Dialog Box
This dialog box enables you to set the encoding options for your simple base64 data.
Page 692 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
To access
Important information
Relevant tasks
For simple, non-complex Base64 values: l
Select an input argument in the Web Service Call Properties of Base64 type.
l
Select the Value option.
l
Choose Embed encoded text.
l
Click the Browse button.
For a complex array, use the
"Process Base64 Data - Complex Data
Dialog Box " below
.
"How to Add Content" on page 678
User interface elements are described below:
UI Element Description
Allows you to save the decoded text to a file.
Text to encode
For complex data, use the
"Process Base64 Data - Complex Data Dialog
Box " below .
Encoding
Options
A list of encoding methods.
Default: Unicode (UTF-8)
Encoded data
The encoded version of the data from the Text to encode pane.
Process Base64 Data - Complex Data Dialog Box
This dialog box enables you to set the encoding options for your complex base64 data.
To access
Important information
For complex Base64 values: l
Select a complex input argument in the Web Service Call Properties, of
Base64 type.
l
Select the Value option click the Parameter icon.
l
Replace the value with a parameter.
l
Right-click the Parameter icon in the Value box and select Parameter
Properties.
l
Click the Edit Data button.
l
In the desired values set column, click the B64 button.
Note: Accessible also from the Checkpoint and Service Emulation data grids.
For simple, non-complex data, use the
Dialog Box " on previous page .
Relevant tasks
"How to Add Content" on page 678
"Process Base64 Data - Simple Data
User interface elements are described below:
Page 693 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
UI Element
File
Text
Description
Encodes the specified file.
Enables you to save decoded data to a file. This is usually data obtained during replay.
Encode the file by reference or its contents.
l
File path. The file to encode.
l
Link to file. References the file containing the values If cleared, it uses the content of the specified file. It copies the content to the script folder.
Tip. For text exceeding 10KB, enable Link to file.
Encodes the specified text string.
l
Text to encode. The Base64 text to encode. As you type the text, VuGen encodes it in the Encoded data pane.
l
Encoding Options. A list of encoding methods. The default is Unicode
(UTF-8).
Aspects List
The following table lists the available testing aspects:
Aspect Name
Positive
Testing
Description
Generates a full positive test that checks each operation of the service.
Standard
Compliance
Checks the service's compliancy with industry standards such as WS-I and
SOAP.
Service
Interoperability
Tests the interoperability of the service's operations with all supported Web
Services toolkits.
Contains the following sub-aspects: l
.NET Framework. Tests that the services are fully interoperable with .NET
Framework WSE 2 Toolkit by calling all of its operations with default/expected values.
l
Axis/Java Based Web Services. Tests that the services are fully interoperable with Axis 1.3 Web Services Framework by calling all of its operations with default/expected values.
Security
Testing
Boundary
Tests service security. Contains the following sub-aspects: l
SQL Injection Vulnerability. Checks if the service is vulnerable to SQL injections by injecting SQL statements and errors into relevant parameters.
l
Cross-site Scripting (XSS). Attempts to hack the service by injecting code into a Web site that will disrupt its functionality.
Using the negative testing technique, creates tests to manipulate data, types,
Page 694 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Testing
Performance
Testing
parameters, and the actual SOAP message to test the service to its limits.
Contains the following sub-aspects: l
Extreme Values. Provides invalid data types to the services and verifies they are not accepted.
l
Null Values. Provides NULL parameters to the services to verify they are not accepted.
Contains the following sub-aspects: l
Stress Testing. Tests the maximum load that can be placed on the application.
l
Overload Sustainability Testing. Tests how well the hardware allocated for the application can support the number of anticipated users.
l
Volume Testing. Tests that the system can handle a massive data entry.
l
Longevity Test. Tests that the system can sustain a consistent number of concurrent Vusers executing transactions using near-peak capacity, over a minimum 24-hour period.
l
Scalability Testing. Repeated stress, overload, volume, and longevity tests with different server or network hardware configurations.
Specify Services Screen
This wizard screen enables you to select Web services to associate with your traffic-based script.
To access
Relevant tasks
Analyze Traffic button
"How to Add Content" on page 678
User interface elements are described below (unlabeled elements are shown in angle brackets):
UI Element Description
Opens the Manage Services dialog box for providing further information about the service. For more information, see
"Manage Services Dialog Box" on page
742 .
Opens the Import Service dialog box. For more information, see
"Import Service
Dialog Box" on page 745 .
Removes the selected service from the list.
<services list>
A list of the available services: l
Service Name. The native name of the service.
l
WSDL Location. The source of the WSDL.
Page 695 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Specify Traffic Information Screen
This wizard screen enables you to specify the capture file for the incoming or outgoing traffic.
To access
Relevant tasks
Analyze Traffic button, Next
"How to Add Content" on page 678
User interface elements are described below:
UI Element Description
Browse. Allows you to select a capture file to import.
Capture file
Incoming Traffic
Outgoing Traffic
Record into action
Opens the Traffic Filters node in the Recording Options dialog box. This allows you to specify which IP addresses to include or exclude from the script. For details, see
"Recording Options" on page 276
.
Opens the
"SSL Configuration Dialog Box" below
which allows you to add SSL certificates to analyze traffic from a secure server.
The name of a capture file containing the server traffic, usually with a cap extension.
The IP address and port of the server whose incoming traffic you want to examine.
The IP address of the server whose outgoing traffic you want to examine.
The section into which you want to create the script: vuser_init, Action, or vuser_end. For actions you want to repeat, use the Action section.
For initialization steps, use vuser_init.
SSL Configuration Dialog Box
This dialog box enables you to configure the SSL certificate for your traffic file.
To access
Relevant tasks
Analyze Traffic button, Next,
"How to Add Content" on page 678
User interface elements are described below (unlabeled elements are shown in angle brackets):
UI Element Description
Add Certificate. Adds a new line to the certificate list.
Delete. Removes the selected certificate.
Page 696 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
<certificate list>
The properties of the certificate. Specify the following: l
IP. The URL or IP address of the machine hosting the certificate file.
l
Port. Port of machine hosting the certificate file.
l
File. The path of the certificate file (with a pem extension) containing the private key. Use the Browse button to locate the file.
l
Password. A password for decrypting the certificate file.
Web Services - Preparing Scripts for Replay
Preparing for Replay Overview
After you create a script with Web Service calls, you prepare it for replay.
You can enhance it with custom error and log messages or with transactions. In addition, you can enhance your script with JMS functions, jms_<suffix> or XML functions, lr_xml_<suffix>. For more information, see the Function Reference (Help > Function Reference).
Run-time settings let you emulate real users more accurately, configure the run-time settings.
These settings include general settings and Web Service specific settings. For details, see
"Run-
Time Settings" on page 346 .
In certain cases, you may need to use the result of one Web Service call as input for another. To do this, you save the result to a parameter and reference it later. For more information, see
"How to
Prepare Scripts for Replay " on page 712 .
This section contains:
Testing Web Service Transport Layers Overview
Web services can be sent over various transport layers. The transport layer is the protocol used to transport messages to and from the server.
VuGen allows you to configure the transport layer for your services. It fully supports HTTP/HTTPS and JMS (Java Message Service) transport layers.
With user handlers, you can process SOAP requests and responses and assign them a custom behavior. For more information, see
" User Handlers " on page 708
.
l
"Sending Messages over HTTP/HTTPS" below
Sending Messages over HTTP/HTTPS
HTTP is used for sending requests from a Web client, usually a browser, to a Web server. HTTP is also used to return the Web content from the server back to the client.
HTTPS handles secure communication between a client and server. Typically, it handles credit card transactions and other sensitive data.
Page 697 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
The typical request and response mechanism is synchronous. In synchronous messaging, the replay engine blocks script execution until the server sends its response. In asynchronous mode, the replay engine executes the script without waiting for server's response for previous messages.
If you are working with HTTP or HTTPS transport, you can use asynchronous calls in conjunction with WS-Addressing. For details, see
"WS-Addressing " on page 700
.
JMS Transport Overview
JMS is a J2EE standard for sending messages, either text or Java objects, between Java clients.
There are two scenarios for communication:
Peer-to-Peer. Also known as Point-to-Point. JMS implements point-to-point messaging by defining a message queue as the target for a message. Multiple senders send messages to a message queue, and the receiver gets the message from the queue.
Publish-Subscribe. Each message is sent from one publisher to many subscribers through a designated topic. The subscribers only receive messages sent after they have subscribed.
VuGen supports point-to-point communication by allowing you to send and receive JMS messages to and from a queue.
Before you can send messages over JMS transport, you need to configure several items that describe the transport: l
JNDI initial context factory. The class name of the factory class that creates an initial context which will be used to locate the JMS resources such as JMS connection factory or JMS queue.
l
JNDI provider. The URL of the service provider which will be used to locate the JMS resources such as JMS connection factory or JMS queue.
l
JMS connection factory. The JNDI name of the JMS connection factory.
In addition, you can set a timeout for received messages and the number of JMS connections per process.
You configure these settings through the JMS run-time settings. For details, see
"JMS > Advanced
Node " on page 382 .
This section also includes: l
"JMS Script Functions" below
l
"JMS Message Structure" on next page
JMS Script Functions
VuGen uses its API functions to implement the JMS transport. Each function begins with a jms prefix:
Funcion Name jms_publish_ message_topic
Description
Publishes messages to a specific topic
Page 698 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
jms_receive_ message_queue jms_receive_ message_topic jms_send_ message_queue jms_send_receive_ message_queue jms_subscribe_ topic jms_set_general_ property jms_set_message_ property
Receives a message from a queue
Receives published messages to a specific topic on a subscription.
Sends a message to a queue.
Sends a message to a specified queue and receives a message from a specified queue.
Creates a subscription for a topic.
Sets a general property in the user context.
Sets a JMS header or property for the next message to be sent, or uses a
JMS header or property to filter received messages.
The JMS steps/functions are only available when manually creating scripts—you cannot record
JMS messages sent between the client and server.
Unlike peer-to-peer communication that uses message queues, the publish-subscribe functions,
jms_publish_message_topic, jms_subscribe_topic, and jms_receive_message_topic, are not supported for Web Service calls. To use these functions with Web Service calls, you must manually set up user handlers to generate the JMS message payload. For more information, see
"How to Create a User Handler" on page 718 .
For details about the JMS functions, see the Function Reference (Help > Function Reference or click F1 on the function).
JMS Message Structure
Each JMS message is composed of: l
Header. contains standard attributes (Correlation ID, Priority, Expiration date).
l
Properties. custom attributes.
l
Body. text or binary information.
JMS can be sent with several message body formats. Two common formats are TextMessage and
BytesMessage.
To override the default behavior, use a jms_set_general_property function before sending the message. Set the JMS_MESSAGE_TYPE property to TextMessage, BytesMessage, or Default.
For Example: jms_set_general_property("step1","JMS_MESSAGE_TYPE","BytesMessage");
For more information, see the Function Reference (Help > Function Reference).
Page 699 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Asynchronous Messages Overview
You can use VuGen to emulate both synchronous and asynchronous messaging.
In synchronous messaging, the replay engine blocks script execution until the server sends its response. In asynchronous mode, the replay engine executes the script without waiting for server's response for previous messages.
This section also includes: l
"Sending Asynchronous Calls with HTTP/HTTPS " below
l
"WS-Addressing " below
Sending Asynchronous Calls with HTTP/HTTPS
This following section describes how to use asynchronous calls in HTTP/HTTPS. You use a Wait
for Event step to instruct Vusers to wait for the response of previous asynchronous requests before continuing. The listener blocks the execution of the service until the server responds.
When adding a Web Service Wait for Event step, you specify the following: l
Quantifier. The quantifier indicates whether the Vuser should wait for ALL events to receive a response or ANY, just one of them. ANY returns the name of the first event to receive a response. ALL returns one of the event names.
l
Timeout. the timeout in milliseconds. If no events receive responses in the specified timeout, then web_service_wait_for_event returns a NULL.
l
Events. a list all of the asynchronous events for which you want to wait.
When running a script with asynchronous messaging, the Replay log provides information about the events and the input and output arguments.
For task details, see
"How to Send Messages over HTTP/S" on page 715
.
When setting up an asynchronous message, you can set the location to which the service responds when it detects an event using WS-Addressing. For more information, see
"WS-Addressing " below
.
WS-Addressing
WS-Addressing is a specification that allows Web Services to communicate addressing information. It does this by identifying Web service endpoints in order to secure end-to-end endpoint identification in messages. This allows you to transmit messages through networks that have additional processing nodes such as endpoint managers, firewalls, and gateways. WS-Addressing supports Web Services messages traveling over both synchronous or asynchronous transports.
The WS-Addressing specification requires a WSAReplyTo address—the location to which you want the service to reply.
Page 700 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
An optional WSAAction argument allows you to define a SOAP action for instances where transport layers fails to send a message.
The following example illustrates a typical SOAP message using WS-Addressing, implemented in the background by VuGen.
<S:Envelope xmlns:S="http://www.w3.org/2003/05/soap-envelope" xmlns:wsa="http://www.w3.org/2004/12/addressing">
<S:Header>
<wsa:MessageID> http://example.com/SomeUniqueMessageIdString
</wsa:MessageID>
<wsa:ReplyTo>
<wsa:Address>http://myClient.example/someClientUser</wsa:Address>
</wsa:ReplyTo>
<wsa:Address>http://myserver.example/DemoErrorHandler</wsa:Address>
</wsa:FaultTo>
<wsa:To>http://myserver.example/DemoServiceURI</wsa:To>
<wsa:Action>http://myserver.example/DoAction</wsa:Action>
</S:Header>
<S:Body>
<!-- Body of SOAP request message -->
</S:Body>
</S:Envelope>
In the following example, the server responds to the interface 212.199.95.138 when it detects
Event_1.
web_service_call("StepName=Add_101",
"SOAPMethod=Calc.CalcSoap.Add",
"ResponseParam=response",
"AsyncEvent=Event_1",
"WSAReplyTo=212.199.95.138",
"WSDL=http://lab1/WebServices/CalcWS/Calc.asmx?wsdl",
"UseWSDLCopy=1",
"Snapshot=t1153825715.inf",
BEGIN_ARGUMENTS,
"first=1",
"second=2",
END_ARGUMENTS,
BEGIN_RESULT,
"AddResult=Param_AddResult1",
END_RESULT,
LAST);
You can issue WS-Addressing calls in both asynchronous and synchronous modes. To use WS-
Addressing in synchronous mode, leave the Async Event box empty in the Transport Layer options. In Script view, remove the AsyncEvent argument. This instructs the replay engine to block script execution until the complete response is received from the server.
For task details, see
"How to Send Messages over HTTP/S" on page 715
.
Page 701 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Database Integration Overview
When testing your Web Service, it is vital that you use data that is accurate and up to date. If you use a snapshot of data from a past date, it may no longer be valid or relevant.
The database integration allows you to access values in a database during your test, ensuring that the data is up to date.
The database integration functions are useful in the following scenarios: l
"Connecting to a Database" below
l
"Using Data Retrieved from SQL Queries" below
l
"Validating Database Values after a Web Service Call" on page 704
l
"Checking Returned Values Through a Database" on page 706
l
"Performing Actions on Datasets" on page 707
Connecting to a Database
To connect to a database, you add a connection step to your script. A built-in Connection String
Generator guides you in creating a database connection string specific to your database and credentials. You can also test your connection before inserting the step.
When running your script with iterations, virtual users only repeat the Action section of the script. If you include the database connection step in the Action section, the test will repeat it for each iteration. Virtual Users only repeat the Action section of the script, but not the vuser_init or vuser_
end sections. Therefore, we recommend that you place the database connection step in the vuser_
init section, and the disconnect step, lr_db_disconnect in the vuser_end section.
In cases where you only need to do one query and scroll through the data, you should also place the
Database: ExecuteSQL Query step in the vuser_init section.
For task details, see
"How to Send Messages over JMS" on page 714 .
Using Data Retrieved from SQL Queries
In this scenario, the test fetches data from the database and uses it at a later point in the script, such as calls to the Web Service. Since the script retrieves the data during each test run, the data is up to date and relevant.
The following table shows a typical flow of the script:
Step
Connect to database
Execute an SQL query
API function
lr_db_connect lr_db_executeSQLStatement
Page 702 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Retrieve and save the data
Web Service call
Disconnect from database lr_db_getvalue to <param_name> web_service_call with {<param_name>} lr_db_disconnect
You can iterate through the results in two ways: l save them to a simple parameter during each iteration l use VuGen built-in iterations to scroll through the data
For more information, see the Function Reference (Help > Function Reference).
In the following example, the vuser_init section connects to the database and performs a database query.
vuser_init()
{ lr_db_connect("StepName=myStep",
"ConnectionString=Initial Catalog=MyDB;Data Source=mylab.net;user id =sa ;password = 12345;" ,
"ConnectionName=MyConnection",
"ConnectionType=SQL",
LAST); lr_db_executeSQLStatement("StepName=MyStep",
"ConnectionName=MyConnection",
"SQLQuery=SELECT * FROM Addresses",
"DatasetName=ds1",
LAST);
return 0;
}
At the end of your test, disconnect from the database in the vuser_end section.
vuser_end()
{
lr_db_connect("StepName=myStep",
"ConnectionString=Initial Catalog=MyDB;Data
Source=LAB1.devlab.net;user id =sa ;password = soarnd1314;" ,
"ConnectionName=MyConnection",
"ConnectionType=SQL",
LAST);
return 0;
}
In the Action section, you include the steps to repeat. Note the use of the Row argument. In the first call to the database, you specify the first row with Row=next. To retrieve another value in the same row, use current.
Action()
{
lr_db_getvalue("StepName=MyStep",
"DatasetName=ds1",
"Column=Name",
Page 703 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
"Row=next",
"OutParam=nameParam",
LAST);
lr_db_getvalue("StepName=MyStep",
"DatasetName=ds1",
"Column=city",
"Row=current",
"OutParam=cityParam",
LAST);
/* Use the values that you retrieved from the database in your Web
Service call */
web_service_call( "StepName=EchoAddr_101",
"SOAPMethod=SanityService|SanityServiceSoap|EchoAddr",
"ResponseParam=response",
"Service=SanityService",
"ExpectedResponse=SoapResult",
"Snapshot=t1227168459.inf",
BEGIN_ARGUMENTS,
"xml:addr="
"<addr>"
"<name>{nameParam}</name>"
"<street></street>"
"<city>{cityParam}</city>"
"<state></state>"
"<zip></zip>"
"</addr>",
END_ARGUMENTS,
BEGIN_RESULT,
END_RESULT,
LAST); return 0;
}
Validating Database Values after a Web Service Call
In this scenario, the test executes a Web Service call that modifies a database on the backend. The goal of this scenario is to validate that the resulting values in the database are correct.
The following table shows a typical flow of the script:
Step
Connect to database
Web Service call
Execute an SQL query
Retrieve and save the data
API function
lr_db_connect (in vuser_init section) web_service_call lr_db_executeSQLStatement lr_db_getvalue to <param_name>
Page 704 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Check the data
Disconnect from database lr_checkpoint lr_db_disconnect (in vuser_end section)
For more information, see the Function Reference (Help > Function Reference).
The following example illustrates this process of checking the data:
Action()
{
/* A Web Service call that modifies a database on the back end. */
web_service_call( "StepName=addAddr_102",
"SOAPMethod=Axis2AddrBookService|Axis2AddrBookPort|addAddr",
"ResponseParam=response",
"Service=Axis2AddrBookService",
"ExpectedResponse=SoapResult",
"Snapshot=t1227169681.inf",
BEGIN_ARGUMENTS,
"xml:arg0="
"<arg0>"
"<name>{Customers}</name>"
"<city>{City}</city>"
"</arg0>",
END_ARGUMENTS,
LAST);
/* Query the database by the cusotmer name that was modified by the
Web Service*/
lr_db_executeSQLStatement("StepName=MyStep",
"ConnectionName=MyConnection",
"SQLQuery=SELECT * FROM Addresses WHERE name = '{Customers}'
",
"DatasetName=ds1",
LAST);
/* Get the values retrieved by the database query. */
lr_db_getvalue("StepName=MyStep",
"DatasetName=ds1",
"Column=Name",
"Row=current",
"OutParam=CustomerName",
LAST);
/* Compare the actual value with the expected value stored in the database. */
lr_checkpoint("StepName=validateCustomer",
"ActualValue={Customers}",
"ExpectedValue={CustomerName}",
"Compare=Equals",
"StopOnValidationError=false",
LAST); return 0;
}
Page 705 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Checking Returned Values Through a Database
In this scenario, the user executes a Web Service call which returns an XML response. The goal of this scenario is to validate the response of the Web Service call against expected values. The expected values are stored in a database. The script fetches the expected results from a database and then compares them with the actual response.
The following table shows a typical flow of the script:
Step
Connect to database
Web Service call
Execute an SQL query
Retrieve the expected data
Validate the data
Disconnect from database
API function
lr_db_connect (in vuser_init section) web_service_call with Result=<result_param> lr_db_executeSQLStatement lr_db_getvalue to <param_name> soa_xml_validate with an XPATH checkpoints.
lr_db_disconnect (in vuser_end section)
You can use the XML validation tool to create a checkpoint for the response data. When creating the validation step, use the database parameter that you retrieved through lr_db_getvalue. For information on the XML Validation tool, see
"XML Validation Overview" on page 729
.
The following example illustrates a typical validation of data returned by a Web Service call. The
Validation step compares the actual expected results:
Action()
{
web_service_call( "StepName=GetAddr_102",
"SOAPMethod=AddrBook|AddrBookSoapPort|GetAddr",
"ResponseParam=response",
"Service=AddrBook",
"ExpectedResponse=SoapResult",
"Snapshot=t1227172583.inf",
BEGIN_ARGUMENTS,
"Name=abcde",
END_ARGUMENTS,
BEGIN_RESULT,
END_RESULT,
LAST);
lr_db_executeSQLStatement("StepName=MyStep",
"ConnectionName=MyConnection",
"SQLQuery=SELECT * FROM Addresses WHERE name = 'abcde' ",
"DatasetName=ds1",
LAST);
lr_db_getvalue("StepName=MyStep",
"DatasetName=ds1",
"Column=Name",
Page 706 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
"Row=current",
"OutParam=CustomerName",
LAST);
soa_xml_validate ("StepName=XmlValidation_1146894916",
"Snapshot=t623713af7a594db2b5fef43da68ad59d.inf",
"XML={GetAddrAllArgsParam}",
"StopOnValidationError=0",
BEGIN_CHECKPOINTS,
CHECKPOINT,"XPATH=/*[local-name(.)='GetAddr'][1]/*[localname(.)='Result'][1]/*[local-name(.)='name'][1]","Value_
Equals={CustomerName}",
END_CHECKPOINTS,
LAST);
return 0;
}
For more information, see the Function Reference (Help > Function Reference).
Performing Actions on Datasets
VuGen lets you perform actions on datasets returned by SQL queries.
The lr_db_dataset_action function performs the following actions on datasets: l
Reset. Set the cursor to the first record of the dataset.
l
Remove. Releases the memory allocated for the dataset.
l
Print. Prints the contents of the entire dataset to the Replay Log and other test report summaries.
Note that when you retrieve binary data through lr_db_getvalue, you cannot print its contents using the Print action.
For information about the syntax and usage of this function, see the Function Reference (Help >
Function Reference).
Customizing Overview
VuGen provides several advanced capabilities that allow you to customize the way your script behaves. These capabilities are user handlers and configuration files.
With user handlers, you can process SOAP requests and responses and assign them a custom behavior. For more information, see below.
Configuration files let you customize advanced settings such as security information and the WSE configuration.
l
" User Handlers " on next page
Page 707 of 1812 HP LoadRunner (11.50)
User Guide
VuGen l
" Custom Configuration Files " on page 710
User Handlers
User Handlers are open API through which you can perform the following operations: l
Get and set the request/response SOAP envelopes l
Override the transport layer l
Get and set the request/response content type l
Get and Set values for LoadRunner parameters l
Retrieve a configuration argument from the script l
Issue messages to the execution log l
Fail an execution
You can set up a user handler directly in a script, or implement it through a DLL. You can apply the handler locally or globally.
For task details, see
"How to Create a User Handler" on page 718 .
For sample user handlers, see
" User Handler Examples " on page 710
.
Handler Function Definitions
For basic implementation of a user handler, you define a user handler function within your Vuser script with the following syntax: int MyScriptFunction(const char* pArgs, int isRequest)
The pArgs argument contains the string that is specified in UserHandlerArgs argument of web_
service_call function.
The isRequest argument indicates whether the function is being called during processing of a
Request (1) or Response (0) SOAP envelope.
The content of SOAP envelope is passed to a parameter called SoapEnvelopeParam for both requests and responses. After the function processes the SOAP envelope, make sure to store it in the same parameter.
To call the handler function, use the function name as a value for the UserHandlerFunction argument in the relevant Web Service Call step. For more information, see the Function Reference
(Help > Function Reference).
Event Handler Return Codes
VuGen recognizes the following return codes for the handler function.
Return Code Description
LR_HANDLER_SUCCEEDED 0 The Handler succeeded, but the SOAP envelope did not change.
LR_HANDLER_FAILED 1 The Handler failed and further processing should be stopped.
Page 708 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
LR_HANDLER_
SUCCEEDED_AND_
MODIFIED
2 The Handler succeeded and the updated SOAP envelope is stored in SoapEnvelopeParam.
In the following example, a script handler manipulates the outgoing envelope:
//This function processes the SOAP envelope before sending it to the server.
int MyScriptFunction(const char* pArgs, int isRequest)
{
if (isRequest == 1) {
//Get the request that is going to be sent
char* str = lr_eval_string("{SoapEnvelopeParam}");
//Manipulate the string...
//Assign the new request content
lr_save_string(str, "SoapEnvelopeParam");
return LR_HANDLER_SUCCEEDED_AND_MODIFIED;
}
return LR_HANDLER_SUCCEEDED;
}
Action()
{
//Instruct the web_service_call to use the handler
web_service_call( "StepName=EchoAddr_102",
"SOAPMethod=SpecialCases.SpecialCasesSoap.EchoAddr",
"ResponseParam=response",
"
userHandlerFunction=MyScriptFunction",
"Service=SpecialCases",
"Snapshot=t1174304648.inf",
BEGIN_ARGUMENTS,
"xml:addr="
"<addr>"
"<name>abcde</name>"
"<street>abcde</street>"
"<city>abcde</city>"
"<state>abcde</state>"
"<zip>abcde</zip>"
"</addr>",
END_ARGUMENTS,
BEGIN_RESULT,
END_RESULT,
LAST);
return 0;
Page 709 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Custom Configuration Files
Configuration files let you customize advanced settings such as security information and the WSE configuration. These files let you control the behavior of the test during run time.
The standard .NET configuration file, mmdrv.exe.config, is located in the VuGen installation folder. Some applications have their own configuration file, app.config.
You can customize the test run further, by filtering out the input or output. In addition, you can configure security information. such as token information and whether or not to allow unsigned test certificates.
For task details, see
"How to Customize Configuration Files" on page 720
.
User Handler Examples
This section illustrates several common uses for user handlers.
.NET Filters
You can apply a .NET filter to your messages using the user handler mechanism.
If you are familiar with Microsoft's Web Service Enhancements (WSE) 2.0, you can create a .NET
filter and register it for incoming or outgoing SOAP messages. A .NET filter is a class that is derived from Microsoft.Web.Services2.SoapInputFilter or Microsoft.Web.Services2.SoapOutputFilter. By overriding the ProcessMessage function of this class, you can examine and modify the envelope's body and header.
To define the filter globally for the entire script, add the following lines to the script's default.cfg file below.
[UserHandler]
Function=LrWsSoapFilterLoader
Args=<Filters InputFilterClass="class name" InputFilterLib="lib name"
OutputFilterClass="class name" OutputFilterLib="lib name" />
Order=BeforeSecurity/AfterSecurity/AfterAttachments
The InputFilterClass parameter indicates the name of your class, and InputFilterLib indicates the name of the assembly in which the class resides. For example:
web_service_call(
...
"UserHandlerName=LrWsSoapFilterLoader",
"UserHandlerArgs=<Filters
InputFilterClass=\"MyFilterNamespace.MyFilterClassName\"
InputFilterLib=\"MyAssemblyName\" />",
BEGIN_ARGUMENTS,
...
END_ARGUMENTS,
...
);
Page 710 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Use SoapOutputFilter to examine an outgoing web_service_call request, and SoapInputFilter to examine the response from the server. Use InputFilterClass and InputFilterLib if your filter is derived from SoapInputFilter, or OutputFilterClass and OutputFilterLib if your filter is derived from SoapOutputFilter.
To define the filter for a specific step, add the following arguments to the web_service_call function.
UserHandlerName= LrWsSoapFilterLoader
UserHandlerArgs=<Filters InputFilterClass=\"class name\"
InputFilterLib=\"lib name\" OutputFilterClass=\"class name\"
OutputFilterLib=\"lib name\" />
UserHandlerOrder=BeforeSecurity/AfterSecurity/AfterAttachments
Overriding the Transport Layer
The following example shows a user handler function overriding the transport layer. VuGen does not automatically send the SOAP request over HTTP transport—instead it follows the transport method indicated in the custom handler.
After you receive a response, set the response envelope with the command: lr_save_string(someResponseEnvelopeStr, "SoapEnvelopeParam");
To apply an alternate transport layer, specify ReplaceTransport as a value for the
UserHandlerOrder argument. Define the transport layer in the handler.
web_service_call(
...
"UserHandlerFunction=<Transport HandlerFunction>",
"UserHandlerArgs=<handler arguments>",
"UserHandlerOrder=
ReplaceTransport"
...
LAST);
Including MIME Attachments
When working with Web Service scripts based on the .NET toolkit, the infrastructure does not support MIME attachments. Using the handlers mechanism, you can add MIME attachment functionality to .NET scripts.
The following sections describe how to send and receive MIME attachments for the .NET toolkit.
You can receive and send a MIME attachment in the same operation.
Sending MIME Attachments
To send a MIME attachment, add the boldfaced code to the web_service_call: web_service_call( "StepName=EchoComplex_101",
"SOAPMethod=SimpleService|SimpleServiceSoap|EchoComplex",
"ResponseParam=response",
"Service=SimpleService",
"UserHandlerName=LrWsAttachmentsHandler",
Page 711 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
"UserHandlerArgs=ATTACHMENT_ADD; ATTACHMENTS_FORMAT_MIME;
ContentType=text/plain; FileName=C:\\temp\\results.discomap",
"ExpectedResponse=SoapResult",
"Snapshot=t1208947811.inf",
BEGIN_ARGUMENTS,
"xml:cls="
"<cls>"
"<i>123456789</i>"
"<s>abcde</s>"
"</cls>",
END_ARGUMENTS,
BEGIN_RESULT,
END_RESULT,
LAST);
Modify the FileName and ContentType parameters to indicate the actual path and content type.
Receiving MIME Attachments
To receive a MIME attachment, add the following code to the web_service_call:
"UserHandlerName=LrWsAttachmentsHandler",
"UserHandlerArgs=ATTACHMENT_SAVE_ALL;ParamNamePrefix=attach;"
Sending and Receiving MIME Attachments
To send and receive a MIME attachment in the same web_service_call, modify the Web Service call as shown below:
"UserHandlerName=LrWsAttachmentsHandler",
"UserHandlerArgs=ATTACHMENT_SAVE_ALL;ParamNamePrefix=attach;
ATTACHMENT_ADD; ATTACHMENTS_FORMAT_MIME; ContentType=text/plain;
FileName=C:\\temp\\results.discomap",
How to Prepare Scripts for Replay
This task describes how to prepare the script for replay and run it.
Assign input parameter values
First save the output result to a parameter, and then reference that parameter in a later Web Service call.
1. Save the output parameter.
a. In the Step Navigator, double-click the Web Service call whose output you want to use, to view its properties.
b. In the left pane, select the output argument whose value you want to save to a parameter.
c. In the right pane, select Save returned value in parameter. Specify a name in the
Parameter box.
2. Use the saved parameter for input.
Page 712 of 1812 HP LoadRunner (11.50)
User Guide
VuGen a. In the Step Navigator, double-click the Web Service call whose input parameters you want to set.
b. In the left pane, select the input argument for which to use the saved parameter.
c. In the right pane, select Value, and click on the abc icon. The Select or Create Parameter box opens.
d. Select the saved output parameter from the Parameter name list.
e. To specify an input parameter in Script view, select the value you want to replace and select
Use Existing Parameters from the shortcut menu. Select one of the available parameters.
Set the Run-time setting - optional
Open the run-time settings (F4) to configure JMS and VM settings. Click the JMS > Advanced node. For user interface details, see the
"JMS > Advanced Node " on page 382 .
Configure XSDs with Any type elements - optional
For Web Services that have an XSD schema with an Any type element, <xsd:element name="<
Any_element>" type="xsd:anyType" />, check that the script conforms with the following model:
BEGIN_ARGUMENTS,
"xml:Any_element="
"<Any_element>"
"<string>
the string to
send</string>"
"</Any_element>",
END_ARGUMENTS,
The actual SOAP may differ slightly, but as long as your script conforms to the above model, it will run properly.
You can also send complex type elements for the <any> type. For example:
"xml:Any_element="
"<Any_element>"
"<myComplexTypeName>"
"<property1>123</property1>"
"<property2>456</property2>"
"</myComplexTypeName>"
"</Any_element>",
Run the script
Click Replay > Run. Observe the output log for relevant messages.
Review the test results
The Test Results viewer opens automatically after the test run. An X indicates a failed step.
Expand the nodes to see detailed information about the SOAP response and checkpoints. For details, see
"Viewing Test Results" on page 234
.
Page 713 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
How to Send Messages over JMS
This task describes how to send messages using the JMS transport method.
1. Open the step properties
In the Step Navigator, select the step whose transport you want to set, and then select Show
Arguments from the shortcut menu.
2. Select the JMS transport method
Select the Transport Layer Configuration node and choose JMS Transport.
For UI details, see
"New Web Service Call Dialog Box" on page 685 .
3. Set the run-time settings - optional
Configure the run-time settings, For details, see
"JMS > Advanced Node " on page 382 .
4. Send synchronous JMS messages - optional
Once you create a Web Service call and designate the transport method as JMS, VuGen sends the JMS messages in a synchronous manner. If desired, specify the queue information.
5. Send asynchronous JMS messages - optional
To implement asynchronous messages over JMS, you send the request or retrieve the response using JMS steps—not Web Service calls.
a. Click within the script at the desired location. Select Insert > New Step and expand the
JMS Functions node.
b. Select a JMS function: JMS Send Message Queue sends a message to a queue. JMS
Receive Message Queue receives a message from the queue.
c. Click OK to open the JMS function properties.
d. Specify a queue name and click OK to generate the JMS functions.
For additional information about these functions, see the Function Reference (Help >
Function Reference or click F1 on the function).
6. Send messages over JMS using SOAP messages - optional
To send messages over JMS, using the SOAP message and without a Web Service call: a. Record SOAP messages using a standard Web protocol.
b. Click within the script at the desired location. Select Insert > New Step and expand the
JMS Functions node.
c. Select a JMS function: Send Message Queue or JMS Receive Message Queue.
d. Click OK to open the JMS function properties.
e. Specify a queue name and click OK to generate the JMS functions.
For details, see the Function Reference (Help > Function Reference or click F1 on the function).
Page 714 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
How to Send Messages over HTTP/S
This task describes how to send messages using the HTTP transport method.
1.
Open the step properties
In the Step Navigator, select the step whose transport you want to set, and then select Show
arguments from the shortcut menu.
2.
Select the HTTP/S transport method
Select the Transport Layer Configuration node and choose HTTP/S Transport.
3.
Send a HTTP synchronous message - optional
To send messages in synchronous mode over HTTP, create a standard Web Service call, and do not enable the Async Support option.
4.
Send asynchronous HTTP messages - optional
a. Choose HTTP/S Transport and select the Async Support option.
b. Type an event name in the Async Event box.
c. Click OK to generate the Web Service call.
d. Add a Wait for Event step. Select Insert > New Step and choose Web Service Wait for
Event.
e. Specify a step name, a quantifier, and a timeout. Click Add and insert the name of the event that you defined in the previous step.
In Script view, VuGen indicates asynchronous messaging with the added parameter,
AsyncEvent.
web_service_call("StepName=EchoString_101",
"SOAPMethod=EchoRpcEncoded.EchoSoap.EchoString",
"ResponseParam=response1",
"Service=ExtendedECHO_rpc_encoded",
"
AsyncEvent=Event_1",
"Snapshot=t1157371707.inf",
BEGIN_ARGUMENTS,
"sec=7",
"strString=mytext",
END_ARGUMENTS,
BEGIN_RESULT,
"EchoStringResult=first_call",
END_RESULT,
LAST);
The AsyncEvent flag instructs the Vuser to wait for the response of previous asynchronous service requests.
5.
Send an asynchronous message using WS-Addressing - optional
Page 715 of 1812 HP LoadRunner (11.50)
User Guide
VuGen a. Select the Async Support option and provide an event name in the Async Event box.
This can be an arbitrary name.
b. Select WSA Support. In the WS-A Reply to box,enter an IP address or autodetect to use the current host. Autodetect is useful when running the same script on several different machines. The server will reply to the specified location when the event occurs.
c. Click OK to save the settings.
d. Instruct the Vuser to wait for an event. Select Insert > New Step and add a Web Service
Wait For Event step after the Web Service call step.
e. Specify a step name, quantifier, and timeout. To add an event name, click Add. The Web
Service will wait for the specified event before responding.
f. Use the Edit, Move Up, and Move Down buttons to manipulate the events.
How to Define a Testing Method
This task describes how to select a testing method.
1. Open the step properties
In the Step Navigator, right-click the step whose response you want to test, and select Show
Arguments.
2. Select an argument
Select the Output Argument node. For details, see
"New Web Service Call Dialog Box" on page 685 .
3. Select a testing method and choose an expected response n
To perform negative testing only, select the Negative Testing check box and choose
SOAP Fault as the Expected Response.
n
To accept any type of SOAP response, select the Negative Testing check box and choose
Any SOAP as the Expected Response.
n
To perform positive testing only, clear the Negative Testing check box.
4. Verify function in the script
In Script view, VuGen indicates the testing method with the ExpectedResponse argument. In the following example, the script performs negative testing, indicated by the SoapFault value: web_service_call("StepName=AddAddr_101",
"SOAPMethod=AddrBook|AddrBookSoapPort|AddAddr",
"ResponseParam=response",
"Service=AddrBook",
"ExpectedResponse=
SoapFault",
"Snapshot=t1189409011.inf",
BEGIN_ARGUMENTS,
END_ARGUMENTS,
BEGIN_RESULT,
Page 716 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
END_RESULT,
LAST);
5. Evaluate the SOAP fault value
When you replay a script that results in a SOAP fault, VuGen saves the fault to a parameter called response. To check the returned value of the SOAP fault, evaluate the response output parameter using lr_xml_find.
In the following example, lr_xml_find checks for a VersionMismatch SOAP fault and issues an output message.
lr_xml_find("XML={response}",
"FastQuery=/Envelope/Body/Fault/faultString ",
"Value=VersionMismatch",
LAST); if (soap_fault_cnt >0)
lr_output_message{"A Version Mismatch SOAP Fault occurred")
For more information about lr_xml_find, see the Function Reference (Help > Function
Reference).
How to Add a Database Connection
This task describes how to add a database connection step through Tree view.
1. Open Solution Explorer
Select View > Solution Explorer.
2. Select a section
Select the desired section: vuser_init or Action. To avoid repeating the connection sequence in every iteration, place it in the vuser_init section.
3. Insert a database connection step
Select Design > Insert in Script > New Step. Choose the lr_db_connect step. The
Database Connection dialog box opens. Specify a Step Name, Connection Name, and Data
Provider, OLEDB or SQL.
4. Create a database connection string a. Click Connection String Generator to generate a database connection string specific to your environment.
b. Indicate the connection properties: o
Server Name
o
Database Name
o
Authentication method: Windows Authentication or User/password.
o
Username and Password c. Click Test Connection to verify that the information you provided is correct.
Page 717 of 1812 HP LoadRunner (11.50)
User Guide
VuGen d. Select an SQL Provider, OLEDB or SQL, and click Generate.
5. Verify function in the script
Check that an lr_db_connect function was written to the script.
How to Create a User Handler
This task describes how to write a user handler for your script.
1. Prerequisite - Create a Web Service call
Import a WSDL file and create a standard Web Service Call. For details, see
"Adding Web Service
Script Content Overview " on page 670 .
1. Define a user handler function
Define a user handler before the Web Service call: int MyScriptFunction(const char* pArgs, int isRequest)
{
...
}
2. Call the user handler function
Call the handler function by specifying the function name as a value for the
UserHandlerFunction argument. in the Web Service Call.
web_service_call(
...
"UserHandlerFunction=MyScriptFunction",
"UserHandlerArgs=<handler arguments>",
LAST);
3. Evaluate the handler function
Evaluate the handler's return code to determine if it succeeded. Use the return codes as described in
" User Handlers " on page 708 .
//This function processes the SOAP envelope before sending it to the server.
int MyScriptFunction(const char* pArgs, int isRequest)
{
if (isRequest == 1) {
//Get the request that is going to be sent
char* str = lr_eval_string("{SoapEnvelopeParam}");
//Manipulate the string...
//Assign the new request content
lr_save_string(str, "SoapEnvelopeParam");
return LR_HANDLER_SUCCEEDED_AND_MODIFIED;
Page 718 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
}
return LR_HANDLER_SUCCEEDED;
}
4. Create a DLL file - optional
To define a user handler through a DLL, locate the API header file, LrWsHandlerAPI.h in the product's include folder.
You can use a sample Visual Studio project located in the samples/WebServices/SampleWsHandler folder as a template for creating a handler. The sample retrieves the request and response envelope and saves it to a parameter. To use this sample, open it in Visual Studio and modify it as required. If you do not need to save the request/response to a parameter, you can remove that section of the sample.
After editing the sample, save it and compile the DLL. When you compile the project, Visual
Studio places the <user_handler_name>.DLL file in the bin folder. If you compile the project from another location, or if you want to copy the DLL from one machine to another, make sure to place it in the bin folder.
5. Configure the user handler - optional
Declare the DLL user handler globally or locally.
To apply the user handler globally to all requests in the script, add the following section to the
default.cfg file in the script's folder.
[UserHandler]
Function=<name>
Args=<arguments>
Order=<BeforeSecurity/AfterSecurity/AfterAttachments> n
Name. The name of the DLL.
n
Args. A list of the configuration arguments for the handler. Use the GetArguments method to retrieve the arguments in your handler.
n
Order. The order in which Vusers process the user handler in requests: Before Security,
After Security, or After Attachments. You can also use this argument to override the transport layer, by entering the value Replace Transport.
Note: Setting the UserHandlerFunction property of a web_service_call function, overrides the definitions in the .cfg file.
By default, user handlers are processed before the security. For request messages, Vusers process the attachments handler after the security handler. For responses, Vusers process the handlers in a reversed order. In typical cases the order does not matter, so any value is acceptable.
To override the Transport layer, specify Order=Replace Transport and specify the new transport handler. If you implement the transport handler as a separate DLL, the
HandleRequest function is called, while the HandleResponse function is ignored.
Page 719 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
To use the handler locally, for a specific request, add the following arguments to the web_
service_call function:
UserHandlerName=<name1>
UserHandlerArgs=<args1>
UserHandlerOrder=<BeforeSecurity/AfterSecurity/AfterAttachments/Replace
Transport>
6. Copy the user handler to all required machines
Make sure that the user handler DLL is accessible to all Load Generator machines running scripts that call it. You may, for example, copy it to the product's /bin folder.
If you copy the script to another machine, it retains the handler information, since it is defined in script's folder.
7. Implement the user handler - optional
To implement a user handler, you use the entry functions HandleRequest or
HandleResponse. Both functions have a single parameter, context, whose properties you can set in your handler. Use the Get functions to retrieve properties, and Set functions to pass information from the replay framework to the handlers or between the handlers.
n
GetEnvelope. Gets the envelope content. For example, example: const char * pEnvelope = context->GetEnvelope(); n
GetEnvelopeLength. Gets the envelope length n
SetEnvelope. Sets the envelope content and length. For example: string str("MySoapEnvelope..."); context->SetEnvelope(str.c_str(), str.length()); n
SetContentType. Sets a new value for HTTP header content type n
LogMessage. Issues a message to the replay log n
GetArguments. Gets the configuration arguments defined for the current handler in order to pass it to the DLL n
GetProperty. Gets a custom property value n
SetProperty. Sets a custom property value
For more information, see the comments in the LrWsHandlerAPI.h file located in the product's include folder.
How to Customize Configuration Files
The following steps describe how to modify configuration files. For details, see
" Custom
Configuration Files " on page 710 .
Locate the configuration file
Determine the location of the configuration file. The standard .NET configuration file,
mmdrv.exe.config is located in the product's bin folder. Some applications have their own file,
Page 720 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
app.config.
Save the application's configuration file
If your application has its own app.config file: l
To apply the configuration information globally to all scripts, save the app.config file as
mmdrv.exe.config in the bin folder, overwriting the existing file.
l
To apply the configuration information locally, specifically for this script, copy the app.config file to the script's folder. This overrides the mmdrv.exe.config file, and remains associated with this script even when you copy it to other machines.
Set the security - optional
By default, VuGen allows unsigned certificates to facilitate testing. To disallow unsigned certificates, modify the allowTestRoot flag in the <security> section to false.
<security>
<x509 storeLocation="currentuser" alllowTestRoot="false"
Tree View Tabs
This sections describes the tabs visible in Tree view—Snapshots and Checkpoints. For details about the Properties tab, see
"New Web Service Call Dialog Box" on page 685
.
Web Services Snapshots - Overview
Vuser scripts based on the Web Services protocol utilize VuGen's Snapshot pane.
l
For an introduction to the Snapshot pane, see
"Snapshot Pane - Overview" on page 85
.
l
For details on how to work with the Snapshot pane, see
"How to Work with Snapshots" on page
88
.
l
For details on the Snapshot pane UI, see
"Snapshot Pane" on page 119 .
The Snapshot pane enables you to view a snapshot of a Web Service call. You can view both the record or replay snapshots.
To access
Select View > Snapshot, or click the Show Snapshot Pane button
VuGen toolbar.
"How to Prepare Scripts for Replay " on page 712
on the
Relevant tasks
User interface elements are described below (unlabeled elements are shown in angle brackets):
UI Element Description
Displays the SOAP request sent to the server by the Web Service call.
Page 721 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
<shortcut menu>
Displays the SOAP response returned by the server.
Displays the SOAP message in a tree hierarchy.
Tip: Expand the tree nodes to show the argument values.
Displays the SOAP message in XML textual format.
In the Response view, right-click on an output argument.
l
Node Properties. Opens the XML Node Properties dialog box.
l
Insert XML Check. Inserts an XML Find step. It allows you to specify a search string, case-sensitivity, and the behavior when errors occur.
l
Save value in parameter. Saves the selected value to a simple parameter.
l
Save XML in parameter. Saves the selected value to an XML parameter.
l
Copy XML. Copies the XML node to the clipboard.
Database Connection Dialog Box
This dialog box helps you create a string to connect to your database.
To access
Click Connection String Generator in the Database Connection dialog box.
Relevant tasks
"How to Send Messages over JMS" on page 714
See also
"Connection String Generator Dialog Box " below
User interface elements are described below:
UI Element
Step Name
Connection String
Data Provider
Description
Opens the Connection String Generator. For details, see
"Connection String Generator Dialog Box " below .
The name or IP address of the database server.
The string by which to connect to the database. Use the
Connection String Generator.
The SQL provider: OLEDB or SQL.
Connection String Generator Dialog Box
This dialog box helps you create a string to connect to your database.
To access
Click Connection String Generator in the Database Connection dialog box.
Relevant tasks
"How to Send Messages over JMS" on page 714
See also
"Database Connection Dialog Box " above
Page 722 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
User interface elements are described below:
UI Element Description
Tests the connection to the database.
Server Name
DB Name
Authentication
SQL Provider
Generates the database connection string and writes it in the
Connection String field in the Database Connection dialog box.
The name or IP address of the database server.
The name of the database.
The authentication method for the database: Windows
Authentication or User/password.
l
User Name, Password. The credentials for the database.
The SQL provider: OLEDB or SQL.
Web Services - Managing Services
Managing Services Overview
The Service Management window lets you manage a list of service entries for the current script.
You can view and set the properties of each service entry.
You add service entries to the list by importing WSDL files. When you add a WSDL to the list,
VuGen creates a working copy that it saves with the script—it is not global. Therefore, for each script that you create, you must import the desired WSDL files.
The Manage Services window provides quick access buttons for importing, deleting, and comparing services.
Page 723 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
The tabs provide you with the ability to set the WSDL properties.
Description
The Description tab displays information about the service: l
Original location. The original source of the WSDL file (read-only).
l
Service name. The name of the Web Service (read-only).
l
Last update from original. The last date that the local copy was updated from the original source (read-only). You can update the version manually or retrieve it automatically each time you reopen the test.
l
Service address. An endpoint address to which the request is sent. If required, you can override the endpoint specified in the WSDL file.
l
Created by. The name of the user who originally imported the service (read-only).
Page 724 of 1812 HP LoadRunner (11.50)
User Guide
VuGen l
Toolkit. The toolkit associated with the script. You set this before importing the first WSDL file
(read-only).
Operations
Each of the imported services may define multiple operations. The Operations tab indicates which operations are being used for the service selected in the left pane.
Connection Settings
In some cases WSDLs reside on secure sites requiring authentication. In certain instances, the
WSDL is accessed through a proxy server.
VuGen supports the importing of WSDLs using security and WSDLs accessed through proxy servers. The following security and authentication methods are supported: l
SSL l
Basic and NTLM authentication l
Kerberos for the .NET toolkit
For more information about setting the connection information while importing the WSDL, see
"How to Add and Manage Services " on page 736 .
UDDI Data
You can view the details of the UDDI server for each service that you imported from a UDDI registry.
The read-only information indicates the URL of the UDDI server, the UDDI version, and the Service key.
Page 725 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Protocol and Security Settings
The Protocol and Security Settings tab shows the details of the security scenario applied to the script. If you did not choose a scenario, it uses the default <no scenario>. For more information, see
"How to Add and Manage Services " on page 736 .
This section also includes: l
"Importing Services " below
l
"Comparison Reports" below
Importing Services
VuGen lets you import services for the purpose of creating a high-level tests with Web Service Call steps. Typically, you begin creating a script by importing a WSDL file.
The Import mechanism requires the following information: l
Source. The source of the WSDL: URL, File, UDDI, or Application Lifecycle Management.
UDDI is a universal repository for services (Universal Description, Discovery, and Integration).
Service brokers register and categorize published Web Services and provide search capabilities. The UDDI business registry is an example of a service broker for WSDL-described
Web Services.
l
Location. the path or URL of the WSDL, entered manually or by browsing.
l
Toolkit. The toolkit to permanently associate with all services in the script for all subsequent imports and replays (only available for the first service added to the script). The toolkit setting instructs VuGen to send real client traffic using an actual toolkit—not an emulation.
VuGen supports the .NET Framework with WSE 2 version SP3 and Axis/Java based Web
Services Framework toolkits. VuGen imports, records, and replays the script using the actual
.NET or Axis toolkit. By default, VuGen uses automatic detection to determine the most appropriate toolkit.
l
Connection Settings. Authentication or proxy server information. This setting is useful for
WSDLs residing on secure servers, or WSDLs that must be accessed via a proxy server.
If VuGen detects a problem with your WSDL when attempting to do an import, it issues an alert and prompts you to open the report. The report lists the errors and provides details about them.
For task details, see
"How to Add and Manage Services " on page 736 .
Comparison Reports
VuGen lists the differences between the files in a Comparison report.
You can configure the comparison settings, indicating which items to ignore during the comparison.
For more information, see the
"XML/WSDL Comparison Dialog Box " on page 747
.
In WSDL Comparison reports, there are two columns— Working Copy and Original File. The
Working Copy is the WSDL stored with the script, while the Original File is the WSDL at its original location—a network file path or a URL.
In XML Comparison reports, each column displays the path of an XML file.
Page 726 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
The Comparison report uses the following legend to mark the differences between the two files: l
Yellow. Changes to an existing element (shown in both versions).
l
Green. A new element added (shown in the original file copy).
l
Pink. A deleted element (shown in the working copy).
In the following example, line 24 was deleted from the original copy and and line 28 was added.
Web Reference Analyzer
Many WSDL files reference other files such as XSD and other XML files. Before running a script, you may want to determine what these files are and if they are available.
VuGen's WSDL Reference Analyzer checks the WSDL for dependencies, and lists them in the
WSDL Reference Analyzer window and in a log file.
The Analyzer places the WSDL and its dependent files in a a zip archive file. It saves the dependency information to a log file, listing its path in the Analyzer window. For task details, see
"How to Analyze WSDL Dependencies" on page 737
XML Editing
The XML editor lets you view and edit XML and XSD schemas.
VuGen provides an editor that displays the XML structure according to a WSDL or XML schema.
The grid-like display lets you view the XML in its hierarchy and set values for each of the elements.
Page 727 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
The left column represents the schema, while the other columns show the XML that is generated and its properties.
To set values for the elements, you can manually edit the XML or import XML files with the values.
The editor denotes optional elements with a small triangle in the upper left corner of the cell. A filledin triangle indicates an included element. To exclude an optional element, click the small triangle to clear it.
When you exclude an element, the Editor works dynamically and removes the entire element from the XML code. When you re-include the element, the Editor adds it back into the XML.
Multiple Value Sets
Value sets are arrays that contain a set of values. You can create multiple value sets for your parameter and use them for different iterations or test runs.
You can use optional elements that will appear in one value set, but not in another. This allows you to vary the values you send for each of the iterations—some iterations can include specific array elements, while other iterations exclude them.
When using value sets, the number of array elements per parameter does not have to be constant.
The exception to this is Choice, Derived, and <any> types, where the number of elements is fixed for all value sets.
For task details, see
"How to Edit the Schema" on page 738 .
Page 728 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
XML Validation Overview
When you run a Web Service, it transfers data requests and responses to and from a server. In
Web Services scripts, it is common to use parameters for the data instead of hard-coded values.
Each parameter contains the actual XML data being transferred. By using parameters, you can test your Web Service with many different values.
VuGen provides an interface for validating the XML data in the parameters by checking for: l well-formed XML l correctness of checkpoint values l compliance with an XML schema (manual loaded schemas only)
To be well-formed, an XML document must follow more than 100 different rules as defined by the
World Wide Web Consortium (W3C). For example, one important rule is that each element must have start and end tags.
Checkpoint validation compares argument values within the XML file with expected values. You manually specify the expected values or load them from an earlier session.
An XML schema represents the interrelationship between the attributes and elements of the XML objects. To check that an XML file complies with its schema, you specify the XML file together with its XSD (XML Schema Definition) file. This check only applies to XSDs that you load manually— not ones that VuGen detects automatically.
This section also includes: l
"XSD Schema Validation " below
l
"Checkpoints and the Expected Response" on next page
l
"Validation Results " on page 733
l
"REST Services and XML Validation" on page 735
XSD Schema Validation
To perform complete XML validation, you select a parameter and indicate its corresponding XSD schema. When specifying a parameter for XML validation, you can use either an input or output parameter.
For input parameters, you use a parameter that you saved earlier. You can also select
Create/Select Parameter from the XML Source dropdown list to create a new one. The parameter type should be XML parameter or a file type parameter where the file's content is XML.
Ideally, this parameter is XML with an ANY type element. By parsing the XSD, VuGen determines whether or not the WSDL is compliant with the schema.
You create output parameters in the Properties tab, by enabling Save returned value in
parameter while selecting the output value. If you select the top node of the output parameter,
VuGen saves the value as an XML parameter.
The following example shows an output array saved to a parameter, My_Saved_Param.
Page 729 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
For information about defining parameters, see
"Parameters" on page 247
.
In the XML Validation dialog box, you provide the saved parameter as the XML Source.
Checkpoints and the Expected Response
The following sections describe the types of checkpoints and how they help you validate the expected response.
Basic and Advanced Checkpoints
You can perform both basic or advanced validations for your checkpoints.
In basic validation, VuGen looks for exact matches of the value in the Expected value column. You can load expected values from a Recorded or Replay snapshot.
Use Advanced Checkpoints to validate a checkpoint on non-leaf nodes or to define expected values in terms of a regular expression.
You define the advanced validation values by entering an XPATH query in the Advanced
Checkpoint section. To obtain the initial XPATH expression, copy it from a row in the Basic
Validation. Choose Copy Row XPATH from the right-click menu and paste the contents in the
Advanced Validation section.
You can define both basic and advanced validations for the same step.
Note that when you select a non-leaf node, you need to supply all of the XML beneath the node.
Page 730 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
In the Vuser script, VuGen indicates an exact match by Value= and a regular expression with
Expression=:
BEGIN_CHECKPOINTS,
CHECKPOINT, "XPATH=/AddResult[1]", "
Value=50"
CHECKPOINT, "XPATH=AddResult", "
Expression=Hel*?",
END_CHECKPOINTS,
XPATH Expressions
Checkpoint expressions support both Nodeset and extended XPath syntax.
NodeSet expressions are XPath expressions evaluated to a single XML node or to a set of XML nodes. For example:
/a/b/c
/x/y[1]
//a/b
VuGen also supports full XPath expressions, such as count(/a/b/c) which is evaluated to int, or
count(/a/b/c) < 3 which is evaluated to a boolean value. The XPATH support allows you to do numeric comparisons. For example, to verify whether a result is between 8 and 16, you can use the following expression: number(/a/b/c) > 8 and number(/a/b/c) < 16
The Expected Response
Using XML Validation you can check the entire response of your Web Service call. This capability is similar to the standard checkpoints, but it has the added capability of saving the entire response to a single parameter, instead of saving each argument to its own parameter.
To validate your responses, you add an XML validation step after the Web Service call you want to validate (it need not be immediately after the call).
For each Web Service call, VuGen saves the entire XML response to a parameter. This lets you validate the entire response in a single step. The name of the parameter is the Web Service call step name with a _Response suffix. For example, if the step name is GetAddr_101, the response parameter is GetAddr_101_Response.
Note that this parameter is not the actual SOAP response. The SOAP response contains the response values and the entire SOAP envelope. This response while containing the XML values, does not contain the SOAP header or envelope.
Since the response is unique for each Web Service call, you must add separate validation steps for each saved parameter. When you select a response parameter, VuGen automatically loads the
XSD, in order to perform a schema validation.
You can also validate an individual argument, whose value you manually saved to a parameter in design time. This parameter will appear in the XML Source dropdown.
Validation Comparison Operators
You use checkpoints in XML validation to check for expected values in the XSD using the following comparison operators:
Page 731 of 1812 HP LoadRunner (11.50)
User Guide
VuGen l
Equals. match the exact text.
l
Does not equal. Does not match the text.
l
Contains. match part of the text.
l
Starts With. a match if the returned text begins with the following phrase.
l
Ends With. a match if the returned text ends with the following phrase.
l
Reg. expression. matches the string pattern using regular expression syntax
For numerical elements, you indicate one of the standard numerical relationships, such as equal, not equal, greater than, less than, and so forth.
For information on defining advanced queries using regular expressions, see
"Checkpoints and the
Expected Response" on page 730
.
Optional Elements
The XML Validation tool lets you check for the presence of an optional value. In some cases, you need to check that a value is present, while in others you need to verify that a value is not present.
When you include the optional element, by filling in the icon , replay checks that the service returned a value. When you exclude the optional element, by clearing the optional icon , replay verifies that the service did not return a value.
In the following example, the optional element was included and given the value of abcd.
During replay, VuGen checks for a value for the element. If it does not detect any value during replay, VuGen issues an error message indicating that it did not find a value for an element that was included. You can see detailed information in the Test Results report. For more information, see
"How to Validate the XML" on page 737
.
In the following example, VuGen checks that the server did not return a value. If it finds a value for the element, an error message indicates that VuGen detected a value for an element that should have been excluded.
Page 732 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
For both types of testing—inclusion and exclusion—you need to select the checkbox in the
Validate column. Otherwise, the Validation tool will ignore the element.
Validation Results
By adding an XML Validation step to your script, VuGen performs the validations in runtime. You can determine the validation results in several ways:
Replay Log
During replay, VuGen displays the results in the Replay log. We recommend that you enable the
Extended Log Run-Time settings to obtain more details about the validation.
Test Results Report
The Test Results report shows the results of the validation step, along with the XML source code.
To open the report, select View > Test Results.
Page 733 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Return Values
In addition to viewing the Replay log, you can evaluate the return values for soa_xml_validate to determine the outcome of the validation. The following table lists the possible return values:
6
7
4
5
2
3
Value Description
0
1
Validation succeeded. XML is well-formed, compliant, and checkpoints are in order.
The parameter is empty or does not exist.
The XML is not well-formed.
The XML is well-formed, but not the XSD.
The XML does not comply with the XSD.
8
9
The values in the XML string do not match the values specified in the checkpoints'
XPATH queries.
The XSD file could not be found.
An error, other than the ones listed in this table, occurred, such as an internal or unknown error.
The XSD file is not well-formed and the values in the XML string do not match the values specified in the checkpoints' XPATH queries.
XML failed validation against the XSD file and the values in the XML string do not match
Page 734 of 1812 HP LoadRunner (11.50)
User Guide
VuGen the values specified in the checkpoints' XPATH queries.
For more information about the function and its return values, see the Function Reference (Help >
Function Reference).
REST Services and XML Validation
You can use the XML validation for non-SOAP Web Services, such as REST. The following example illustrates the collaboration between a REST Web Service and XML Validation.
// Save the content between the commas to a Design Run type parameter web_reg_save_param("WCSParam_Text1",
"LB=",
"RB=",
"RelFrameId=1",
"Search=Body",
"IgnoreRedirections=Yes",
LAST);
//The service request submitted as a URL web_url("xml",
"URL=http://ecs.amazonaws.com/onca/xml?Service=AWSECommerceService=;
Operation=ItemSearch=;AWSAccessKeyId=123456789ABCD=;SearchIndex=Books=;
Keywords=Cortisol=;Author=Tolstoy",
"Resource=0",
"RecContentType=text/xml",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
LAST);
//Use the parameter's value in the validation statement.
soa_xml_validate ("StepName=XmlValidation_1",
"Snapshot=t3e9876543214.inf",
"XML={ WCSParam_Text1}",
"StopOnValidationError=0",
"XSD=C:\\Bugs\\67571_Rest\\AWSECommerceService.xsd",
BEGIN_CHECKPOINTS,
...
END_CHECKPOINTS,
LAST);
To use a POST, PUT, or DELETE action, use web_custom_request as described in the
LoadRunner Function Reference.
XML Queries
You can query an XML tree in order to locate and examine a specific element and value.
Page 735 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
To search an XML file, you use a query in the standard XPATH syntax. To build a valid XPATH query, use the built-in Query Builder. You can perform a query on your XML document, and search for a specific Namespace URI, value, or attribute. Note that all queries are case-sensitive.
How to Add and Manage Services
This task describes how to create a list of services that you can call from your test. Using the
Manage Services window, you import services and configure their settings.
Open the Manage Services dialog box
Select SOA Tools > Manage Services or click the toolbar button to open the Manage Services dialog box.
Import a service
Click Import. In the Import Service dialog box, select a WSDL source and browse to the location.
For URL type imports, the Browse button opens a new browser. Navigate to the WSDL and then close the browser. This action places the URL in the location box. For details, see the
"Import
Service Dialog Box" on page 745
.
If your service requires authentication or uses a proxy, configure these settings before importing the
WSDL. Expand the Import Services dialog box and click Configure. For details, see the
"Connection Settings Dialog Box" on page 744
.
Repeat this step for all the services you want to include in your test.
Get to know the WSDL
Familiarize yourself with the WSDL. View its details as described in the
"Manage Services Dialog
Box" on page 742 .
Click View WSDL to open the locally saved WSDL file in Internet Explorer and study its structure.
Check for WSDL updates - optional
Use the Comparison tool to check that the WSDL did not change since your last import or update.
First, set the comparison options. Click SOA Tools > SOA Settings > XML/WSDL
Comparison. Specify what differences to ignore. For details, see
"XML/WSDL Comparison Dialog
Box " on page 747 .
In the Manage Services window, click Compare to open a report comparing the working copy of the
WSDL with the one at the original location.
If you discover changes in the Comparison report, click Update Now to retrieve the latest version of the WSDL from its source.
Override the service address- optional
View the address in the Service Address box. This is the default endpoint address as retrieved from the WSDL. If you want to override it, select Override address and type in an alternate endpoint address for the service requests.
To return to the default address, clear the Override address option. For details, see the
"Manage
Services Dialog Box" on page 742
.
Page 736 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Set a security scenario - optional
Click the Protocol and Security tab to use WS-Security or another type of a security scenario.
For more information, see
"Web Services - Security" on page 750
How to Analyze WSDL Dependencies
This task describes how to use the Reference Analyzer to determine WSDL dependencies. For user interface details, see
"WSDL Reference Analyzer Dialog Box" on page 749 .
1. Open the Reference Analyzer
Select SOA Tools > WSDL Reference Analyzer.
2. Select a source and target
In the Select WSDL file box, indicate the location of the WSDL you want to analyze.
In the Output file path box, indicate a location for the zip file.
3. Begin the analysis
Click Start Analyzing. The Analyzer lists all of the dependencies in the output window along with their paths.
4. View the log
View the results in the log window. To clear the results and perform another analysis, click
Clear Log.
How to Validate the XML
This task describes how to validate the XML to be well-formed and verify the expected responses.
For concept details, see
"XML Validation Overview" on page 729 .
1. Open the XML Validation tool
Select a test step (or Web Service call in Script view) and click the Validate XML button on the upper toolbar. For user interface details, see
"Validate XML Dialog Box" on page 747
.
2. Select a parameter
In the XML Source box, choose a response parameter from the drop down list. For the complete response of the Web Service call, choose the response parameter—the name of the
Web Service call step with a _Response suffix. If you manually saved a response argument for an individual parameter, you can select it too.
3. Enable checkpoints
Select the Checkpoints option if it is not already selected. In the Validate column, check the arguments that you want to validate. Click Select All to enable validation for all of the arguments and their children.
4. Set the expected values a. Place the mouse over the argument name to discover its data type.
Page 737 of 1812 HP LoadRunner (11.50)
User Guide
VuGen b. Select a comparison operator, such as Equals, Does not equal, and so forth.
c. Specify an expected value. Certain data types provide an interface for selecting values, such as the Boolean and Date types.
d. To parameterize a value, click the ABC icon and create a new parameter.
5. Set advanced checkpoints - optional a. Select the Advanced Checkpoints option.
b. Copy an XPath expression from an existing argument. For example, in the Checkpoint grid, select an argument value and select Copy XPATH from the shortcut menu.
c. Paste the XPath expression into the XPATH Query column. For more information, see
"Checkpoints and the Expected Response" on page 730
.
d. Select a Validation Method: Contains, Reg.Expression, or Exact Phrase.
e. Specify an expected value.
6. Complete the validation step
Click OK to add the XML Validation step. It appears in your script as soa_xml_validate.
7. Prepare for a test run
Set the Extended logging options. Click F4 to open the Run-Time settings. Select the General
> Log node and select the Extended log option. You do not need to enable any of the sub options. Click OK.
8. Run the script and view the results a. Click F5 to run the script. View the Replay log to check for errors.
b. View the test results. If the Test Results window did not open automatically, select View >
Test Results.
c. Expand the XML Validation step. View the status, source XML, and the checkpoint results.
How to Edit the Schema
This task describes how to use the XML editor to load values for the XML and XSD files. For user interface details, see
"XML Editor Dialog Box" on page 749 .
1. Open the XML editor
Choose SOA Tools > XML Editor. The editor opens.
2. Load a schema
Choose Schema > Load and select an XSD file for which you want to create value sets and edit.
3. Select a root
If the schema has multiple root elements, select a root element. Click the small button adjacent to the root name to open the drop down box.
Page 738 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
4. Assign values n
Type entries into the Values column. To enter values manually, place the mouse over the element's icon to discover its data type. For more information about data types, see
"How to
Edit Values in the XML Grid " on next page
.
Load XML from file into the selected
n
To load values from an XML file, Click the
column button.
5. Add more value sets - optional
Choose Columns > Add or click the Add Column button to add another value set. Set the values manually or by loading XML as described in the previous step.
To add a column with identical values to the selected one, click the Duplicate Column button
.
To resize the columns of the value sets, click the divider in the column's title and drag your mouse to the desired width.
6. Edit the XML - optional
To edit the actual schema, select one column and click the Edit XML from the selected
column
button. After the editing, click OK.
7. Remove a value set - optional
Page 739 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
To remove a column, select it and choose Columns > Remove or click the Remove Column button.
8. Save a column and its values- optional
To save the XSD with the values of the current value set, select the column and choose XML
> Save or click the Save XML from the selected column button.
How to Edit Values in the XML Grid
This task describes how to work in the XML grid.
Parameterization uses the Editor to display parameter elements and values as described in
"Parameters" on page 247 .
XML validation uses the grid to display the XSD schemas. Service Emulation uses the grid to display rules.
For user interface details, see
"XML Editor Dialog Box" on page 749
.
Enter the XML grid
Click within an XML grid. The XML grid is integrated into the XML Editor, Parameterization, XML
Validation, and Service Emulation. Choose a root element if there are multiple ones.
Determine the data type
To determine an element's data type, place your mouse over the icon adjacent to the element name, such as 123, ABC, B64, and so forth. The mouseover popup indicates the data type.
The grid recognizes element data types and provides an interface for setting the values. For example: l
For an Int type, the value cell contains a number scrolling control.
l
For boolean, it contains a list box with the values true, false, 1, or 0.
l
For a Date element, you can open a calendar to select a date.
Set the base64 properties
The schema indicates Base64 elements with a B64 button to the right of the value box. Click the button to open the Process Base 64 Data dialog box. For UI details, see
"Process Base64 Data -
Simple Data Dialog Box " on page 692
.
Include or exclude optional elements
To include optional elements, fill in the green triangle adjacent to the element.
Include or exclude array elements
To include or exclude array elements, click on the green diamond in the square brackets.
l
If the green diamond is visible, it includes the element.
l
If the green diamond is removed, it excludes the element and all of its descendants.
The following example excludes an array element in several value sets.
Page 740 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Add or remove array elements
To duplicate an array, right-click the parent node and select Duplicate Array Element.
To remove an array, right-click the parent node and select Remove Array Element.
Create a structure for <any> elements l
To add an array of <any> elements, select the parent <any> element and choose Add Array
Element from the shortcut menu.
l
To add a child <any> element, select the parent element and choose Add child from the shortcut menu.
l
To add an additional child <any> element, select the child element and choose Add sibling from the shortcut menu.
l
To provide a name for the <any> element, click the Rename Element text, and type in a name.
l
To load values for an <any> element, choose Load XML from the shortcut menu.
How to Build an XML Query
This task describes how to use the Query Builder to locate and examine a specific element. For details, see
"XML Queries " on page 735 .
1. Prerequisites
Create a script and run it at least once.
2. Open the Find XML dialog box
In the Snapshot pane, Click Find XPath. In the Find XML dialog box, select Request or
Page 741 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Response. For user interface details, see the
"Find XML Dialog Box" on page 750 .
3. Specify a query
Manually type in an Xpath query or click Query Builder.
4. Specify details for the Query Builder
If using the Query Builder, enter the search text in the appropriate boxes.
n
Enable the Name section to search for the name of a node or element.
n
Enable the Namespace URI section to search for a namespace.
n
Enable the Text section to search for the value of the element indicated in the Name box.
n
Enable the Attributes section to search for an attribute.
o
To add an attribute, click the Add button . The Attribute Properties box opens. Enter an attribute name and value. Click OK.
5. Perform the query
Click OK in the XML Node Query dialog box. VuGen places the text of the query in the XPath query box. Click Find Next to begin the search.
Manage Services Dialog Box
This dialog box enables you to manage your WSDLs, provide authentication information, and set a security scenario.
To access
Relevant tasks
Use one of the following: l
Click the Manage Services button l
SOA Tools > Manage Services
on the VuGen toolbar.
"How to Add and Manage Services " on page 736
User interface elements are described below (unlabeled elements are shown in angle brackets):
UI Element Description
Opens the Import Service dialog box.
Removes the selected service from the list.
<WSDL
Opens the WSDL Comparison Report showing the Working copy and Original copy of the WSDL side-by-side.
To set the comparison settings, see
"XML/WSDL Comparison Dialog Box " on page 747
Displays the WSDL in a browser.
A list of the imported WSDLs.
Page 742 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
list>
Description tab
Provides information about the WSDL, its endpoint address, toolkit, and update information.
Operations tab
Lists the operations of the service: Operation Name, PortName, and Used in
Script (Yes or No).
Click a column to sort the operations by that column's data. Click it again to reverse the sorting order.
Connection
Settings tab
Allows you to provide authentication settings for the machine from which you are importing a service. For more information, see the
"Manage Services Dialog Box" on previous page .
Note: This only applies to URL and UDDI type imports.
UDDI Data tab
Protocol and
Security tab
The UDDI server, UDDI version, and service key. For more information, see the
"Manage Services Dialog Box" on previous page
Allows you to view and set a security scenario for your Web Service calls. For more information, see below.
Description Tab
The following elements are displayed in the Description tab:
UI Element Description
Loads the latest version of the WSDL from its original location.
Created By
Description
Last update from original
Original
Location
The name with which you logged in. You can edit this field and specify a different name. This is useful for sorting the services in reports (read-only).
An editable field into which you can type information about the service.
The last date and time the WSDL was updated (read-only).
The original location from where the WSDL was imported (read-only).
Override address
Service
Address
Enables you to enter an alternate endpoint for the service in the Service
Address box.
The endpoint of the service to which service requests are sent, retrieved from the WSDL file (read only). To override the default address, select Override
address.
Service Name
The native service name in the WSDL file that is displayed by default when importing the service (read-only).
Page 743 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Toolkit
Update when opening script
The toolkit associated with the service. You set this when you import the service (read-only).
Updates the WSDL from its source each time you open the script.
Connection Settings Tab
The following elements are included:
UI Element Description
Authentication
Use Authentication Setting: Enables you to enter credentials for authentication.
l
Username, Password. The user name and password to use for retrieving the WSDL.
Tip: For users not in the default domain, type the domain name before the user name. For example, domain1/alex_qc.
Proxy
Use Proxy Setting. Enables you to enter proxy details and credentials.
l
Server. Name or IP address of proxy server.
l
Port. Port through which to access the WSDL.
l
Username, Password. the user name and password to be used for authentication. For users not in the default domain, type the domain name before the user name. For example, domain1/alex_qc.
UDDI Data Tab
The following elements are included:
UI
Element
Service
Key
UDDI
Server
UDDI
Version
Description
A unique identifier of the service on the UDDI server, used to locate the service definition when updating the service.
The URL address and version of the UDDI server from which the service definition is imported.
The version of the UDDI registry: 2 or 3.
Connection Settings Dialog Box
Enables you to provide authentication credentials and proxy server details for the machine hosting the WSDL file.
To access
For a new service: Select SOA Tools > Import Service. In the Import
Services dialog box, click Connection Settings.
Page 744 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
For existing services: Select a service in the Service Management dialog box, and click the Connection tab.
Only available for services imported through a URL and UDDI.
Important information
Relevant tasks
"How to Add and Manage Services " on page 736
The following elements are included:
UI Element Description
Authentication
Use Authentication Setting: Enables you to enter credentials for authentication.
l
Username, Password. the user name and password to use for retrieving the WSDL.
Tip: For users not in the default domain, type the domain name before the user name. For example, domain1/alex_qc.
Proxy
Use Proxy Setting. Enables you to enter proxy details and credentials.
l
Server. Name or IP address of proxy server.
l
Port. Port through which to access the WSDL.
l
Username, Password. the user name and password to be used for authentication. For users not in the default domain, type the domain name before the user name. For example, domain1/alex_qc.
Import Service Dialog Box
Enables you to import WSDLs from a file system, a URL, Application Lifecycle Management, a
UDDI, or Systinet.
To access
Use one of the following: l
Select Services > New > Import Services l
Select New > Import Services from the shortcut menu
"How to Add and Manage Services " on page 736
Relevant tasks
The following elements are included:
UI Element Description
Browse. Enables you to locate a service on the file system, through a browser, UDDI registry, or Application Lifecycle Management repository depending on your Import WSDL from selection.
Opens the Connections Settings dialog box for configuring the authentication and proxy settings of the server hosting the WSDL.
For details, see
"Connection Settings Dialog Box" on previous page
.
Page 745 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Select WSDL from
Allows you to select a toolkit for the test. Choose Automatic, .NET, or Axis. The Automatic setting uses an algorithm to determine the most suitable toolkit.
Opens the Application Lifecycle Management Connection dialog box to allow you to specify the ALM host machine.
Begins the import process.
Location of WSDL. Browse for the information or enter it manually: l
URL: Complete URL. Make sure to insert a complete URL—not a shortened version.
l
File: Full path and file name.
l
UDDI: UDDI registry ID. The Browse button opens the
"Search for Service in UDDI Dialog Box" below
.
Search for Service in UDDI Dialog Box
This dialog box enables you to locate a specific service from a UDDI registry.
To access
l
In the Manage Services window, click Import.
l
In the Import dialog box, select UDDI in the Select WSDL from section.
l
Click .
Relevant tasks
"How to Add and Manage Services " on page 736
User interface elements are described below (unlabeled elements are shown in angle brackets):
UI Element Description
Begins the search for a service based on the text in the All or part of the
service name box.
<service list>
An alphabetical list of all the services that match the string. The grid shows the following columns: Service Name, Service Key, Service Description,
Service WSDL.
All or part of the service name
A string including the desired service name or part of the name. You do not need to use wildcard expressions.
The following options narrow the search: l
Exact Match. The service name must exactly match your text.
l
Case Sensitive. The case of service name must match the case of the specified text.
Page 746 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
UDDI server inquiry address
UDDI
Version 2/3
The complete path for the inquiry on the UDDI server.
The UDDI version of the services to display in the list.
XML/WSDL Comparison Dialog Box
This dialog box enables you to configure the settings for comparing different versions of a WSDL
You can instruct the comparison tool to ignore specific differences such as case, comments, and so forth.
To access
Relevant tasks
SOA Tools > SOA Settings > XML/WSDL Comparison.
"How to Add and Manage Services " on page 736
User interface elements are described below:
.
UI Element
Show only differences
Ignore case
Ignore comments
Ignore processing instructions
Ignore namespaces
Description
Show only differences in the report—do not display the matching text.
Do not show case mismatches as differences.
Do not mark mismatches in the comment as differences.
Do not mark mismatches in the processing instructions as differences.
Do not mark mismatches in namespaces as differences.
Validate XML Dialog Box
This dialog box enables you to validate XML parameters and their expected values.
To access
Relevant tasks
on the upper toolbar.
"How to Validate the XML" on page 737
User interface elements are described below (unlabeled elements are shown in angle brackets):
UI Element Description
Reloads the XSD schema file in the checkpoint grid.
Selects the Validate box for all elements.
Clears the Validate box for all elements.
Page 747 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
<checkpoints grid>
<advanced checkpoints grid>
XML Source
l
In the upper pane: Deletes all checkpoint expected values.
l
In the lower pane: Deletes all advanced checkpoints.
Loads expected values for the XML elements from the recorded data.
Loads expected values for the XML elements from the latest replay data.
Deletes the selected advanced checkpoint.
A list of the response elements. The grid columns include:
XML Checkpoints n
The response elements you want to check.
Validate n
Enables/disables the validation for a specific element.
Expected Value n
Comparison operator dropdown displaying the relevant comparison method such as Equals, Does not equal.
n
The value to compare to the response.
n
Enables the using of a parameter for the expected value instead of a hard-coded value.
A list of the response elements. The grid columns include: l
XPath Query. The XPATH expression to use in the comparison.
l
Validation Method. The validation method: Contains, Regular
Expression, or Exact Phrase.
l
Expected Value. The value to compare to the response.
The XML parameter to validate. The dropdown provides a list of all available parameters and the option to create a new one.
l
Show only output parameters. Limits the XML source dropdown list to show only output parameters.
Checks for well-formed XML, providing the results in the report.
Check for wellformed XML
XML Schema
Checkpoints
Advanced
Checkpoints
Fail test upon validation error
The schema file associated with the XML. In some instances this is retrieved automatically.
Enables checkpoint validation during the test run.
Enables the advanced checkpoint validation during the test run.
Marks the test status as Failed if a validation error occurs.
Page 748 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
WSDL Reference Analyzer Dialog Box
This dialog box enables you to determine the dependencies of a WSDL file.
To access
Relevant tasks
SOA Tools > WSDL Reference Analyzer
"How to Analyze WSDL Dependencies" on page 737
User interface elements are described below (unlabeled elements are shown in angle brackets):
UI Element Description
Begins the analysis, showing all the results in the Log window.
Clears the log window and log file.
<log window>
Select WSDL file
Output file path
Opens the folder containing the output file.
A running log of the reference analysis.
The local path or URL of the WSDL file to analyze.
A location for the output zip file.
XML Editor Dialog Box
This dialog box enables you to determine the dependencies of a WSDL file.
To access
Relevant tasks
SOA Tools > XML Editor
"How to Edit the Schema" on page 738
User interface elements are described below (unlabeled elements are shown in angle brackets):
UI Element Description
Load Schema. Opens an XSD schema file in the editor.
Add Column. Adds a Values column to the right of the last column.
Duplicate Column. Creates a new column with the same values as the selected column.
Delete Column. Deletes the selected Values column.
Load XML. Loads XML data from a file into the selected column.
Page 749 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Edit XML. Opens the schema with the data of the selected column, in a text editor.
Save XML. Saves the values from the selected column to an XML file.
<schema>
The XSD schema with the element values in grid format.
XML
Values
An XML representation of the schema with the values of the selected column (right pane).
Find XML Dialog Box
This dialog box enables you to determine the dependencies of a WSDL file.
To access
Relevant tasks
Find XPATH in the Snapshot pane.
l
"How to Build an XML Query " on page 741
l
"How to Query an XML Tree" on page 510
User interface elements are described below (unlabeled elements are shown in angle brackets):
UI Element Description
Opens the XML Node Query dialog box for specifying query information.
XPath Query
The query expression. This can be entered manually or through the Query
Builder.
Find
The SOAP message upon which to perform the search: Request or Response.
XML Node Query Dialog Box
User interface elements are described below:
UI Element
Name
Namespace URI
Text
Attributes
Description
Add Attribute. Opens the Attribute Properties dialog box.
Delete. Removes the selected attribute from the list.
Edit. Enables you to edit the selected attribute.
Searches for the name of a node or element.
Searches for a namespace.
Searches for the value of the element indicated in the Name box.
Searches for an attribute in the attribute list.
Web Services - Security
Page 750 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Setting Security Overview
When building Web Service applications, there is a challenge in building scalable applications that are secure. You can secure Web Services by having the message sent over a secure transport, such as Secure Sockets Layer (SSL), but this is limited to point-to-point communication.
To allow you to send your messages securely, VuGen supports several security mechanisms,
Security Tokens (WS-Security), and SAML.
For more information on tokens, see below. For more information on SAML, see
"SAML Security
Options " on page 754 .
The following table lists the considerations for using each of the models.
Legacy Model
You are working with a script that already uses the legacy model
You are testing a service written in frameworks such as .NET 2.0, Axis, or other older toolkits
You require a low-level control over WS-
Security tokens
You are having trouble using the new model or find the capabilities of the legacy more adequate for your needs
Scenario Based Model
You are testing a WCF Service.
You are testing a service written in a new framework, such as Axis2 or Metro (WSIT).
Your service uses advanced specifications such as WS-SecureConversation or WS-
Trust.
You are having trouble using the legacy model or you find the capabilities of the new model more adequate.
Note: If your WSDL is located in a secure location, you must provide the security information through the Manage Services dialog box. For more information, see the
"Connection Settings
Dialog Box" on page 744 .
Security Tokens and Encryption
The WS-Security specification lets you place security credentials in the actual SOAP message.
You accomplish this by instructing a client to obtain security credentials from a source that is trusted by both the sender and receiver. When a SOAP message sender sends a request, those security credentials, known as security tokens, are placed in the SOAP message. When the Web server receives the SOAP request, it does not need to send additional requests to verify the integrity of the sender. The server verifies that the credentials are authentic before letting the Web
Service execute the application. By not having to go back to the source of the credentials, this significantly improves the application's scalability.
To further secure Web Services, it is common to use digital signatures or encryption for the SOAP messages. Digitally signing a SOAP message verifies that the message has not been altered during transmission. Encrypting a SOAP message helps secure a Web Service by making it difficult for anyone other than the intended recipient to read the contents of the message.
Page 751 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
The Web Services security mechanism associates security tokens with messages. This mechanism supports several security token formats to accommodate a variety of authentication requirements. For example, a client might need to provide a proof of identity or a security certificate.
To support WS-Security, VuGen allows you to create security tokens for your script. You can create multiple tokens and set their properties. After creating a token, you use it to sign or encrypt a
SOAP message.
In certain instances, you do not send the token explicitly—you use the token for the purpose of signatures or encryption, without including the actual token in the SOAP envelope header. Using the Add option, you can indicate whether to send the actual token explicitly.
The available tokens are Username and Password, X.509 Certificate, Kerberos Ticket,
Kerberos2 Ticket, Security Context Token, and Derived Token. The information you need to provide differs for each token.
l
User Name and Password. The User Name and Password token contains user identification information for the purpose of authentication: User Name and Password.
You can also specifyPassword Options, indicating how to send the password to the server for authentication: SendPlainText, SendNone, or SendHashed.
l
X.509 Certificate. This security token is a token based on an X.509 certificate. To obtain a certificate, you can either purchase it from a certificate authority, such as VeriSign, Inc. or set up your own certificate service to issue a certificate. Most Windows servers support the public key infrastructure (PKI) which enable you to create certificates. You can then have it signed by a certificate authority or use an unsigned certificate.
When you add an X.509 token to the Vuser script, you specify the LogicalName, Store Name,
Key identifier type, Key identifier value, and Store Location arguments.
l
Kerberos Ticket/Kerberos2 Ticket. (for Windows 2003 or XP SP1 and later) The Kerberos protocol is used to mutually authenticate users and services on an open and unsecured network.
Using shared secret keys, it encrypts and signs user credentials. A third party, known as a KDC
(Kerberos Key Distribution Center), authenticates the credentials. After authentication, the user may request a service ticket to access one or more services on the network. The ticket includes the encrypted, authenticated identity of the user. The tickets are obtained using the current user's credentials.
VuGen supports tokens based on both Kerberos and Kerberos2 security tokens. The primary difference between the Kerberos and Kerberos2 tokens is that Kerberos2 uses the Security Support
Provider Interface (SSPI), so it does not require elevated privileges to impersonate the client's identity. In addition, the Kerberos2 security token can be used to secure SOAP messages sent to a
Web Service running in a Web farm.
When you add a Kerberos token to the Vuser script, you specify a LogicalName for the tokenalong with the Host and Domain names of the Web Services machine.
l
Security Context Token. These tokens are security tokens that can be used repeatedly until they expire. SOAP message senders can use security context tokens to sign and/or encrypt a series of SOAP messages, known as a conversation, between a SOAP message sender and the target Web Service. The main benefits of this type of token are: n
As long as the security context token has not expired, the SOAP message sender can use the
Page 752 of 1812 HP LoadRunner (11.50)
User Guide
VuGen same security context token to sign and/or encrypt the SOAP messages sent to the target Web
Service.
n
Security context tokens are based on a symmetric key, making them more efficient at digitally signing or encrypting a SOAP message than an asymmetric key.
n
Security context tokens can be requested from one security token service by sending a SOAP message to another security token service.
When you add a Security Context token to the Vuser script, you specify values for the
LogicalName, Base Token, Issuer Token, End Point URI, and Add applies to arguments.
l
Derived Token. The Derived token is a token based on another existing token, excluding X.509
for which derivation is not supported. You need to specify a LogicalName and the Derived
From token. If you remove the original token, then the derived token will no longer be available.
Note that you cannot use a Derived type of token in a recursive manner.
For details about the token attribute in the script, see the Function Reference (Help > Function
Reference).
Adding the Security Policy
To add a security policy to a section of your script, you enclose the relevant steps with Web
Service Set Security and Web Service Cancel Security steps.
When you add a Web Services Set Security step to your script, VuGen adds a web_service_set_
security function that contains arguments with the tokens, message signatures, and encryption that you defined.
web_service_set_security(
SECURITY_TOKEN, "Type=USERNAME", "TokenName=mytoekn1",
"UserName=bob", "Password=123", "PasswordOptions=SendNone",
"Add=True", LAST);
Parameterization is not supported for the following arguments: Token Type, Logical Name, Base
Token, Issuer Token or Derive From arguments.
Working with Message Signatures and Encrypted Data
When you add a security token to a SOAP message, it is added to the SOAP message in the form of an XML element in the WS-Security SOAP header.
The message, however, is exposed and therefore requires additional security. This is especially true when the credentials, including the password, are sent in plain text as it is with role-based security.
The two methods used to secure the data are digital signatures and encryption.
l
Digital Signatures. Digital Signatures are used by message recipients to verify that messages were not altered since their signing. The digital signature is usually in the form of XML within the
SOAP message. The recipient checks the signature to make sure it is valid. Certain environments, such as WSE, automatically verify the signature on the SOAP recipient's computer.
l
Encryption. Although the XML digital signature offers a mechanism for verifying that the message has not been altered since it was signed, it does not encrypt the SOAP message—the
Page 753 of 1812 HP LoadRunner (11.50)
User Guide
VuGen message is still plain text in XML format. To secure the message in order that it should not be exposed, you encrypt it, making it difficult for an intruder to view and obtain a user's password.
Parameterization is not supported for message signatures and encryption arguments. For details on adding message signatures and encryption to your script, see
"How to Add Security to a Web
Service Script" on page 768 .
SAML Security Options
VuGen supports SAML (Security Assertion Markup Language) for Web Services. SAML is an XML standard for exchanging security-related information, called assertions, between business partners over the Internet. The assertions can include attribute statements, authentication, decision statements, and authorization decision statements.
SAML uses brokered authentication with a security token issued by STS (Security Token Service).
The STS is trusted by the client and the Web Service to provide interoperable security tokens.
SAML tokens are important for Web Service security because they provide cross-platform interoperability and a means of exchanging information between clients and services that do not reside within a single security domain.
You can set the SAML settings for an entire script or part of the script. For details, see
"How to Add
SAML Security" on page 769 .
Note: You cannot apply SAML security and the standard Web Service (a Web Service Set
Security step) security to the same step. To cancel Web Service security, insert a Web
Service Cancel Security step.
Signing SAML Assertions
VuGen provides a method for signing an unsigned SAML assertion. As input, you provide the unsigned assertion, a certificate file, and the optional password. As output, VuGen provides the signed SAML assertion. For task details, see
"How to Add SAML Security" on page 769
.
Policy Files
SAML policy files follow the WSE 3.0 standard and define the attribute values for the SAML security. By default, VuGen uses the samlPolicy.config file located in the installation's dat folder.
When entering SAML security information, you can enter it manually in the properties dialog box, or you can refer to a policy file containing all of the security information. You can create your own policy file based on samlPolicy.config.
You can modify the policy file to include values for the security parameters, such as username and certificate information. When adding a SAML security step to your script, if you explicitly specify values for the security arguments, they override the values in the policy file.
If you make changes to the default policy file, we recommend that you copy the new policy file to your script's folder. Make sure to save custom policy files with a .config extension to insure that they remain with the script, even when running it on other machines or calling it from the
LoadRunner Controller.
Page 754 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
To learn more about the SAML policy files, see the SAML STS example on the MSDN Web site. If you want to emulate SAML Federation behavior, copy the samlFederationPolicy.config file from the data folder to your script's folder, and specify it as the policy file.
Security Scenarios Overview
VuGen allows you to test Web Services that utilize advanced security and WS-Specifications.
Such services can be written in various platforms such as WCF (Windows Communication
Foundation), Metro (WSIT), and Axis2. For WCF services, VuGen also supports proprietary standards and transports.
You enable this support by setting up a security scenario. Each scenario represents a typical environment used in conjunction with Web Service calls. VuGen provides several built-in security scenarios that are commonly used. It applies the scenario's settings individually to each service.
For the built-in scenarios, the user interface lets you provide identity information where required.
You can customize security, transport, proxy, and other advanced settings.
If you cannot find a scenario that corresponds to your environment, you can use the generic custom scenario.
For a "How To" guide on selecting a scenario, see Tips and Guidelines .
Choosing a Security Model
VuGen supports two models for configuring security for your Web Service calls: Legacy and
Scenario. This chapter describes the Scenario security model. The Legacy model refers to the manual addition of Web Service Set Security steps, or the web_service_set_security function.
The following table lists the considerations for using each of the models.
Legacy Model
You are working with a script that already uses the legacy model
Scenario Based Model
You are testing a WCF Service
You are testing a service written in frameworks such as .NET 2.0, Axis, or other older toolkits
You require a low-level control over WS-
Security tokens
You are having trouble using the new model or find the capabilities of the legacy functions adequate
You are testing a service written in a new framework such as Axis2 or Metro (WSIT).
Your service uses advanced specifications such as WS-SecureConversation or WS-Trust
You are having trouble using the legacy model or you find the capabilities of the new model more adequate
Private, Imported, and Shared Scenarios
To assign a security scenario to a specific service, use the Manage Services window. The
Protocol and Security tab contains the interface to create and view security scenarios for
Page 755 of 1812 HP LoadRunner (11.50)
User Guide
VuGen individual services.
You can select a scenario in three ways: l
Private scenario. Create a new scenario by selecting one of the built-in ones and customizing it for your Web Service.
l
Imported scenario. Use a scenario created at an earlier time. The scenario will be editable, and if someone modifies the original scenario, it will not affect you.
l
Shared scenario. Load a security scenario already configured by another user from a remote location or the file system. You cannot edit this scenario's settings from the Manage Services window. If someone edits the scenario, it will affect your environment. You usually use this option after working with the product for some time and saving the scenario files.
Scenario Categories
The scenario describes the configuration of your Web Service. It contains information such as security, encoding, proxy, and so forth. VuGen provides a Security Scenario editor that allows you to configure the settings for each scenario.
To determine the scenario that best fits your service, refer to the sections below. If you are unsure which scenario to choose, we recommend to use the Custom Binding scenario. For more information, see
" The Custom Binding Scenarios " on page 760
.
Use the default <no scenario> for: l simple Web Services where no advanced standards are required.
l scripts that use the legacy security model l
Web Services that require a specific security setting, not available in any of the existing scenarios.
If you select a built-in scenario and experience problems in replay, it is possible that no scenario was required and the problem is elsewhere. Reset the value to <no scenario>.
The built-in security scenarios are divided into the following categories: l
"Core Scenarios" below
l
"Security Scenarios" on next page
l
"WCF Scenarios" on next page
l
"Optimization Scenarios" on page 758
Core Scenarios
The following table describes the built-in Core scenario.
Scenario Name When to use
Plain SOAP l
Web services which do not require advanced standards l
Web services which may require you to specify the WS-Addressing version
Page 756 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
For this type of scenario, if your service uses WS-Addressing, specify the version.
Security Scenarios
The following table describes the built-in Security scenario.
Scenario Name
Username
Authentication
When to use
l
Client is authenticated with a username and password on the message level
For this type of scenario, specify the username/password, and if your service uses WS-
Addressing, specify the version.
WCF Scenarios
The following table shows the scenarios for Web Services that utilize WCF. The WSHttpBindingbased scenarios are divided according to the way the client authenticates itself to the server. For example, if your client presents a user name and a password to the server, choose the Username
(message protection) scenario. The user interface lets you provide the identity information in the form of a user name or a certificate as required.
WCF Scenario Name
WSHttpBinding - No Authentication
WSHttpBinding - Windows authentication wsHttpBInding - Certificate authentication
WSHttpBinding - username (message protection) authentication
When to use
l
Client uses the server's X.509 certificate for encryption l
Client is not authenticated l
Communication may utilize advanced standards such as secure conversation and MTOM l
Client and server use Windows authentication l
Security is based on Kerberos or SPNEGO negotiations l
Communication may utilize advanced standards such as secure conversation and MTOM l
Client uses the server's X.509 certificate for encryption l
Client uses its own X.509 certificate for signature l
Communication may utilize advanced standards such as secure conversation and MTOM l
Client uses the server's X.509 certificate for encryption l
Client is authenticated with a username and password l
Communication may utilize advanced standards such as secure conversation and MTOM
Page 757 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
WSHttpBinding - username (transport protection) authentication
WSFederationHttpBinding
Custom Binding l
SSL is enabled l
Client is authenticated with a username and password l
Communication may utilize advanced standards such as secure conversation and MTOM l
Client authenticates against the STS using a predefined scenario l
Client uses the token given from the STS to authenticate against the server l
Web Service that uses WS-* standards l
WCF services of any configuration
Optimization Scenarios
The following table describes the built-in Optimization scenario.
Scenario Name When to use
MTOM l
MTOM enabled Web services l
Web Services which may require you to specify the WS-Addressing version
For MTOM type scenarios, if your service uses WS-Addressing, specify the version.
WCF Scenario Settings
This section describes the values required for the WCF security scenarios:
The WsHttpBinding Scenario
No Authentication (Anonymous)
In this scenario, the client uses the server's certificate to encrypt a message; there is no client authentication.
You specify only one of the following settings: l
Negotiate service credentials. Negotiate the Web Service's certificate with the server.
l
Specify service certificate. Browse for a service certificate. For more information, see
"Select
Certificate Dialog Box " on page 778
. If you select this option, the Negotiate service
credentials option is not available.
Provide the DNS information.
Page 758 of 1812 HP LoadRunner (11.50)
User Guide
VuGen l
Expected server DNS. The expected identity of the server in terms of its DNS. This can be
localhost, an IP address, or a server name. It can also be the common name by which the certificate was issued.
Windows Authentication
This WCF scenario uses Windows Authentication.
You declare the expected identity of the server in terms of its SPN or UPN identities. If you are testing a WCF service that has not been customized and uses the default configuration, use this type of scenario.
Certificate Authentication
In this WCF WSHttpBinding scenario, the client uses the server's X.509 certificate to encrypt the message and its own certificate for a signature.
Specify only one of the following settings: l
Negotiate service credentials. Negotiate the Web Service's certificate with the server.
l
Specify service certificate. Browse for a service certificate. For details, see
"Select Certificate
Dialog Box " on page 778
. If you select this option, the Negotiate service credentials option is not available.
Provide the DNS information: l
Expected server DNS. The expected identity of the server in terms of its DNS. This can be
localhost, an IP address, or a server name. It can also be the common name by which the certificate was issued.
Username Authentication (Message Protection)
In this WCF WSHttpBinding scenario, the client uses the server's X.509 certificate to encrypt the message, and sends a user name and password to authenticate itself.
Specify the following settings: l
Username. Password. The client's user name and password credentials.
Specify only one of the following settings: l
Negotiate service credentials. Negotiate the Web Service's certificate with the server.
l
Specify service certificate. Browse for a service certificate. For details, see
"Select Certificate
Dialog Box " on page 778
. If you select this option, the Negotiate service credentials option is not available.
Provide the DNS information: l
Expected server DNS. The expected identity of the server in terms of its DNS. This can be
localhost, an IP address, or a server name. It can also be the common name by which the certificate was issued.
Username (Transport Protection) Authentication
This WCF WSHttpBinding scenario enables SSL and authenticates the client with a user name and password on the message level.
Specify the following settings:
Page 759 of 1812 HP LoadRunner (11.50)
User Guide
VuGen l
Username. Password. The client's user name and password credentials.
The Federation Scenario
In the WSFederationHttpBinding scenario, the client authenticates against the STS (Security
Token Service) to obtain a token. The client uses the token to authenticate against the application server.
Therefore, two bindings are needed, one against the STS and another against the application server.
First, use the Security Scenario editor to define an STS binding. For more information, see
" How to
Create and Manage Security Scenarios " on page 770
. When setting the binding against the application server, specify this file in the Referenced file box.
For the Federation scenario, specify the following server information: l
Transport. HTTP or HTTPS l
Encoding. Text or MTOM
For the Federation scenario, specify the following security information: l
Authentication mode. IssuedToken, IssuedTokenForCertificate,
IssuedTokenForSslNegotiated, IssuedTokenOverTransport, or SecureConversation l
Bootstrap policy. IssuedToken, IssuedTokenForCertificate, IssuedTokenForSslNegotiated, or IssuedTokenOverTransport
For the Federation scenario, specify the following identity information: l
Server certificate. Browse for a server certificate. For more information, see the
"Select
Certificate Dialog Box " on page 778
.
l
Expected server DNS. the expected identity of the server in terms of its DNS. This can be
localhost or an IP address or server name.
For the Federation scenario, specify the following STS (Security Token Service) information: l
Issuer address. The address of the issuer of the STS. This can be localhost, an IP address, or a server name.
l
Referenced binding. The file that references the binding that contacts the STS (Security Token
Service)
The Custom Binding Scenarios
The Custom Binding scenario enables the highest degree of customization. Since it is based upon WCF customBinding, it allows you to test most WCF services, along with services on other platforms such as Java that use
WS - <spec_name> specifications.
Page 760 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Use the Custom Binding scenario to configure a custom scenario that does not comply with any of the predefined security scenarios.
For the Custom Binding scenario, specify the following server information: l
Transport. HTTP, HTTPS, TCP, or NamedPipe l
Encoding. Text, MTOM, or WCF Binary
Specify the following security information: l
Authentication mode. None, AnonymousForCertificate, AnonymousForSslNegotiated,
CertificateOverTransport, Kerberos, KerberosOverTransport, MutualCertificate,
MutualSslNegotiated, SecureConversation, SspiNegotiated, UserNameForCertificate,
UserNameForSslNegotiated, UserNameOverTransport, or SspiNegotiatedOverTransport l
Bootstrap policy. For SecureConversation type authentication, specify a bootstrap policy:
AnonymousForCertificate, AnonymousForSslNegotiated, CertificateOverTransport, Kerberos,
KerberosOverTransport, MutualCertificate, MutualSslNegotiated, SspiNegotiated,
UserNameForCertificate, UserNameForSslNegotiated, UserNameOverTransport, or
SspiNegotiatedOverTransport l
Net security. the network security. Select None, Windows stream security, or SSL stream security. For services with HTTP transport, leave the default value, None. To enable SSL for
HTTP, choose the HTTPS transport.
If your Web Service uses Reliable messaging, enable the option, and select Ordered or Not
Ordered.
Identities
Your security settings may require you to provide identity details for either the client and server, or both of them.
An example of identity details for the client, are user name/password or an X.509 certificate.
For identity information, provide one or more authentication details as required by the service:
Username, Password, Server certificate, Client certificate, or a custom Windows identity. For details about choosing a certificate, see
"Select Certificate Dialog Box " on page 778
.
Some scenarios require you to declare the expected identity of the server in terms of its DNS, SPN, or UPN identity.
l
DNS. Provide the name of a server or use localhost.
l
SPN. Provide the SPN identity in the domain\machine format.
l
UPN. Provide the UPN identity in the user@domain format.
After setting the basic values, you can set advanced attributes as described in
"Advanced Scenario
Setting " on next page .
Page 761 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Advanced Scenario Setting
This section describes the Advanced scenario settings to customize a security scenario in the areas of Encoding, Advanced Standards, Security, or HTTP and Proxy.
Not all settings are relevant for all scenarios, so some of them might be disabled or hidden depending on the scenario.
Encoding
The Encoding tab lets you indicate the type of encoding to use for the messages: Text, MTOM, or
Binary. The default is Text encoding.
For each of these encoding methods, you can choose a version of WS-Addressing: l
None l
WSA 1.0
l
WSA 04/08
Advanced Standards
This tab lets you configure advanced WS- standards, such as Reliable Messaging and the Via address option.
If your service implements the WS-ReliableMessaging specification, enable the Reliable
Messaging option and set the following options: l
Reliable messaging ordered. indicates whether the reliable session should be ordered l
Reliable messaging version. WSReliableMessagingFebruary2005 or
WSReliableMessaging11
Via Address
In certain instances, you may need to send a message to an intermediate service that submits it to the actual server. This may also apply when you send the message to a debugging proxy. This corresponds to the WCF clientVia behavior.
In such cases it may be useful to separate the physical address to which the message is actually sent, from the logical address for which the message is intended. The logical address may be the physical address of the final server or any name. It appears in the SOAP message as follows:
<wsa:Action>http://myLogicalAddress<wsa:Action>
The logical address is retrieved from the user interface. By default, it is the address specified in the
WSDL. You can override this address from the Manage Services dialog box.
Security
The Advanced security settings correspond to the WS-Security specifications.
For security scenarios that are based upon WCF WSHttpBinding, you can indicate the following settings: l
Enable secure session. Establish a security context using the WS-SecureConversation
Page 762 of 1812 HP LoadRunner (11.50)
User Guide
VuGen standard.
l
Negotiate service credentials. Allow WCF proprietary negotiations to negotiate the service's security.
For WSHttpBinding, Custom Binding, or WSFederationHttpBinding WCF type scenarios, you can set the default algorithm suite and protection level:
Attribute
Default
Algorithm
Suite
Protection
Level
Meaning
The algorithm to use for symmetric/ asymmetric encryption.
These are the values from the
SecurityAlgorithmSuite configuration in WCF:
Should the SOAP Body be encrypted/signed
Possible Values
l
Basic128 l
Basic128Rsa15 l
Basic128Sha256 l
Basic128Sha256Rsa15 l
Basic192 l
Basic192Rsa15 l
Basic192Sha256 l
Basic192Sha256Rsa15 l
Basic256 l
Basic256Rsa15 l
Basic256Sha256 l
Basic256Sha256Rsa15 l
TripleDes l
TripleDesRsa15 l
TripleDesSha256 l
TripleDesSha256Rsa15
None, Sign, and
EncryptAndSign (default)
For Custom Binding or WSFederationHttpBinding WCF type scenarios, you can customize the security settings in greater detail. The following table describes the options and their values:
Attribute
Message Protection
Order
Message Security
Version
Meaning
The order for signing and encrypting
The WS-Security security version
Possible Values
l
SignBeforeEncrypt l
SignBeforeEncrypt-
AndEncryptSignature l
EncryptBeforeSign
A list of the current versions
Page 763 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Security Header
Layout
Key Entropy Mode
The layout for the message header
The entropy mode for the security key.
l
Strict l
Lax l
LaxTimeStampFirst l
LaxTimeStampLast l
Client Entropy l
Security Entropy l
Combined Entropy
You can enable or disable the following options: l
Require derived keys. Indicates whether or not to require derived keys.
l
Require security context cancellation. Disabling this option implies that stateful security tokens will be used in the WS-SecureConversation session (if enabled).
l
Include timestamp. Includes a timestamp in the header.
l
Allow serialized token on reply. Enables the reply to send a serialized token.
l
Require signature confirmation. Instructs the server to send a signature confirmation in the response.
For X.509 certificates, you can specify values for the following items:
Attribute
X509 Inclusion Mode
Meaning
When to include the X509 certificate
X509 Reference Style
X509 require derived keys
X509 key identifier clause type
How to reference the certificate
Should X509 certificates require derived keys
The type of clause used to identify the
X509 key.
Possible Values
l
Always to Recipient l
Never l
Once l
AlwaysToInitiator l
Internal l
External l
Enable - Yes l
Disable - No l
Any l
Thumbprint l
IssuerSerial l
SubjectKeyIdentifier l
RawDataKeyIdentifier
HTTP and Proxy
This tab lets you set the HTTP and Proxy information for your test.
Page 764 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
HTTP(S) Transport
The following table describes the HTTP(S) Transport options:
Option Meaning
Transfer mode
The transfer method for requests/responses
Possible Values
Buffered, Streamed,
StreamedRequest,
StreamedResponse
Default 65 KB Max response size (KB)
The maximum size of the response before being concatenated
Allow cookies
Enable cookies
Keep-Alive
Enabled
Enable keep-alive connections
Authentication scheme
HTTP authentication method
Enabled/Disabled
Enabled/Disabled
Realm
Require client certificate
None, Digest, Negotiate, NTLM,
IntegratedWindows
Authentication, Basic, Anonymous
The realm of the authentication scheme
Any URL
For SSL transport, require a certificate Enabled/Disabled
Proxy Information
If the Web service's transport uses a proxy server, you can specify its details in the Security tab.
The following table describes the proxy options:
Option
Use default web proxy
Bypass proxy on local
Proxy address
Proxy authentication scheme
Meaning
Use machine's default proxy settings
Possible Values
Enabled/Disabled
Ignore proxy when the service is on the local machine the proxy server
Enabled/Disabled
Any URL
HTTP authentication method on
Proxy
None, Digest, Negotiate, NTLM,
IntegratedWindows
Authentication, Basic, Anonymous
WCF Extensibility
You can implement your own binding, behavior, or channel when using customBinding by defining the assemblyPath and typeName by modifying the configuration file <script directory>/WSDL/@config/[your config].stss
.
Page 765 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
The assemblyPath attribute should have a value of either the full path of the dll or its relative path to script directory.
The typeName attribute should have the full type name: ns.typeName.
Binding
Name the scenario attribute in the protocols element and provide the assemblyPath and typeName attributes.
The class you use for binding is inherited from System.ServiceModel.Channels.Binding.
Channel
Add a new element under the customization node. You can specify any name for the element, however the element must contain the two attributes:assemblyPath andtypeName.
The class to use for binding is inherited from
System.ServiceModel.Channel.BindingElement
.
Note: This will work with customBinding scenarios only.
Behavior
Add a new element under the behaviors element (which is under endpointBehavior) and add the two attributes assemblyPath and typeName.
To bind the new element, implement the
System.ServiceModel.Description.IEndpointBehavior
class.
Note: If you inherit from System.ServiceModel.Description.ClientCredentials, the client credentials from this class will be used.
Examples of Channel and Behavoir
<protocols scenario="customBinding" uiType="customBinding" xmlns="http://hp/ServiceTest/config">
<mode>Private</mode>
<customization>
<textMessageEncoding />
<preferlrhttpTransport />
<myChannel assemblyPath="CustomChannel.dll" typeName="CustomChannel.WCFChannel" />
</customization>
<behaviors>
<endpointBehaviors>
<behavior>
Page 766 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
<clientVia viaUri="qwqwq" />
< myBehavior assemblyPath="CustomBehavior.dll" typeName="CustomBehavior.WCFbeahvior" />
</behavior>
</endpointBehaviors>
</behaviors>
</protocols>
An example of overriding the whole binding (the configuration may contain just one line):
<protocols scenario="userBinding" assemblyPath="WCFBinding.dll" typeName=" WCFBinding.Binding"/>
Preparing Security Scenarios for Running
Parameterizing Security Elements
You can parameterize the security elements in a script independently. For example, in a usernamebased security scenario, you might want each Vuser or iteration to use a different user name.
Protecting Custom Headers
When an operation uses SOAP headers, VuGen does not automatically sign or encrypt them. To incorporate a protection scheme such as a signature or encryption, you must manually add the following information to the scenario's configuration file (.stss) in the behavior element: l soapAction of the relevant operation l the header XML name and namespace l the protection level
The following example shows an outgoing message with the soapAction, http://mySoapAction.
The XML element header1 from namespace http://myServiceNamespace is encrypted and signed. The header2 element from the same namespace is only signed.
<protocols ...>
...
<behaviors>
<contractBehaviors>
<behavior>
<channelProtectionBehavior>
<protectionRequirements action="http://mySoapAction">
<incomingEncryptionParts>
<header localName="header1"
Page 767 of 1812 HP LoadRunner (11.50)
User Guide
VuGen namespace="http://myServiceNamespace" />
</incomingEncryptionParts>
<incomingSignatureParts>
<header localName="header1" namespace=" http://myServiceNamespace " />
<header localName="header2" namespace=" http://myServiceNamespace " />
</incomingSignatureParts>
</protectionRequirements>
</channelProtectionBehavior>
</behavior>
</contractBehaviors>
</behaviors>
</protocols>
Emulating Users with Iterations
Many of the security scenarios establish a session with the server. For example, every scenario that uses WS-SecureConversation establishes a server session. This session is established when the first operation is executed and ends when the script is finished. By default, VuGen closes all sessions after each iteration and opens them again when the next iteration begins. This implies that every iteration simulates a new session and Vuser.
When working with multiple iterations, this may not be the desired effect—you may prefer to keep the original session active and not open a new session for each iteration. This applies when load testing through the LoadRunner Controller or when setting multiple iterations in the run-time settings.
You can override this behavior so that only the first iteration will establish a new session, while all subsequent ones will continue to use the open session. This simulates a user who repeatedly performs an action using the same session.
To determine which simulation mode to use, choose the one which is most appropriate to what you are simulating. For example, if you are simulating a load test where most of the actions are performed repeatedly by the same user in a single session, use the above configuration. If you are unsure, leave the default settings.
How to Add Security to a Web Service Script
This task describes how to add set the security for your Web Service calls. For details about Web
Services security, see
"Setting Security Overview" on page 751
.
Page 768 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Insert a new Web Services Security Step
1. Place the cursor at the point at which you want to add the security settings. In most cases, it is best to place it in vuser_init so that the security scope will be applied to the whole script. To apply the security for specific calls, place it at the desired location.
2. Select Insert > New Step to open the Add Step dialog box.
3. Select Web Service Set Security and click OK. The Set Security Properties box opens.
Add a token - optional
1. Click Add to add a new token. The Add Token dialog box opens.
2. Select a token type. For details, see
"Security Tokens and Encryption " on page 751 .
In the LogicalName box, assign an arbitrary name for the token to be used by VuGen in identifying the token.
Add any relevant information, such as User Name and Password for the User Name and
Password type token.
To send the token explicitly in the SOAP envelope header, select True. To exclude the token from the SOAP envelope header, select False.
Add a message signature or encryption - optional
1. Click Add > Message Signature or Add > Encrypted Data.
2. Select a token to use with the message signature or encryption. Both signatures and encryptions require you to specify a token previously defined as the signing/encrypting token.
3. Specify a target token, or leave the field blank to apply the signature or encryption to the whole message body. For details, see
"Security Tokens and Encryption " on page 751 .
Set a message timeout - optional
To specify a time for which the message packet is considered valid, select Time To Live and specify a time in seconds.
Cancel the security settings - optional
To cancel the security settings at a specific point within the script, add a Web Service Cancel
Security step at the desired point.
How to Add SAML Security
This task describes how to add SAML security for your Web Service calls. For more information about SAML security, see
"SAML Security Options " on page 754
.
For syntax information, see the Function Reference (Help > Function Reference).
1. Insert a new Web Services Security step a. Place the cursor at the point at which you want to add the security settings.
b. Select Insert > New Step to open the Add Step dialog box.
Page 769 of 1812 HP LoadRunner (11.50)
User Guide
VuGen c. Select Web Service Set Security SAML and click OK. The properties box opens.
2. Insert a SAML assertion
To add a SAML assertion method, add a Web Service Sign SAML Assertion step through the Add Step dialog box (Insert > New Step). Provide the unsigned assertion, a certificate file, and a password (optional).
3. Set the security policy - optional
Specify a policy file, or leave it blank to use the default. If you manually enter values, they override any values in the policy file. You must provide an Issuer URL, also known as the STS
URL.
4. Cancel the SAML settings - optional
To remove the settings at a specific point in the script, insert a Web Service Cancel Security
SAML step.
How to Create and Manage Security Scenarios
The following steps describes how to create and customize a security scenario for a specific service.
l
"Open the Security Scenario Data dialog box" below
l
"Create a scenario (if you do not have existing ones)" below
l
"Load a security scenario (if you have existing ones)" on next page
l
"Configure advanced settings - optional" on next page
l
"Modify an existing security scenario - optional" on next page
1. Open the Security Scenario Data dialog box a. Click Manage Services. In the left pane, select the service for which you want to set the security scenario. If necessary, import a service, as described in
"Import Service Dialog
Box" on page 745 .
b. Select the Protocol and Security tab and click the Edit Data button. The Security
Scenario Data dialog box opens.
2. Create a scenario (if you do not have existing ones) a. Choose Private scenario and select a built-on security scenario for the current service.
b. In the Scenario type box, choose a scenario. For details, see
"Choosing a Security Model
" on page 755 .
c. Specify the required values for your scenario. For details, see
"WCF Scenario Settings " on page 758 .
d. To specify a certificate (only applicable to some of the scenarios), click the Browse button adjacent to the Client certificate or Specify service certificate box to open the Select
Certificate dialog box. For details, see the
"Select Certificate Dialog Box " on page 778
.
Page 770 of 1812 HP LoadRunner (11.50)
User Guide
VuGen o
To retrieve a certificate from a file, choose File and locate its path.
o
To retrieve a certificate from a Windows store, Choose Windows Store. Select a Store location and name. Specify a search string—to search for all certificates, leave the
Search text box empty. To search for a specific certificate, specify a substring of the certificate name. If required, specify a password for the private key. Click Find to generate the list of certificates found in the store.
3. Load a security scenario (if you have existing ones) a. To use an existing scenario with the ability to modify it, choose Private scenario. Click
Import. In the Shared Scenario dialog box, select a stored scenario. If required, modify the settings as described in
"WCF Scenario Settings " on page 758 .
b. To use an existing scenario without the option of changing it, choose Shared Scenario.
Use the Browse button to open the Shared Scenario dialog box and select a stored scenario.
Note: If someone modifies a shared scenario file at its source, it will affect your script.
4. Configure advanced settings - optional
Click Advanced to configure the Proxy, Encoding, and other advanced setting. For most scenarios, the default settings are ideal. For details, see
"Advanced Scenario Setting " on page
762 . Click OK to save the security scenario.
5. Modify an existing security scenario - optional
To create and modify security scenarios that will be available globally for all scripts—not just this specific service, use the Security Scenario editor. You can also use the editor to save the scenario so that others may load it.
a. Choose SOA Tools > Security Scenario Editor.
b. Click the Load button and browse for an existing stss scenario file.
c. Modify the scenario settings as required d. Click Save or Save as.
6. Protect SOAP headers - optional
Manually modify the behavior element in the scenario's configuration file a. In VuGen, open the Script view. Choose choose View > Script View.
b. Click in the script editor and select Open Script Directory from the shortcut menu.
c. Locate the security scenario's configuration file <service_name>.stss in WSDL/@config folder.
d. Modify the behavior section of the file. For details, see
"Protecting Custom Headers " on page 767 .
7. Set the iteration mode- optional
To configure your environment to use the same session for all iterations:
Page 771 of 1812 HP LoadRunner (11.50)
User Guide
VuGen a. Open the script root folder: In Script view, click inside the script and choose Open Script
Directory from the shortcut menu.
b. Open default.cfg file in a text editor.
c. In the [WebServices] section, add in a row under the toolkit. If you are using the Axis toolkit or if you configured other settings, the file contents may differ.
[WebServices]
Toolkit=.Net
SimulateNewUserInNewIteration=0 d. Save and close the file.
For details, see
"Emulating Users with Iterations " on page 768
How to Parameterize Security Elements
This task describes how to independently parameterize the security elements in a script.
1. Open the Security Scenario Editor
Select SOA Tools > Security Scenario Editor.
2. Set up a scenario for each Vuser
Set up a scenario for each Vuser as described in
" How to Create and Manage Security
Scenarios " on page 770 . We recommend you use the names user1, user2, and so forth, and
save them in a new folder, %script root%/WSDL/referencedConfig.
3. Open the Parameter List window and create a parameter
Select Vuser > Parameters List. Create a new parameter, <ServiceName>_shared_config.
Replace the <ServiceName> with the case-sensitive name of the service you are testing. To determine the exact name of the service, click Manage Services to see the list of services.
4. Add parameter values
In the values table, in each row add the file names of the security scenarios with their .stss
extensions. You can use a relative path, relative to the script folder. Click Add Row to add multiple values. Close the Parameter List dialog box.
5. Call the parameter a. Click Manage Services and select the Protocol and Security tab. Click Edit Data.
b. Select Shared Scenario. Click the Browse button and enter the parameter name,
<ServiceName>_shared_config, in the test box.
Set Security Properties Dialog Box
This dialog box enables you to set the security properties for your Web Service calls.
To access
Relevant tasks
Insert > New Step > Web Service Set Security.
Click OK.
"How to Add Security to a Web Service Script" on page
Page 772 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
See also
Important Information
768
"How to Add SAML Security" on page 769
If you have edited key algorithm or session algorithm values in the mmdrv.config file for an existing script, these values are replaced with the system default values.
WS -Security Tab
User interface elements are described below (unlabeled elements are shown in angle brackets):
UI Element
<Token Grid>
Description
Displays a unique number, type and name of all tokens that have been added.
Page 773 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Add Security Token
Page 774 of 1812
Username and Password
UI Element Description
Token
Name
A meaningful name for the token.
Include nonce
If selected, an arbitrary number is used once to sign communication.
Username
Specify the username.
Password
Specify the password.
Password type
Specify the password as one of the following: l
Text l
Hash l
None
Timestamp format
Specify the timestamp format: l
Full l
Created l
None
X.509 Certificate Token
UI
Element
Token
Name
Description
A meaningful name for the token..
Certificate
If selected, an arbitrary number is used once to sign communication.
Reference
Type
Specify the username.
Kerberos Token
UI
Element Description
Token
Name
A meaningful name for the token.
Host
The host name of the server against which you want to authenticate. In most cases, it is the host portion of the service
URL.
Domain
The Windows domain of the server against which you want to authenticate.
Kerberos2 Token
UI
Element Description
Token
Name
Specify the name of the token.
Host
The host name of the server against which you want to authenticate. In most cases, it is the host portion of the service
URL.
Domain
The Windows domain of the server against which you want to authenticate.
User Guide
VuGen
Add Message Signature
UI Element
Signing token
Description
The token to use for signing, usually an X.509 type. Select from the list of all added tokens.
Canonicalization algorithm
A URL for the algorithm to use for canonicalization. A drop down list provides common algorithms. If you are unsure which value to use, keep the default.
Transform
Algorithm
A URL for the Transform algorithm to apply to the message signature. A drop down list provides common algorithms. If you are unsure which value to use, keep the default.
Inclusive namespace list
A list of comma-separated prefixes to be treated as inclusive (optional).
What to sign
The SOAP elements to sign: SOAP Body,
Timestamp, and WS-Addressing.
Xpath (optional)
An XPath that specifies which parts in the message to sign. If left blank, the elements selected in the Signature options field are signed. For example, //*[localname(.)='Body']
.
Token (optional)
The target token you want to sign. Select from the drop down list of all added tokens.
With most services, this field should be left empty.
Page 775 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Add Message Encryption UI Element Description
Encrypting
Token
The token to use for encryption, usually an X.509 type. You can select from a list of all previously created tokens.
Encrypting
Type
Indicates whether to encrypt the whole destination Element or only its
Content.
Key algorithm
The algorithm to use for the encryption of the session key:
RSA15 or RSAOAEP.
Note: If you have edited the mmdrv.config file with a custom key algorithm value for an existing script, this value is replaced with the system default value of RSA15.
Session algorithm
The algorithm to use for the encryption of the SOAP message.
You can select from a list of common values.
Note: If you have edited the mmdrv.config file with a custom session algorithm value for an existing script, this value is replaced with the system default of AES128.
What to encrypt
Xpath
(optional)
An XPath that indicates the parts of the message to encrypt. If left blank, only the SOAP body is encrypted.
Token
(optional)
The name of the encrypted token. A drop down box provides a list of all added tokens. With most services, this field should be left empty.
Delete a token definition from the grid.
Up/Down. Positioning tools that allow you to set the
Page 776 of 1812 HP LoadRunner (11.50)
User Guide
VuGen priority of the security elements.
Note: Make sure the security elements are positioned in order of their priority.
Exclude Timestamp
Removes the timestamp from the SOAP header before sending the security element to the server.
WS Add ressing
The WS-Addressing tab indicates whether WS-Addressing is used by the service, and if so, its version number. You can also specify the IP address of the server to which you want the response to be sent.
Security Scenario Editor Dialog Box
This dialog box enables you to define security scenarios for your script.
To access
Important information
Relevant tasks
SOA Tools > Security Scenario Editor
You can also define scenarios for a specific service. For details, see
" How to Create and Manage Security
Scenarios " on page 770
.
" How to Create and Manage Security Scenarios " on page
770
User interface elements are described below:
UI Element Description
New. Resets the editor for defining a new security scenario. If you made changes to the current scenario, it prompts you to save them.
Load. Opens an existing shared scenario from a URL or file.
Save. Saves the scenario file. If you have not saved the file at least once, it prompts you for a name.
Save as. Saves the scenario file at a new location.
Help. Opens the Online help for security scenarios.
Close. Closes the dialog box.
Opens the Advanced Setting dialog box for setting the encoding, reliable messaging, secure session information, and proxy configuration.
For details, see
"Advanced Scenario Setting " on page 762 .
Scenario type
The security scenario type: No scenario or a sub-type of Core, Security, WCF,
Page 777 of 1812 HP LoadRunner (11.50)
User Guide
VuGen or Optimization scenarios.
Select Certificate Dialog Box
This dialog box enables you to search and locate a certificate from a file or Windows store.
To access
Select a scenario that uses a certificate in one of the following ways: l
Open the Security Scenario Editor: Choose SOA Tools > Security Scenario
Editor.
l
In the Manage Services dialog box, select the Protocol and Security tab and click the Edit Data button.
Select a WCF scenario that uses a client or service certificate, such as
WsHttpBinding or Federation. In the Certificate field, click the Browse button.
Important information
This only applies to security scenarios that allow you to specify client, server, or service certificates.
Relevant tasks
l
" How to Create and Manage Security Scenarios " on page 770
.
l
" How to Create and Manage Security Scenarios " on page 770
.
Select Certificate from File
When you choose File, the dialog box shows the user interface elements described below:
UI Element
File
Password
(optional)
Description
Browse. Allows you to locate the certificate file with a .pem, .arm, .der, or
.pfx extension.
The complete path of the certificate file.
The password required to access the certificate.
Select Certificate from Windows Store
When you choose Windows Store, the dialog box shows the user interface elements described below (unlabeled elements are shown in angle brackets):
UI Element Description
Begins the search for the certificate.
Import from
The location of the certificate: l
Windows store
l
File
Page 778 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Store location
Store name
Search text
Password
(optional)
<certificate list>
The store location, for example Current User.
The store name, for example, AuthRoot.
The text to match in the certificate name.
The password required to access the certificate.
A list of the certificates in the Windows store sorted by Subject, Issuer, Private,
Store Location, and Store Name.
Web Services Security Examples
This section illustrates several common security scenarios.
Authenticating with a Username Token
The following example illustrates the sending of a message level username/password token (a username token), where the user name is John and the password is 1234.
web_service_set_security(
SECURITY_TOKEN, "Type=USERNAME","LogicalName=myToken",
"UserName=John", "Password=1234", "PasswordOptions=SendPlainText",
"Add=True",
LAST);
Signing a Specific Element with an X.509 Certificate
It is possible to sign only a specific element in a message. The following example signs a specific element using an XPATH expression:
web_service_set_security(
SECURITY_TOKEN, "Type=X509","LogicalName=myCert",
"StoreName=My", "IDType=SubjectName", "IDValue=CN=myCert",
"StoreLocation=CurrentUser", "Add=True",
MESSAGE_SIGNATURE, "UseToken=myCert", "TargetPath=//*[localname(.)='someElement' and namespace-uri(.)='http://myNamespace']",
LAST);
Signing with an X.509 Certificate
The following example shows a script using an X.509 certificate for a digital signature.
web_service_set_security(
SECURITY_TOKEN, "Type=X509","LogicalName=myCert",
"
StoreName=My", "IDType=SubjectName", "IDValue=CN=myCert",
"
StoreLocation=CurrentUser", "Add=True",
MESSAGE_SIGNATURE, "UseToken=myCert",
LAST);
Note: The certificate needs to be installed in the Windows certificate store. In the example
Page 779 of 1812 HP LoadRunner (11.50)
User Guide
VuGen above, you need to set the actual store name, store location, and subject name of your certificate.
Encrypting with a Certificate
The following sample encrypts a message with the service's X.509 certificate.
web_service_set_security(
SECURITY_TOKEN, "Type=X509","LogicalName=serviceCert",
"StoreName=My", "IDType=SubjectName", "IDValue=CN=serviceCert",
"StoreLocation=CurrentUser", "Add=False",
ENCRYPTED_DATA, "UseToken=serviceCert",
LAST);
After you specify the details of your X.509 certificate, you can encrypt a specific XPATH in the message.
Since we want to generate a Subject Key Identifier, we set the Add value to False.
Authenticating with a Username Token and Encrypting with an X.509 Certificate
The following example sends a username token to the service and encrypts it with the server's
X.509 certificate: web_service_set_security(
SECURITY_TOKEN, "Type=X509","LogicalName=serviceCert",
"StoreName=My", "IDType=SubjectName", "IDValue=CN=serviceCert",
"StoreLocation=CurrentUser", "Add=True",
SECURITY_TOKEN, "Type=USERNAME","LogicalName=myUser",
"UserName=John", "Password=1234", "PasswordOptions=SendPlainText",
"Add=True",
ENCRYPTED_DATA, "UseToken=serviceCert", "TargetToken=myUser",
LAST);
The UseToken and TargetToken properties indicate which token to use and which to encrypt.
Their values reference the LogicalName property of the tokens.
Encrypting and Signing a Message
This example shows how to sign a message using a private key and then encrypt it using the service's public key.
web_service_set_security(
SECURITY_TOKEN, "Type=X509","LogicalName=myCert",
"StoreName=My", "IDType=SubjectName", "IDValue=CN=myCert",
"StoreLocation=CurrentUser", "Add=True",
SECURITY_TOKEN, "Type=X509","LogicalName=serverToken",
"StoreName=My", "IDType=SubjectName", "IDValue=CN=serverCert",
"StoreLocation=CurrentUser", "Add=False",
MESSAGE_SIGNATURE, "UseToken=myCert",
ENCRYPTED_DATA, "UseToken=serverCert",
LAST);
Page 780 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Referencing an X.509 Certificate Using a Hash
In certain cases, you may be unable to reference a certificate with a subject name. This example shows how to reference the certificate using its unique hash.
web_service_set_security(
SECURITY_TOKEN, "Type=X509","LogicalName=serviceCert",
"StoreName=My", "IDType=Base64KeyID",
"IDValue=
pOl0+1iuotKLlO91nhjDg5reEw0=",
"StoreLocation=CurrentUser", "Add=False",
ENCRYPTED_DATA, "UseToken=serviceCert",
LAST);
Web Services - Service Emulation
Service Emulation Report Wizard
This wizard enables you to generate reports about your emulated service.
To access
Client Testing > Generate Report
Wizard map
This wizard contains:
Welcome >
"Service Emulation Report Wizard " above
>
"Service Emulation Report
Wizard " above
>
"Service Emulation Report Wizard " above
See also
"New Label Dialog Box " on page 785
Select Columns Page
This wizard page enables you to select the column to include in the report.
Important information
General information about this wizard is available here:
"Service Emulation
Report Wizard " above
.
Wizard map
The
"Service Emulation Report Wizard " above
contains:
Welcome > Select Columns Page >
"Service Emulation Report Wizard " above
>
"Service Emulation Report Wizard " above
User interface elements are described below:
UI Element
All fields
Description
All of the available fields of the report: l
Client IP Address l
Date and time l
Operation l
Rule
Page 781 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Fields to be displayed
l
Service l
Session ID
The fields to appear in the report in the order in which they appear.
l
To change the order of the columns in the report, use the Up and Down buttons in the Fields to be displayed pane.
l
To add or remove fields from the report, use the horizontal arrow buttons: n n
. Add selected field to report.
. Add all fields to report.
n
. Remove selected field from report.
n
. Remove all fields from report.
Filtering Page
This wizard page enables you to select the column to include in the report.
Important information
General information about this wizard is available here:
Report Wizard " on previous page .
"Service Emulation
Wizard map
The
"Service Emulation Report Wizard " on previous page
contains:
Welcome >
"Service Emulation Report Wizard " on previous page
> Filtering
Page>
"Service Emulation Report Wizard " on previous page
User interface elements are described below:
UI Element
From
To
Service
Operation
Description
Lower limit for the report generation through a time or label. For more information, see Labels.
Tip: Disable option to include all data from the beginning of the service call log.
Upper limit for the report generation through a time or label. For more information, see Labels.
Tip: Disable option to include all data until the end of the service call log.
Services to include in the report. Select each service individually. To show all, disable the option.
Operations to include in the report. Select each operation individually. To show all, disable the option.
Page 782 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Checkpoint
Status
Client IP address
SessionID
The statuses to show: Failure, Success, and Undefined. To show all, disable the option.
The client IP addresses to include in the report. To show all, disable this option.
The session IDs to include in the report. To show all, disable this option.
Sorting Page
This wizard page enables you to select the column to include in the report.
Important information
General information about this wizard is available here:
"Service Emulation
Report Wizard " on page 781
.
Wizard map
The
"Service Emulation Report Wizard " on page 781
contains:
Welcome >
"Service Emulation Report Wizard " on page 781
>
"Service
Emulation Report Wizard " on page 781
> Sorting Page
User interface elements are described below:
UI
Element
Description
Asc/Desc
The order in which to display the data in the report. The sorting order is not global and may be set differently for each item.
Default: Ascending order, for each item.
All fields
All fields by which the report can be sorted: Date and time, Service, Operation,
Client IP address, and Session ID.
Ordering fields
The fields by which to sort the report data. Use right facing arrows to include an item in the sorting list. Use the up and down arrows to set priorities in the ordering.
Host Configuration Dialog Box
Enables you to view the host name and set the database connection settings.
To access
Important information
In the Host name toolbar, in the left pane, click the Host Configuration button .
If your database requires a username and password, you need to enter them here.
User interface elements are described below:
UI Element
Server
Port
Description
Server details: hostname\instance of the database.
The port on the database server used by
Page 783 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Username\Password
the emulated service.
Credentials for logging into the database server.
Default value: empty for localhost
Host Name Pane
Displays the host name and lets you start or stop the server, and open the Host Configuration dialog box.
To access
Important information
See also
Automatically displayed in the left pane.
The lower part of the left pane contains a toolbar for each of the available hosts.
l
"Host Configuration Dialog Box" on previous page
User interface elements are described below (unlabeled elements are shown in angle brackets):
UI Element Description
Start Emulation Server. Starts the Tomcat server and invokes the
ServiceEmulationClient process.
Stop Emulation Server. Stops the Tomcat server and the
ServiceEmulationClient process.
Configure Host. Opens the Host Configuration dialog box to set the database connection settings.
<hostname>
the machine hosting the displayed emulated services
Default value: localhost
New Emulated Service Dialog Box
This dialog box lets you define an emulated service by indicating a WSDL and selecting a host.
To access Service > New Emulated Service
Important information
Importing is not supported for WSDLs that import schemas. To import this type of
WSDL, deploy it on a local server and then import it using the generated URL.
User interface elements are described below:
UI Element Description
Browse. Opens a browser (for URL selection) or the Open file dialog box (for
FIle selection).
Opens the Host Selection Dialog Box.
Page 784 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Select host
Select WSDL from
A dropdown list of the available host machines.
The source of the WSDL: l
URL
l
FIle
Clear Service Call Log Dialog Box
This dialog box enables you to clear the service call log in the database. You can clear the whole log or a part of it, based on dates or labels.
To access Client Testing > Clear Service Log >
User interface elements are described below:
UI
Element
From
Description
To
Lower limit for the report generation through a time or label. For more information, see
Labels.
Tip: Disable this option to clear all data from the beginning of the log until the To threshold.
Upper limit for the report generation through a time or label. For more information, see
Labels.
Tip: Disable this option to clear all data from the From threshold until the end of the log.
New Label Dialog Box
This dialog box enables you to put a date and time stamp on incoming emulated service calls.
These labels will allow you to filter you data when generating reports.
To access
See also
Client Testing > Add Label
l
"Service Emulation Report Wizard " on page 781
l
"Clear Service Call Log Dialog Box " above
User interface elements are described below:
UI Element
Current time
Label name
Description
Time stamp associated with the label (read-only).
The label name as it will appear in the reports and filtering options.
Windows Sockets Protocol
Page 785 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Recording Windows Sockets - Overview
The Windows Sockets protocol supports applications which communicate over the TCP/IP protocol using a Microsoft WinSock DLL. The WinSock protocol allows you to see the actual data sent and received by the buffers.
The WinSock protocol records functions that relate to the sockets, data buffers, and the Windows
Sockets environment. Using VuGen, you record your application's API calls to the Winsock.dll or
Wsock32.dll. For example, you could create a script by recording the actions of a telnet application.
After creating a Winsock Vuser script, you can view the recorded buffers as raw data or as a snapshot. For details, see
"Windows Sockets Data" below
or
"Windows Sockets Snapshots -
Overview" on next page
.
Translation Tables
You can display Windows Sockets data in EBCDIC format through a translation table.
A translation table allows you to specify the format for recording when using the WinSock single protocol, and for code generation when using a WinSock multi protocol. This applies to users running on mainframe machines or AS/400 servers. Both the server and client machines determine the format of the data from translation tables installed on your system. If your data is in ASCII format, it does not require translation.
The first four digits of the listbox item represent the server format. The last four digits represent the client format. In the above example, the selected translation table is 002501b5. The server format is 0025 and the client format is 01b5 indicating a transfer from the server to the client. In a transmission from the client to the server, you would select the item that reverses the formats—
01b50025 indicating that the client's 01b5 format needs to be translated to the server's 0025 format.
The translation tables are located in the ebcdic folder under the VuGen's installation folder. If your system uses different translation tables, copy them to the ebcdic folder.
For details on selecting a translation table in the recording options, see the
"WinSock Node" on page 345 .
Windows Sockets Data
When you use VuGen to create a Windows Sockets Vuser script, your actions are recorded into the three sections of the script: vuser_init, Action, and vuser_end. In addition to the Vuser script,
VuGen also creates data files: l
snapshotdata.ws contains the data that was transmitted or received during the recording session. VuGen's Snapshot pane displays the contents of the data file. Do not modify the contents of the snapshotdata.ws file.
Page 786 of 1812 HP LoadRunner (11.50)
User Guide
VuGen l
data.ws contains the data that is transmitted during the replay sessions, and is expected to be received. You can right-click any step in the Editor and then select Show Arguments to show the buffer content that is stored in data.ws for the selected step. Using the Text View tab of the dialog box that opens, you can edit the data that is stored for any data buffer.
Several LRS functions, such as lrs_receive and lrs_send, handle the actual data that is transferred between servers and clients. The data that is received or transmitted is stored in data buffers, which can be very large. In order to simplify the appearance of the Vuser script, the actual data is stored in external files—not in the C file. When a data transfer occurs, the data is copied from the external file into a temporary buffer.
The external file, data.ws, contains the contents of all the temporary buffers. The buffers' contents are stored as sequential records. The records are marked by identifiers indicating whether the data was sent or received, and the buffer descriptor. The LRS functions use the buffer descriptors to access the data.
The descriptors have one of the following formats: recv buf index number of bytes received send buf index number of bytes sent
The buffer index begins with 0 (zero), and all subsequent buffers are numbered sequentially
(1,2,3...) regardless of whether they are send or receive buffers.
In the following example, an lrs_receive function was recorded during a Vuser session: lrs_receive("socket1", "buf4", LrsLastArg)
In this example, lrs_receive handled data that was received on socket1. The data was stored in the fifth receive record(buf4)—note that the index number is zero-based. The corresponding section of the data.ws file shows the buffer and its contents.
recv buf4 39
"\xff\xfb\x01\xff\xfb\x03\xff\xfd\x01"
"\r\n"
"\r\n"
"SunOS UNIX (sunny)\r\n"
"\r"
"\x0"
"\r\n"
"\r"
"\x0"
For task details, see
"How to View and Modify Windows Sockets Buffers " on page 791
.
Windows Sockets Snapshots - Overview
Vuser scripts based on the Windows Sockets Vuser protocol utilize VuGen's Snapshot pane.
l
For an introduction to the Snapshot pane, see
"Snapshot Pane - Overview" on page 85
.
l
For details on how to work with the Snapshot pane, see
"How to Work with Snapshots" on page
88
.
l
For details on the Snapshot pane UI, see
"Snapshot Pane" on page 119 .
Page 787 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
When you open a Windows Sockets Vuser script, VuGen's standard Snapshot pane functionality is available. For Windows Sockets Vuser scripts, the Snapshot pane displays snapshots of the recorded data buffers.
To display a specific buffer in the Snapshot pane: l
In the Editor, select the step that contains a reference to the required buffer.
l
In the Step Navigator, double-click the step that contains a reference to the required buffer.
You can view the buffer snapshots in either Text view or Hex view.
Note that VuGen stores the snapshot data as read-only data. You cannot modify the contents of the snapshots. However, you can modify the buffer data that is associated with any of the steps in a Vuser script. To modify the buffer data, right-click the required step in the Editor and then select Show Arguments. The Text View tab of the dialog box that opens lets you modify the buffer data. For details, see
"How to View and Modify Windows Sockets Buffers " on page
791
The Text view shows the buffer data as text.
The Hex view shows the buffer data in hexadecimal representation. The data is displayed in three columns: l
The left column shows the offset of the first character in each row.
l
The middle column shows the hexadecimal value of the data.
l
The right column shows the data in ASCII format.
The status bar below the buffer snapshot displays information about the buffer and the data selected in the buffer: l
Buffer number. The buffer number of the displayed buffer.
Page 788 of 1812 HP LoadRunner (11.50)
User Guide
VuGen l
Buffer size. The total number of bytes in the buffer.
l
Buffer type. The type of buffer—received or sent.
l
Data. The value of the data that is selected in the buffer, in decimal and hexadecimal formats.
Both big endian and little endian sequences are displayed.
l
Offset. The offset of the selected data from the beginning of the buffer. If you select multiple bytes, the offset displays the range of the selection.
Navigating within the Buffer Data
l
To go to a specific offset within the buffer (absolute), click Go To. In the Go To Offset dialog box enter an offset value, and then click Apply.
l
To jump to a location relative to the selected entry, click Go To. In the Go To Offset dialog box, click Advance by , specify the number of bytes to advance, and then click Apply.
Data Navigation Tools
VuGen provides you with Go To functionality to help you to navigate through the data in the
Snapshot pane. This helps you to identify and analyze a specific values in the snapshot. You can move around within the data buffer by specifying an offset. You can indicate the absolute location of the data, or a location relative to the current position of the cursor within the buffer. You can also select a range of data, by specifying the starting and end offsets. For details on the dialog box options, see
"Go To Offset Dialog Box" on page 795 .
Buffer Data Editing
You can perform all of the standard edit operations on buffer data: copy, paste, and delete. To perform edit operations on buffer data, right-click the required step in the Editor and select Show
Arguments. You can then perform the edit operation in the Text View tab of the dialog box that opens. You cannot perform any edit operations in the Binary View tab.
Note that you perform edit operations on buffer data only, not on Snapshot data - which is readonly.
Page 789 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
When you copy data from a buffer, VuGen allows you to copy the data either in hexadecimal format or in decimal format. When you insert data into a buffer, VuGen allows you to specify the format of the data—single byte, 2-byte, or 4-byte.
How to Record a Windows Sockets Script
This task describes how to set up a Windows Sockets recording and how to record the session.
1. Open the recording options - optional
After creating a WinSock script, select Record > Recording Options and click the WinSock node.
2. Select a translation table - optional
In the EBCDIC section, select a translation table. If your data is in ASCII format, select the
None option—otherwise VuGen will convert the ASCII data. For details, see
"Translation
Tables " on page 786
.
Page 790 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
3. Exclude any non-relevant sockets - optional
In the Exclude Settings section, add any non-relevant sockets to the list. You should exclude hosts and ports that do not influence the server load under test, similar to the local host and the
DNS port (53), which are excluded by default.
To exclude the entries from the recording, but include them in the log, clear the Do not include
excluded sockets in log option.
For user interface details, see the
"WinSock Node" on page 345 .
4. Set a think time threshold - optional
Indicate a think time threshold. If VuGen detects a pause in action less than the threshold time, it will not generate a Think Time step/ lr_think_time function. For details, see the
"WinSock
Node" on page 345 .
5. Record the session
Record the session and save the script.
6. Parameterize the script - optional
Replace recorded values with parameters using the shortcut menu. For more information, see
"Parameters" on page 247
7. Regenerate the script - optional
If you need to regenerate the script, for example if you want to include an excluded host:port, or if the translation was not correct:
- Select Record > Regenerate Script.
- Click the Options link.
- Under General, select Protocols, and then under Active Protocols, ensure that the
Windows Sockets checkbox is selected.
- Under Sockets, select Winsock, and then modify the settings.
Note: Options for script regeneration are available for multi-protocol scripts only.
How to View and Modify Windows Sockets Buffers
The following steps describe how to view, modify, and navigate through WinSock buffer data.
Modifying buffer data
You can modify buffer data in the Show Arguments dialog box for specific lrs steps in a Vuser script. You can use the Show Arguments dialog box to modify buffer data for the following steps: l lrs_length_receive l lrs_length_send l lrs_receive l lrs_receive_ex l lrs_send
Page 791 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
For further details on these steps, see the Function Reference (Help > Function Reference).
To display the Show Arguments dialog box for any of the above steps, right-click a step in the Editor and select Show Arguments. A dialog box opens and displays the buffer data in the Buffer
Content section of the dialog box.
For further details about editing buffer data in Windows Sockets steps, see
"Buffer Data Editing" on page 789 .
Note that you cannot modify any data in the Snapshot pane
View and modify the data in the data.ws file
In the Solution Explorer, double-click the data.ws file. The contents of the data.ws file appear in the
VuGen Editor. Modify the data directly in the Editor. For details, see
"Windows Sockets Data" on page 786 .
Note that it is possible to modify data.ws files, it is recommended that you do not modify these files.
View the data in the Snapshot pane
1. Ensure that the Snapshot pane is displayed.
2. Open the Vuser script in the Editor and select a step, or double-click an entry in the Step
Navigator. The associated snapshot is displayed in the Snapshot pane. You cannot edit the snapshot data.
Navigate within the snapshot data
To navigate within the buffer data, display in the Snapshot pane, and then click Go to. The Go to
Offset dialog box opens.
l
To go to a specific offset within the buffer (absolute), select Go to offset and specify an offset value. Click Apply.
l
To jump to a location relative to the cursor, click Advance by and specify the number of bytes to
Page 792 of 1812 HP LoadRunner (11.50)
User Guide
VuGen advance. To advance ahead, enter a positive value. To move backwards within the buffer, use a negative value. Click Apply.
l
To select a range of data within the buffer, click Select range from and specify the beginning and end offsets. Click Apply.
Insert data into a buffer
You can insert a numerical value into a data buffer. You can insert the data as a single, double-byte, or 4-byte value. The following steps describe how to insert a number into a data buffer.
1. Copy the numerical data to be inserted to the clipboard.
2. Right-click a step in the Editor and select Show Arguments.
3. In the dialog box that opens, ensure that the Text View tab is displayed.
4. Under Buffer Content, right-click at the location in the buffer where you want to insert the data, and then select Advanced > Paste Byte or Advanced > Paste Short (2 bytes) or
Advanced > Paste Long (4 bytes).
5. Click OK. VuGen inserts the data into the buffer.
Copy and paste blocks of data
You can modify the buffer data as characters, decimal numbers, or hexadecimal numbers. For details, see
"Buffer Data Editing" on page 789 .
Note that you can edit buffer data only when you view the step arguments - you cannot edit buffer data in the Snapshot pane.
1. Right-click a step in the Editor and select Show Arguments. A dialog box opens and displays the buffer data in the Buffer Content section of the dialog box.
2. To copy buffer data: n
As characters, select one or more bytes and press Ctrl+c.
n
As a decimal number, select one or more bytes, right-click in the selection and select
Advanced > Copy As Decimal Number.
n
As a hexadecimal number, select one or more bytes, right-click in the selection and select
Advanced > Copy As Hexadecimal Number.
3. To paste the data: n
As characters, press Ctrl+V.
n
As a single byte (assuming the size of the data on the clipboard is a single byte), right-click at the desired location in the buffer and click Advanced > Paste Byte.
n
In short format (2-byte), right-click at the desired location in the buffer and click Advanced >
Paste Short (2 bytes).
n
In long format (4-byte), right-click at the desired location in the buffer and click Advanced >
Paste Long (4 bytes).
Page 793 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
4. To delete data, select the data in the Text view, right-click inside the selection and select
Delete.
Data Buffers
When you use VuGen to create a Windows Sockets Vuser script, VuGen creates the data.ws data file. This file contains the data that is transmitted, and is expected to be received, during the replay sessions. You can right-click any step in the Editor and then select Show Arguments to show the buffer content that is stored in data.ws for the selected step. Using the Text View tab of the dialog box that opens, you can edit the data that is stored for any data buffer.
The data.ws data file has the following format: l
File header l
A list of buffers and their contents
The file header includes an internal version number of the data file format. The current version is 2.
If you try to access data from a data file with format version 1, VuGen issues an error.
;WSRData 2 1
An identifier precedes each record, indicating whether the data was received or sent, followed by the buffer descriptor, and the number of bytes received (for lrs_receive only). The buffer descriptor contains a number identifying the buffer.
For example, recv buf5 25 indicates that the buffer contains data that was received. The record number is 5, indicating that this receive operation was the sixth data transfer (the index is zero based), and twenty-five bytes of data were received.
If your data is in ASCII format, the descriptor is followed by the actual ASCII data that was transferred by the sockets.
If your data is in EBCDIC format, it must be translated through a look-up table. For information on setting the translation table, see the
"WinSock Node" on page 345 . The EBCDIC whose ASCII
value (after translation) is printable, is displayed as an ASCII character. If the ASCII value corresponds to a non-printable character, then VuGen displays the original EBCDIC value.
recv buf6 39
"\xff\xfb\x01\xff\xfb\x03\xff\xfd\x01"
"\r\n"
"SunOS UNIX (sunny)
\r\n"
The following segment shows the header, descriptors, and data in a typical data file:
;WSRData 2 1 send buf0 48
"\xff\xfd\x01\xff\xfd\x03\xff\xfb\x03\xff\xfb\x18" recv buf1 15
"\xff\xfd\x18\xff\xfd\x1f\xff\xfd"
"#"
"\xff\xfd"
Page 794 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
"'"
"\xff\xfd"
"$" send buf2 24
"\xff\xfb\x18"
Go To Offset Dialog Box
This dialog box allows you to go to a specific location within the recorded data.
To access
Relevant tasks
On the Snapshot pane toolbar, click Go to.
"How to View and Modify Windows Sockets Buffers " on page 791
User interface elements are described below:
UI Element Description
Current offset
The current offset of the cursor (read only).
Go to offset
Goes to a specific, absolute offset within the data.
Advance by...bytes
Select range from...to...
Apply
Jumps to a location relative to the cursor, by a number of bytes. Positive values indicate a forward direction. Negative values indicate a reverse direction.
Selects a range of data within the buffer.
Moves the cursor to the specified offset.
Wireless Protocols
WAP Protocol Overview
The Wireless Application Protocol (WAP) is an open, global specification that enables mobile users with wireless devices to instantly access and interact with information and services.
The WAP protocol specifies a microbrowser thin-client using a new standard called WML that is optimized for wireless handheld mobile terminals. WML is a stripped-down version of XML.
WAP also specifies a proxy server that: l acts as a gateway between the wireless network and the wire-line Internet l provides protocol translation l optimizes data transfer for the wireless handset
WAP architecture closely resembles the WWW model. All content is specified in formats that are similar to the standard Internet formats. Content is transported using standard protocols in the
Page 795 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
WWW domain and an optimized HTTP-like protocol in the wireless domain (Wireless Session
Protocol). You locate all WAP content using WWW standard URLs.
WAP uses many WWW standards, including authoring and publishing methods. WAP enhances some of the WWW standards in ways that reflect the device and network characteristics. WAP extensions are added to support Mobile Network Services such as Call Control and Messaging. It accounts for the memory and CPU processing constraints that are found in mobile terminals. WAP also supports low bandwidth and high latency networks.
WAP assumes the existence of a gateway that is responsible for encoding and decoding data transferred to and from the mobile client. The purpose of encoding content delivered to the client is to minimize the size of data sent to the client over-the-air, as well as to minimize the computational energy required by the client to process that data. The gateway functionality can be added to origin servers, or placed in dedicated gateways as illustrated below.
WAP Toolkits
To assist developers in producing WAP applications and services, the leading companies such as
Nokia, Ericsson, and Phone.com, have developed toolkits. The WAP Toolkit provides an environment for developers who want to provide Internet services and content for mobile terminals.
It allows developers to write, test, debug, and run applications on a PC-based simulator phone. The toolkit allows users to browse WAP sites through an HTTP connection or a WAP gateway.
A mobile phone communicates with a gateway in WSP protocol; a toolkit can communicate with the gateway, or directly with the server. VuGen automatically detects the communication mode that is configured in the toolkit: WSP or HTTP. If you are interested in the traffic to the gateway, you record in WSP mode. If you want to check the server and the content providers, you can record your toolkit session in HTTP mode, and bypass the gateway.
VuGen uses custom API functions to emulate a user session. Most functions are the standard Web protocol functions utilizing the HTTP protocol. Several WAP functions emulate actions specific to
WAP Vusers.
Page 796 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Push and Pull Technology
In the normal client/server model, a client requests information or a service from a server. The server responds by transmitting information or performing a service to the client. This is known as
pull technology—the client pulls information from the server.
In contrast to this, there is also push technology. The WAP push framework transmits information to a device without a previous user action. This technology is also based on the client/server model, but there is no explicit request from the client before the server transmits its content.
To perform a push operation in WAP, a Push Initiator (PI) transmits content to a client. However, the Push Initiator protocol is not fully compatible with the WAP Client—the Push Initiator is on the
Internet, and the WAP Client is in the WAP domain. Therefore, we need to insert a translating gateway to serve as an intermediary between the Push Initiator and the WAP Client. The translating gateway is known as the Push Proxy Gateway (PPG).
The access protocol on the Internet side is called the Push Access Protocol (PAP).
The protocol on the WAP end is called the Push Over-The-Air (OTA) protocol.
The Push Initiator contacts the Push Proxy Gateway (PPG) over the Internet using the PAP
Internet protocol. PAP uses XML messages that may be tunneled through various well-known
Internet protocols such as HTTP. The PPG forwards the pushed content to the WAP domain. The content is then transmitted using the OTA protocol over the mobile network to the destination client.
The OTA protocol is based on WSP services.
In addition to providing basic proxy gateway services, the PPG is capable of notifying the Push
Initiator about the final status of the push operation. In two-way mobile networks, it can also wait for the client to accept or reject the content.
Push Services Types
Push services can be of the SL or SI type: l
SL. The Service Loading (SL) content type provides the ability to cause a user agent on a mobile client to load and execute a service—for example, a WML deck. The SL contains a URI indicating the service to be loaded by the user agent without user intervention when appropriate.
l
SI. The Service Indication (SI) content type provides the ability to send notifications to endusers in an asynchronous manner. For example, the notifications may be about new emails, changes in stock price, news headlines, and advertising.
In its most basic form, an SI contains a short message and a URI indicating a service. The message is presented to the end-user upon reception, and the user is given the choice to either start the service indicated by the URI immediately, or postpone the SI for later handling. If the SI is postponed, the client stores it and the end-user is given the ability to act upon it at a later point of time.
VuGen Push Support
Push support for VuGen is divided into three parts: l
Push support at the client end—the ability to accept push messages.
Page 797 of 1812 HP LoadRunner (11.50)
User Guide
VuGen l
Push support to WAP HTTP Vusers—emulating Push Initiators.
l
Push messages (SI =; SL) format services—formatting push messages.
Client Push Support
At the client end, VuGen supports both push services (SL and SI) for all replay modes (CO and CL).
The wap_wait_for_push function instructs the Vuser to wait for a push message to arrive. You set the timeout for this function in the run-time settings.
When a push message arrives, the Vuser parses it to determine its type and to retrieve its attributes. If parsing was successful, it generates and executes a pull transaction to retrieve the relevant data. You can disable the pull event, indicating to the Vuser not to retrieve the message data by configuring the Run-Time settings.
Emulating Push Initiators
Push support for WAP HTTP Vusers enables you to perform load testing of the PPG. Push support allows Vusers to function as Push Initiators supporting the Push Access Protocol (PAP). The
PAP defines the following sets of operations between the PI and the PPG: l
Submit a Push request.
l
Cancel a Push request.
l
Submit a query for the status of a push request.
l
Submit a query for the status of a wireless device's capabilities.
l
Initiate a result notification message from the PPG to the PI.
All operations are request/response—for every initiated message, a response is issued back to the
PI. PI operations are based on the regular HTTP POST method supported by VuGen. Currently, only the first two operations are supported through wap_push_submit and wap_push_cancel.
Formatting Push Messages
You can submit data to a Web server using the web_submit_data function. It is difficult, however, to send long and complex data structures using this function. To overcome this difficulty and provide a more intuitive API function, several new API functions were added to properly format the
XML message data: wap_format_si_msg and wap_format_sl_msg. For more information about these functions, see the Function Reference (Help > Function Reference).
MMS (Multimedia Messaging Service) Protocol Overview
MMS (Multimedia Messaging Service) is an extension of the SMS protocol. Whereas SMS messages can only contain text, MMS allows you to send and receive messages with a wide range of content to MMS capable handsets. This content can be in the form of text, sound, email messages, images, video clips, and even streaming data. It is also possible to send multimedia messages from a mobile phone to an email address.
An MMS message typically includes a collection of attachments. While SMS messages are limited to 160 bytes, an MMS message could be several MBs in size. MMS usually requires a third generation (3G) network to enable such large messages to be delivered.
To receive an MMS message, a mobile phone receives an MMS notification over SMS. The SMS message can be received over various SMS protocols such as SMPP, UCP, and CIMD2. The
SMS message contains a unique path to the MMS message stored in the MMSC server's database
Page 798 of 1812 HP LoadRunner (11.50)
User Guide
VuGen and the mobile phone uses this path to download the message from the SMSC. The current version of VuGen supports the receiving of MMS notifications over the SMPP interface.
Multimedia Messaging Service Vuser scripts support the 1.0 and 1.1 versions of the MMS protocol, as defined by OMA (Open Mobile Alliance organization). Using MMS Vusers, you can send MMS messages to the MMSC server directly over the HTTP protocol, or over the WAP protocol through a
WAP gateway.
Multimedia Messaging Service functions emulate the sending and receiving of MMS messages.
Each function begins with an mm prefix. For detailed syntax information for these functions, see the Function Reference (Help > Function Reference).
How to Run an MMS Scenario in the Controller
An MMS (Multimedia Messaging Service) scenario requires a command line setting.
To set the MMS command line setting:
1. From the Scenario Schedule screen, click Details. The Group Information dialog is displayed.
2. If the Command line box is not visible, click the More button.
3. Add the following to the end of the Command line text: -usingwininet yes
4. Click OK to accept the Command line switch.
Advanced Topics
Manually Programming a Script using the VuGen
Editor
Manually Programming Scripts - Overview
VuGen allows you to program your own functions into the script, instead of recording an actual session. You can use the Vuser API or standard programming functions. Vuser API functions allow you to gather information about Vusers. For example, you can use Vuser functions to measure server performance, control server load, add debugging code, or retrieve run-time information about the Vusers participating in the test or monitoring.
This chapter describes how to program a Vuser script from within the VuGen editor, incorporating your application's libraries or classes.
You can also develop a Vuser script through programming within the Visual C and Visual Basic environments. In these environments, you develop your Vuser script within your development application, while importing the Vuser API function libraries. For more information, see
"Creating
Scripts with Visual Studio" on page 804
.
To create a customized script, you first create a skeleton script. The skeleton script contains the three primary sections of a script: init, actions, and end. These sections are empty and you manually insert functions into them.
You can create empty scripts for the following programming languages:
Page 799 of 1812 HP LoadRunner (11.50)
User Guide
VuGen l
C l
Java l
Visual Basic l
VBScript l
JavaScript
Note: When working with JavaScript and VBScript Vusers, the COM objects that you use within your script must be fully automation compliant. This makes it possible for one application to manipulate objects in another application, or to expose objects so that they may be manipulated.
JavaScript Vusers
You can create an empty JavaScript Vuser script, in which to place JavaScript code. This script type lets you incorporate your existing JavaScript application into VuGen. To create an empty
JavaScript Vuser script, select JavaScript Vuser from the Custom category, in the New Virtual
User dialog box.
function Actions()
{
//"TO DO: Place your business process/action code here
return(lr.PASS);
}
VuGen creates three sections, vuser_init, action, and vuser_end. Each of these sections contain a JavaScript function—Init, Actions, and Terminate respectively. You place your code within these functions, as indicated by the TO DO comment.
An additional section that is viewable from VuGen, is the global.js file, which creates the objects for the Vuser API functions and the Javascript. For example, the following code creates the standard object lr: var lr = new ActiveXObject("LoadRunner.LrApi")
C Vuser Scripts
In a C Vuser script, you can use any C code that conforms to the standard ANSI conventions. To create an empty C Vuser script, select C Vuser in the Create a New Script dialog box. VuGen creates an empty C Vuser script:
Action1()
{
return 0;
}
You can use C Vuser functions in all of Vuser script types that use C functions.
See the Function Reference (Help > Function Reference) for a C reference that includes syntax and examples of commonly used C functions.
Page 800 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Guidelines for Using C Functions
All standard ANSI-C conventions apply to C Vuser scripts, including control flow and syntax. You can add comments and conditional statements to the script just as you do in other C programs. You declare and define variables using ANSI C conventions.
The C interpreter that is used to run Vuser scripts accepts the standard ANSI C language. It does not support any Microsoft extensions to ANSI C.
Before you add any C functions to a Vuser script, note the following limitations: l
A Vuser script cannot pass the address of one of its functions as a callback to a library function.
l
The stdargs, longjmp, and alloca functions are not supported in Vuser scripts.
l
Vuser scripts do not support structure arguments or return types. Pointers to structures are supported.
l
In Vuser scripts, string literals are read-only. Any attempt to write to a string literal generates an access violation.
l
C Functions that do not return int, must be casted. For example, extern char * strtok();
Calling libc Functions
In a Vuser script, you can call libc functions. However, since the interpreter that is used to run
Vuser scripts does not support any Microsoft extensions to ANSI C, you cannot use Microsoft's include files. You can either write your own prototypes, or ask HP Customer Support to send you
ANSI-compatible include files containing prototypes for libc functions.
Linking Mode
The C interpreter that is used to run Vuser scripts uses a "lazy" linking mode in the sense that a function need not be defined at the start of a run, as long as the function is defined before it is used.
For example: lr_load_dll("mydll.dll");
myfun(); /* defined in mydll.dll -- can be called directly,
immediately after myfun.dll is loaded. */
VBScript Vusers
You can create an empty VBScript Vuser script, in which you can place VBScript code. This script type lets you incorporate your VBScript application into VuGen. To create an empty VBScript Vuser script, select VB Script Vuser from the Custom category, in the New Virtual User dialog box.
VuGen creates an empty VBScript Vuser script:
Public Function Actions()
`"TO DO: Place your action code here
Actions = lr.PASS
End Function
VuGen creates three sections, vuser_init, action, and vuser_end. Each of these sections contain a VBScript function—Init, Actions, and Terminate respectively. You place your code within these functions, as indicated by the TO DO comment.
Page 801 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
An additional section that is viewable from VuGen, is the global.vbs file, which creates the objects for the Vuser API functions and VB Script. For example, the following code creates the standard object lr:
Set lr = CreateObject("LoadRunner.LrApi")
Java Vusers
In Java Vuser scripts, you can place any standard Java code. To create an empty Java Vuser script, select Java Vuser from the Custom category, in the New Virtual User dialog box. VuGen creates an empty Java script: import lrapi.lr; public class Actions
{
public int init() {
return 0;
}
public int action() {
return 0;
}
public int end() {
return 0;
}
}
Note that for Java type Vusers, you can only edit the Actions class. Within the Actions class, there are three methods: init, action, and end. Place initialization code in the init method, business processes in the action method, and cleanup code in the end method.
VB Vusers
You can create an empty Visual Basic Vuser script, in which you can place Visual Basic code. This script type lets you incorporate your Visual Basic application into VuGen. To create an empty VB
Vuser script, select VB Vuser from the Custom category, in the New Virtual User dialog box.
VuGen creates an empty VB script:
Public Function Actions() As Long
`"TO DO: Place your action code here
Actions = lr.PASS
End Function
VuGen creates three sections, vuser_init, action, and vuser_end. Each of these sections contain a VB function—Init, Actions, and Terminate respectively. You place your code within these functions, as indicated by the TO DO comment.
An additional section that is viewable from VuGen, is the global.vba file, which contains the object and variable global declarations for Vusers and the VB application.
Replay Error with VB Vuser Scripts
If you are getting error number -25210 when trying to replay a VB Vuser script, you may have a problem with some of your DLL files.
Page 802 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Solution
1. Open the c:\Program Files\Common Files\Microsoft Shared\vba\vba6 folder.
2. Locate the VBE6.dll and VBE6EXT.OLB files.
3. Right click the files and click properties to see the version of each file.
4. If either the VBE6.dll or the VBE6EXT.OLB file versions are between 6.04.9972 and
6.05.1024, they both must be replaced. If neither file version is in this range, contact HP software support.
5. Replace the VBE6.dll file with version 6.04.9972 or 6.05.1024.
6. Replace the VBE6EXT.OLB file with version 6.04.9969 or 6.05.1024.
.NET Vusers
You can create an empty .NET Vuser script, in which to place .NETcode. This script type lets you incorporate your existing .NET application into VuGen. To create an empty .NET Vuser script, select .NET Vuser from the Custom category, in the Create New Script dialog box.
In a .NET vuser script the default language is C#. If your script is generated from a recorded session, VuGen enables you to change the script language from C# to VB.NET by selecting Visual
Basic .NET Language from Record > Recording Options > General > Script and regenerating the script.
Tip: You can edit the script in Visual Studio by clicking the button.
The following example is in C#: namespace Script
{ public class VuserClass
{ public int vuser_init()
{ return 0;
} public int Action()
{ return 0;
} public int vuser_end()
}
}
{ return 0;
}
Note: Place initialization code in the init method, business processes in the action method, and cleanup code in the end method.
Page 803 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Creating Scripts with Visual Studio
Creating Vuser Scripts in Visual Studio - Overview
There are several ways to create Vuser scripts: through VuGen or a development environment such as Visual Studio.
VuGen
You can use VuGen to create Vuser script that run on Windows or Linux platforms by recording or by manually programming within the VuGen editor. You create the script in a Windows environment and run it in either Windows or Linux—recording is not supported on Linux.
Visual
Studio
For users working with Visual Studio, you can program in Visual Basic, C, C# or
C++. The programs must be compiled into a dynamic link library (dll).
This chapter describes how to develop a Vuser script through programming within the Visual C,
Visual C# and Visual Basic environments. In these environments, you develop your Vuser script within your development application, while importing the Vuser API libraries.
You can also program a Vuser script from within the VuGen editor, incorporating your application's libraries or classes. Programming within VuGen is available for C, Java, Visual Basic, VBScript, and JavaScript. For more information, see
"Manually Programming a Script using the VuGen
Editor" on page 799
To create a Vuser script through programming, you can use a VuGen template as a basis for a larger Vuser script. The template provides: l correct program structure l
Vuser API calls l source code and makefiles for creating a dynamic library
An online C reference of the common functions used in Vuser scripts, are included in the Function
Reference (Help > Function Reference).
How to Create a Vuser Script with Visual C
You can create Vuser scripts using Visual C version 6.0 or higher.
1. In Visual C, create a new project - dynamic link library (dll). Select File > New and click the
Projects tab.
2. In the Wizard, select empty dll.
3. Add the following files to the project: n
A new cpp file with 3 exported function: init, run, end (the names may be customized).
n
The library file lrun50.lib (located in the <lr installation dir>/lib).
4. In the project settings change the following:
Page 804 of 1812 HP LoadRunner (11.50)
User Guide
VuGen n
Select the C/C++ tab and select Code generation (Category) > Use Run Time library
(List).Change it to: Multithreaded dll. n
Select the C/C++ tab and select Preprocessor (Category) > Preprocessor definitions (edit field) Remove _DEBUG.
5. Add code from your client application, or program as you normally would.
6. Enhance your script with Vuser API functions. For example, lr_output_message to issue messages, lr_start_transaction to mark transactions, and so forth. For more information, see the General functions in the Function Reference (Help > Function Reference).
7. Build the project. The output will be a DLL.
8. Create a folder with the same name as the DLL and copy the DLL to this folder.
9. In the lrvuser.usr file in the Template folder, Update the USR file key BinVuser with the DLL name: BinVuser=<DLL_name>.
Example:
In the following example, the lr_output_messsage function issues messages indicating which section is being executed. The lr_eval_string function retrieves the name of the user. To use the following sample, verify that the path to the Vuser API include file, lrun.h is correct.
#include "c:\lrun_5\include\lrun.h" extern "C" { int __declspec(dllexport) Init (void *p)
{
lr_output_message("in init"); return 0;
} int __declspec(dllexport) Run (void *p)
{
const char *str = lr_eval_string("<name>");
lr_output_message("in run and parameter is %s", str); return 0;
} int __declspec(dllexport) End (void *p)
{
lr_output_message("in end"); return 0;
}
} //extern C end
How to Create a Vuser Script with Visual Basic or Visual
C#
Create a Vuser in Visual Basic or Visual C#
1. In Microsoft Visual Basic or in Microsoft Visual C#, create a new project by selecting File >
New Project > LoadRunner Virtual User. A new project is created with one class and a
Page 805 of 1812 HP LoadRunner (11.50)
User Guide
VuGen template for a Vuser.
2. Save the project by selecting File > Save Project.
3. Open the Object Browser (View menu). Select the LoadRunner Vuser library and double-click on the Vuser Class module to open the template. The template contains three sections,
Initialize, Actions, and Terminate.
n
Visual Basic template
Option Explicit
Implements Vuser
Private Sub Initialize()
'Implement the Vuser initialization code here
End Sub
Private Sub Actions()
'Implement the Vuser main Action code here
End Sub
Private Sub Terminate()
'Implement the Vuser termination code here
End Sub n
Visual C# template public int Initialize()
{
// TO DO: Add virtual user's initialization routines return lr.PASS;
} public int Actions()
{
} public int Terminate()
{
// TO DO: Add virtual user's business process actions return lr.PASS;
// TO DO: Add virtual user's termination routines return lr.PASS;
}
4. Add code from your client application, or program as you normally would.
5. Use the Object Browser to add the desired VuGen elements to your code such as transactions, think time, rendezvous points, and messages.
6. Enhance your program with run-time settings and parameters. For more information, see
"How to Configure Run-Time Settings and Parameters" on next page .
7. Build the Vuser script by selecting Build > Build Solution project_name.dll.
The project is saved in the form of a Vuser script (.usr) in the same folder as the project.
Page 806 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
How to Configure Run-Time Settings and Parameters
After you create the DLL for your script, you create a script (.usr) and configure its settings. The
lrbin.bat utility provided with VuGen lets you define parameters and configure runtime settings for scripts created with Visual C and Basic. This utility is located in the bin folder of the product installation.
Configure runtime settings and parameterize scripts
1. In the product's bin folder, double-click on lrbin.bat. The Standalone Vuser Configuration dialog box opens.
2. Select File > New. Specify a script name for the usr file. The script name must be identical to the name of the folder to which you saved the DLL.
3. Select Vuser > Advanced and enter the DLL name in the Advanced dialog box.
4. Select Replay > Run-time Settings to define run-time settings. The Run-time Settings dialog box is identical to that displayed in the VuGen interface. For more information, see
"Run-Time
Settings" on page 346
5. Select Vuser > ParameterList to define parameters for your script. The Parameter dialog boxes are identical to those in VuGen. For more information, see
"Parameters" on page 247
Test the script by running it in standalone mode. Select Replay > Run Vuser. The Vuser execution window appears while the script runs.
Language Support
Language Support - Overview
VuGen supports multilingual environments, allowing you to use languages other than English on native language machines when creating and running scripts.
When working with languages other than English, the primary issue is ensuring that VuGen recognizes the encoding of the text during record and replay. The encoding applies to all texts used by the script. This includes texts in HTTP headers and HTML pages for Web Vusers, data in parameter files, and others.
Windows 2000 and higher lets you save text files with a specific encoding directly from Notepad:
ANSI, Unicode, Unicode big endian, or UTF-8.
By default, VuGen works with the local machine encoding (ANSI). Some servers working with foreign languages, require you to work with UTF-8 encoding. To work against this server, you must indicate in the Advanced recording options, that your script requires UTF-8 encoding.
Page Request Header Language
Before running a Web script, you can set the page's request header to match your current language.
In the Internet Protocol Run-Time settings, you set the language of the Accept-Language request header. This header provides the server with a list of all of the accepted languages.
Page 807 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
To set this value, select Replay > Run-Time Settings > Internet Protocol > Preferences >
Advanced > Options > Accept-Language request header and select the desired language.
For user interface details, see
"Internet Protocol > Preferences Node" on page 372
.
How to Convert Encoding Format of a String
You can manually convert a string from one encoding to another (UTF-8, Unicode, or locale machine encoding) using the lr_convert_string_encoding function with the following syntax: lr_convert_string_encoding(char * sourceString, char * fromEncoding, char * toEncoding, char * paramName)
The function saves the result string (including its terminating NULL) in the third argument,
paramName. It returns a 0 on success and -1 on failure.
The format for the fromEncoding and toEncoding arguments are:
LR_ENC_SYSTEM_LOCALE NULL
LR_ENC_UTF8 "utf-8"
LR_ENC_UNICODE "ucs-2"
In the following example, lr_convert_string_encoding converts "Hello world" from the system locale to Unicode.
Action()
{ int rc = 0; unsigned long converted_buffer_size_unicode = 0; char *converted_buffer_unicode = NULL; rc = lr_convert_string_encoding("Hello world", NULL, LR_ENC_
UNICODE, "stringInUnicode"); if(rc < 0)
{
// error
} return 0;
}
In the replay log, the output window shows the following information:
Output:
Starting action Action.
Action.c(7): Notify: Saving Parameter "stringInUnicode =
H\x00e\x00l\x00l\x00o\x00 \x00w\x00o\x00r\x00l\x00d\x00\x00\x00"
Ending action Action.
The result of the conversion is saved to the paramName argument.
Page 808 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
How to Convert Encoding Format of Parameter Files
The parameter file contains the data for parameters that were defined in the script. This file, stored in the script's folder, has a *.dat extension. When running a script, Vusers use the data to execute actions with varying values.
By default, VuGen saves the parameter file with your machine's encoding. When working with languages other than English, however, in cases where the server expects to receive the string in
UTF-8, you may need to convert the parameter file to UTF-8. You can do this directly from Notepad, provided that you are working with Windows 2000 or higher.
Apply UTF-8 encoding to a parameter file
1. Select Vuser > Parameter List and view the parameter properties.
2. In the right pane, locate the parameter file in the File path box.
3. With the parameter table in view, click Edit in Notepad. Notepad opens with the parameter file in csv format.
4. In the Save as type box, select All Files.
In the Encoding box, select UTF-8 type encoding.
5. Click Save. Notepad asks you to confirm the overwriting of the existing parameter file. Click
Yes.
VuGen now recognizes the parameter file as UTF-8 text, although it still displays it in regular characters.
Page 809 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
How to Record Web Pages with Foreign Languages
When working with Web or other Internet protocols, you can indicate the encoding of the Web page text for recording. The recorded site's language must match the operating system language. You cannot mix encodings in a single recording—for example, UTF-8 together with ISO-8859-1 or shift_ jis.
This task describes how to record web pages with foreign languages using VuGen.
Automatically record foreign language web pages.
In order to be recognized as a non-English Web page, the page must indicate the charset in the
HTTP header or in the HTML meta tag. Otherwise, VuGen will not detect the EUC-JP encoding and the Web site will not be recorded properly. To instruct VuGen to record non-English requests as
EUC-JP or UT-8, select Record > Recording Options > HTTP Properties > Advanced >
support charset and select the appropriate option in the Recording Options dialog box, HTPP
Properties: Advanced node. For user interface details, see
"HTTP > Advanced Node" on page
314 .
Note that by selecting the EUC-JP or UTF-8 option in the Recording Options, you are forcing
VuGen to record a Web page with the selected encoding, even when it uses different encoding. If, for example, a non-EUC encoded Web page is recorded as EUC-JP, the script will not replay properly.
Manually record foreign language web pages
You can manually add full support for recording and replaying of HTML pages encoded in EUC-JP using the web_sjis_to_euc_param function. This also allows VuGen to display Japanese EUCencoded characters correctly in Vuser scripts.
When you use web_sjis_to_euc_param, VuGen shows the value of the parameter in the
Execution Log using EUC-JP encoding. For example, when you replay the web_find function,
VuGen displays the encoded values. These include string values that were converted into EUC by the web_sjis_to_euc_param function, or parameter substitution when enabled in the Run-Time
Setting > Log > Extended Log.
Troubleshooting and Limitations
This section describes troubleshooting and limitations when working with foreign languages.
Browser Configuration
If, during recording, non-English characters in the script are displayed as escaped hexadecimal numbers (For example, the string " =;" becomes "%DC%26"), you can correct this by configuring your browser not to send URLs in UTF-8 encoding. In Internet Explorer, select Tools > Internet
Options and click the Advanced tab. Clear the Always Send URLs as a UTF-8 option in the
Browsing section.
For more information about web_sjis_to_euc_param, see the LoadRunner Function Reference.
Page 810 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Protocol Limitations
SMTP Protocol
If you work with SMTP protocol through MS Outlook or MS Outlook Express, the Japanese text recorded in a Vuser script is not displayed correctly. However, the script records and replays correctly.
Script Name Length
When recording in COM, FTP, IMAP, SMTP, POP3, REAL or VB in VBA mode, the length of the script name is limited to 10 multi-byte characters (21 bytes).
Application Lifecycle Management Integration
To open a script saved in an Application Lifecycle Management project from VuGen, or a scenario saved in an ALM project from Controller, add a new Test Set named "Default" (in English) to the
ALM project.
Advanced Topics
Calling External Functions in DLLs
You can call functions that are defined in external DLLs. By calling external functions from your script, you can reduce the memory footprint of your script and the overall run-time.
To call the external function, you load the DLL in which the function is defined.
You can load a DLL in one of the following ways: l
Locally (for one script) by using the lr_load_dll function. For task details, see
"How to Load a
DLL locally" on page 818 .
l
Globally (for all scripts) by adding statements to the vugen.dat file. For task details, see
"How to Load a DLL Globally" on page 819
.
Logging CtLib Server Messages
When you run a CtLib Vuser script, (Sybase CtLib, under the Client Server type protocols), all messages generated by the CtLib client are logged in the standard log and in the output file. By default, server messages are not logged. To enable logging of server messages (for debugging purposes), insert the following line into your Vuser script:
LRD_CTLIB_DB_SERVER_MSG_LOG;
VuGen logs all server messages in the Standard log.
To send the server messages to the output (in addition to the Standard log), type:
LRD_CTLIB_DB_SERVER_MSG_ERR;
To return to the default mode of not logging server errors, type the following line into your script:
Page 811 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
LRD_CTLIB_DB_SERVER_MSG_NONE;
Note: Activate server message logging for only a specific block of code within your script, since the generated server messages are long and the logging can slow down your system.
Recording OLE Servers
VuGen currently does not support recording for OLE applications. These are applications where the actual process is not launched by the standard process creation routines, but by the OLE
Automation system. However, you can create a Vuser script for OLE applications based on the following guidelines.
There are two types of OLE servers: executables, and DLLs.
DLL Servers
If the server is the DLL, it will eventually be loaded into the application process space, and VuGen will record the call to LoadLibrary. In this case, you may not even realize that it was an OLE application.
Executable Servers
If the server is the executable, you must invoke the executable in the VuGen in a special way: l
First, determine which process actually needs to be recorded. In most cases, the customer knows the name of the application's executable. If the customer doesn't know the name of the application, invoke it and determine its name from the NT Task Manager.
l
After you identify the required process, click Start Recording in VuGen. When prompted for the
Application name, enter the OLE application followed by the flag "/Automation". Next, launch the user process in the usual way (not via VuGen). VuGen records the running OLE server and does not invoke another copy of it. In most cases, these steps are sufficient to enable VuGen to record the actions of an OLE server.
l
If you still are experiencing difficulties with recording, you can use the CmdLine program to determine the full command line of a process which is not directly launched. (The program is available in a knowledgebase article on the Customer Support Web site, http://support.hp.com)
Using CmdLine
In the following example, CmdLine.exe is used to determine the full command line for the process
MyOleSrv.exe, which is launched by some other process.
Determine its full command line
1. Rename MyOleSrv.exe to MyOleSrv.orig.exe.
2. Place CmdLine.exe in the same folder as the application, and rename it to MyOleSrv.exe.
3. Launch MyOleSrv.exe. It issues a popup with a message containing the complete command line of the original application, (including additional information), and writes the information into
c:\temp\CmdLine.txt.
Page 812 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
4. Restore the old names, and launch the OLE server, MyOleSrv.exe, from VuGen with the correct command line parameters. Launch the user application in a regular way - not through
VuGen. In most cases, VuGen will record properly.
If you still are experiencing difficulties with recording, proceed with the following steps:
1. Rename the OLE server to MyOleSrv.1.exe, and CmdLine to MyOleSrv.exe.
2. Set the environment variables "CmdStartNotepad" and "CmdNoPopup" to 1. See
"CmdLine
Environment Variables" below
for a list of the CmdLine environment variables.
3. Start the application (not from VuGen). Notepad opens with the full command line. Check the command line arguments. Start the application several times and compare the command line arguments. If the arguments are the same each time you invoke the application, then you can reset the CmdStartNotepad environment variable. Otherwise, leave it set to "1".
4. In VuGen, invoke the program, MyOleSrv.1.exe with the command line parameters (use
Copy/Paste from the Notepad window).
5. Start the application (not from within VuGen).
CmdLine Environment Variables
You can control the execution of CmdLine through the following environment variables:
CmdNoPopup
If set, the popup window will not appear.
CmdOutFileName
If set, and non-empty, CmdLine will attempt to create this file instead of c:\temp\CmdLine.txt.
CmdStartNotepad
If set, the output file will be displayed in the notepad (Best used with
CmdNoPopup).
Running a Vuser from the Linux Command Line
VuGen includes a Linux shell script utility, run_db_Vuser.sh, that automatically performs the same operations as the virtual user but from the command line. It can perform each of the replay steps optionally and independently. This is a useful tool for debugging tests to be replayed on Linux.
Place the file run_db_Vuser.sh in the $M_LROOT/bin folder. To replay a Vuser type: run_db_Vuser.sh
Vuser.usr
You can also use the following command line options:
-cpp_ only
-cci_
This option will start the preprocessing phase. The output of this process is the file
` Vuser.c '.
This option runs the compilation phase. The ` Vuser.c ' file is used as input, and the
Page 813 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
only
-exec_ only
output produced is the ` Vuser.ci ' file.
This option runs the Vuser, by taking as input the ` Vuser.ci ' file and running it via the replay driver.
-ci ci_ file
This option allows you to specify the name and location of a .ci file to be run. The second parameter contains the location of the .ci file.
-out output_ directory
This option allows you to determine the location of any output files created throughout the various processes. The second parameter is the directory name and location.
-driver driver_ path
This option allows you to specify the actual driver executable to be used for running the Vuser. By default the driver executable is taken from the settings in the
VuGen.dat file.
Note that only one of the first three options can be used at a time for running the run_db_vuser.
Specifying the Vuser Behavior
Since VuGen creates the Vuser script and the Vuser behavior as two independent sources, you can configure user behavior without directly referencing the Vuser script, for example, wait times, pacing times, looping iterations, logging, and so forth. This feature lets you make configuration changes to a Vuser, as well as store several `profiles' for the same Vuser script.
The ` Vuser.cfg ' file, by default, is responsible for defining this behavior - as specified in VuGen's
Runtime settings dialog box. You can save several versions of this file for different user behavior and then run the Vuser script referencing the relevant .cfg file.
You can run the Vuser script with the relevant configuration file from a server machine. To do this, add the following to the Vuser command line:
-cfg c:\tmp\profile2.cfg
For information on command line parameters, see
"Command Line Parameters" below
.
Note that you cannot control the behavior file from VuGen. VuGen automatically uses the .cfg file with the same name as the Vuser. (You can, of course, rename the file to be ` Vuser.cfg ').
However, you can do this manually from the command line by adding the -cfg parameter mentioned above to the end of the driver command line.
Note: The Linux utility, run_db_vuser, does not yet support this option.
Command Line Parameters
The Vusers can accept command line parameters when invoked. There are several Vuser API functions available to reference them (lr_get_attrib_double, and so on). In your environment, you can send command line parameters to the Vuser by adding them to the command line entry of the script window.
Page 814 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
When running the Vuser from VuGen, you cannot control the command line parameters. You can do this manually, however, from the Windows command line by adding the parameters at the end of the line, after all the other driver parameters, for example: mdrv.exe -usr c:\tmp\Vuser\Vuser.usr
command_line_params
-out c:\tmp\vuser vuser_
Note: The Linux utility, run_db_vuser, does not yet support this option.
How to Create a New Vuser Type
The following steps describe how to create a new vuser type.
l
"Edit the mdrv.dat file" below
l
"Add a CFG file (optional)" on next page
l
"Insert an LRP file" on page 817
l
"Specify a Template" on page 817
1. Edit the mdrv.dat file
Edit the mdrv.dat file which resides in the M_LROOT\dat folder. Add a section for the new
Vuser type with all of the applicable parameters from the following list.
[<
extension_name>]
ExtPriorityType=< {internal, protocol}>
WINNT_EXT_LIBS=<dll name for NT>
WIN95_EXT_LIBS=<dll name for 95>
SOLARIS_EXT_LIBS=<dll name for Solaris>
LINUX_EXT_LIBS=<dll name for Linux>
HPUX_EXT_LIBS=<dll name for HP>
AIX_EXT_LIBS=<dll name for IBM>
LibCfgFunc=<configuration function name>
UtilityExt=<other extensions list>
WINNT_DLLS=<dlls to load to the interpreter context, for NT>
WIN95_DLLS=<dlls to load to the interpreter context, for 95>
SOLARIS_DLLS=<dlls to load to the interpreter context, for Solaris>
LINUX_DLLS=<dlls to load to the interpreter context, for Linux>
HPUX_DLLS=<dlls to load to the interpreter context, for HP>
AIX_DLLS=<dlls to load to the interpreter context, for IBM>
ExtIncludeFiles=<extra include files. several files can be seperated by a comma>
ExtCmdLineConc=<extra command line (if the attr exists concatenate value)>
ExtCmdLineOverwrite=<extra command line (if the attr exists overwrite value)>
CallActionByNameFunc=<interpreter exec_action function>
GetFuncAddress=<interpreter get_location function>
RunLogicInitFunc=<action_logic init function>
Page 815 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
RunLogicRunFunc=<action_logic run function>
RunLogicEndFunc=<action_logic end function>
For example, an Oracle NCA Vuser type is represented by:
[Oracle_NCA]
ExtPriorityType=protocol
WINNT_EXT_LIBS=ncarp11i.dll
WIN95_EXT_LIBS=ncarp11i.dll
LINUX_EXT_LIBS=liboranca11i.so
SOLARIS_EXT_LIBS=liboranca11i.so
HPUX_EXT_LIBS=liboranca11i.sl
AIX_EXT_LIBS=liboranca11i.so
LibCfgFunc=oracle_gui_configure
UtilityExt=lrun_api,HttpEngine
ExtCmdLineOverwrite=-WinInet No
ExtCmdLineConc=-UsingWinInet No
SecurityRequirementsFiles=oracle_nca.asl
SecurityMode=On
VuGen was designed to be able to handle a new Vuser type with no code modifications. You may, however, need to add a special View.
There is no generic driver supplied with VuGen, but you can customize one of the existing drivers. To use a customized driver, modify mdrv.dat. Add a line with the platform and existing driver, then add a new line with your customized driver name, in the format <platform>_
DLLS=<my_replay.dll name>. For example, if your SAP replay dll is called SAPPLAY32.DLL, add the following two lines to the [sap] section of mdrv.dat:
WINNT=sapdrv32.exe
WINNT_DLLS=sapplay32.dll
2. Add a CFG file (optional)
You can specify a configuration file to set the default Run-Time Settings for your protocol. You define it in the LibCfgFunc variable in the mdrv.dat file, or place one called default.cfg in the new protocols subfolder under templates. A sample default.cfg follows.
[ThinkTime]
Options=NOTHINK
Factor=1
LimitFlag=0
Limit=1
[Iterations]
NumOfIterations=1
IterationPace=IterationASAP
StartEvery=60
RandomMin=60
RandomMax=90
[Log]
LogOptions=LogExtended
MsgClassData=0
Page 816 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
MsgClassParameters=0
MsgClassFull=1
3. Insert an LRP file
In the dat/protocols folder, insert an lrp file which defines the protocol. This file contains the configuration information for the protocol in the Protocol, Template, VuGen, and API sections.
Certain protocols may have additional sections, corresponding to the additional run-time setting options.
The Protocol section contains the name, category, description, and bitmap location for the protocol.
[Protocol]
Name=WAP
CommonName=WAP
Category=Wireless
Description=Wireless Application Protocol - used for Web-based, wireless communication between mobile devices and content providers.
Icon=bitmaps\wap.bmp
Hidden=0
Single=1
Multi=0
The Template section indicates the name of the various sections of the script and the default test name.
[Template] vuser_init.c=init.c
vuser_end.c=end.c
Action1.c=action.c
Default.usp=test.usp
@@TestName@@.usr=wap.usr
default.cfg=default.cfg
The VuGen section has information about the record and replay engines, along with the necessary DLLs and run-time files.
The API section contains information about the protocol's script API functions.
You can use one of the existing lrp files in the protocols folder as a base for your new protocol.
4. Specify a Template
After adding an lrp file, insert a subfolder to M_LROOT/template with a name corresponding to the protocol name defined in the lrp file. In this subfolder, insert a default.cfg file which defines the default settings for the general and run-time settings.
If you want to use a global header file for all of your protocol's scripts, add a file named
globals.h. This file should contain an include statement which points to a header file for the new protocol. For example, the template/http subfolder contains a file called globals.h which directs
VuGen to the as_web.h file in the include folder:
#include #as_web.h"
Page 817 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
How to Load a DLL locally
This task describes how to use the lr_load_dll function to load a DLL into your Vuser script. Once the DLL is loaded, you can call any function defined within the DLL without having to declare it in your script.
Call a function defined in a DLL
1. Use the lr_load_dll function to load the DLL at the beginning of your script. Place the statement at the beginning of the vuser_init section. lr_load_dll replaces the ci_load_dll function.
Use the following syntax: lr_load_dll( library_name);
Note that for Linux platforms, DLLs are known as shared libraries. The extension of the libraries is platform dependent.
2. Call the function defined in the DLL in the appropriate place within your script.
In the following example, the insert_vals function, defined in orac1.dll, is called, after the creation of the Test_1 table.
int LR_FUNC Actions(LR_PARAM p)
{ lr_load_dll("
orac1.dll"); lrd_stmt(Csr1, "create table Test_1 (name char(15), id integer)\n",
-1,
1 /*Deferred*/, 1 /*Dflt Ora Ver*/, 0); lrd_exec(Csr1, 0, 0, 0, 0, 0);
/* Call the insert_vals function to insert values into the table. */ insert_vals();
lrd_stmt(Csr1, "select * from Test_1\n", -1, 1 /*Deferred*/, 1
/*Dflt Ora Ver*/, 0); lrd_bind_col(Csr1, 1, =;NAME_D11, 0, 0); lrd_bind_col(Csr1, 2, =;ID_D12, 0, 0); lrd_exec(Csr1, 0, 0, 0, 0, 0); lrd_fetch(Csr1, -4, 15, 0, PrintRow14, 0);
...
Note: You can specify a full path for the DLL. If you do not specify a path, lr_load_library searches for the DLL using the standard sequence used by the C++ function, LoadLibrary on Windows platforms. On Linux platforms you can set the LD_LIBRARY_PATH environment variable (or the platform equivalent). The lr_load_dll function uses the same search rules as dlopen. For more information, see the main pages for dlopen or its equivalent.
Page 818 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
How to Load a DLL Globally
This task describes how to load a DLL globally, to make its functions available to all your Vuser scripts. Once the DLL is loaded, you can call any function defined within the DLL, without having to declare it in your script.
Load a DLL globally
1. Add a list of the DLLs you want to load to the appropriate section of the mdrv.dat file, located in your application's dat folder.
Use the following syntax:
PLATFORM_DLLS=my_dll1.dll, my_dll2.dll, ...
replacing the word PLATFORM with your specific platform. For a list of platforms, see the beginning section of the mdrv.dat file.
For example, to load DLLs for Winsock Vusers on an NT platform, add the following statement to the mdrv.dat file:
[WinSock]
ExtPriorityType=protocol
WINNT_EXT_LIBS=wsrun32.dll
WIN95_EXT_LIBS=wsrun32.dll
LINUX_EXT_LIBS=liblrs.so
SOLARIS_EXT_LIBS=liblrs.so
HPUX_EXT_LIBS=liblrs.sl
AIX_EXT_LIBS=liblrs.so
LibCfgFunc=winsock_exten_conf
UtilityExt=lrun_api
ExtMessageQueue=0
ExtCmdLineOverwrite=-WinInet No
ExtCmdLineConc=-UsingWinInet No
WINNT_DLLS=
user_dll1 .dll, user_dll2 .dll, ...
2. Call the function defined in the DLL in the appropriate place within your script.
.dat Files
There are two .dat files used by VuGen: vugen.dat and mdrv.dat.
vugen.dat
This vugen.dat file resides in the M_LROOT\dat folder and contains general information about
VuGen, to be used by both the VuGen and the Controller.
[Templates]
RelativeDirectory=template
The Templates section indicates where the templates are for the VuGen protocols. The default entry indicates that they are in the relative template folder. Each protocol has a subfolder under
template, which contains the template files for that protocol.
The next section is the GlobalFiles section.
Page 819 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
[GlobalFiles] main.c=main.c
@@TestName@@.usr=test.usr
default.cfg=test.cfg
default.usp=test.usp
The GlobalFiles section contains a list of files that VuGen copies to the test folder whenever you create a new test. For example, if you have a test called "user1", then VuGen will copy main.c, user1.usr and user1.cfg to the test folder.
The ActionFiles section contains the name of the file containing the Actions to be performed by the
Vuser and upon which to perform iterations.
[ActionFiles]
@@actionFile@@=action.c
In addition to the settings shown above, vugen.dat contains settings that indicate the operating system and other compilation related settings.
mdrv.dat
The mdrv.dat file contains a separate section for each protocol defining the location of the library files and driver executables. For information about how to use this file to create a new protocol, see
"How to Create a New Vuser Type" on page 815
.
Creating and Running Scripts in Linux
Creating and Running Scripts in Linux - Overview
You can use VuGen on a Linux environment in the following ways: l
You can use VuGen to create Vuser scripts that run on Linux platforms. You record your application in a Windows environment and run it in Linux—recording is not supported on Linux.
l
Users working in Linux-only environments can program Vuser scripts. Scripts can be programmed in C or C++ and they must be compiled into a dynamic library.
To create a script through programming, you can use a Vuser template as a basis for a larger Vuser scrips. The template provides: l correct program structure l
Vuser API calls l source code and makefiles for creating a dynamic library
Programming Vuser Actions
The Vuser script files, test.c, test.usr, and test.cfg, can be customized for your Vuser.
You program the actual Vuser actions into the test.c file. This file has the required structure for a programmed Vuser script. The Vuser script contains three sections: vuser_init, Actions, and vuser_ end.
Page 820 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Note that the template defines extern C for users of C++. This definition is required for all C++ users, to make sure that none of the exported functions are modified inadvertently.
#include "lrun.h"
#if defined(__cplusplus) || defined(cplusplus) extern "C"
{
#endif int LR_FUNC vuser_init(LR_PARAM p)
{ lr_message("vuser_init done\n"); return 0;
}
{ int Actions(LR_PARAM p) lr_message("Actions done\n"); return 0;
}
{ int vuser_end(LR_PARAM p) lr_message("vuser_end done\n"); return 0;
}
#if defined(__cplusplus) || defined(cplusplus)}
#endif
You program Vuser actions directly into the empty script, before the lr_message function of each section.
The vuser_init section is executed first, during initialization. In this section, include the connection information and the logon procedure. The vuser_init section is only performed once each time you run the script.
The Actions section is executed after the initialization. In this section, include the actual operations performed by the Vuser. You can set up the Vuser to repeat the Actions section (in the test.cfg file).
The vuser_end section is executed last, after the all of the Vuser's actions. In this section, include the clean-up and logoff procedures. The vuser_end section is only performed once each time you run the script.
Note: LoadRunner controls Vusers by sending SIGHUP, SIGUSR1, and SIGUSR2 Linux signals. Do not use these signals in your Vuser programs.
How to Create a Template
VuGen includes a utility that copies a template into your working folder. The utility is called mkdbtest, and is located in $M_LROOT/bin. You run the utility by typing: mkdbtest name
When you run mkdbtest, it creates a folder called name, which contains the template file, name.c.
For example, if you type:
Page 821 of 1812 HP LoadRunner (11.50)
User Guide
VuGen mkdbtest test1
mkdbtest creates a folder called test1, which contains the template script, test1.c.
When you run the mkdbtest utility, a folder is created containing four files test.c, test.usr, test.cfg and Makefile, where test is the test name you specified for mkdbtest.
How to Configure Run-Time Settings Manually
To configure Vuser run-time settings, you modify the default.cfg and default.usp files created with the script. These run-time settings correspond to VuGen's run-time settings. (See
"Run-Time
Settings" on page 346 .) The default.cfg file contains the setting for the General, Think Time, and
Log options. The default.usp file contains the setting for the Run Logic and Pacing.
General Options
There is one General option for Linux Vuser scripts:
ContinueOnError instructs the Vuser to continue when an error occurs. To activate the option, specify 1. To disable the option, specify 0.
In the following example, the Vuser will continue on an error.
[General]
ContinueOnError=1
Think Time Options
You can set the think time options to control how the Vuser uses think time during script execution.
You set the parameters Options, Factor, LimitFlag, and Limit parameters according to the following chart.
Option
Ignore think time
Use recorded think time
Multiply the recorded think time by...
Use random percentage of recorded think time
Options
NOTHINK
RECORDED
MULTIPLY
RANDOM
Factor
N/A
1.000
number range
LimitFlag Limit
N/A N/A
N/A
N/A
N/A
N/A lowest percentage upper percentage
Page 822 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Limit the recorded think time to...
RECORDED/
MULTIPLY number (for
MULTIPLY)
1 value in seconds
To limit the think time used during execution, set the LimitFlag variable to 1 and specify the think time Limit, in seconds.
In the following example, the settings tell the Vuser to multiply the recorded think time by a random percentage, ranging from 50 to 150.
[ThinkTime]
Options=RANDOM
Factor=1
LimitFlag=0
Limit=0
ThinkTimeRandomLow=50
ThinkTimeRandomHigh=150
Log Options
You can set the log options to create a brief or detailed log file for the script's execution.
[Log]
LogOptions=LogBrief
MsgClassData=0
MsgClassParameters=0
MsgClassFull=0
You set the parameters LogOptions, MsGClassData, MsgClassParameters, and MsgClassFull variables according to the following chart:
Logging Type
Disable Logging
Standard Log
Parameter
Substitution (only)
Data Returned by
Server (only)
Advanced Trace
(only)
All
LogOptions MsgClassData MsgClassParameters MsgClassFull
LogDisabled N/A
LogBrief
LogExtended
LogExtended
N/A
LogExtended 0
1
0
N/A
N/A
1
0
0
N/A
N/A
0
0
1
LogExtended 1 1 1
In the following example, the settings tell the Vuser to log all data returned by the server and the parameters used for substitution.
[Log]
LogOptions=LogExtended
MsgClassData=1
Page 823 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
MsgClassParameters=1
MsgClassFull=0
Iterations and Run Logic
You can set the Iteration options to perform multiple iterations and control the pacing between the iterations. You can also manually set the order of the actions and their weight. To modify the run logic and iteration properties of a script, you must edit the default.usp file.
To instruct the Vuser to perform multiple iterations of the Actions section, set
RunLogicNumOfIterations to the appropriate value.
To control the pacing between the iterations, set the RunLogicPaceType variable and its related values, according to the following chart:
Pacing
As soon as possible
Wait between Iterations for a set time
Wait between iterations a random time
Wait after each iteration a set time
Wait after each iteration a random time
RunLogicPaceType Related Variables
Asap
Const
N/A
RunLogicPaceConstTime
Random
ConstAfter
After
RunLogicRandomPaceMin,
RunLogicRandomPaceMax
RunLogicPaceConstAfterTime
RunLogicAfterPaceMin,
RunLogicAfterPaceMax
In the following example, the settings tell the Vuser to perform four iterations, while waiting a random number of seconds between iterations. The range of the random number is from 60 to 90 seconds.
[RunLogicRunRoot]
MercIniTreeFather=""
MercIniTreeSectionName="RunLogicRunRoot"
RunLogicRunMode="Random"
RunLogicActionOrder="Action,Action2,Action3"
RunLogicPaceType="Random"
RunLogicRandomPaceMax="90.000"
RunLogicPaceConstTime="40.000"
RunLogicObjectKind="Group"
RunLogicAfterPaceMin="50.000"
Name="Run"
RunLogicNumOfIterations="4"
RunLogicActionType="VuserRun"
RunLogicAfterPaceMax="70.000"
RunLogicRandomPaceMin="60.000"
MercIniTreeSons="Action,Action2,Action3"
RunLogicPaceConstAfterTime="30.000"
Page 824 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
How to Define Transaction and Insert Rendezvous Points
Manually
When programming a Vuser script without VuGen, you must manually configure the Vuser file in order to enable transactions and rendezvous. The configuration settings are listed in the test.usr
file.
[General]
Type=any
DefaultCfg=Test.cfg
BinVuser=libtest.libsuffix
RunType=Binary
[Actions] vuser_init=
Actions= vuser_end=
[Transactions] transaction1=
[Rendezvous]
Meeting=
Each transaction and rendezvous must be defined in the usr file. Add the transaction name to the
Transactions section (followed by an "="). Add each rendezvous name to the Rendezvous section
(followed by an "="). If the sections are not present, add them to the usr file as shown above.
How to Compile Scripts Manually
After you modify the template, you compile it with the appropriate Makefile in the script's folder.
Note that for C++ compiling, you must use the native compiler (not gnu). The compiler creates a dynamic library called: l libtest.so (solaris) l libtest.a (AIX) l libtest.sl (HP)
You can modify the Makefile and assign additional compiler flags and libraries by modifying the appropriate sections.
If you are working with a general template, you must include your application's libraries and header files. For example, if your application uses a library called testlib, include it in the LIBS section.
LIBS = \
-testlib \
-lLrun50 \
-lm
After you modify the makefile, type Make from the command line in the working folder to create the dynamic library files for the Vuser script.
After you create a script, you check it's functionality from the command line.
To run a Vuser script from the Linux command line, type:
Page 825 of 1812 HP LoadRunner (11.50)
User Guide
VuGen mdrv -usr ` pwd' test.usr
where pwd is the full path to the folder containing the Vuser script and test.usr is the name of the
Vuser file. Check that your script communicates with the server and performs all the required tasks.
After you verify that your script is functional, you integrate it into your environment: a LoadRunner scenario, Performance Center load test, or Business Process Monitor configuration. For more information, see the HP LoadRunner Controller, Performance Center, or HP Business Service
Management documentation.
Programming with the XML API
Programming with the XML API - Overview
VuGen's support for XML allows you to dynamically work with XML code and retrieve the values during test execution. Follow these steps in creating an effective XML script: l
Record a script in the desired protocol, usually Web, Web Services, or Wireless.
l
Copy the XML structures into your script.
l
Add XML functions from the LR API in order to retrieve dynamic data and the XML element values.
The LR API uses XPath, the XML Path language to manipulate the text in an XML document.
You can instruct VuGen to display the output values of XML elements in the Execution log window using the Run-Time settings. VuGen displays the line numbers, the number of matches, and the value. To allow the displaying of values, you need to enable parameter substitution. In the Run-
Time settings, open the General:Log node, select Extended log, and select Parameter
Substitution. For more information, see
"Run-Time Settings" on page 346
All Vuser API XML functions return the number of matches successfully found, or zero for failure.
Using XML Functions
This section provides examples of how to work with data in an XML tree. Certain functions allow you to retrieve information, and others let you write information to an XML tree. The examples use the following XML tree containing the names and extensions of several employees in the Acme organization.
style="font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline"><acme_org>
<accounting_dept>
<employee type='PT'>
<name>John Smith</name>
<extension>2145</extension>
</employee>
</accounting_dept>
<engineering_dept>
<employee type='PT'>
<name>Sue Jones</name>
<extension>2375</extension>
</employee>
Page 826 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
</engineering_dept>
</acme_org>
Reading Information from an XML Tree
The functions which read information from an XML tree are:
lr_xml_extract lr_xml_find lr_xml_get_values
Extracts XML string fragments from an XML string.
Performs a query on an XML string.
Retrieves values of XML elements found by a query.
To retrieve a specific value through a query, you specify the tags of the parent and child nodes in a path format.
For example, to retrieve an employee name in the Accounting department, use the following string: lr_xml_get_values("XML={XML_Input_Param}",
"ValueParam=OutputParam",
"
Query=/acme_org/accounting_dept/employee/name",
LAST);
The Execution log window (with Extended logging enabled) shows the output of this function:
Output:
Action.c(20): "lr_xml_get_values" was successful, 1 match processed
Action.c(25): Query result = John Smith
Writing to an XML Structure
The functions which write values to an XML tree are:
lr_xml_delete lr_xml_insert lr_xml_replace
Deletes fragments from an XML string.
Inserts a new XML fragment into an XML string.
Replaces fragments of an XML string.
lr_xml_set_ values
Sets the values of XML elements found by a query.
lr_xml_transform
Applies Extensible Stylesheet Language (XSL) transformation to XML data.
The most common writing function is lr_xml_set_values which sets the values of specified elements in an XML string. The following example uses lr_xml_set_values to change the phone extensions of two employee elements in an XML string.
Page 827 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
First, we save the XML string to a parameter called XML_Input_Param. We want two values to be matched and substituted, so we prepare two new parameters, ExtensionParam_1 and
ExtensionParam_2, and set their values to two new phone extensions, 1111 and 2222.
lr_xml_set_values contains the argument "ValueName=ExtensionParam", which picks up the values of ExtensionParam_1 and ExtensionParam_2. The current extensions of the two employees are substituted with the values of these parameters, 1111 and 2222. The value of OutputParam is then evaluated proving that the new phone extensions were in fact substituted.
Action() {
int i, NumOfValues;
char buf[64];
lr_save_string(xml_input, "XML_Input_Param"); // Save input as parameter
lr_save_string("1111", "ExtensionParam_1");
lr_save_string("2222", "ExtensionParam_2");
lr_xml_set_values("XML={XML_Input_Param}",
"ResultParam=NewXmlParam", "ValueParam=ExtensionParam",
"SelectAll=yes", "Query=//extension", LAST);
NumOfValues= lr_xml_get_values("XML={NewXmlParam}",
"ValueParam=OutputParam", "Query=//extension",
"SelectAll=yes", LAST);
for (i = 0; i < NumOfValues; i++) {/* Print the multiple values of MultiParam */
sprintf(buf, "Retrieved value %d : {OutputParam_%d}", i+1, i+1);
lr_output_message(lr_eval_string(buf));
}
return 0;
}
Output:
Action.c(40): Retrieved value 1: 1111
Action.c(40): Retrieved value 2: 2222
Specifying XML Function Parameters
Most XML API functions require that you specify the XML element and a query. You can also indicate if you want to retrieve all results or a single one.
Defining the XML Element
For defining the XML element to query, you can specify a literal string of the XML element, or a parameter that contains the XML. The following example shows the XML input string defined as a literal string:
Page 828 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
"XML=<employee>JohnSmith</employee>"
Alternatively, the XML string can be a parameter containing the XML data. For example:
"XML={EmployeeNameParam}"
Querying an XML Tree
Suppose you want to find a value within an XML tag, for example, an employee's extension. You formulate a query for the desired value. The query indicates the location of the element and which element you want to retrieve or set. The path that you specify limits the scope of the search to a specific tag. You can also search for all elements of a specific type under all nodes below the root.
For a specific path, use "Query=/full_xml_path_name/element_name"
For the same element name under all nodes, use "Query=//element_name"
In the VuGen implementation of XML functions, the scope of a query is the entire XML tree. The tree information is sent to the Vuser API functions as the value of the xml argument.
Multiple Query Matching
When you perform a query on an XML element, by default VuGen returns only the first match. To retrieve multiple values from a query, you specify the "SelectAll=yes" attribute within your functions. VuGen adds a suffix of _index to indicate multiple parameters. For example, if you defined a parameter by the name EmployeeName, VuGen creates EmployeeName_1,
EmployeeName_2, EmployeeName_3, and so on.
lr_xml_set_values("XML={XML_Input_Param}",
"ResultParam=NewXmlParam", "ValueParam=ExtensionParam",
"SelectAll=yes", "Query=//extension", LAST);
With functions that write to a parameter, the values written to the parameter can then be evaluated.
For example, the following code retrieves and prints multiple matches of a query:
NumOfValues = lr_xml_get_values("Xml={XmlParam}", "Query=//name",
"SelectAll=yes", "ValueParam=EmployeeName", LAST);
For functions that read from parameters, the values of the parameters must be pre-defined. The parameter must also use the convention ParamName_IndexNumber, for example Param_1,
Param_2, Param_3, and so on. This collection of parameters is also known as a parameter set.
In the following example, lr_xml_set_values reads values from the parameter set and then uses those values in the XPath query. The parameter set that represents the employee extensions, is called ExtensionParam. It has two members: ExtensionParam_1 and ExtensionParam_2. The lr_
xml_set_values function queries the XML input string and sets the value of the first match to 1111 and the second match to 2222.
lr_save_string("1111", "ExtensionParam_1"); lr_save_string("2222", "ExtensionParam_2"); lr_xml_set_values("XML={XML_Input_Param}",
"ResultParam=NewXmlParam", "ValueParam=ExtensionParam",
"SelectAll=yes", "Query=//extension", LAST);
Page 829 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
XML Attributes
VuGen contains support for attributes. You can use a simple expression to manipulate attributes of
XML elements and nodes, just as you can manipulate the elements themselves. You can modify the desired attribute or only attributes with specific values.
In the following example, lr_xml_delete deletes the first cubicle element with the name attribute.
lr_xml_delete( "Xml={ParamXml}",
"Query=//cubicle/@name",
"ResultParam=Result",
LAST
);
In the next example, lr_xml_delete deletes the first cubicle element with a name attribute that is equal to Paul.
lr_xml_delete( "Xml={ParamXml}",
"Query=//cubicle/@name="Paul",
"ResultParam=Result",
LAST
);
Structuring XML Scripts
Initially, you create a new script in your preferred protocol. You can record a session in that protocol, or you may program the entire script without recording. Structure the Actions section of the script as follows: l
XML input declaration l
The Actions section
The XML input section contains the XML tree that you want to use as an input variable. You define the XML tree as a char type variable. For example: char *xml_input=
"<acme_org>"
"<employee>"
" <name>John Smith</name>"
"<cubicle>227</cubicle>"
"<extension>2145</extension>"
"</employee>"
"<employee>"
"<name>Sue Jones</name>"
"<cubicle>227</cubicle>"
"<extension>2375</extension>"
"</employee>"
"</acme_org>";
The Action section contains the evaluation of the variables and queries for the element values. In the following example, the XML input string is evaluated using lr_save_string. The input variable is queried for employee names and extensions.
Page 830 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
Action() {
/*
Save the input as a parameter.*/
lr_save_string(xml_input, "XML_Input_Param");
/*
Query 1 - Retrieve an employee name from the specified
element.*/
lr_xml_get_values("XML={XML_Input_Param}",
"ValueParam=OutputParam",
"Query=/acme_org/employee/name", LAST);
/*
Query 2 - Retrieve an extension under any path below the
root.*/
lr_xml_get_values("XML={XML_Input_Param}",
"ValueParam=OutputParam",
"Query=//extension", LAST);
return 0;
}
Enhancing a Recorded Session with XML
You can prepare an XML script by recording a session and then manually adding the relevant XML and Vuser API functions.
The following example illustrates how a recorded session was enhanced with Vuser API functions.
Note that the only function that was recorded was web_submit_data, which appears in bold.
The first section contains the XML input declaration of the variable SOAPTemplate, for a SOAP message:
#include "as_web.h"
// SOAP message const char* pSoapTemplate=
"<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">"
"<soap:Body>"
"<SendMail xmlns=\"urn:EmailIPortTypeInft-
IEmailService\"/>"
"</soap:Body>"
"</soap:Envelope>";
Page 831 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
The following section represents the actions of the user:
Action1()
{
// get response body
web_reg_save_param("ParamXml", "LB=", "RB=", "Search=body", LAST);
// fetch weather by HTTP GET web_submit_data("GetWeather",
"Action=http://glkev.net.innerhost.com/glkev_ ws/
WeatherFetcher.asmx/GetWeather",
"Method=GET",
"EncType=",
"RecContentType=text/xml",
"Referer=http://glkev.net.innerhost.com
/glkev_ ws/WeatherFetcher.asmx?op=GetWeather",
"Snapshot=t2.inf",
"Mode=HTTP", ITEMDATA, "Name=zipCode",
"Value=10010", ENDITEM, LAST); // Get City value
lr_xml_get_values("Xml={ParamXml}",
"Query=City",
"ValueParam=ParamCity",
LAST
);
lr_output_message(lr_eval_string("***** City = {ParamCity}
*****"));
// Get State value
lr_xml_get_values("Xml={ParamXml}",
"Query=State",
"ValueParam=ParamState",
LAST
);
lr_output_message(lr_eval_string("***** State = {ParamState}
*****"));
// Get several values at once by using template lr_xml_get_values_ ex("Xml={ParamXml}",
"Template="
"<Weather>"
"<Time>{ParamTime}</Time>"
"<Temperature>{ParamTemp}</Temperature>"
"<Humidity>{ParamHumid}</Humidity>"
"<Conditions>{ParamCond}</Conditions>"
"</Weather>",
LAST
);
lr_output_message(lr_eval_string( "***** Time = {ParamTime},
Temperature =
Page 832 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
{ParamTemp},
"
"Humidity = {ParamHumid},
Conditions =
{ParamCond}
*****"));
// Generate readable forecast
lr_save_string(lr_eval_string("\r\n\r\n*** Weather Forecast for
{ParamCity}, {ParamState} ***\r\n"
"\tTime: {ParamTime}\r\n"
"\tTemperature: {ParamTemp} deg.
Fahrenheit\r\n"
"\tHumidity: {ParamHumid}\r\n"
"\t{ParamCond} conditions expected\r\n"
"\r\n"),
"ParamForecast"
);
// Save soap template into parameter
lr_save_string(pSoapTemplate, "ParamSoap");
// Insert request body into SOAP template
lr_xml_insert("Xml={ParamSoap}",
"ResultParam=ParamRequest",
"Query=Body/SendMail",
"position=child",
"XmlFragment="
"<FromAddress>[email protected]</FromAddress>"
"<ToAddress>[email protected]</ToAddress>"
"<ASubject>Weather Forecast</ASubject>"
"<MsgBody/>",
LAST
);
//
// "<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">"
// "<soap:Body>"
// "<SendMail xmlns=\"urn:EmailIPortTypeInft-
IEmailService\"/>"
// "<FromAddress>[email protected]</FromAddress>"
// "<ToAddress>[email protected]</ToAddress>"
// "<ASubject>Weather Forecast</ASubject>"
// "<MsgBody/>"
// "</SendMail>"
// "</soap:Body>"
// "</soap:Envelope>";
//
// Insert actual forecast text
lr_xml_set_values("Xml={ParamRequest}",
Page 833 of 1812
"ResultParam=ParamRequest",
"Query=Body/SendMail/MsgBody",
HP LoadRunner (11.50)
"ValueParam=ParamForecast",
LAST);
User Guide
VuGen
// Add header for SOAP
web_add_header("SOAPAction", "urn:EmailIPortTypeInft-
IEmailService");
// Get response body
web_reg_save_param("ParamXml", "LB=", "RB=", "Search=body", LAST);
// Send forecast to recipient, using SOAP request
web_custom_request("web_custom_request",
"URL=http://webservices.matlus.com/scripts/emailwebservice.dll/soap/IEmailservice",
"Method=POST",
"TargetFrame=",
"Resource=0",
"Referer=",
"Body={ParamRequest}",
LAST);
// Verify that mail was sent
lr_xml_find("Xml={ParamXml}",
"Query=Body/SendMailResponse/return",
"Value=0",
LAST
);
return 0;
}
How to Use Result Parameters
Some of the lr_xml functions return a result parameter, such as ResultParam. This parameter contains the resulting XML data after the function is executed. The result parameters will be available from the parameter list in the Select or Create Parameter dialog box.
For example, for lr_xml_insert, ResultParam contains the complete XML data resulting from the insertion of the new XML fragment
You can use the result parameters as input to other XML related functions such as Web Service calls. During replay, VuGen captures the value of the result parameter. In a later step, you can use that value as an input argument.
The functions that support result parameters are lr_xml_insert, lr_xml_transform, lr_xml_
replace, lr_xml_delete, and lr_xml_set_values.
The following functions save values to a parameter other than the resultParam: lr_xml_get_values saves values to ValueParam and lr_xml_extract saves values to XMLFragmentParam. These values are also available for parameter substitution.
Use the result parameter as input
1. In the Step Navigator, double-click on an XML step to view its Properties.
2. In the Result XML Parameter box, specify a name for the Result XML parameter (or
ValueParam and XMLFragmentParam).
Page 834 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
3. Reference the parameter name as in input argument.
Page 835 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
For more information, see
"New Web Service Call Dialog Box" on page 685 .
Troubleshooting and Limitations
This section describes troubleshooting and limitations for parameters.
Function argument limitations
You can use parameterization only for the arguments within a function. You cannot parameterize text strings that are not function arguments. In addition, not all function arguments can be parameterized. For details on which arguments you can parameterize, see the Function Reference
(Help > Function Reference) for each function.
For example, consider the lrd_stmt function. The function has the following syntax: lrd_stmt (LRD_CURSOR FAR *mptCursor, char FAR *mpcText, long mliTextLen, LRDOS_INT4 mjOpt1, LRDOS_INT4 mjOpt2, int miDBErrorSeverity);
The indicates that you can parameterize only the mpcText argument.
Page 836 of 1812 HP LoadRunner (11.50)
User Guide
VuGen
A recorded lrd_stmt function could look like this: lrd_stmt(Csr4, "select name from sysobjects where name =\"
Kim\" ", -1,
148, -99999, 0);
You could parameterize the recorded function to look like this: lrd_stmt(Csr4, "select name from sysobjects where name =\"
<name>\" ",
-1, 148, -99999, 0);
Note: You can use the lr_eval_string function to "parameterize" a function argument that you cannot parameterize by using standard parameterization. In addition, you can use the lr_eval_
string function to "parameterize" any string in a Vuser script.
For VB, COM, and Microsoft .NET protocols, you must use the lr.eval string function to define a parameter. For example, lr.eval_string("{Custom_param}").
For more information on the lr_eval_string function, see the Function Reference.
Data table file size limitations
If .dat file's size is over 100MB, a message is displayed that the file is too big and will not be displayed.
If you need to load a file over 100MB, you can change "MaxParametersDisplaySize" parameter in vugen.ini:
[ParamTable]
MaxParametersDisplaySize=100000000
Page 837 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Controller
Welcome to the HP LoadRunner Controller User Guide. This guide presents an overview of the HP
LoadRunner testing process, and describes how to create and run HP LoadRunner scenarios using
HP LoadRunner Controller in a Windows environment.
HP LoadRunner is HP's tool for application performance testing. LoadRunner stresses your entire application to isolate and identify potential client, network, and server bottlenecks.
Understanding LoadRunner
Application Load Testing Overview
Modern system architectures are complex. While they provide an unprecedented degree of power and flexibility, these systems are difficult to test. Whereas single-user testing focuses primarily on functionality and the user interface of a system component, application testing focuses on performance and reliability of an entire system.
For example, a typical application testing scenario might depict 1000 users that log in simultaneously to a system on Monday morning. What is the response time of the system? Does the system crash? To be able to answer these questions and more, a complete application performance testing solution must do the following: l
Test a system that combines a variety of software applications and hardware platforms l
Determine the suitability of a server for any given application l
Test the server before the necessary client software has been developed l
Emulate an environment where multiple clients interact with a single server application l
Test an application under the load of tens, hundreds, or even thousands of potential users
The HP LoadRunner Solution
Traditional or manual testing methods offer only a partial solution to load testing. For example, you can test an entire system manually by constructing an environment where many users work simultaneously on the system. Each user works at a single machine and submits input to the system. However, this manual testing method has the following drawbacks: l
It is expensive, requiring large amounts of both personnel and machinery l
It is complicated, especially coordinating and synchronizing multiple testers l
It involves a high degree of organization, especially to record and analyze results meaningfully l
The repeatability of the manual tests is limited
LoadRunner addresses the drawbacks of manual performance testing: l
LoadRunner reduces personnel requirements by replacing human users with virtual users or
Vusers. These Vusers emulate the behavior of real users operating real applications.
Page 838 of 1812 HP LoadRunner (11.50)
User Guide
Controller l
Because numerous Vusers can run on a single computer, LoadRunner reduces the amount of hardware required for testing.
l
The HP LoadRunner Controller allows you to control all the Vusers from a single point of control.
l
LoadRunner monitors the application performance online, enabling you to fine-tune your system during test execution.
l
LoadRunner automatically records the performance of the application during a test. You can choose from a wide variety of graphs and reports to view the performance data.
l
LoadRunner checks where performance delays occur: network or client delays, CPU performance, I/O delays, database locking, or other issues at the database server. LoadRunner monitors the network and server resources to help you improve performance.
l
Because LoadRunner tests are fully automated, you can repeat them as often as you need.
HP LoadRunner Terminology
l
Scenario. A scenario is a sequence of events that emulate the hypothetical actions of real users on your application.
l
Vusers. In the scenario, LoadRunner replaces real users with virtual users or Vusers. While a workstation accommodates only a single human user, many Vusers can run concurrently on a single workstation. In fact, a scenario can contain tens, hundreds, or even thousands of Vusers.
l
Vuser Scripts. The actions that a Vuser performs during the scenario are described in a Vuser script. When you run a scenario, each Vuser executes a Vuser script. The Vuser scripts include functions that measure and record the performance of your application's components.
l
Transactions. To measure the performance of the server, you define transactions. A transaction represents an action or a set of actions that you are interested in measuring. You define transactions within your Vuser script by enclosing the appropriate sections of the script with start and end transaction statements. For example, you can define a transaction that measures the time it takes for the server to process a request to view the balance of an account and for the information to be displayed at the ATM.
l
Rendezvous points. You insert rendezvous points into Vuser scripts to emulate heavy user load on the server. Rendezvous points instruct Vusers to wait during test execution for multiple
Vusers to arrive at a certain point, so that they may simultaneously perform a task. For example, to emulate peak load on the bank server, you can insert a rendezvous point instructing 100
Vusers to deposit cash into their accounts at the same time.
l
Controller. You use the HP LoadRunner Controller to manage and maintain your scenarios.
Using the Controller, you control all the Vusers in a scenario from a single workstation.
l
Load Generator. When you 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.
l
Performance analysis. Vuser scripts include functions that measure and record system performance during load-testing sessions. During a scenario run, you can monitor the network and server resources. Following a scenario run, you can view performance analysis data in reports and graphs.
Page 839 of 1812 HP LoadRunner (11.50)
User Guide
Controller
The HP LoadRunner Testing Process - Overview
The following section provides a general overview of the HP LoadRunner testing process.
1. Planning the Test
Successful load testing requires that you develop a thorough test plan. A clearly defined test plan will ensure that the LoadRunner scenarios that you develop will accomplish your load testing objectives. For more information, see
"Planning Load Test Scenarios" on page 852
.
2. Creating the Vuser Scripts
Vusers emulate human users interacting with your Web-based application. A Vuser script contains the actions that each Vuser performs during scenario execution.
In each Vuser script, you determine the tasks that will be: n
Performed by each Vuser n
Performed simultaneously by multiple Vusers n
Measured as transactions
For more information on creating Vuser scripts, see the HP Virtual User Generator User Guide.
3. Designing the Scenario
A scenario describes the events that occur during a testing session. A scenario includes a list of machines on which Vusers run, a list of scripts that the Vusers run, and a specified number of Vusers or Vuser groups that run during the scenario. When designing the scenario, you set the scenario configuration and scheduling which determines how all the load generators and
Vusers behave while the scenario runs.
You design scenarios using the Controller. For information about LoadRunner scenarios, see
"Designing Scenarios " on page 863 .
4. Running the Scenario
You emulate user load on the server by instructing multiple Vusers to perform tasks simultaneously. While the scenario runs, LoadRunner measures and records the transactions that you defined in each Vuser script. You can set the level of load by increasing and decreasing the number of Vusers that perform tasks at the same time and you can also monitor your system's performance online. For more information, see
"Running Scenarios " on page
976 .
5. Monitoring the Scenario
You configure the LoadRunner monitoring components to identify bottlenecks on the system and determine which element is causing performance degradation, for example, file locking, resource contention, and network overload. Use LoadRunner in conjunction with the new network and machine monitoring tools to create load and measure performance at different points in the system. For more information on monitoring, see
"Working with LoadRunner
Online Monitors" on page 1043
.
6. Analyzing Test Results
During scenario execution, LoadRunner records the performance of the application under
Page 840 of 1812 HP LoadRunner (11.50)
User Guide
Controller different loads. You use LoadRunner's graphs and reports to analyze the application's performance. For more information about LoadRunner's reports and graphs, see the HP
LoadRunner Analysis User Guide.
HP LoadRunner Vuser Technology
On each Windows load generator, you install the Remote Agent Dispatcher (Process) and a
LoadRunner Agent.
l
Remote Agent Dispatcher. The Remote Agent Dispatcher (Process) enables the Controller to start applications on the load generator.
l
Agent. The LoadRunner Agent enables the Controller and the load generator to communicate with each other. When you run a scenario, the Controller instructs the Remote Agent Dispatcher
(Process) to launch the LoadRunner agent. The agent receives instructions from the Controller to initialize, run, pause, and stop Vusers. At the same time, the agent also relays data on the status of the Vusers back to the Controller.
HP LoadRunner Vuser Types
There are two categories of Vusers:
Protocol Based Vusers
LoadRunner supports various types of Vusers using the most common protocols. Each type is designed to handle different aspects of today's system architectures. You can use the Vuser types in any combination in a scenario in order to create a comprehensive application test.
Vuser types are divided into several categories, indicating their use within common business environments. For example: l
Application Deployment Solution Vusers support the Citrix or Remote Desktop Protocol
(RDP) protocols.
l
Client/Server Vusers support database and socket communication protocols.
Page 841 of 1812 HP LoadRunner (11.50)
User Guide
Controller l
Distributed Components Vusers support COM/DCOM and Microsoft .NET protocols.
l
E-business Vusers support AJAX, HTTP/HTML, and Web Services protocols.
l
ERP/CRM Vusers provide testing for Oracle NCA, SAP, and Siebel systems.
l
Java Vusers support the Jacada, CORBA, RMI, and JMS protocols.
For a complete list of the available Vuser and protocol types, see Vuser Types in the HP Virtual
User Generator User Guide.
GUI Vusers
LoadRunner can integrate functional testing scripts in the form of GUI Vuser scripts into a load testing scenario. These GUI Vuser scripts are created using HP Functional Testing software -
QuickTest or Unified Functional Testing.
You can run only a single GUI Vuser on a Windows-based load generator. Use Citrix to run multiple
GUI Vusers. For additional information on Windows-based GUI Vusers, see
"Using QuickTest or
Unified Functional Testing Scripts in LoadRunner" on page 1009 .
Vuser Technology
Vusers (except for GUI Vusers) generate load on a server by submitting input directly to the server.
Vusers do not operate client applications—they access the server using LoadRunner API functions. These API functions emulate the input from an actual application.
Because Vusers are not reliant on client software, you can use Vusers to test server performance even before the client software has been developed. Further, since Vusers do not have a user interface, the amount of system resources required is minimal. This allows you to run large numbers of Vusers on a single workstation.
The following example illustrates the use of Vusers: Suppose that you have a Web-based database server that maintains your customer information. The information is accessed by numerous customer service personnel who are located throughout the country. The server receives the queries, processes the requests, and returns responses via the Web to field personnel.
You want to test the response times of the entire system when numerous service personnel simultaneously access the server. Using LoadRunner, you could create several hundred Vusers, each Vuser accessing the server database. The Vusers enable you to emulate and measure the performance of your database and Web servers under the load of many users.
You develop a Vuser script to define the actions of a Vuser. A Vuser script includes functions that control the script execution, specify the input that the Vuser submits to the server, and measure the server performance.
Page 842 of 1812 HP LoadRunner (11.50)
User Guide
Controller
You develop Vuser scripts either by recording with HP Virtual User Generator (VuGen) or by using
LoadRunner's Vuser script templates.
For the database server example above, you could create a Vuser script that performs the following actions: l
Logs in to the Web application l
Connects to the database server l
Submits an SQL query l
Retrieves and processes the server response l
Disconnects from the server and the Web
You can create Vuser scripts on a Windows-based platform, or program them on a Linux platform.
For a list of the supported Linux platforms, see the HP LoadRunner Readme file. For more information about Vusers, see the HP Virtual User Generator User Guide.
Controller Window
The Controller window enables you to design and run load test scenarios, and view Diagnostics for
J2EE/.NET data.
Page 843 of 1812 HP LoadRunner (11.50)
User Guide
Controller
UI Example
To access
Start > Program Files > LoadRunner > LoadRunner > Load Testing tab >Run Load Test
Start > Program Files > LoadRunner > Applications > Controller
Important information
By default, upon opening the Controller, the New Scenario dialog box is displayed. To disable this option, clear the Show at Startup option. For details, see
"New Scenario Dialog Box " on page 883
.
Relevant tasks
l
"How to Design a Goal-Oriented Scenario " on page 866
l
"How to Design a Manual Scenario " on page 868
l
"How to Run a Scenario" on page 977
l
"How to Set Up the Monitoring Environment – Workflow" on page 1044
User interface elements are described below:
UI Element Description
New Scenario. Opens New Scenario dialog box. For user interface details, see
"New Scenario Dialog Box " on page 883 .
Page 844 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Open Scenario. Enables you to open an existing scenario.
Save Scenario. Enables you to save the active scenario.
Edit scenario goal. Opens the Edit Scenario Goal dialog box where you define goals for a goal-oriented scenario. For user interface details, see
"Edit
Scenario Goal Dialog Box " on page 879 .
(Goal-oriented scenario; Run view only)
(Run view only)
(Run view only)
(Run view only)
Load Generators. Opens the Load Generators dialog box where you can add new load generators and view details about existing load generators. For user interface details, see
"Load Generators Dialog Box " on page 907 .
Initialize Vusers. Initializes all Vusers (ar those that are still in the Down state) in a selected Vuser group. The group's status changes from Down to
Pending to Initializing to Ready. If the group fails to initialize, the status changes to Error.
By initializing all of the Vusers in a group before running them, you can ensure that they all begin executing the scenario at the same time.
Run Vusers Until Complete. Runs all Vusers in a selected Vuser group until completion. If you run a Vuser group in the Down or Error state, LoadRunner initializes and then runs the group.
Note: You can instruct LoadRunner to randomly run only one Vuser in a Vuser group by right-clicking the group and selecting Run one Vuser Until
Complete. A Vuser script log opens, displaying run-time information about the
Vuser. For more information, see
"Vuser Script Log " on page 1001
Gradual Stop. Gradually stops a Vuser group in the Run state if you selected the Wait for the current iteration to end before exiting or Wait for the
current action to end before exiting options in the Run-Time Settings tab of the Options dialog box.
Stop Vusers. Immediately stops all Vusers in selected Vuser groups from executing their scripts.
(Run view only)
Analyze Results. Opens diagnostics results.
(Run view only)
Invoke VuGen. Invokes HP Virtual User Generator.
Invoke Analysis. Invokes HP LoadRunner Analysis.
Design tab
Enables you to design scenarios. For details, see
"Design Tab" on page 876
.
Diagnostics for
J2EE/.NET tab
Enables you to view J2EE/.NET diagnostics data collected from a scenario run. For details, see the HP Diagnostics User Guide.
Run tab
Enables you to run and monitor scenario runs. For details, see
"Run Tab" on
Page 845 of 1812 HP LoadRunner (11.50)
User Guide
Controller
<Status bar>
page 995
.
Displays the following features of Controller (if enabled): l
Application Lifecycle Management Connection l
IP Spoofer l
Auto Collate Results l
Auto Load Analysis
License Utility
LoadRunner License Utility
To run Vusers from the LoadRunner Controller, you need the appropriate LoadRunner licenses.
These licenses must be installed on the computer on which the LoadRunner Controller is installed.
You use the LoadRunner License Utility to manage your LoadRunner licenses. The LoadRunner
License Utility enables you to: l
View the details of licenses that are currently installed.
l
Install additional licenses.
To access
Select Start > All Programs > HP Software > HP LoadRunner > License >
LoadRunner License Utility.
Important information
Using the LoadRunner License Utility, you can install a new license by using either a license file or a license key.
l
License file. When you purchase a new license, HP may send you an email with an attached license file. The license file contains the license keys for one or more licenses. When you use the license file to install the new licenses, the
LoadRunner License Utility reads the license file and extracts all the license keys that are included in the license file. You can then select which of the available licenses to install. You may choose to use a license file to install
LoadRunner licenses because the license file enables you to install multiple licenses simultaneously.
l
License key. Unlike a license file, a license key enables you to install just a single license at a time. You may receive the license key directly from HP, or the license key may be included in a license file that you receive from HP.
"How to Install a New License" on page 850
Relevant tasks
See also
"Additional Information About VUD Licenses" on page 851
The table below describes the LoadRunner License Utility UI elements:
UI Element
Host ID
Description
Identifies the computer on which the Controller is installed. You may need
Page 846 of 1812 HP LoadRunner (11.50)
User Guide
Controller
UI Element Description
to provide the Host ID when purchasing new LoadRunner licenses. To obtain new LoadRunner licenses, click the Contact HP to purchase a
new license link at the bottom of the LoadRunner License Utility.
License Summary Displays a list of the LoadRunner licenses that are installed on the
Controller computer. Click on any license in the table to display additional details about the license. The Vuser protocols included in the selected
license box displays a list of the Vuser protocols that are included in the selected license.
Status Indicates the status of the license.
Locked
License Bundle
Type l
Valid
. Indicates that the license in current and functional.
l
Invalid
. Indicates that the license is no longer valid.
n
A time-limited license becomes invalid after its expiration date passes.
n
An Evaluation license or an Instant on license becomes invalid if a
Time limited, Permanent, or VUD license is installed for the same
Vuser bundle.
n
A VUD license becomes invalid when the remaining capacity is zero.
By default, the License Summary table does not show invalid licenses.
Select the Show invalid licenses check box to show invalid licenses.
Note that a license may become temporarily invalid if the LoadRunner
License Utility detects that the system clock has been tampered with.
To restore the affected licenses, reset the system clock to the current date and time.
l
To be Expired
. Indicates that the license will expire within 30 days.
Locked. Indicates that the license can be installed only on the computer on which it is currently installed – not on any other computer.
Unlocked. Indicates that the license can be installed on any computer.
Indicates the name of the Vuser protocol bundle to which the license applies. The license enables the Controller to run Vusers of any protocol that is included in the protocol bundle. To display a list of the Vuser protocols that are included in a bundle, click the license in the License
Summary table. A list of the associated Vuser protocols is displayed at the bottom of the LoadRunner License Utility.
Note that a Partner License icon that appears to the left of a license bundle indicates that the license is for a LoadRunner partner, and not for standard LoadRunner Vuser protocols. Partner licenses enable third-party applications to be controller by the LoadRunner Controller. Partner licenses operate the same as standard LoadRunner licenses.
Indicates the type of license:
Page 847 of 1812 HP LoadRunner (11.50)
User Guide
Controller
UI Element
Expiration Date
Capacity
Show invalid licenses
Vuser protocols included in the selected license
Install New
Licenses
Description
l
Instant on licenses are installed when LoadRunner is first installed.
Note that the expiration date of an Instant On license is calculated based on the date on which LoadRunner is first installed. You cannot extend the Expiration Date of an Instant On license by uninstalling and then reinstalling LoadRunner.
l
Evaluation licenses are supplied to enable potential customers to evaluate LoadRunner functionality.
l
Time limited licenses are valid for a limited period only. Time limited licenses are typically issued for 60 or 365 days.
l
Permanent licenses do not expire - there is no time limit to the validity of these licenses.
l
VUD licenses are issued with a limited capacity. The capacity is defined by the measurement Vuser-days or VUDs. For example, the capacity of a VUD license may be 1000 VUDs. Each day that the
Controller is used to run Vusers, the maximum number of Vusers that ran simultaneously on that day is deducted from the remaining license capacity. If a maximum of 200 Vusers ran on day 1, then 800 VUDs will remain in the license.
Note that a VUD license may have an expiration date and therefore be time-limited.
For more information, see
"Additional Information About VUD Licenses" on page 851
.
Indicates the date and time when Time limited, Instant on, VUD, and
Evaluation licenses expire.
l
For Instant on, Evaluation, Time Limited, and Permanent licenses,
Capacity indicates the maximum number of Vusers [of the type specified by the license bundle] that can be run simultaneously from the
LoadRunner Controller.
l
For VUD licenses, Capacity indicates the number of VUDs that remain in the license.
Select this check box to show invalid licenses in the list of LoadRunner licenses that are installed.
Displays the Vuser protocols that are included in the selected license.
Opens the New License dialog box which enables you to install new
LoadRunner licenses. For details, see
"How to Install a New License" on page 850 .
Page 848 of 1812 HP LoadRunner (11.50)
User Guide
Controller
LoadRunner License Utility - New License
The LoadRunner License Utility - New License dialog box enables you to install a new license by using either a license file or a license key.
l
License file. When you purchase a new license, HP may send you an email with an attached license file. The license file contains the license keys for one or more licenses. When you use the license file to install the new licenses, the LoadRunner License Utility reads the license file and extracts all the license keys that are included in the license file. You can then select which of the available licenses to install. You may choose to use a license file to install LoadRunner licenses because the license file enables you to install multiple licenses simultaneously.
l
License key. Unlike a license file, a license key enables you to install just a single license at a time. You may receive the license key directly from HP, or the license key may be included in a license file that you receive from HP.
To access
Select Start > All Programs > HP Software > HP LoadRunner > License >
LoadRunner License Utility, and then click Install New Licenses.
Important information
Before you install a new LoadRunner license, ensure that you have the required license file or license key.
"How to Install a New License" on next page
Relevant tasks
See also
"Additional Information About VUD Licenses" on page 851
The table below describes the LoadRunner License Utility - New License dialog box UI elements:
UI Element Description
Install licenses using a license file
Select this option if you want to use a license file to install the new licenses.
License File Click Browse and then select the license file that was sent to you by HP.
Displays the content of the license file in the table below.
View License File
Content
Select the licenses to install
Install
Select the check boxes for the licenses to install.
License Bundle
Type
Indicates the name of the Vuser protocol bundle to which the license applies. The license enables the Controller to run Vusers of any protocol that is included in the protocol bundle.
Indicates the name of the Vuser protocol bundle to which the license applies. The license enables the Controller to run Vusers of any protocol that is included in the protocol bundle.
Indicates the type of license:
Page 849 of 1812 HP LoadRunner (11.50)
User Guide
Controller
UI Element
Expiration Date
Capacity
Description
l
Evaluation licenses are supplied to enable potential customers to evaluate LoadRunner functionality.
l
Time limited licenses are valid for a limited period only. Time limited licenses are typically issued for 60 or 365 days.
l
Permanent licenses do not expire - there is no time limit to the validity of these licenses.
l
VUD licenses are issued with a limited capacity. The capacity is defined by the measurement Vuser-days or VUDs. For example, the capacity of a VUD license may be 1000 VUDs. Each day that the Controller is used to run Vusers, the maximum number of Vusers that ran simultaneously on that day is deducted from the remaining license capacity. For example, if a maximum of 200 Vusers ran on day 1, then 800 VUDs will remain in the license. For the calculation of used VUDs, you can specify at what time each new day begins. To change the time at which a new day begins, click the VUDs will begin at link at the bottom of the
LoadRunner License Utility.
Note that a VUD license may have an expiration date and therefore be time-limited.
For more information, see
"Additional Information About VUD Licenses" on next page
.
Indicates the date and time when Time limited, Instant On, VUD, and
Evaluation licenses expire.
l
For Evaluation, Time Limited, and Permanent licenses, Capacity indicates the maximum number of Vusers [of the type specified by the license bundle] that can be run simultaneously from the LoadRunner
Controller.
l
For VUD licenses, Capacity indicates the number of VUDs that remain in the license.
Select this option if you want to use a license key to install the new license, and then enter the license key that was sent to you by HP.
Install a license using a license key
Install
Close
Installs the licenses contained in the license file or license key.
Closes the LoadRunner License Utility - New License dialog box.
How to Install a New License
For information about LoadRunner licenses, see
"LoadRunner License Utility" on page 846
.
To install a new LoadRunner license:
Page 850 of 1812 HP LoadRunner (11.50)
User Guide
Controller
1. Select Start > All Programs > HP Software > HP LoadRunner > License > LoadRunner
License Utility.
2. In the LoadRunner License Utility, click Install New Licenses. The LoadRunner License
Utility - New License dialog box opens.
To install using a license file
a. Click the Browse button to the right of License File, and locate the license file that was sent to you by HP.
b. Click View License File Content to display details of the licenses that are included in the license file.
c. In the list of licenses included in the license file, select the licenses to install.
To install using a license key
a. Click Install a license using a license key.
b. Enter the license key that you received from HP.
3. Click Install. The selected licenses are installed.
4. Click Close. In the License Summary table, make sure that the new licenses appear in the list of installed licenses.
Additional Information About VUD Licenses
To run Vusers from the LoadRunner Controller, you need the appropriate LoadRunner licenses.
There are various types of LoadRunner licenses. VUD licenses are issued with a limited capacity.
The capacity is defined by the measurement Vuser-days or VUDs. For details on how to install
VUD licenses, see
"LoadRunner License Utility" on page 846 .
Additional information about VUD licenses:
l
For the calculation of VUDs consumed in a VUD license, you can specify at what time each new day begins. LoadRunner determines the maximum number of Vusers that ran during the 24 hour period after the start time. To change the time at which a new day begins, click the VUDs
will start at time link at the bottom of the LoadRunner License Utility.
l
If you have both a regular license [Instant On, Evaluation, Time limited, or Permanent] and a
VUD license for a particular Vuser protocol, LoadRunner will always use the regular license before deducting from the VUD license. Thus, if 500 Vusers were run on a particular day, and there is a regular license for 400 Vusers, then 100 VUDs will be deducted from the VUD license.
l
A Vuser is included in the VUD count as soon as the Vuser reaches the Initialization status in a scenario.
l
Consumed VUDs are deducted from the available VUD capacity at the start of the following day.
l
If a scenario runs for more than one day, the maximum VUD usage is calculated and deducted based on the day that the scenario run started.
Page 851 of 1812 HP LoadRunner (11.50)
User Guide
Controller l
A multi-protocol Vuser will run only if licenses are available for all protocols in the Vuser script.
Therefore, if a Vuser script includes protocols from two different protocol bundles, you will need licenses for both bundles to run the Vuser script.
l
A VUD license may have an expiration date and therefore be time-limited.
Designing Load Test Scenarios
Planning Load Test Scenarios
Load Test Planning Overview
As in any type of system testing, a well-defined test plan is the first essential step to successful testing. Planning your load testing helps you to: l
Build test scenarios that accurately emulate your working environment.
Load testing means testing your application under typical working conditions, and checking for system performance, reliability, capacity, and so forth.
Before running your load test, it is important to: l
Understand which resources are required for testing.
Application testing requires hardware, software, and human resources. Before you begin testing, you should know which resources are available and decide how to use them effectively.
l
Define success criteria in measurable terms.
Focused testing goals and test criteria ensure successful testing. For example, it is not enough to define vague objectives like "Check server response time under heavy load." A more focused success criterion would be "Check that 50 customers can check their account balance simultaneously, and that the server response time will not exceed one minute."
Load Testing Objectives
Your test plan should be based on a clearly defined testing objective.
The following table presents common application testing objectives that LoadRunner helps you test, as described in Robert W. Buchanan, Jr's The Art of Testing Network Systems (John Wiley &
Sons, Inc., 1996). More details on these objectives appear after the table.
Objective
Measuring end-user response time
Defining optimal hardware configuration
Checking reliability
Answers the Question
How long does it take to complete a business process?
Which hardware configuration provides the best performance?
How hard or long can the system work without errors or failures?
Page 852 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Checking hardware or software upgrades
Evaluating new products
Measuring system capacity
Identifying bottlenecks
How does the upgrade affect performance or reliability?
Which server hardware or software should you choose?
How much load can the system handle without significant performance degradation?
Which element is slowing down response time?
Measuring End-User Response Time
Check how long it takes for the user to perform a business process and receive a response from the server. For example, suppose that you want to verify that while your system operates under normal load conditions, the end users receive responses to all requests within 20 seconds. The following graph presents a sample load vs. response time measurement for a banking application:
Defining Optimal Hardware Configuration
Check how various system configurations (memory, CPU speed, cache, adaptors, modems) affect performance. Once you understand the system architecture and have tested the application response time, you can measure the application response for different system configurations to determine which settings provide the desired performance levels.
For example, you could set up three different server configurations and run the same tests on each configuration to measure performance variations.
Checking Reliability
Determine the level of system stability under heavy or continuous work loads. You can use
LoadRunner to create stress on the system: force the system to handle extended activity in a compressed time period to simulate the kind of activity a system would normally experience over a period of weeks or months.
Checking Hardware or Software Upgrades
Perform regression testing to compare a new release of hardware or software to an older release.
You can check how an upgrade affects response time (benchmark) and reliability. Application regression testing does not check new features of an upgrade; rather it checks that the new release is as efficient and reliable as the older release.
Page 853 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Evaluating New Products
You can run tests to evaluate individual products and subsystems during the planning and design stage of a product's life cycle. For example, you can choose the hardware for the server machine or the database package based on evaluation tests.
Identifying Bottlenecks
You configure the LoadRunner monitoring components to identify bottlenecks on the system and determine which element is causing performance degradation, for example, file locking, resource contention, and network overload. Use LoadRunner in conjunction with the new network and machine monitoring tools to create load and measure performance at different points in the system.
For more information on monitoring, see
"Monitoring Process Overview" on page 1043 .
Measuring System Capacity
Measure system capacity, and determine how much excess capacity the system can handle without performance degradation. To check capacity, you can compare performance versus load on the existing system, and determine where significant response-time degradation begins to occur.
This is often called the "knee" of the response time curve.
Once you determine the current capacity, you can decide if resources need to be increased to support additional users.
How to Plan a Load Test
This task describes how to plan a load test.
Page 854 of 1812 HP LoadRunner (11.50)
User Guide
Controller
1. Analyze the application
You should become thoroughly familiar with the hardware and software components, the system configuration, and the typical usage model. This analysis ensures that the testing environment you create using LoadRunner will reflect the environment and configuration of the application under test. For task details, see
"How to Analyze the Application" below .
2. Define the load testing objectives
Before you begin testing, you should define exactly what you want to accomplish. For task details, see
"How to Define the Load Test Objectives" on page 857 .
3. Plan LoadRunner implementation
Decide how to use LoadRunner to achieve your testing goals. For task details, see
"How to
Plan the LoadRunner Implementation" on page 858
.
How to Analyze the Application
This task describes how to analyze the application under test as part of the load test planning process. Each step in this task contains example information relating to an online banking system.
1. Identify system components
Draw a schematic diagram to illustrate the structure of the application. If possible, extract a schematic diagram from existing documentation. If the application under test is part of a larger network system, you should identify the component of the system to be tested. Make sure the diagram includes all system components, such as client machines, network, middleware, and servers.
Example
The following diagram illustrates an online banking system that is accessed by many Web users. The Web users each connect to the same database to transfer funds and check balances. The customers connect to the database server through the Web, using multiple browsers.
Page 855 of 1812 HP LoadRunner (11.50)
User Guide
Controller
2. Describe the system configuration
Enhance the schematic diagram with more details. Describe each system component's configuration. You should be able to answer the following questions: n
How many users are anticipated to connect to the system?
n
What is the application client's machine configuration (hardware, memory, operating system, software, development tool, and so forth)?
n
What types of database and Web servers are used (hardware, database type, operating system, file server, and so forth)?
n
How does the server communicate with the application client?
n
What is the middleware configuration and application server between the front-end client and back-end server?
n
What other network components may affect response time (modems and so forth)?
n
What is the throughput of the communications devices? How many concurrent users can each device handle?
Example
The schematic diagram of the online banking system specified that there are multiple application clients accessing the system.
Front-End Client Configuration
Anticipated number of application clients 50 concurrent application clients
Page 856 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Hardware / Memory
Operating system & version
Client browser
Pentium IV/ 1GB
Windows 2003
Internet Explorer 6.0 SP1
3. Analyze the usage mode
Define how the system is typically used, and decide which functions are important to test.
Consider who uses the system, the number of each type of user, and each user's common tasks. In addition, consider any background load that might affect the system response time.
Example
Suppose 200 employees log on to the accounting system every morning, and the same office network has a constant background load of 50 users performing various word processing and printing tasks. You could create a LoadRunner scenario with 200 virtual users signing in to the accounting database, and check the server response time.
To check how background load affects the response time, you could run your scenario on a network where you also simulate the load of employees performing word processing and printing activities.
4. Examine task distribution
In addition to defining the common user tasks, examine the distribution of these tasks.
Example
Suppose the bank uses a central database to serve clients across many states and time zones. The 250 application clients are located in two different time zones, all connecting to the same Web server. There are 150 in Chicago and 100 in Detroit. Each begins their business day at 9:00 AM, but since they are in different time zones, there should never be more than 150 users signing in at any given time. You can analyze task distribution to determine when there is peak database activity, and which activities typically occur during
peak load time.
How to Define the Load Test Objectives
This task describes how to define the load test objectives as part of the load test planning process.
1. Decide on general objectives
For a list of suggested testing objectives, see
"Examining Load Testing Objectives " on page
861 .
2. State the objectives in measurable terms
Once you decide on your general load testing objectives, you should identify more focused goals by stating your objectives in measurable terms. To provide a baseline for evaluation,
Page 857 of 1812 HP LoadRunner (11.50)
User Guide
Controller determine exactly what constitutes acceptable and unacceptable test results.
Example
General Objective. Product Evaluation: choose hardware for the Web server.
Focused Objective. Product Evaluation: run the same group of 300 virtual users on two different servers, HP and NEC. When all 300 users simultaneously browse the pages of your Web application, determine which hardware gives a better response time.
3. Decide when to test
Load testing is necessary throughout the product life cycle. The following table illustrates what types of tests are relevant for each phase of the product life cycle:
Planning and Design
Evaluate new products
Measure response time
Development
Measure response time
Deployment
Check reliability
Check optimal hardware configuration
Measure response time
Production Evolution
Measure response time
Check HW or
SW upgrades
Identify bottlenecks
Measure system capacity
Check HW or SW upgrades
Measure system capacity
Check reliability
How to Plan the LoadRunner Implementation
This task describes how to plan the LoadRunner implementation as part of the load test planning process.
1. Define the scope of performance measurements
You can use LoadRunner to measure response time at different points in the application.
Determine where to run the Vusers and which Vusers to run according to the test objectives: n
Measuring end-to-end response time. You can measure the response time that a typical user experiences by running a GUI Vuser at the front end. GUI Vusers emulate real users by submitting input to and receiving output from the client application.
You can run GUI Vusers at the front end to measure the response time across the entire network, including a terminal emulator or GUI front end, network, and server.
Page 858 of 1812 HP LoadRunner (11.50)
User Guide
Controller n
Measuring network and server response times. You can measure network and server response time, excluding response time of the GUI front end, by running Vusers (not GUI) on the client machine. Vusers emulate client calls to the server without the user interface.
When you run many Vusers from the client machine, you can measure how the load affects network and server response time.
n
Measuring GUI response time. You can determine how the client application interface affects response time by subtracting the previous two measurements:
GUI response time = end-to-end - network and serve r n
Measuring server response time. You can measure the time it takes for the server to respond to a request without going across the network. When you run Vusers on a machine directly connected to the server, you can measure server performance.
Page 859 of 1812 HP LoadRunner (11.50)
User Guide
Controller n
Measuring middleware-to-server response time. You can measure response time from the server to middleware if you have access to the middleware and its API. You can create
Vusers with the middleware API and measure the middleware-server performance.
2. Define Vuser activities
Create Vuser scripts based on your analysis of Vuser types, their typical tasks, and your test objectives. Since Vusers emulate the actions of a typical end-user, the Vuser scripts should include the typical end-user tasks. For example, to emulate an online banking client, you should create a Vuser script that performs typical banking tasks. You would browse the pages that you normally visit to transfer funds or check balances.
You decide which tasks to measure based on your test objectives and define transactions for these tasks. Transactions measure the time that it takes for the server to respond to tasks submitted by Vusers (end-to-end time). For example, to check the response time of a bank
Web server supplying an account balance, define a transaction for this task in the Vuser script.
In addition, you can emulate peak activity by using rendezvous points in your script.
Rendezvous points instruct multiple Vusers to perform tasks at exactly the same time. For example, you can define a rendezvous to emulate 70 users simultaneously updating account information.
3. Select Vusers
Before you decide on the hardware configuration to use for testing, determine the number and type of Vusers required. To decide how many Vusers and which types to run, look at the typical usage model, combined with the testing objectives. Some general guidelines are: n
Use one or a few GUI users to emulate each type of typical user connection.
n
Run multiple Vusers to generate the rest of the load for each user type.
Page 860 of 1812 HP LoadRunner (11.50)
User Guide
Controller
For example, suppose that you have five kinds of users, each performing a different business process:
Usage Model
100 customer service users in New York (LAN connection) 2
30 customers in Europe (dial-in ISDN connection) 2
5 background batch processes
GUI Other
_
98
28
5
150 customers (terminal connection)
6 managers
_
2
_
4
4. Choose testing hardware/software
The hardware and software should be powerful and fast enough to emulate the required number of virtual users. Refer to the HP LoadRunner Installation Guide for specific hardware requirements.
To decide on the number of machines and correct configuration, consider the following: n
It is advisable to run HP LoadRunner Controller on a separate machine.
n
Each GUI Vuser requires a separate Windows-based machine; several GUI Vusers can run on a single Linux machine.
n
Configuration of the test machine for GUI Vusers should be as similar as possible to the actual user's machine.
Note: The results file requires a few MB of disk space for a long scenario run with many transactions. The load generators also require a few MB of disk space for temporary files if there is no NFS. For more information about run-time file storage, see
"Run-Time File
Storage Locations " on page 958 .
Examining Load Testing Objectives
Your test plan should be based on a clearly defined testing objective. This section presents an overview of common testing objectives:
This section includes: l
"Examining Load Testing Objectives " above
l
"Examining Load Testing Objectives " above
l
"Examining Load Testing Objectives " above
l
"Examining Load Testing Objectives " above
l
"Examining Load Testing Objectives " above
l
"Examining Load Testing Objectives " above
l
"Examining Load Testing Objectives " above
Page 861 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Measuring End-User Response Time
Check how long it takes for the user to perform a business process and receive a response from the server. For example, suppose that you want to verify that while your system operates under normal load conditions, the end users receive responses to all requests within 20 seconds. The following graph presents a sample load vs. response time measurement for a banking application:
Defining Optimal Hardware Configuration
Check how various system configurations (memory, CPU speed, cache, adaptors, modems) affect performance. Once you understand the system architecture and have tested the application response time, you can measure the application response for different system configurations to determine which settings provide the desired performance levels.
For example, you could set up three different server configurations and run the same tests on each configuration to measure performance variations.
Checking Reliability
Determine the level of system stability under heavy or continuous work loads. You can use
LoadRunner to create stress on the system: force the system to handle extended activity in a compressed time period to simulate the kind of activity a system would normally experience over a period of weeks or months.
Checking Hardware or Software Upgrades
Perform regression testing to compare a new release of hardware or software to an older release.
You can check how an upgrade affects response time (benchmark) and reliability. Application regression testing does not check new features of an upgrade; rather it checks that the new release is as efficient and reliable as the older release.
Evaluating New Products
You can run tests to evaluate individual products and subsystems during the planning and design stage of a product's life cycle. For example, you can choose the hardware for the server machine or the database package based on evaluation tests.
Identifying Bottlenecks
You can run tests that identify bottlenecks on the system and determine which element is causing performance degradation, for example, file locking, resource contention, and network overload. Use
LoadRunner in conjunction with the new network and machine monitoring tools to create load and measure performance at different points in the system. For more information, see
"Monitoring Load
Test Scenarios" on page 1043
Page 862 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Measuring System Capacity
Measure system capacity, and determine how much excess capacity the system can handle without performance degradation. To check capacity, you can compare performance versus load on the existing system, and determine where significant response-time degradation begins to occur.
This is often called the "knee" of the response time curve.
Once you determine the current capacity, you can decide if resources need to be increased to support additional users.
Designing Scenarios
Load Test Scenarios Overview
To test your system with LoadRunner, you must create a load test scenario. A scenario defines the events that occur during each testing session. It defines and controls the number of users to emulate, the actions that they perform, and the machines on which they run their emulations.
Before you design a scenario, you should have a a well-defined test plan in mind. For more details, see
"Planning Load Test Scenarios" on page 852 .
You design scenarios in the Design tab of the Controller. After you design the scenario,
LoadRunner saves the information in a scenario file (.lrs).
You can design the following types of scenarios:
Page 863 of 1812 HP LoadRunner (11.50)
User Guide
Controller l
"Manual Scenarios " below
l
"Goals Types for Goal-Oriented Scenarios " on next page
Manual Scenarios
You build a manual scenario by selecting scripts to run, assigning load generators on which to run the scripts, and distributing Vusers to run among the scripts.
You can design a manual scenario in one of the following modes: l
Vuser group mode. In this mode, each script you select for the scenario is assigned to a Vuser group. You assign a number of Vusers to each Vuser group that you create. You can instruct all
Vusers in a group to run the same script on the same load generator, or you can assign different scripts and load generators to the various Vusers in a group.
l
Percentage mode. In this mode, you define a total number of Vusers to be used in the scenario, and assign load generators and a percentage of the total number of Vusers to each script.
After you define which Vuser groups/scripts to run in the scenario, you select or build a schedule by which to run the scenario. For more information, see
"Scheduling Manual Scenarios " on page
909 .
You can also create Service Level Agreements (SLAs) which are specific goals that you define for your load test scenario. When you run the scenario, LoadRunner gathers and stores performance-related data. When you analyze the run, Analysis compares this data against the
SLAs and determines SLA statuses for the defined measurements. For more information, see
"Service Level Agreements " on page 923 .
Changing Scenario Modes
You can convert a scenario from the Vuser group mode to the percentage mode and vice versa.
The following table describes what happens to the scenario when converting from the one mode to the other:
Vuser group mode to percentage mode
l
If a Vuser group contains multiple scripts, in percentage mode the scripts are listed one by one in the Scenario Scripts pane.
l
In the percentage mode, all load generators are assigned to all Vuser scripts by default. If multiple load generators are assigned to a Vuser group, the Vusers assigned to the scripts in the percentage mode are distributed evenly among the load generators originally assigned to the group.
If you defined group schedules for the Vuser groups, these settings will be lost. All profiles will contain schedule by scenario settings only. For details about scheduling scenarios, see
"Scheduling Manual Scenarios " on page 909
.
Percentage mode to
Vuser group mode
l
Each script is converted to a Vuser group.
l
If you defined multiple load generators for a Vuser script, the Vuser group that is created when converting the scenario will also contain multiple load generators.
l
If a schedule is defined for the scenario, all the schedule settings remain unchanged.
Page 864 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Note: You can convert from one scenario mode to another at any time. For details, see
"How to Change the Scenario Mode (Manual Scenario)" on page 869
.
Goals Types for Goal-Oriented Scenarios
In a goal-oriented scenario, you define the goals you want your test to achieve and LoadRunner automatically builds a scenario for you based on these goals.
You can define the following types of goals for a goal-oriented scenario: l
Virtual Users
This goal tests if your application can run a specified number of Vusers simultaneously. Running this type of goal-oriented scenario is similar to running a manual scenario.
l
Pages per Minute/Hits per Second/Transactions per Second
These goals test the strength of your server. For each of these goal types, you specify a minimum-maximum range of Vusers for the scenario to run, and in the case of the Transactions per Second goal type, you also specify a transaction name.
Note:
n
Pages per Minute and Hits per Second goals are for Web Vusers only.
n
Hits per second relates to HTTP requests per second.
When you define one of these goal type, the Controller divides the target defined by the minimum number of Vusers specified, and determines the target number of hits/transactions per second or pages per minute that each Vuser should reach.
The Controller then begins loading the Vusers according to the load behavior settings you defined, as follows: n
If you selected to run the Vusers automatically, LoadRunner loads 50 Vusers in the first batch.
If the maximum number of Vusers defined is less than 50, LoadRunner loads all of the Vusers simultaneously.
n
If you chose to reach your target after a certain period of the scenario elapses, LoadRunner attempts to reach the defined target within this period of time. It determines the size of the first batch of Vusers based on the time limit you defined and the calculated target number of hits, transactions, or pages per Vuser.
n
If you chose to reach your target by gradation (x number of pages/hits every x amount of time),
LoadRunner calculates the target number of hits or pages per Vuser and determines the size of the first batch of Vusers accordingly. (Not relevant for the Transactions per Second goal type).
After running each batch of Vusers, LoadRunner evaluates whether the target for the batch was achieved. If the batch target was not reached, LoadRunner recalculates the target number of hits, transactions, or pages per Vuser, and readjusts the number of Vusers for the next batch to be able to achieve the defined goal. By default, a new batch of Vusers is released every two minutes.
Page 865 of 1812 HP LoadRunner (11.50)
User Guide
Controller
If the goal has not been reached after the Controller has launched the maximum number of
Vusers, LoadRunner attempts to reach the defined target once more by recalculating the target number of hits, transactions, or pages per Vuser, and running the maximum number of Vusers simultaneously.
A Pages per Minute or Hits/Transactions per Second goal-oriented scenario is assigned a Failed status if: n
The Controller has twice attempted to reach the goal using the maximum number of Vusers specified, and the goal could not be reached.
n
No pages per minute or hits/transactions per second were registered after the first batch of
Vusers was run.
n
The number of pages per minute or hits/transactions per second did not increase after the
Controller ran a certain number of Vuser batches.
n
All the Vusers that ran failed.
n
There were no available load generators for the type of Vusers you attempted to run.
l
Transaction Response Time
This goal tests how many Vusers can be run simultaneously without exceeding a desired transaction response time. You specify the name of the transaction in your script that you want to test, and a minimum-maximum range of Vusers for LoadRunner to run. The transaction response time you specify should be a predefined threshold value.
For example, if you do not want a customer to wait more than five seconds to log in to your ecommerce site, specify a maximum acceptable transaction response time of five seconds. Set the minimum and maximum number of Vusers to the minimum-maximum range of customers you want to be able to serve simultaneously.
If the scenario does not reach the maximum transaction response time that you defined, your server is capable of responding within a reasonable period of time to the number of customers you want to be able to serve simultaneously. If the defined response time is reached after only a portion of the Vusers has been executed, or if you receive a message that the defined response time will be exceeded if the Controller uses the maximum number of Vusers defined, you should consider revamping your application and/or upgrading your server software and hardware.
Notes about Transactions per Second or Transaction Response Time goals:
n
To achieve a Transactions per Second or Transaction Response Time goal, your script must contain transactions. For each of these goal types, you define the transaction in the script that you want to test.
n
For a Transaction Response Time goal-oriented scenario to be effective, you must choose your transaction carefully, ensuring that it performs effective hits on the server.
How to Design a Goal-Oriented Scenario
This task describes how to design a goal-oriented scenario. In this type of scenario, you define the goals you want your test to achieve and LoadRunner automatically builds a scenario for you based
Page 866 of 1812 HP LoadRunner (11.50)
User Guide
Controller on these goals.
1. Prerequisites n
Before setting up the scenario, decide which goal you want the scenario to reach. For details on types of scenario goals, see
"Goals Types for Goal-Oriented Scenarios " on page 865 .
n
Before you start designing the scenario, record the VuGen scripts that will run in the scenario. For details, see the HP Virtual User Generator User Guide.
2. Open a new goal-oriented scenario a. On the Controller toolbar, click the New Scenario button .
b. In the New Scenario dialog box that opens, select Goal-oriented Scenario.
c. Select scripts to run in the scenario. Select scripts in the Available Scripts box, and click
Add to move them to the Scripts in Scenario box.
When you click OK, the Design tab opens and displays the new scenario.
3. Add load generators to the scenario
Click the Load Generators button . In the Load Generators dialog box that opens, click
Add and enter the details of the load generator you are adding. For details about the Add Load
Generator dialog box, see
"Add Load Generator/Load Generator Information Dialog Box " on page 896 .
4. Assign load generators to each script
In the Scenario Scripts pane, for each script, click the Load Generators column and select a load generator on which to run the script.
Note: By default, the script will run on all the load generators in the scenario.
5. Define a goal for the scenario
In the Scenario Goal pane, click the Edit Scenario Goal button. In the dialog box that opens, define the goal the scenario should reach. For details about filling in the scenario goal details, see
"Edit Scenario Goal Dialog Box " on page 879 .
6. Assign each script a percentage of the total scenario target
In the Scenario Scripts pane's % of Target column, enter the percentage of the total goal you want each script to reach during the scenario.
Page 867 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Note: Assign percentages to the scripts starting with the first script in the list and moving down the list.
7. Define service level agreements for the scenario - optional
You can define service level agreements (SLAs) to measure scenario goals over time intervals, or over a whole scenario run. When you later analyze the run using HP LoadRunner Analysis, this data is compared against the SLAs and SLA statuses are determined for the defined measurements. To define SLAs, see
"How to Define Service Level Agreements " on page 924 .
How to Design a Manual Scenario
This task describes how to design a manual scenario.
1. Prerequisites n
When designing a manual scenario, plan how you want to distribute the Vusers in the scenario. For more details, see
"Manual Scenarios " on page 864
.
n
Before you start designing the scenario, record the VuGen scripts that will run in the scenario. For details, see the HP Virtual User Generator User Guide.
2. Open a scenario, or create a new one a. On the main Controller toolbar, click the New Scenario button .
b. In the New Scenario dialog box, select Manual Scenario.
c. (Optional) To distribute the Vusers by percentage, select the Use the Percentage mode... option.
Note: You can convert from one scenario mode to another at any time. For details,
"How to Change the Scenario Mode (Manual Scenario)" on next page
.
d. (Optional) Select scripts to participate in the scenario. If you do not select the scripts here, you can select them in the step.
When you click OK, the scenario opens in the Design tab.
3. Add load generators to the scenario
Click the Load Generators button . In the Load Generators dialog box that opens, click
Add and enter the details of the load generator you are adding. For details about adding load generators, see
"Add Load Generator/Load Generator Information Dialog Box " on page 896 .
4. Add Vuser groups/scripts to the scenario
Vuser GroupMode: In the Scenario Groups pane, create Vuser groups to participate in the scenario. To create a group: a. Click the Add Group button .
Page 868 of 1812 HP LoadRunner (11.50)
User Guide
Controller b. In the Add Group dialog box: o
Give the group a name and assign a number of Vusers to the group.
o
Select a load generator on which to run the Vusers.
o
Select a Vuser script.
Percentage Mode: In Scenario Scripts pane, add groups to participate in the scenario as follows: c. Click the Add Group button and select a Vuser script from the list.
d. In the Scenario Scripts pane's Load Generator column, select load generators on which to run the scripts.
Note: By default, the script will run on all the load generators in the scenario.
e. When you have selected all the scripts for the scenario, in the Scenario Scripts pane's
% column assign a percentage of the total number of Vusers to each script. Assign percentages to the scripts starting with the first script in the table and moving down the list.
Note: The total number of Vusers for the scenario is defined in the scenario schedule.
See below.
5. Define a schedule for the scenario
Define a schedule by which to run the Vusers in the scenario. For details, see
"How to Define a
Schedule for the Scenario - Workflow" on page 911
.
6. Define service level agreements for the scenario - optional
You can define service level agreements (SLAs) to measure scenario goals over time intervals, or over a whole scenario run. When you later analyze the run using HP LoadRunner Analysis, this data is compared against the SLAs and SLA statuses are determined for the defined measurements. To define SLAs, see
"How to Define Service Level Agreements " on page 924
How to Change the Scenario Mode (Manual Scenario)
This task describes how to change a manual scenario from Vuser group mode to percentage mode, and vice versa.
For details about the scenario modes and the effects of changing from one to another, see
"Manual
Scenarios " on page 864
.
l
To convert the scenario from Vuser group mode to percentage mode, select Scenario >
Convert Scenario to the Percentage Mode.
l
To convert the scenario from percentage mode to Vuser group mode, select Scenario >
Convert Scenario to the Vuser Group Mode.
Note: By default, every time you convert from one mode to another, a message appears
Page 869 of 1812 HP LoadRunner (11.50)
User Guide
Controller warning you that scenario and schedule settings may change. To show/hide this warning message, select Scenario > Show Convert Scenario Mode Warning.
How to View/Modify Scripts in the Scenario
This section describes how to view and modify scripts used in your load test scenario.
You view/modify the details of the scripts in the Group Information dialog box (see
"Group
Information Dialog Box " on page 880
) or in the Script Information dialog box see
"Script Information
Dialog Box " on page 889 ).
View script details
You can view the details of a script by right-clicking the script in the Scenario Groups/Scripts pane and selecting Details.
In the Group/Script Information dialog box that opens, you can: l
View details about the script, including:
Note: If you do not see some of the details listed below, click More.
l
Script path l
Command line options l
Rendezvous points included in the script l
Vusers associated with the script l
Files associated with the script l
Open the script in VuGen by clicking the View Script button l
View the script's run-time settings by clicking the Run-Time Settings button
Modify a script's run-time settings l
To view or modify a script's run-time settings, in the Scenario Groups/Scripts pane right-click the script and select Run-Time Settings.
l
To view or modify run-time settings of a script associated with a particular Vuser, in the Vusers dialog box (Scenario Groups pane > Vusers select Run-Time Settings.
) right-click the Vuser and
Modifying the run-time settings for one Vuser in a group modifies the run-time settings for all the
Vusers in that group that are using the same script.
Modify multiple scripts' run-time settings
This section describes how to modify run-time settings of multiple scripts or of a Vuser group that includes multiple scripts.
1. In the Scenario Groups/Scripts pane select multiple scripts or the Vuser group that includes
Page 870 of 1812 HP LoadRunner (11.50)
User Guide
Controller multiple scripts.
2. Right-click the selection and select Run-Time Settings.
3. In the Multiple Run-Time Settings Mode dialog box that opens: l
To modify run-time settings for all of the scripts simultaneously, click Shared RTS. l
To modify run-time settings per script, click Individual RTS.
For user interface details, see
"Multiple Run-Time Settings Mode Dialog Box " on page 882
.
Note:
l
For details about specific run-time settings, see the HP Virtual User Generator User Guide.
l
When you modify the run-time settings from the Controller, LoadRunner runs the script using the modified settings.
View/Edit a script in VuGen
To view/edit a script included in your scenario, right-click the script and select View Script. The script opens in VuGen. For more information on editing scripts, see the HP Virtual User Generator
User Guide.
Specify command line options
You can specify command line options to use when running a script.
1. In the Scenario Groups/Scripts pane, right-click the script and select Details.
2. In the Group/Script Information dialog box that opens, if Command line is not displayed near the bottom, click More.
3. Enter a command in the command line, for example: -x value -y value.
For information about passing command line argument values to a script, see the HP Virtual
User Generator User Guide.
View rendezvous points included in the script
1. In the Scenario Groups/Scripts pane, right-click the script and select Details.
2. In the Group/Script Information dialog box, if the Rendezvous tab is not displayed near the bottom, click More.
If there are rendezvous points included in the script, they are displayed in the Rendezvous tab.
For details about rendezvous points, see
"Rendezvous Points Overview " on page 1002 .
View Vusers associated with the script
1. In the Scenario Groups/Scripts pane, right-click the script and select Details.
2. In the Group/Script Information dialog box, if the Vusers tab is not displayed near the bottom, click More.
The Vusers tab displays the Vusers associated with the script.
Page 871 of 1812 HP LoadRunner (11.50)
User Guide
Controller
View files associated with the script
1. In the Scenario Groups/Scripts pane, right-click the script and select Details.
2. In the Group/Script Information dialog box, if the Files tab is not displayed near the bottom, click More.
By default, the Files tab lists all the files in the script's folder (only after your script has been added to the script list). These files include the configuration settings file, the init, run, and end portions of the script, the parameterization definitions file, and the .usr file. To add a file to the list, click Add.
Example
To run Visual C++ Vusers on a remote load generator, you must add the .dll of the Vuser to the list of files.
You can delete the files that you add, but not the other files listed.
Relative Paths for Scripts
You can specify a relative location for a script in your scenario. The location can be relative to the current scenario folder, or relative to the LoadRunner installation folder.
When you run a scenario, the script is automatically copied from this relative location to a temporary folder on the load generator running the script. This enables the load generator to access the script locally instead of over a network.
To specify a path relative to the current scenario director, type either of the following notations at the start of the script path:
Notation
.\
..\
Description
Indicates that the path is relative to the location of the scenario folder
Indicates that the path is relative to the location of the parent folder of the scenario folder
For example, if the current scenario is located at F:\scenarios, to specify that the script, user1, is located in F:\scenarios\scripts, you could type:
.\scripts\user1
To specify a path relative to the LoadRunner installation folder, type a percent sign (%) at the beginning of the script path. For example, if the LoadRunner installation folder is located at
F:\LoadRunner
, to specify that the script, user1, is located in F:\LoadRunner\scripts, you could type:
%\scripts\user1
Note: When specifying a relative path, you can include standard DOS notation (.\ and ..\) inside the path, as shown in the following example: M:\LR\my_tests\..\..\test.usr.
Page 872 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Vuser Statuses
The following table describes the possible statuses of Vusers before, during, and after a scenario run.
Status
Down
Pending
Initializing
Ready
Running
Description
The Vuser is down.
The Vuser is ready to be initialized and is waiting for an available load generator, or is transferring files to the load generator. The Vuser will run when the conditions set in its scheduling attributes are met.
The Vuser is being initialized on the remote machine.
The Vuser already performed the init section of the script and is ready to run.
The Vuser is running. The Vuser script is being executed on a load generator.
Rendezvous
The Vuser has arrived at the rendezvous point and is waiting to be released by
LoadRunner.
Done.Passed
The Vuser has finished running. The script passed.
Done.Failed
The Vuser has finished running. The script failed.
Error
Gradual
Exiting
Exiting
A problem occurred with the Vuser. Check the Status field on the Vuser dialog box or the output window for a complete explanation of the error.
The Vuser is completing the iteration or action it is running (as defined in Tools
> Options > Run-Time Settings) before exiting.
The Vuser has finished running or has been stopped, and is now exiting.
Stopped
The Vuser stopped when the Stop command was invoked.
Add Group Dialog Box
This dialog box enables you to add Vuser groups to participate in a scenario.
To access
Manual scenario > Design tab > Scenario Groups/Scripts pane > Add Group
Important information
While a scenario is running, you can add Vuser groups to the scenario and enable them. However, if you add a Vuser group after all the Vusers in the scenario have started running, the new group will not run in the scenario.
Relevant tasks
"How to Design a Manual Scenario " on page 868
User interface elements are described below:
Page 873 of 1812 HP LoadRunner (11.50)
User Guide
Controller
UI Element Description
Enables you to add Vuser scripts to the list of scripts.
Note: To add a VB Vuser script, select the .usr file.
Opens VuGen where you can record a Vuser script. For more information on recording Vuser scripts, see the HP Virtual User Generator User Guide.
Group Name
The name of the Vuser group.
When you select a script the Vuser group is automatically given the same name as the script. You can modify the group name.
Note: The name is limited to a maximum of 55 characters.
Load
Generator
Name
The load generator assigned to the Vuser group.
To add a load generator to this list, select Add from the list. For user interface details, see
"Add Load Generator/Load Generator Information Dialog Box " on page 896 .
Select Script
Lists the available scripts that have been added to the scenario. When you select a script, its name and path are displayed above the list.
To display the scripts with their full paths, right-click the list area and select
Show Paths.
Note: If a script uses Unique file parameterization, running more than one
Vuser group with that script in the same scenario may cause unexpected scenario results. For more information about Unique file parameterization, see the HP Virtual User Generator User Guide.
Vuser
Quantity
The number of Vusers to add to the group.
Add Script Dialog Box
This dialog box enables you to add Vuser scripts to a scenario.
To access
Use one of the following: l
All scenarios: Design tab > Right-click in Scenario Scripts pane > Add
Script
l
Goal-oriented scenario: Design tab > Scenario Scripts pane > Add Script l
Manual scenario (percentage mode): Design tab > Add Group
Important information
While a scenario is running, you can add scripts to the scenario and enable them.
However, if you add a script after all the Vusers in the scenario have started running, the added script will not run in the scenario.
Relevant tasks
l
"How to Design a Manual Scenario " on page 868
l
"How to Design a Goal-Oriented Scenario " on page 866
User interface elements are described below:
Page 874 of 1812 HP LoadRunner (11.50)
User Guide
Controller
UI Element Description
Enables you to add Vuser scripts to the list of scripts.
Note: To add a VB Vuser script, select the .usr file.
Opens VuGen where you can record a Vuser script. For more information on recording Vuser scripts, see the HP Virtual User Generator User Guide.
Select Script
Lists the scripts available for the scenario. When you select a script, its name and path are displayed above the list.
To display the scripts with their full paths, right-click the list area and select
Show Paths.
Add Vusers Dialog Box
This dialog box enables you to add Vusers to a Vuser group.
To access
Important information
See also
l
Design tab > Scenario Groups pane > Vusers
> Add Vusers l
Relevant for manual scenarios in Vuser group mode only.
l
Available when a group is selected in the Scenario
Groups pane.
"Run/Stop Vusers Dialog Box" on page 996
User interface elements are described below:
UI Element
Group Name
Load Generator
Name
Description
Enables you to add Vuser scripts to the list of scripts.
Note: To add a VB Vuser script, select the .usr file.
Opens VuGen where you can record a Vuser script. For more information on recording Vuser scripts, see the HP Virtual User Generator User
Guide.
Opens the Run-Time Settings dialog box, where you can edit the script's run-time settings.
When you modify the run-time settings from the Controller, LoadRunner runs the script using the modified settings.
Opens the Parameter list in VuGen where you can create, view, modify, and delete script parameters. For details, see the HP Virtual User
Generator User Guide.
The name of the group to which to add Vusers.
The load generator assigned to the Vuser group.
To add a load generator to this list, select Add from the list. For user interface details, see
"Add Load Generator/Load Generator Information
Page 875 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Quantity to add
Select Script
Dialog Box " on page 896
.
The number of Vusers to add to the Vuser group.
Lists the scripts available for the scenario. When you select a script, its name and path are displayed above the list.
To display the scripts with their full paths, right-click the list area and select Show Paths.
Design Tab
The Design tab enables you to design load test scenarios.
To access
Relevant tasks
Design tab l
"How to Design a Manual Scenario " on page 868
l
"How to Design a Goal-Oriented Scenario " on page 866
l
"How to Define a Schedule for the Scenario - Workflow" on page 911
l
"How to Define Service Level Agreements " on page 924
l
"How to Change the Scenario Mode (Manual Scenario)" on page 869
l
"How to View/Modify Scripts in the Scenario" on page 870
User interface elements are described below:
UI Element Description
Page 876 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Scenario Goal pane
(Goal-oriented scenario)
In goal-oriented scenarios, displays information regarding the scenario goal.
Scenario Groups pane
(Manual scenario in
Vuser Group mode)
For user interface details, see
"Scenario Goal Pane " on page 884
.
Displays the Vuser groups created for the scenario.
Scenario Scheduler pane
(Manual scenario)
For user interface details, see
"Scenario Groups/Scripts Pane - Manual Scenarios" on page 885 .
Displays the scenario schedule.
Page 877 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Scenario Scripts pane
For user interface details, see
"Scenario Schedule Pane " on page 922 .
Displays the Vuser scripts selected for the scenario.
Service Level
Agreement pane
For user interface details: l
See
"Scenario Groups/Scripts Pane - Manual Scenarios" on page 885
l
See
"Scenario Scripts Pane - Goal-Oriented Scenarios" on page 888
Lists the service level agreements defined for the scenario.
Page 878 of 1812 HP LoadRunner (11.50)
User Guide
Controller
For user interface details, see
"Service Level Agreement Pane " on page 929
.
Edit Scenario Goal Dialog Box
This dialog box enables you to set goals for your scenario.
To access
Goal-oriented scenario > Design tab > Scenario Goal pane > Edit Scenario
Goal
Important information
l
Available for goal-oriented scenarios only.
l
When you run a goal-oriented scenario, the goal you defined is displayed in the appropriate graph, along with the scenario results. This enables you to compare the results with your target goal.
Relevant tasks
"How to Design a Goal-Oriented Scenario " on page 866
User interface elements are described below:
UI Element Description
Enables you to rename the selected goal profile.
Enables you to delete the selected goal profile.
Enables you to define a new goal profile.
Define Scenario
Opens the Scenario Start dialog box where you can set the scenario start time as follows: l
Without delay. As soon as the Start Scenario command is issued.
l
With a delay of HH:MM:SS. The specified time after the Start
Scenario command is issued.
l
At HH:MM:SS on <date>. At a specified time on a specified date.
The scenario goal:
Page 879 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Goal
Do not change recorded think time
l
Goal Type. The type of goal. For more details, see
"Goals Types for
Goal-Oriented Scenarios " on page 865
.
l
Transaction Name. (When goal type is Transactions per
second/Transaction Response Time) The static script transaction for your scenario to test, or the name of an automatic/dynamic script transaction that you have recorded.
l
Reach Goal of <value> <goal type>. The desired goal limits.
l
Using a minimum of <value> and a maximum of <value> Vusers.
The minimum and maximum number of Vusers to use in the scenario.
If selected, LoadRunner runs the scenario using the think time recorded in the script.
Note: If you select this option, you may need to increase the number of
Vusers in your scenario in order to reach your target.
The goal profile name.
Goal Profile
Name
Load Behavior tab
Enables you to specify how and when the Controller should reach the target.
Ramp Up. How the Vusers should start running.
l
Automatic. The Controller starts running the default number of Vusers in a batch, that is, 50 Vusers every two minutes. If the maximum number of Vusers defined is less than 50, then it runs all the Vusers.
l
Reach target X after. The amount of scenario time after which
Controller should reach the target.
l
Step up by. How rate at which the Controller should reach the target (x number of Vusers/hits/pages every x amount of time). (Not available for the Transactions per Second and Transaction Response Time goal types.)
Load Preview graph
A graphical representation of the goal and load behavior defined for the scenario.
Scenario Settings tab
Enables you to specify the actions to take when the target is reached, or if the target is not reached: l
Run Time. The amount of time (in hours, minutes, and seconds) to run the scenario after the target has been reached.
l
If target cannot be reached. The action to be taken if the target cannot be reached.
n
Receive Notification. If selected, the Controller sends an error message indicating that the target could not be reached.
Group Information Dialog Box
This dialog box displays details about the selected Vuser group, and enables you to modify the group's settings.
Page 880 of 1812 HP LoadRunner (11.50)
User Guide
Controller
To access
Important information
Relevant Tasks
Manual Scenario > Design tab > Scenario Groups pane >
Details
l
Relevant for manual scenarios in Vuser group mode only.
l
Available when a group is selected in the Scenario Groups pane.
l
"How to Design a Manual Scenario " on page 868
l
"How to View/Modify Scripts in the Scenario" on page 870
User interface elements are described below:
UI Element
Command Line
Files tab
Description
Updates script settings as follows: l
Script. If a script was modified during a scenario run, updates the script details in the scenario.
l
Run-Time Settings. If you modified a script's run-time settings from the Controller, restores the initial run-time settings.
Opens VuGen where you can view and edit the script. For more information on editing scripts, see the HP Virtual User
Generator User Guide.
Opens the Run-Time Settings dialog box, where you can edit the Vuser script's run-time settings.
When you modify the run-time settings from the Controller,
LoadRunner runs the script using the modified settings. To restore the initial settings previously set using VuGen, click the
Refresh button and select Run-Time Settings.
The command line options to use when running the script.
Example: -x value -y value.
For information about passing command line argument values to a script, see the HP Virtual User Generator User Guide.
Displays all files used by the script, including the configuration settings file, the init, run, and end portions of the script, the parameterization definitions file, and the .usr file.
l
To exclude a file from the list, clear the check box adjacent to it.
l
To add a file or folder used by the script, click the Add button.
Note: To run Visual C++ Vusers on a remote load generator, l you must add the .dll of the Vuser to this list.
You can delete the files that you add, but not the other files listed.
Page 881 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Group Name
Load Generator Name
Rendezvous tab
Script
Vusers tab
The name of the Vuser group.
To modify, type a new name in the Group Name box. The name is limited to a maximum of 55 characters.
The load generator assigned to the Vuser group.
To add a load generator to this list, select Add from the list. For user interface details, see
"Add Load Generator/Load Generator
Information Dialog Box " on page 896 .
Displays the rendezvous points defined for the selected script.
The name, path, and type of the Vuser script selected for the
Vuser group.
Displays all Vusers associated with the selected script.
Multiple Run-Time Settings Mode Dialog Box
This dialog box enables you to select the mode for modifying run-time settings of multiple selected scripts.
To access
Use one of the following: l
In the Scenario Groups/Scripts pane, right-click a multiple selection of scripts, and select Run-Time Settings l
Right-click a Vuser group that includes multiple scripts and select Run-Time
Settings
Important information
l
If one of the selected scripts does not support shared run-time settings, then you will only have the option of modifying each script's individual run-time settings (Individual RTS).
l
Shared RTS mode is disabled for GUI or Astra LoadTest Vusers.
l
Some run-time settings cannot be modified in Shared RTS mode. These settings will not appear in the Run-Time Settings window. To modify them, open the run-time settings for each individual script.
The following nodes will not appear in Shared RTS mode: n
Run Logic node - for protocols which support the Run Logic node, the
Iterations box appears in the Pacing node n
Additional Attributes node n
Internet Protocol:ContentCheck node n
Java Environment Settings:Classpath node n
Nodes with tables in the format Property, Value for the protocols: Citrix ICA,
Oracle NCA, and WAP For example: Oracle NCA:Client Emulation node
Relevant tasks
"How to View/Modify Scripts in the Scenario" on page 870
User interface elements are described below:
Page 882 of 1812 HP LoadRunner (11.50)
User Guide
Controller
UI
Element
Description
Individual
RTS
Opens a separate Run-Time Settings dialog box (one at a time) for each selected script. In this mode, you modify each script's settings individually.
Shared
RTS
Opens the Run-Time Settings Shared Mode dialog box containing all of the run-time settings in blank mode. In this mode, any settings that are change are applied to all selected scripts. All other run-time settings remain unchanged.
See Important information above.
New Scenario Dialog Box
This dialog box enables you to create a new scenario and select Vuser scripts to run in the scenario.
To access
Relevant tasks
Controller toolbar > New Scenario
Important information
Before you create a scenario, you should have a good idea as to the type of scenario you want to create. See
"Load Test Scenarios Overview " on page 863 .
l
"How to Design a Manual Scenario " on page 868
l
"How to Design a Goal-Oriented Scenario " on page 866
User interface elements are described below:
UI Element
Select Scenario Type
Description
Moves the script selected in the Available
Scripts box to the Scripts in Scenario box.
Removes the selected script from the Scripts
in Scenario box.
Enables you to add scripts to the list of available scripts.
Note: To add a VB Vuser script, select the .usr file.
Opens VuGen where you can record a Vuser script. For more information on recording Vuser scripts, see the HP Virtual User Generator User
Guide.
Opens the Connection to HP ALM dialog box, where you can connect to Application Lifecycle
Management to download scripts.
Select the type of scenario to create. For details, see
"Load Test Scenarios Overview " on page 863 .
Page 883 of 1812 HP LoadRunner (11.50)
User Guide
Controller l
Manual Scenario. You manually build the scenario creating Vuser groups and specifying the script, load generators, and the number of Vusers to include in each
Vuser group.
n
Use the Percentage mode... You define the total number of Vusers to be used in the scenario and assign a percentage of the total number of Vusers to each Vuser script.
l
Note: You can convert from one scenario mode to another at any time. For details, see
"How to Change the Scenario Mode (Manual
Scenario)" on page 869 .
Goal-Oriented Scenario. You define the goals you want your test to achieve, and
LoadRunner automatically builds a scenario for you, based on these goals.
Select the scripts you would like to use in your scenario
(Optional) Select the scripts to use in the scenario.
l
Available Scripts. Lists the fifty most recently used scripts.
l
Scripts in Scenario. Lists the scripts selected for the scenario.
Click Add/Remove to move selected scripts between the two lists.
Note: You can change the maximum number of scripts displayed in the Available Scripts box by modifying the following registry key: HKEY_
CURRENT_USER\Software\Mercury
Interactive\RecentScripts\max_num_of_ scripts
Show at startup
When selected, the New Scenario dialog box is displayed upon opening the Controller.
Note: This option can also be enabled/disabled from the Controller's View menu. Select View >
Show New Scenario Dialog.
Scenario Goal Pane
This pane displays the goals defined for the scenario.
To access
Important information
Goal-oriented scenario > Design tab l
Available for goal-oriented scenarios only.
Page 884 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Relevant tasks
l
The goal profiles include the type of goal, the minimum and maximum number of Vusers that should be used in the scenario, the duration of the scenario, and the load behavior.
"How to Design a Goal-Oriented Scenario " on page
866
User interface elements are described below:
UI Element
Goal
Goal Profile Name
Load Behavior
Description
Opens the Edit Scenario Goal dialog box, where you set the goals for the scenario. See
"Edit Scenario Goal Dialog Box " on page 879
.
The defined goal, including the type of goal and the expected target.
The name of the goal profile.
How and when the Controller should reach the defined goal.
Load Preview graph
A graphical representation of the goal and load behavior defined for the scenario.
Max Number of
Vusers
The maximum number of Vuser to run in the scenario.
Min Number of
Vusers
The minimum number of Vuser to run in the scenario.
Scenario Duration
The amount of time the scenario should continue running after reaching the defined goal.
Scenario Groups/Scripts Pane - Manual Scenarios
This pane displays the Vuser groups/scripts that were added to the scenario.
To access
Manual Scenario > Design tab
Important information
l
Vuser group mode: The Design tab displays the Scenario Groups pane where you can define Vuser groups to run Vuser scripts in a scenario. It lists all
Vuser groups, together with their paths, as well as the load generators and number of Vusers assigned to each group.
l
Percentage mode: The Design tab displays the Scenario Scripts pane where you can define Vuser scripts to run in a scenario. It lists all Vuser scripts, their paths, and the load generators and percentage of the total number of Vusers assigned to each script.
Note: You can change from one scenario mode to another at any time. For details, see
"How to Change the Scenario Mode (Manual Scenario)" on page 869
.
Page 885 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Relevant tasks
l
"How to Design a Manual Scenario " on page 868
l
"How to Change the Scenario Mode (Manual Scenario)" on page 869
"Load Test Scenarios Overview " on page 863
See also
User interface elements are described below (unlabeled elements are shown in angle brackets):
UI Element Description
Start Scenario. Starts running the scenario.
Virtual Users. Opens the Vusers dialog box where you can define properties for individual Vusers within the Vuser groups you have defined. To each Vuser you can assign a different Vuser script and/or load generator.
For user interface details, see
"Vusers Dialog Box" on page 892 .
Add Group.
l
Vuser group mode: Opens the Add Group dialog box where you create Vuser groups for the scenario. See
"Add Group Dialog Box " on page 873 .
l
Percentage mode: Opens the Add Script dialog box where you select Vuser scripts for the scenario. See
"Add Script Dialog Box " on page 874 .
Remove Group. Deletes the selected Vuser group/script.
image of button
<Groups/Scripts table>
Opens the Run-Time Settings dialog box, where you can edit the Vuser script's runtime settings.
Notes:
l
When you modify the run-time settings from the Controller, LoadRunner runs the script using the modified settings. To restore the initial settings previously set using VuGen, click the Refresh button and select Run-Time Settings.
l
If run-time settings for a script were not defined in VuGen, the Controller displays its own default settings for Log and Think Time. Default VuGen settings are displayed for all other nodes.
Details. Opens the Group/Script Information dialog box where you can view and modify the Vuser group/script's settings.
For details, see
"Group Information Dialog Box " on page 880
or
"Script Information
Dialog Box " on page 889
where respectively.
View Script. Opens the script in VuGen where you can view and edit the Vuser script. For more information on editing scripts, see the HP Virtual User Generator
User Guide.
Virtualized servicesOpens the Virtualized Services Settings dialog box. For more information on virtualized services, see the HP Virtualized Services Settings Dialog
Box User Guide.
Displays the following information about the Vuser groups/scripts selected for the scenario:
Page 886 of 1812 HP LoadRunner (11.50)
User Guide
Controller l
. Indicates that the Vuser group/script is participating in the scenario.
l
Group/Script Name.The name of the Vuser group/script.
l
Script Path. The path of the Vuser script.
In Vuser group mode, if the Vuser group includes more than one script, the scripts' names are listed. Clicking the cell's drop down arrow displays the scripts' full paths.
<Groups/Scripts table>
(continued)
<Right-click menu>
If you want to access the script from a location that is relative to the current scenario folder, you can replace the actual path with the relative path. For details, l see
"Relative Paths for Scripts " on page 872 .
Quantity. (Vuser group mode) The number of Vusers assigned to the Vuser group.
This column is read-only when the defining a real-world schedule (default schedule).
In this case, the quantity of Vusers is defined when designing the scenario l schedule.
%. (Percentage mode) The percentage of Vusers assigned to run the Vuser script.
If you modify the percentage assigned to one group, the percentages assigned to the other scripts change to create a total of 100% for all of the Vuser scripts.
Note: Modify percentages to the scripts starting with the first script in the list and l moving down the list.
Load Generators. The load generators assigned to the Vuser group/script.
If you select multiple load generators for a group/script, the Vusers assigned to the
Vuser group/script are distributed evenly among the load generators.
Default value (in percentage mode): All Load Generators
Note: To add a load generator to this list, select Add from the list. For more details, see
"Add Load Generator/Load Generator Information Dialog Box " on page 896 .
l
Load Generators. The load generators assigned to the Vuser group/script.
If you select multiple load generators for a group/script, the Vusers assigned to the
Vuser group/script are distributed evenly among the load generators.
Default value (in percentage mode): All Load Generators
Note: To add a load generator to this list, select Add from the list. For more details, see
"Add Load Generator/Load Generator Information Dialog Box " on page 896 .
l
Auto Sort. When adding a Vuser group/script, automatically sorts the table according to the defined sort.
l
Sort Groups/Scripts. Enables you to sort the table by Vuser group/script name, script path, quantity/percentage of Vusers, or load generator. To sort the table in ascending/descending order, click the relevant table heading.
Page 887 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Scenario Scripts Pane - Goal-Oriented Scenarios
This pane lists the Vuser scripts selected for the goal-oriented scenario.
To access
Relevant tasks
See also
Goal-oriented scenario > Design tab
"How to Design a Goal-Oriented Scenario " on page 866
"Load Test Scenarios Overview " on page 863
User interface elements are described below (unlabeled elements are shown in angle brackets):
UI Element Description
Starts running the scenario.
Opens the Load Generators dialog box where you can add new load generators and view details about existing load generators. See
"Load
Generators Dialog Box " on page 907 .
Opens the Add Script dialog box where you can select Vuser scripts to add to the scenario. See
"Add Script Dialog Box " on page 874
.
Deletes the selected Vuser script.
Opens the Run-Time Settings dialog box, where you can edit the Vuser script's run-time settings.
Notes:
l
When you modify the run-time settings from the Controller,
LoadRunner runs the script using the modified settings.
l
If run-time settings for a script were not defined in VuGen, the
Controller displays its own default settings for Log and Think Time.
Default VuGen settings are displayed for all other nodes.
Opens the Script Information dialog box where you can view the Vuser script's settings. See
"Script Information Dialog Box " on next page .
Opens the script in VuGen where you can view and edit the Vuser script.
For more information on editing scripts, see the HP Virtual User
Generator User Guide.
<Right-click menu>
l
Auto Sort. When adding a script, automatically sorts the table according to the defined sort.
l
Sort Scripts. Enables you to sort the table by Vuser script name, script path, percentage of Vusers, or load generator. To sort the table in ascending/descending order, click the relevant table heading.
<Scripts table>
Displays the following information about the Vuser scripts selected for the scenario:
Page 888 of 1812 HP LoadRunner (11.50)
User Guide
Controller l
. Indicates that the script is participating in the scenario.
l
Script Name. The name of the Vuser script.
l
Script Path. The path of the Vuser script.
If you want to access the script from a location that is relative to the current scenario folder, you can replace the actual path with the relative l path. For details, see
"Relative Paths for Scripts " on page 872 .
% of Target. The percentage of the overall target number of Vusers, pages per minute, hits per second, transactions per second, or transaction response time that is automatically distributed to each
Vuser script.
l
Load Generators. The load generators assigned to the script. If you select multiple load generators for a script, the Vusers assigned to the script are distributed evenly among the load generators.
Default value: All Load Generators
Note: To add a load generator to this list, select Add from the list. For more details, see
"Add Load Generator/Load Generator Information
Dialog Box " on page 896
.
Scenario Start Time Dialog Box
This dialog box enables you to set when the scenario will start.
To access
Goal-oriented scenario > Design tab > Scenario Schedule pane > Scenario Start
Time button.
User interface elements are described below:
UI Element
Without delay
With a delay of HH:MM:SS
At HH:MM:SS on <date>
Description
Starts the scenario as soon as the Start Scenario command is issued.
Starts the scenario the specified time after the Start
Scenario command is issued.
Starts the scenario at a specified time on a specified date.
Script Information Dialog Box
This dialog box displays details about the selected Vuser group, and enables you to modify the group's settings.
To access
Important information
Design tab > Scenario Scripts pane > Details
Available when a script is selected in the Scenario Scripts pane.
Relevant to:
Page 889 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Relevant tasks
l
Manual scenarios in percentage mode l
Goal-oriented scenarios l
"How to View/Modify Scripts in the Scenario" on page
870
User interface elements are described below:
UI Element
Command Line
Files tab
Description
Updates script settings as follows: l
Script. If the script was modified during a scenario run, updates the script details in the scenario.
l
Run-Time Settings. If you modified the run-time settings from the
Controller, restores the initial run-time settings.
Opens VuGen where you can view and edit the script. For more information on editing scripts, see the HP Virtual User Generator User
Guide.
Note: If you use VuGen to make changes to a script while the Controller is running, click Refresh and select Script to update the script details in the scenario.
Opens the Run-Time Settings dialog box, where you can edit the Vuser script's run-time settings.
Notes:
l
When you modify the run-time settings from the Controller,
LoadRunner runs the script using the modified settings. To restore the initial settings previously set using VuGen, click the Refresh button and select Run-Time Settings.
l
If run-time settings for a script were not defined in VuGen, the
Controller displays its own default settings for Log and Think Time.
Default VuGen settings are displayed for all other nodes.
The command line options to use when running the script.
Example: -x value -y value.
For information about passing command line argument values to a script, see the HP Virtual User Generator User Guide.
Displays all files used by the script, including the configuration settings file, the init, run, and end portions of the script, the parameterization definitions file, and the .usr file.
l
To exclude a file from the list, clear the check box adjacent to it.
l
To add a file or folder used by the script, click the Add button.
Note: To run Visual C++ Vusers on a remote load generator, you must l add the .dll of the Vuser to this list.
You can delete the files that you add, but not the other files listed.
Page 890 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Rendezvous tab
Script
Vusers tab
Displays the rendezvous points defined for the selected script.
The name, path, and type of the selected Vuser script.
Displays all Vusers associated with the selected script.
Vuser Information Dialog Box
This dialog box displays details about a specific Vuser in a group, and lets you modify the load generator and script settings for the Vuser.
To access
Use one of the following: l
Manual scenario > Design tab > Scenario Groups pane > Vusers
> l
In Vusers dialog box, double-click Vuser.
Relevant tasks
l
"How to View/Modify Scripts in the Scenario" on page 870
l
"How to Run a Scenario" on page 977
User interface elements are described below:
UI Element Description
Enables you to add Vuser scripts to the list of scripts.
Note: To add a VB Vuser script, select the .usr file.
Opens VuGen where you can record a Vuser script. For more information on recording Vuser scripts, see the HP
Virtual User Generator User Guide.
Opens the Run-Time Settings dialog box, where you can edit the Vuser script's run-time settings.
Notes:
l
Modifying the run-time settings for one Vuser modifies the run-time settings for all the Vusers in the group that are using the same script.
l
When you modify the run-time settings from the
Controller, LoadRunner runs the script using the modified settings.
l
If run-time settings for a script were not defined in
VuGen, the Controller displays its own default settings for Log and Think Time. Default VuGen settings are displayed for all other nodes.
Page 891 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Group Name
Load Generator Name
Select Script
Vuser Name
Opens the Parameter list in VuGen where you can create, view, modify, and delete Vuser script parameters. For details, see the HP Virtual User
Generator User Guide.
The name of the group to which the selected Vuser belongs.
The load generator assigned to the Vuser's Vuser group.
To add a load generator to this list, select Add from the list. For user interface details, see
"Add Load
Generator/Load Generator Information Dialog Box " on page 896
.
Lists the available scripts that have been added to the scenario. When you select a script, its name and path are displayed above the list.
To display the scripts with their full paths, right-click the list area and select Show Paths.
The name of the selected Vuser.
Vusers Dialog Box
This dialog box displays the status of the Vusers in the selected Vuser group.
To access
Relevant tasks
Manual scenario > Design tab > Scenario Groups pane > Vusers l
"How to Run a Scenario" on page 977
l
"Control Vusers During a Scenario Run - Use-
Case Scenario " on page 980
User interface elements are described below (unlabeled elements are shown in angle brackets):
UI Element Description
Show Vuser Log. Displays a log containing run-time information about the
Vuser that is refreshed, by default, every 1000 milliseconds. For more information, see
"Vuser Script Log " on page 1001 .
Hide Vuser Log. Closes the Vuser log.
Starts running the selected Vuser.
Instructs the Controller to complete the current iteration or action before stopping the Vuser.
Note: This option is only available when the Vuser is in the Run state, and if you selected the Wait for the current iteration to end before exiting or Wait for the current action to end before exiting option in the Run-
Page 892 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Time Settings tab of the Options dialog box.
Stops running the selected Vuser immediately.
Resets the status of the Vuser to Down.
Opens the Vuser Information dialog box, where you can view details about the selected Vuser.
Opens the Add Vusers dialog box where you can add more Vusers to the
Vuser group.
<Filter by script>
Filters the Vusers table by the selected script.
<Filter by status>
Filters the Vusers table by the selected Vuser status. For details, see
"Vuser Statuses " on page 873
.
<Right-click menu>
<Vusers table>
l
Filter Vusers. Enables you filter the Vuser list by Vuser status.
l
Renumber. Renumbers the list of Vusers in sequential order, starting from 1.
l
Sort Vusers. Enables you to sort the table by a selected column. To sort the table in ascending/descending order, click the relevant table heading.
Displays the following information about the Vusers: l
ID. The Vuser's ID number l
Status. The Vuser's status. For details, see
"Vuser Statuses " on page
873
.
l
Script. The script run by the Vuser.
l
Load Generator. The load generator on which the Vuser is running.
l
Elapsed Time. Amount of time that has elapsed in the scenario since the Vuser began running.
Load Generators
Load Generators Overview
Load generators are the machines that run the Vuser scripts in your scenario.
When you add a load generators to the list of load generators in the Controller, you define its attributes. You can modify these attributes at any time.
You can enable load generators to take part in the scenario, and then indicate which specific load generators will run Vuser scripts in the scenario. If an enabled load generator is unavailable for a particular scenario run, you can exclude it temporarily instead of removing it entirely from your list of load generators. You can also disable load generators to isolate a specific machine to test its performance.
Page 893 of 1812 HP LoadRunner (11.50)
User Guide
Controller
To set attributes for a specific load generator, see
"Add Load Generator/Load Generator Information
Dialog Box " on page 896 .
To set global settings for all the load generators participating in the scenario, see
"Options Dialog
Box" on page 962 .
Load Balancing
Load balancing evenly distributes the load generated by Vusers among the requested load generators, ensuring an accurate load test.
When a Windows load generator's CPU usage becomes overloaded, the Controller receives a message and stops loading Vusers on the overloaded load generator, and automatically distributes them among load generators taking part in the scenario. Only where there are no other load generators in the scenario does the Controller stop loading Vusers.
You can monitor the status of a machine's CPU usage using the icons in the Load Generators dialog box (see
"Load Generators Dialog Box " on page 907 ). When the CPU usage of a load
generator becomes problematic, the icon to the left of the load generator name contains a yellow bar. When the machine becomes overloaded, the icon contains a red bar.
Note: Load balancing is only available in manual scenarios in the percentage mode and in goaloriented scenarios.
How to Connect to a Linux Load Generator Without Using
RSH
This task describes how to connect to a Linux load generator without using RSH.
1. On the Linux load generator, make sure that the agent daemon (m_agent_daemon) is running.
If not, launch it by running the following command from <load generator installation
directory>/bin: m_daemon_setup -install
If successful, you will receive the following message: m_agent_daemon <process ID>
The agent now keeps running, even if the user is logged off. It only stops running if you run the command explained below, or if you reboot the machine.
Note: If you look at the log file m_agent_daemon[xxx].log in the temp folder, you may see communication errors, even if the installation succeeded. These messages appear because the LoadRunner agent always tries to open Port #443 (because any agent can be an MI Listener, and the MI Listener always listens to this port), and in Linux machines, this port cannot be opened by any user except for the root user. However, this does not interfere with using this agent for the load generator.
2. In the Controller, in the Load Generator Information dialog box > Linux Environment tab,
Page 894 of 1812 HP LoadRunner (11.50)
User Guide
Controller select the Don't use RSH option. Connect as usual.
For details, see
"Load Generator Configuration > Linux Environment Tab" on page 903
.
To stop the agent daemon:
Run the following command from the <LR_root>/bin folder: m_daemon_setup -remove
This stops the m_agent_daemon. If successful, you receive the following message: m_agent_daemon is down.
How to Add Load Generators to a Scenario
The following steps describe how to add load generators to a scenario.
Note: When you add a load generator, it remains in the Down state until it is connected.
For details about the Load Generator configuration tabs, see
"Add Load Generator/Load Generator
Information Dialog Box " on next page .
Add a load generator
1. Open the scenario.
n
Click to open a new scenario.
n
Click to open an existing scenario.
The scenario is displayed in the Design tab.
2. Click the Load Generators button
.
3. Click Add, and enter the details of the load generator.
4. (Optional) Click More to display the configuration tabs and configure other load generator's details.
How to Modify Load Generator Details
The following steps describe how to edit load generator settings.
1. Open the scenario . The scenario is displayed in the Design tab.
2. Click the Load Generators button .
3. Select the load generator, and click Details.
4. Modify the details displayed in the configuration tabs. For details, see
"Add Load
Generator/Load Generator Information Dialog Box " on next page
.
Page 895 of 1812 HP LoadRunner (11.50)
User Guide
Controller
How to Connect/Disconnect a Load Generator
This task describes how to connect or disconnect a load generator.
1. On the Controller toolbar, click Load Generators .
2. Select the load generator in the list and click Connect/Disconnect.
Linux Environment Variables
To work with a load generator in a Linux environment, your Linux startup configuration file needs to include specific environment variables. To set the environment variables, users need to add the
env.csh script to their startup configuration file.
Linux Users Startup Configuration File
C shell .cshrc
Bourne and Korn shell .profile
Add the following line in the startup configuration file: source <load generator installation directory>/env.csh
For example: source /opt/HP/HP_LoadGenerator/env.csh
Add Load Generator/Load Generator Information Dialog
Box
These dialog boxes enable you to add load generators, and view and edit information about a load generator respectively.
To access
Important information
Relevant tasks
See also
Controller toolbar > l
Add New Load Generator dialog box:
Click Add l
Load Generator Information dialog box:
Select a load generator and click Details
After adding a load generator, it appears in the
Load Generators list with a Down status.
"How to Add Load Generators to a Scenario" on previous page
"How to Modify Load Generator Details" on previous page
"Load Generators Overview" on page 893
Page 896 of 1812 HP LoadRunner (11.50)
User Guide
Controller
User interface elements are described below:
UI Element
(Add New Load
Generator dialog box only)
Enable load generator to take part in the scenario
When selected, enables the load generator to participate in the scenario.
When cleared, the load generator is disabled. This is useful in the following cases: l
If an enabled load generator is unavailable for a particular scenario run, you can exclude it temporarily instead of removing it entirely from your list of load generators.
l
You can disable load generators to isolate a specific machine to test its performance.
The name of the load generator.
Name
Platform
Description
More/Less. Shows/hides the tabs where you configure the load generator's details. See
"Add Load Generator/Load Generator
Information Dialog Box " on previous page
below.
Temporary directory
The platform on which the load generator is installed.
The location, on the load generator, where the Controller can store temporary files.
Default: If left empty, during a scenario run LoadRunner stores temporary files on the load generator in a temporary folder specified by the load generator's TEMP or TMP environment variables.
Load Generator Configuration Tabs
User interface elements are described below:
UI Element
Connection
Log tab
(Load
Generator
Information dialog box only)
Description
Displays the standard output and standard errors generated as the Controller connects to the selected Linux load generator. You can change the command that the Controller sends to the remote bridge in order to connect to the load generator. See
"Load Generator Configuration > Connection Log Tab" on next page
Note: Available in Expert mode only.
Run-Time
File Storage tab
Run-Time
Quota tab
Enables you to specify the result folder for the performance data that LoadRunner gathers from each load generator during a scenario. See
"Load Generator
Configuration > Run-Time File Storage Tab" on page 899 .
Enables you to specify a maximum number of Vuser types that the load generator should initialize or stop simultaneously. See
"Load Generator
Configuration > Run-Time Quota Tab" on page 900 .
Security tab
Enables monitoring or running Vusers over a firewall. See
"Load Generator
Page 897 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Status tab
Configuration > Security Tab" on page 901 .
Status. Displays details about the status of the load generator. See
"Load
Generator Configuration > Status Tab" on page 902 .
Terminal
Services tab
The Terminal Services Manager which enables you to distribute Vusers running in your load testing scenario on terminal servers. See
"Load Generator
Configuration > Terminal Services Tab" on page 902 .
Linux
Environment tab
Enables you to configure the login parameters and shell type for each Linux load generator. See
"Load Generator Configuration > Linux Environment Tab" on page
903
.
Vuser Limits tab
(Add New
Load
Generator dialog box only)
Enables you to modify the maximum number of GUI, RTE, and other Vusers that the load generator can run. See
"Load Generator Configuration > Vuser Limits
Tab" on page 905 .
Vuser Status tab
(Load
Generator
Information dialog box only)
Displays the status of all the Vusers connected to the load generator. See
"Load
Generator Configuration > Vuser Status Tab" on page 905 .
WAN
Emulation tab
Enables WAN Emulation on your scenario. See
"Load Generator Configuration >
WAN Emulation Tab" on page 906 .
Load Generator Configuration > Connection Log Tab
This tab displays the standard output and standard errors generated as the Controller connects to the selected Linux load generator and enables you change the command that the Controller sends to the remote bridge in order to connect to the load generator.
To access
Important information
Relevant tasks
Controller toolbar > > Details
This tab is displayed only when the
Controller is in Expert mode.
l
"How to Add Load Generators to a
Scenario" on page 895
l
"How to Modify Load Generator
Details" on page 895
Page 898 of 1812 HP LoadRunner (11.50)
User Guide
Controller
See also
l
"Load Generators Overview" on page 893
l
"Expert Mode " on page 958
User interface elements are described below:
UI Element
Bridge cmd
Rsh standard errors
Rsh standard output
Description
The command sent by the Controller to the remote bridge in order to connect the
Linux load generator.
Note: This command replaces the default bridge command sent by the
Controller.
Displays rsh standard errors as the
Controller connects to the selected
Linux load generator.
Displays rsh standard output as the
Controller connects to the selected
Linux load generator.
Load Generator Configuration > Run-Time File Storage
Tab
This tab enables you to specify the results folder for the performance data that LoadRunner gathers from this load generator during a scenario run.
To access
Important information
Relevant tasks
Controller toolbar > > Add or Details l
The folder specified here stores the result files gathered on the selected load generator.
A global results folder for all load generators is specified in the
Tools > Options dialog box. For details, see
"Options > Run-
Time File Storage Tab " on page 968
.
Note: If the settings specified here differ to the global load generator settings, the settings specified here take preference l for this particular load generator.
If the load generator is localhost, then LoadRunner stores the scripts and results on a shared network drive, and the options on this tab are all disabled.
l
If you are monitoring over a firewall, the settings in this tab are not relevant.
l
"How to Add Load Generators to a Scenario" on page 895
l
"How to Modify Load Generator Details" on page 895
Page 899 of 1812 HP LoadRunner (11.50)
User Guide
Controller
See also
l
"Run-Time File Storage Locations " on page 958
l
"Options > Run-Time File Storage Tab " on page 968
User interface elements are described below:
UI Element
Scripts and results stored
Description
Select where to store the results of the scenario run and/or
Vuser scripts gathered from the selected load generator during a scenario run: l
As defined in Tools > Options > Run-Time File
Storage. Stores the results as specified in the global settings.
l
In temporary directory on <load generator name>.
Instructs the Controller to save the run-time files on a hard drive of the load generator machine.
l
On a shared network drive. Instructs the Controller to save the scenario results and/or the Vuser scripts on a shared network drive. A shared network drive is a drive to which the Controller and all the load generators in the scenario have read and write permissions.
Load Generator Configuration > Run-Time Quota Tab
This tab enables you to specify a maximum number of Vuser types that the load generator should initialize or stop simultaneously, so as to reduce load on the load generator.
To access
Controller toolbar > > Add or Details
Important
Information
The settings specified here are relevant for the selected load generator.
You can set run-time quotas for all load generators in a scenario from the Tools >
Options > Run-Time Settings tab. For details on setting global run-time quotas, see
"Options > Run-Time Settings Tab " on page 969
.
Note: If the settings specified here differ to the global load generator settings, the settings specified here take preference for this particular load generator.
Relevant tasks
See also
l
"How to Add Load Generators to a Scenario" on page 895
l
"How to Modify Load Generator Details" on page 895
l
"Options > Run-Time Settings Tab " on page 969
User interface elements are described below:
UI Element Description
Resets values to their defaults.
Page 900 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Vuser
Quota
l
Number of Vusers that may be initialized at one time - <current load
generator>. The maximum number of Vusers that the current load generator can initialize simultaneously.
l
Default: 50
Maximum value: 999
Limit the number of users that may be stopped at one time to. The maximum number of Vusers that the current load generator can stop simultaneously.
Default: 50
Load Generator Configuration > Security Tab
This tab enables monitoring or running Vusers over a firewall.
To access
Important information
Controller toolbar > > Add or Details l
If the load generator is connected, you cannot change values in the Security tab. To disconnect a load generator, select the load generator in the Load
Generators dialog box and click Disconnect.The load generator status changes to Down, and you can change the settings.
l
If the load generator is localhost, this tab is disabled.
Relevant tasks
l
"How to Add Load Generators to a Scenario" on page 895
l
"How to Modify Load Generator Details" on page 895
User interface elements are described below:
UI
Element
Description
Enable firewall
Enable
SSL
Support
Firewall
Settings
Enables LoadRunner to monitor or run Vusers over a firewall.
Note: If this option is selected, the Temporary directory box in the load generator's details area (at the top of the dialog box) is disabled and if a location was defined, it is erased.
Enables an encrypted connection between the Controller and load generator.
l
Enable running Vusers over Firewall. Enables LoadRunner to run Vusers on a load generator outside the firewall.
l
Enable Monitoring over Firewall. Enables LoadRunner to monitor the load generator over a firewall.
l
MI Listener. The name of the MI Listener that the load generator uses to communicate over the firewall.
Page 901 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Load Generator Configuration > Status Tab
This tab displays details about the status of the load generator.
To access
Relevant tasks
Controller toolbar > > Details
"How to Modify Load Generator Details" on page 895
User interface elements are described below:
UI Element
Details
Load Generator Status
Description
Error and other run-time information about the selected load generator.
The status of the load generator.
Load Generator Configuration > Terminal Services Tab
This tab displays the Terminal Services Manager which enables you to distribute Vusers running in your load testing scenario on terminal servers.
To access
Important information
Relevant tasks
See also
Controller toolbar > > Add or Details
This feature is not supported if the load generator is located over a firewall.
l
"How to Add Load Generators to a Scenario" on page 895
l
"How to Modify Load Generator Details" on page 895
"Terminal Services Overview " on page 939
User interface elements are described below (unlabeled elements are shown in angle brackets):
UI Element Description
Resets values to their defaults.
<Connection
Options>
l
Connect to existing Terminal Services Sessions. Enables connection to existing (open) terminal sessions.
Note: If you select this option, you must open a terminal client session l manually for each terminal that you want to run Vusers on during the scenario.
Create new Terminal Services Sessions. Enables the Controller to open and close terminal sessions automatically using a user name, password, and domain for the Terminal Services session.
n
Show Terminal Services clients on the Controller machine. Enables interaction with new Terminal Services sessions using the RDP client.
Page 902 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Enable
Terminal
Services
Manager
Maximum number of
Vusers per terminal
Number of terminals
Enables the Controller to manage load automatically using terminal sessions on the load generator.
Note:
When enabled, you can see the load generator's name only, without adding any extra references.
Example:
If you need to use three load generator sessions, my_machine, my_
machine:1, and my_machine:2, then in the load generator list, you need only insert the load generator, my_machine, and enable the Terminal Services
Manager for three terminals (Number of terminals = 3 - see below).
If not enabled, you need to insert each of the three terminals as separate load generators: my_machine, my_machine:1, and my_machine:2.
The maximum number of Vusers that you want to run in a terminal session. This depends on the Vuser type used in the script.
Default: 50
Example: For GUI Vusers, the maximum is one Vuser for each terminal session.
The number of terminals you want to use in your scenario. You must open a terminal client session for each terminal on which you want to run Vusers during the scenario.
Default: 2
Load Generator Configuration > Linux Environment Tab
This tab enables you to configure the login parameters and shell type for each Linux load generator.
To access
Important information
Relevant tasks
User interface elements are described below:
Controller toolbar > > Add or Details l
This tab is not available for a load generator running Vusers or monitoring over a firewall.
l
Editable only when the load generator is on a
Linux platform.
l
"How to Add Load Generators to a Scenario" on page 895
l
"How to Modify Load Generator Details" on page
895
l
"How to Connect to a Linux Load Generator
Without Using RSH" on page 894
UI Element
Login as
Description
The user's credentials for logging in to the Linux environment:
Page 903 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Shell Settings
l
Name. If the load generator is Linux-based, set the login information for the load generator.
Default: LoadRunner uses your Windows user name for the Linux login. That is, if your Windows login is lrunner, the Controller logs in to the load generator as lrunner. To log in to a Linux-based load generator using a different login name, select Name and specify the desired Linux login name.
Using this option, you can log in to the Windows Controller as bill and connect to the Linux load generator as mike. However, you should make sure that mike allows bill to log in using his name. This can be done by adding the line "+ bill" at the beginning of mike's l
.rhosts file.
Use lower case for login names. Instructs LoadRunner to use lower case names during login to avoid case-sensitive issues with the Linux operation system.
Local User. (Expert mode only) Linux load generators that use the rsh shell to establish a connection as the current Windows user (due to security considerations). To "mislead" rsh and log in as a user other than the current Windows login, select Local user and specify the desired Linux login name. Because modifying the local user name is a security breach for rsh, this option should be used only when you encounter a problem connecting to the remote machine.
The Linux shell settings for the remote Linux load generator.
Default: The Controller connects remotely to the Linux load generator using rsh (remote shell).
l
Don't use RSH. Connects to the remote load generator without using RSH. In this case, you need to activate the agent daemon on the load generator manually.
Note: If you do want to connect using RSH, clear this check box, make sure that RSH is enabled on the load generator, and make sure that the agent daemon is not already running on the load generator. If the agent daemon is running, stop it by running the following command from the <LR_root>/bin folder: m_daemon_setup l remove
Default shell. The default shell on the Linux load generator: csh (C
Shell—the default), bsh (Bourne Shell), or ksh (Korn Shell).
To work with the load generator, your Linux startup configuration file needs to include specific environment variables. For details, see l
"Linux Environment Variables" on page 896
.
Initialization command. Command line options for LoadRunner to use when logging in to a Linux system. This initialization command runs as soon as the shell opens.
Example: You could select ksh and use the following initialization command: source .profile;
Page 904 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Load Generator Configuration > Vuser Limits Tab
This tab enables you to modify the maximum number of GUI, RTE, and other Vusers that the load generator can run.
To access
Relevant tasks
Controller toolbar > > Add or Details l
"How to Add Load Generators to a Scenario" on page 895
l
"How to Modify Load Generator Details" on page 895
User interface elements are described below:
UI Element Description
Resets values to their defaults.
Available Types
Maximum Active
The types of Vusers the load generator should run.
The types of vusers are: l
GUI-WinRunner l
RTE
l
Other Vusers
The maximum number of each type of Vuser that the load generator should run.
Defaults:
l
GUI-WinRunner: 1 l
RTE: 1000 l
Other Vusers: 5000
Note: The maximum number of active Vusers that you specify must not exceed the number of Vusers that you are licensed to run. To check your Vuser licensing limitations, open the LoadRunner
License Utility by selecting Start > All Programs > HP Software
> HP LoadRunner > License > LoadRunner License Utility.
Load Generator Configuration > Vuser Status Tab
This tab enables you to view the status of all the Vusers connected to the load generator.
To access
Important information
Controller toolbar > > Add or Details
This tab is visible only when the load generator is connected.
Page 905 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Relevant tasks
See also
l
"How to Add Load Generators to a Scenario" on page 895
l
"How to Modify Load Generator Details" on page 895
"Configuring WAN Emulation Settings" on page
941
User interface elements are described below (unlabeled elements are shown in angle brackets):
UI Element
<Vuser Status>
GUI/WinRunner
Other Vusers
RTE
Totals
Description
The status of the Vusers: l
Pending. Vusers are waiting to initialize.
l
Initializing. Vusers are in the initialization state.
l
Active. Vusers are actively running in the scenario.
The number of GUI/WinRunner Vusers that are in the Pending, Initializing, and Active states.
The number of Vusers—other than
GUI/WinRunner and RTE Vusers—that are in the
Pending, Initializing, and Active states.
The number of RTE Vusers that are in the
Pending, Initializing, and Active states.
The total number of Vusers that are in the
Pending, Initializing, and Active states.
Load Generator Configuration > WAN Emulation Tab
This tab enables WAN Emulation on your scenario.
To access
Important information
Controller toolbar > > Add or Details l
To enable the WAN Emulator, the load generator must be disconnected. If the load generator is connected, select it in the Load Generators dialog box and click Disconnect. The load generator status changes to Down.
l
This tab is disabled if: n
The load generator is running on a Linux platform n
The WAN Emulation third party software is not installed n
The load generator is also the Controller
Page 906 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Relevant tasks
l
"How to Integrate WAN Emulation Into Your Scenario" on page 943
l
"How to Add Load Generators to a Scenario" on page 895
l
"How to Modify Load Generator Details" on page 895
"Configuring WAN Emulation Settings" on page 941
See also
User interface elements are described below:
UI Element
Auto Monitoring
User Details
Emulated Location
Description
Opens the third party software WAN Emulation Settings dialog box. For detailed information on configuring WAN Emulation using this dialog box, see the relevant third party software documentation.
For information on some typical network emulation settings, see
"Typical Network Emulation Settings " on page 942
.
Note: If several load generators are being configured to emulate a specific location, make sure that each load generator is configured with the same settings.
If you are connecting to the load generator remotely, but do not have the necessary permissions to retrieve third party monitors, you can retrieve these monitors with additional credentials that do have the necessary permissions. If you have these additional credentials, enter them in the
User Name and Password boxes.
The name of the emulated location.
For details, see
"Emulated Locations Overview" on page 942
.
Enables the WAN Emulator on the load generator.
Enable WAN
Emulation on Load
Generator
Load Generators Dialog Box
This dialog box enables you to manage the load generators defined for the scenario.
To access
Relevant tasks
See also
Controller toolbar >
"How to Add Load Generators to a Scenario" on page
895
"How to Modify Load Generator Details" on page 895
"Load Generators Overview" on page 893
"Load Balancing " on page 894
User interface elements are described below (unlabeled elements are shown in angle brackets):
UI Element Description
Opens the Add New Load Generator dialog box where you define a new load generator.
Page 907 of 1812 HP LoadRunner (11.50)
User Guide
Controller
<Icons>
<Load Generator table>
See
"Add Load Generator/Load Generator Information
Dialog Box " on page 896
.
Note: When you add a load generator, its status is set to Down until it is connected.
l
Connect. Instructs the Controller to connect the load generator for the scenario. The status of the load generator changes from Down to Ready.
l
Disconnect. When the load generator is connected, the button automatically changes to Disconnect.
When clicked, the status of the load generator changes to Down.
Removes the load generator from the list. The load generator can be removed when it is disconnected only.
Opens the Load Generator Information dialog box where you can view and modify information about the load generator selected in the list. See
"Add Load
Generator/Load Generator Information Dialog Box " on page 896 .
Instructs the Controller to disable or enable the load generator. When a load generator is disabled, its Name,
Status, Platform, and Details appear in gray.
Attempts to reset a failed connection.
The Controller monitors a Windows load generator's
CPU usage and automatically stops loading Vusers on a load generator when it becomes overloaded.
You can monitor the status of a machine's CPU usage as follows:
The load generator is ready.
There is a problem with the CPU usage of the load generator.
The load generator is overloaded.
Displays the following information: l
Name. The name of the load generator.
l
Status. The status of the load generator: n
Ready. The load generator is connected.
n
Connecting. The load generator is in the process of connecting.
n
Active. The load generator is running Vusers.
n
Down. The load generator is not connected.
Page 908 of 1812 HP LoadRunner (11.50)
User Guide
Controller
<Right-click menu>
n
Failed. A connection with the load generator could not be established.
l
Platform. The type of platform on which the load generator is running.
l
Details. If the connection fails, displays details about why it failed.
l
Filter Hosts. Enables you filter the load generator list by status.
l
Load Default List. Loads the default list of load generators.
l
Save List As Default. Saves the current list of load generators as the default list.
l
Sort Hosts. Enables you to sort the Load Generator table by a selected column. To sort the table in ascending/descending order, click the relevant table heading.
Scheduling Manual Scenarios
Scheduling Manual Scenarios Overview
An important factor in the creation of a manual scenario is developing a test that accurately portrays user load behavior—the type of load and the timing of the load.
After you create a scenario, you schedule the scenario to start running at a specified time. You can limit the execution duration of the scenario or of a Vuser group within the scenario.
You can also stipulate how many Vusers to start and stop running within a certain time frame. You can specify whether LoadRunner should start or stop running all Vusers in a scenario simultaneously, or only a certain number of Vusers within a specified amount of time.
Note: Rendezvous points in a Vuser script interfere with a scheduled scenario run. If your script contains rendezvous points, your scenario will not run as scheduled. For details on rendezvous points, see
"Rendezvous Points" on page 1002 .
Scheduling by Scenario or Group
After you have designed a manual scenario, you can schedule the participating Vuser groups/scripts to run as part of a scenario schedule.
You can schedule all the groups/scripts to run together on one schedule, or you can define a separate schedule for each Vuser group.
For details about manual scenario modes, see
"Manual Scenarios " on page 864 .
Page 909 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Scheduling By Scenario
When you schedule by scenario, LoadRunner runs all the Vuser groups participating in the scenario simultaneously. That is, the schedule defined for running the scenario is applied to all the
Vuser groups concurrently, and LoadRunner applies each action proportionately to all the Vusers groups.
For example, take a scenario that includes 3 participating Vuser groups as follows:
Group Name Number of Vusers
Group1 10
Group2 20
Group3
Total
30
60
When scheduling by scenario, if the schedule instructs LoadRunner to load 30 Vusers when it starts running, LoadRunner loads a proportional number of Vusers from each group as follows:
Group Name Number of Vusers
Group1
Group2
5
10
Group3
Total
15
30
Note: The same principle applies when viewing the scenario in percentage mode.
Scheduling By Vuser Group
Note: For scenarios in Vuser group mode only.
When you schedule by Vuser group, each Vuser group participating in the scenario runs on its own separate schedule. That is, for each Vuser group, you can specify when to start running the
Vuser group, how many Vusers in the group to start and stop running within specified time intervals, and how long the group should continue running.
Schedule Run Modes
You can schedule a scenario to run according to the run-time settings defined in the Vuser groups, or you can let the groups run over and over again until the scenario schedule instructs them to stop running.
You can schedule a scenario to run in one of the following modes: l
Real-world schedule. (Default) The scenario runs according to a user-defined group of actions
Page 910 of 1812 HP LoadRunner (11.50)
User Guide
Controller that simulate a real-world schedule of events. Vuser groups run according to the iterations defined in their run-time settings, but you can define how many Vusers to run at a time, how long
Vusers should continue to run, and how many Vusers to stop running at a time.
l
Basic schedule. All enabled Vuser groups run together on one schedule, each according to its own run-time settings. You can schedule how many Vusers to start running at a time, and how long they should run before stopping.
Note: You can change the default run mode in the Tools > Options > Execution tab.
The following table illustrates how the given schedule types run in real-world vs basic run mode:
Schedule by
Scenario
Run Mode
Real-world
All participating Vuser groups run together on one schedule. The scenario runs according to a user-defined group of actions that emulate a true-to-life schedule of events. You can schedule how many Vusers to start running at a time, how long to run the Vusers, and how many Vusers to stop running at a time.
Basic
All participating Vuser groups run together on one schedule, each according to its own run-time settings.
You can schedule the Vusers to start and stop running simultaneously or gradually, and you can specify how long they should run before stopping.
Group
(Not applicable when viewing scenario in
Percentage mode)
Each participating Vuser group runs according to its own defined schedule that emulates a true-to-life schedule of events for that Vuser group. You can schedule when to start running the Vuser group, how many Vusers to run at a time, how long to run the Vusers, and how many Vusers to stop running at a time.
Each participating Vuser group runs according to its own schedule, each according to its own run-time settings.
For each Vuser group, you can schedule how many Vusers in the group to start and stop running simultaneously or gradually, and you can specify how long they should run before stopping.
How to Define a Schedule for the Scenario - Workflow
This task describes how to define a schedule for a scenario.
1. Prerequisite
Make sure that a scenario is open, or create a new one, and that scripts have been selected for the scenario.
For more details, see
"How to Design a Manual Scenario " on page 868 .
2. Define the schedule
In the Scenario Schedule pane, select a schedule from the list, or define a new schedule by clicking New Schedule .
Page 911 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Define the schedule in the definition area as follows: a. (Optional) To rename the schedule, type a new name in the Schedule Name box and click
Save New Name
.
b. Select the type of schedule: Scenario or Group. For details, see
"Scheduling by Scenario or Group" on page 909 .
c. Select a run mode: Real-world or Basic. For details, see
"Schedule Run Modes" on page
910 .
Note: The default run mode for all schedules is Real-world. You can change the default to Basic in the Tools > Options > Execution tab.
3. Define actions for the schedule
The Actions Grid displays the default actions that correspond to the type of schedule you selected in step
"How to Define a Schedule for the Scenario - Workflow" on previous page
above.
For schedule action details, see
"Schedule Actions" on page 918
.
n
For details about how to add actions, see
"How to Add Actions to the Scenario Schedule "
Page 912 of 1812 HP LoadRunner (11.50)
User Guide
Controller
on page 914 .
n
For details about how to edit actions, see
"How to Edit Schedule Actions " on page 917 .
4. Vuser group schedules only: Copy a group's schedule settings to other groups - optional
When scheduling by Vuser group, you can copy a Vuser group's schedule settings to other
Vuser groups.
Note: Schedule settings copied include the schedule run mode (basic or real-world) and the set of schedule actions.
Example:
To copy group_1's schedule settings to group_2, select group_2 in the Scenario Groups pane, click Copy Schedule Settings From , and select group_1.
5. Schedule a start time for the scenario - optional
In the Schedule Definition area, click the Start Time button and select when to start running
Page 913 of 1812 HP LoadRunner (11.50)
User Guide
Controller the scenario.
How to Add Actions to the Scenario Schedule
Note: You can add actions to a real-world schedule only.
Add an action to the schedule from the Actions grid
1. In the Action grid do one of the following: n
To insert an action after a specific action, select the action and click Add Action After .
n
To add an action after the last action, double-click the last row in the Actions grid—marked by an asterisk (*).
2. In the Add Action dialog box, define the new action. For schedule action details, see
"Schedule
Actions" on page 918
.
3. Click Apply.
4. To add another action while in the Add Action dialog box, click Add Another Action and repeat steps
"How to Add Actions to the Scenario Schedule " above through "How to Add
Actions to the Scenario Schedule " above .
Add an action from the schedule graph
You can add Start Vusers, Duration, and Stop Vusers actions from the graph by splitting an action into two actions, or appending a new action after the last action in the graph.
1. Make sure that the graph is in Edit mode
.
2. Select the line that represents the action that you want to split.
Tip: Selecting the action in the Actions grid highlights the corresponding line in the graph.
3. Click the Split Action button
. The selected line splits in two. In the Actions grid, the original action splits into two equivalent actions, each representing half of the original action.
For example: n
Splitting a Duration action of 5 minutes results in two Duration actions of 2.5 minutes each.
n
Splitting a Start Vusers action that starts 20 Vusers results in two Start Vusers actions, each starting 10 Vusers.
4. (Optional) Edit each of the actions. For details, see
"How to Edit Schedule Actions " on page
Page 914 of 1812 HP LoadRunner (11.50)
User Guide
Controller
917 .
Append an action after the last action:
1. Make sure that the graph is in Edit mode .
2. In the graph toolbar, click New Action .
3. Append new actions as follows: n
Start Vusers action. Click the graph anywhere above and to the right of the endpoint of the last line of the graph.
For example: n
Duration action. Click the graph anywhere directly to the right of the endpoint of the last line of the graph.
Page 915 of 1812 HP LoadRunner (11.50)
User Guide
Controller
For example: n
Stop Vusers action. Click the graph anywhere below and to the right of the endpoint of the last line of the graph.
For example:
Page 916 of 1812 HP LoadRunner (11.50)
User Guide
Controller
4. Edit the actions. For details, see
"How to Edit Schedule Actions " below
.
How to Edit Schedule Actions
This task describes how to edit schedule actions, both in the Actions grid and from the schedule graph.
Edit an action from the Actions grid
Double-click the action (or select it), click Edit Action , and edit the action as desired.
You can also edit other actions before closing the Edit Action dialog box. Click Previous or Next to navigate between the actions.
Edit an action from the schedule graph
You can edit real-world schedules from the graph: you can edit Start Vusers, Stop Vusers, and
Duration actions. When you edit actions from the graph, the action's details in the Actions grid are updated accordingly.
l
Double-click the line in the graph representing the action you want to edit. Edit the action in the
Edit Action dialog box that opens. Click Previous or Next to edit other actions.
l
Make sure that the graph is in Edit mode
Action
Start
Vusers
Start
Vusers
Modification
, select the line in the graph, and drag it as follows:
To change the number of Vusers to start running: n
To start more Vusers, drag the diamond-shaped endpoint upwards.
n
To start fewer Vusers, drag the diamond-shaped endpoint downwards.
To change the time interval between starting Vusers: n
To increase the time interval, drag the diamond-shaped endpoint to the right.
n
To decrease the time interval, drag the diamond-shaped endpoint to the left.
Note: A vertical line indicates that the Vusers start running simultaneously.
Page 917 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Duration
n
To increase the duration between scheduled actions, drag the diamond-shaped endpoint to the right.
n
To decrease the duration between scheduled actions, drag the diamondshaped endpoint to the left.
Stop
Vusers
Stop
Vusers
To change the number of Vusers to stop running: n
To stop fewer Vusers, drag the diamond-shaped endpoint upwards.
n
To stop more Vusers, drag the diamond-shaped endpoint downwards.
To change the time interval between stopping Vusers: n
To increase the time interval, drag the diamond-shaped endpoint to the right.
n
To decrease the time interval, drag the diamond-shaped endpoint to the left.
Note: A vertical line indicates that the Vusers stop running simultaneously.
Tip: To fine-tune any of the details of the selected action line, use the arrow keys on your keyboard, or edit the action in the Actions grid.
Schedule Actions
A scenario schedule contains a series of actions that instruct the scenario when to start running a
Vuser group, how to initialize Vusers, when to start and stop running Vusers, and how long to run an action.
The following sections describe the available schedule actions.
l
"Schedule Actions" above
l
"Schedule Actions" above
l
"Schedule Actions" above
l
"Schedule Actions" above
l
"Schedule Actions" above
Start Group
The Start Group action defines when to start running a Vuser group.
Options
Start immediately after the scenario begins
(Default)
Description
LoadRunner starts running the Vuser group as soon as the scenario starts running.
Start <00:00:00>
(HH:MM:SS) after the scenario begins
After the scenario starts running, LoadRunner waits the specified time (in hours, minutes, and seconds) before it starts running the
Vuser group.
Start when group <group name> finishes
LoadRunner starts running the Vuser group immediately after the
Vuser group specified in this option has finished running.
Page 918 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Note:
l
The Start Group action is available for group schedules only, and always appears as each group's first schedule action.
l
The Start Group action is always followed by the Initialize action.
l
The Start Group action cannot be deleted.
Initialize
The Initialize action instructs LoadRunner to prepare the Vusers so that they are in the Ready state and can run.
Options
Initialize all Vusers simultaneously
Initialize XX Vusers
every <00:00:00>
(HH:MM:SS)
Initialize each Vuser just before it runs
(Default)
Description
LoadRunner initializes all the Vusers together before running them.
LoadRunner initializes the specified number of Vusers gradually, according to the specified time interval (in hours, minutes, and seconds), before running them.
LoadRunner initializes each Vuser just before it starts running.
Note: This option is not available for group schedules when the Wait
for all groups to initialize option is selected. For details, see
Schedule Definition Area .
Note:
l
The Initialize action appears in the Actions grid for all schedule types.
l
The Initialize action cannot be deleted.
Start Vusers
The Start Vusers action instructs LoadRunner to start running Vusers.
Options
Start XX Vusers:
Simultaneously
(Default)
Start XX Vusers: YY
Vusers every
<00:00:00>
(HH:MM:SS)
Description
LoadRunner runs the specified number of Vusers simultaneously.
LoadRunner runs the specified number of Vusers (XX) gradually. That is, LoadRunner runs YY Vusers, and waits the specified time (in hours, minutes, and seconds) before running another YY Vusers.
Note:
Page 919 of 1812 HP LoadRunner (11.50)
User Guide
Controller l
LoadRunner starts running Vusers only when they have reached the Ready state.
l
In a basic schedule, LoadRunner always runs all the Vusers, whether simultaneously or gradually. In a real-world schedule, you can select how many Vusers to start running.
l
While a scenario is running, you can add Vuser groups/scripts to participate in the scenario.
When starting the Vusers gradually, if you add a Vuser group to the scenario after all the original Vusers have already started running, the new group starts running immediately.
Duration
The Duration action instructs LoadRunner to continue running the scenario in the current state, for the specified amount of time.
Options
Run until completion
Description
The scenario runs until all the Vusers have finished running.
Note: In real-world schedules, this option is available after the first Start
Vusers action only, and if selected, causes all subsequent actions to be deleted.
Run for XX days and
<00:00:00>
(HH:MM:SS)
The scenario runs in its current state for the specified amount of time (in days, hours, minutes, and seconds) before continuing with the next action.
Default: 5 minutes.
Note: In a real-world schedule, if you select this option, and this
Duration action is not followed by any other action, the scenario continues to run indefinitely.
Run indefinitely
(Basic schedule only)
The scenario runs indefinitely.
Stop Vusers
The Stop Vusers action instructs LoadRunner to stop running Vusers.
Options
Stop XX Vusers:
Simultaneously
(Default)
Stop XX Vuser:
YY
Vusers every
<00:00:00>
(HH:MM:SS)
Description
LoadRunner stops running the specified number of Vusers at once.
LoadRunner stops running the specified number of Vusers gradually. That is, LoadRunner stops YY Vusers, and waits the specified time (in hours, minutes, and seconds) before stopping another YY Vusers, until all XX
Vusers have stopped running.
Add Action Dialog Box
This dialog box enables you to add actions to a real-world scenario schedule to simulate a more true-to-life schedule by which to run your scenario.
To access
In the Design tab > Scenario Schedule pane >
Page 920 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Important information
Relevant tasks
See also
Actions grid, do one of the following: l
Double-click the last row in the Actions grid— marked by an asterisk (*).
l
In the Actions grid, select the action after which you want to add a new action, and click Add Action
After
.
l
Available for real-world schedules only.
l
You can add Start Vusers, Duration, and Stop
Vusers actions only.
"How to Define a Schedule for the Scenario -
Workflow" on page 911
l
Actions Grid l
"Schedule Actions" on page 918
User interface elements are described below (unlabeled elements are shown in angle brackets):
UI Element
<Action details area>
Action type
Description
Resets the Add Action dialog box so that you can add another action.
Available only after clicking Apply when adding an action.
Adds the defined action to the Actions grid. Leaves the Add Action dialog box open, in edit mode, so that you can make changes to the action you added or add another action.
The details of the new action.
For details about the schedule actions, see
"Schedule Actions" on page 918
.
The type of action to add.
Edit Action Dialog Box
This dialog box enables you to edit schedule actions.
To access
Use one of the following: l
Double click an action in the Actions grid or in the interactive graph.
l
Design tab > Scenario Schedule pane > Actions grid/Schedule graph > Edit Action
Page 921 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Important information
Relevant tasks
See also
l
In the Actions grid, you can edit all actions.
l
In the interactive graph, you can edit Start/Stop Vusers and Duration actions only.
l
"How to Define a Schedule for the Scenario -
Workflow" on page 911
l
"How to Edit Schedule Actions " on page 917
l
Actions Grid l
"Schedule Actions" on page 918
l
Interactive Schedule Graph
User interface elements are described below (unlabeled elements are shown in angle brackets):
UI Element Description
Displays the details of the previous/next action in the
Actions grid.
<Action details area>
Action type
Displays the current details of the selected action.
Displays the type of action selected.
Scenario Schedule Pane
This pane enables you to define a schedule for running your scenario.
To access
Relevant tasks
See also
Manual scenario > Design tab
"How to Define a Schedule for the Scenario -
Workflow" on page 911
l
"Scheduling Manual Scenarios Overview " on page 909
l
"Scheduling by Scenario or Group" on page 909
l
"Schedule Run Modes" on page 910
User interface elements are described below:
UI Element
Actions grid
Description
Displays a list of scenario's schedule actions.
See Actions Grid .
Page 922 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Interactive schedule graph
Displays a graphical representation of the scenario schedule. The lines in the graph correspond to the actions defined in the Actions grid.
See Interactive Schedule Graph .
Schedule definition area
Displays the selected schedule's details.
See <!-- apply PrintOnly condition to this paragraph -->Schedule Definition
Area .
Service Level Agreements
Service Level Agreements Overview
Tracking Period
How to Define Service Level Agreements
How to Define Service Level Agreements - Use-Case Scenario
Advanced Options Dialog Box
Goal Details Dialog Box
Service Level Agreement Pane
Service Level Agreement Wizard
Select a Measurement Page
Select Transactions Page
Set Load Criteria Page
Set Percentile Threshold Values Page
Set Threshold Values Page (Goal Per Time Interval)
Set Threshold Values Page (Goal Per Whole Run)
Service Level Agreements Overview
Service level agreements (SLAs) are specific goals that you define for your load test scenario.
After a scenario run, HP LoadRunner Analysis compares these goals against performance related data that was gathered and stored during the course of the run, and determines whether the SLA passed or failed.
Depending on the measurements that you are evaluating for your goal, LoadRunner determines the
SLA status in one of the following ways:
SLA Type Description
SLA status determined at time intervals over a timeline
Analysis displays SLA statuses at set time intervals over a timeline within the run. At each time interval in the timeline—for example, every 10 seconds—
Analysis checks to see if the measurement's performance deviated from the threshold defined in the SLA.
Measurements that can be evaluated in this way:
930
930
931
932
933
934
935
923
924
924
925
928
929
929
Page 923 of 1812 HP LoadRunner (11.50)
User Guide
Controller l
Average Transaction Response Time
l
Errors per Second
SLA status determined over the whole run
Analysis displays a single SLA status for the whole scenario run.
Measurements that can be evaluated in this way: l
Total Hits per run
l
Average Hits (hits/second) per run
l
Total Throughput (bytes) per run
l
Average Throughput (bytes/second) per run
You can define and edit SLAs in the Controller or in Analysis.
To define SLAs in the Controller, see
"How to Define Service Level Agreements " below
.
For details about defining SLAs in Analysis and viewing SLA information in Analysis reports, see the HP LoadRunner Analysis User Guide.
Tracking Period
When you define an SLAs for measurements that are evaluated over a timeline, Analysis determines SLA statuses at specified time intervals within that timeline. The frequency of the time intervals is called the tracking period.
An internally-calculated tracking period is defined by default. You can change the tracking period by entering a value in the Advanced Options dialog box which Analysis plugs into a built-in algorithm to calculate the tracking period. For details, see
"Advanced Options Dialog Box " on page 928
.
How to Define Service Level Agreements
This task describes how to define service level agreements (SLAs).
You can define service level agreements (SLAs) which measure scenario goals over time intervals, or over a whole scenario run. For details, see
"Service Level Agreements Overview " on previous page .
See also the HP LoadRunner Analysis User Guide.
Tip: For a use-case scenario related to this task, see
"How to Define Service Level
Agreements - Use-Case Scenario " on next page .
1. Prerequisites
If you are defining an SLA for Average Transaction Response Time, your scenario must include a script that contains at least one transaction.
2. Run through the SLA wizard
In the Service Level Agreement pane, click New to open the Service Level Agreement wizard.
Page 924 of 1812 HP LoadRunner (11.50)
User Guide
Controller
For user interface details, see
"Service Level Agreement Wizard " on page 930 .
a. Select a measurement for the SLA.
b. If you are defining an SLA for Average Transaction Response Time, select the transactions to include in your goal.
c. (Optional) When evaluating SLA statuses over a timeline, select load criteria to take into account and define appropriate load value ranges for the load criteria. For an example, see
"How to Define Service Level Agreements - Use-Case Scenario " below
.
d. Set thresholds for the measurements.
o
If the Average Transaction Response Time or Errors per Second exceed the defined thresholds, Analysis will produce a Failed SLA status.
o
If Total Hits per run, Average Hits (hits/second) per run, Total Throughput (bytes)
per run, or Average Throughput (bytes/second) per run are lower than the defined threshold, Analysis will produce a Failed SLA status.
3. Define a tracking period - optional
For measurements whose SLA statuses are determined over time intervals, you need to define the frequency of the time intervals, that is, the tracking period. For details, see
"Tracking
Period " on previous page
.
For user interface details, see
"Advanced Options Dialog Box " on page 928 .
4. Results
When analyzing your scenario run, HP LoadRunner Analysis compares the data collected from the scenario run against the SLA settings, and determines SLA statuses which are included in the default Summary Report.
For more information, see the HP LoadRunner Analysis User Guide.
How to Define Service Level Agreements - Use-Case
Scenario
This use-case scenario describes how to define a service level agreement (SLA) for Average
Transaction Response Time.
This scenario includes the following steps: l
"How to Define Service Level Agreements - Use-Case Scenario " above
l
"How to Define Service Level Agreements - Use-Case Scenario " above
l
"How to Define Service Level Agreements - Use-Case Scenario " above
l
"How to Define Service Level Agreements - Use-Case Scenario " above
l
"How to Define Service Level Agreements - Use-Case Scenario " above
l
"How to Define Service Level Agreements - Use-Case Scenario " above
l
"How to Define Service Level Agreements - Use-Case Scenario " above
Page 925 of 1812 HP LoadRunner (11.50)
User Guide
Controller
1. Background
The administrator of HP Web Tours would like to know when the average transaction response time for booking a flight and searching for a flight exceeds a certain value. Assume that your scenario includes a script that includes the following transactions: book_flight and search_
flight.
2. Start the SLA wizard
In the Service Level Agreement pane, click New to open the Service Level Agreement wizard.
3. Select the measurement for the SLA
On the Select a Measurement page, under SLA status determined at time intervals over a
timeline, select Average Transaction Response Time.
4. Select the transactions to evaluate in your goal
On the Select a Transaction page, select the transactions to be evaluated: book_flight and
search_flight.
5. Select a load criterion and define appropriate ranges of load - optional
On the Select Load Criteria page, select the load criterion to take into account when evaluating the average transaction response time.
In this case, to see the effect that various quantities of Vusers running on the system has on the average transaction response time of each transaction, in the Load Criteria box, select
Running Vusers.
Then set the value ranges for the running Vusers:
Consider less than 20 Vusers to be a light load, 20 – 50 Vusers an average load, and 50 Vusers or more a heavy load. Enter these values in the Load Values boxes.
Note:
n
You can set up to three in-between ranges.
n
Valid load value ranges are consecutive—there are no gaps in the range—and span all
Page 926 of 1812 HP LoadRunner (11.50)
User Guide
Controller values from zero to infinity.
6. Set thresholds
On the Set Threshold Values page, you define the acceptable average transaction response times for the transactions, taking into account the defined load criteria.
In this case, define the same threshold values for both transactions as follows: for a light load, a reasonable average response time can be up to 5 seconds, for an average load, up to 10 seconds, and for a heavy load, up to 15 seconds.
Tip: To define the same thresholds for all the transactions, you can type the values in the table nearer the bottom of the Set Threshold Values page, and click Apply to all
transactions.
7. Define a tracking period - optional
When SLA statuses for a measurement are determined at time intervals over a timeline, the frequency of the time intervals is determined by the tracking period.
This step is optional because an internally-calculated tracking period of at least 5 seconds is defined by default. You can change the tracking period in the Advanced Options dialog box: a. In the Service Level Agreement pane, click the Advanced button.
b. Select Tracking period of at least X seconds, and select a tracking period. The time intervals are calculated by Analysis according to a built-in algorithm and as a function of the value you enter here.
Example:
If you select a tracking period of 10, and the aggregation granularity for the scenario
(defined in Analysis) is 6, then the tracking period is set to the nearest multiple of 6 that is greater than or equal to 10, that is, Tracking Period = 12.
For details, see
"Tracking Period " on page 924
.
Page 927 of 1812 HP LoadRunner (11.50)
User Guide
Controller
For user interface details, see
"Advanced Options Dialog Box " below
.
8. Results
When analyzing your scenario run, Analysis applies your SLA settings to the default Summary
Report and the report is updated to include all the relevant SLA information.
For example, it displays the worst performing transactions in terms of defined SLAs, how specific transactions performed over set time intervals, and overall SLA statuses.
For more information, see the HP LoadRunner Analysis User Guide.
Advanced Options Dialog Box
This dialog box enables you to define a tracking period for load test scenario.
To access
Design tab > Service Level Agreement pane >
Important Information
Relevant tasks
The tracking period is calculated by Analysis according to a built-in algorithm and as a function of the value entered here.
l
"How to Define Service Level Agreements " on page
924
l
"How to Define Service Level Agreements - Use-
Case Scenario " on page 925
"Service Level Agreements Overview " on page 923
See also
User interface elements are described below:
UI Element
Internally calculated tracking period
Description
Analysis sets the tracking period to the minimum value possible, taking into account the aggregation granularity defined for the scenario. This value is at least 5 seconds. It uses the following formula:
Tracking Period = Max (5 seconds, aggregation granularity)
Tracking period of at least X seconds
Determines the minimum amount of time for the tracking period. This value can never be less than 5 seconds.
Analysis sets the tracking period to the nearest multiple of the scenario's aggregation granularity that is greater than or equal to the value (X) that you selected.
For this option, Analysis uses the following formula:
Tracking Period =
Max(5 seconds, m(Aggregation
Granularity)) where m is a multiple of the scenario's aggregation
Page 928 of 1812 HP LoadRunner (11.50)
User Guide
Controller granularity such that m(Aggregation Granularity) is greater than or equal to X.
Example: If you select a tracking period of X=10, and the aggregation granularity for the scenario is 6, then the tracking period is set to the nearest multiple of 6 that is greater than or equal to 10, that is,
Tracking Period = 12.
Goal Details Dialog Box
This dialog box displays the thresholds that were set for the selected SLA.
To access
Important information
See also
Design tab > Service Level Agreement pane >
If you defined load criteria as part of your SLA, the threshold values are displayed per the defined load value ranges.
"Service Level Agreements Overview " on page 923
Service Level Agreement Pane
This pane lists all the service level agreements (SLAs) defined for the scenario.
To access
Relevant Tasks
See also
Design tab l
"How to Design a Goal-Oriented Scenario " on page 866
l
"How to Design a Manual Scenario " on page 868
l
"How to Define Service Level Agreements " on page 924
l
"How to Define Service Level Agreements - Use-
Case Scenario " on page 925
"Service Level Agreements Overview " on page 923
User interface elements are described below:
UI Element Description
Starts the Service Level Agreement wizard where you can define new goals for the load test scenario.
Opens the Goal Details dialog box which displays a summary of the details of the selected SLA.
Opens the Service Level Agreement wizard where you can modify the goals defined in the SLA.
Deletes the selected SLA.
Page 929 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Service Level Agreement list
Opens the Advanced Options dialog box where you can adjust the tracking period for measurements that are evaluated per time interval over a timeline.
For more information, see
"Tracking Period " on page 924 .
For user interface details, see
"Advanced Options
Dialog Box " on page 928
.
Lists the SLAs defined for the scenario.
Service Level Agreement Wizard
This wizard enables you to define goals or service level agreements (SLAs) for your load test scenario.
To access
Important information
Relevant tasks
Wizard map -
Goal measured per time interval
Wizard map -
Goal measured over whole scenario run
See also
Design tab > Service Level Agreement pane >
There are two modes for the Service Level Agreement wizard. The pages included in the wizard depend on the measurement that is selected. See the wizard maps below.
l
"How to Design a Goal-Oriented Scenario " on page 866
l
"How to Design a Manual Scenario " on page 868
l
"How to Define Service Level Agreements " on page 924
l
"How to Define Service Level Agreements - Use-Case Scenario " on page 925
The
"Service Level Agreement Wizard " above
contains:
Welcome >
"Select a Measurement Page " below
> ( "Select Transactions
Page " on next page
) >
"Set Load Criteria Page " on page 932
>
"Set
Threshold Values Page (Goal Per Time Interval)" on page 934
The
"Service Level Agreement Wizard " above
contains:
Welcome >
"Select a Measurement Page " below
>
"Set Threshold
Values Page (Goal Per Whole Run)" on page 935
"Service Level Agreements Overview " on page 923
Select a Measurement Page
This wizard page enables you to select a measurement for your goal.
Important information
l
General information about this wizard is available here:
"Service Level
Agreement Wizard " above .
Page 930 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Wizard map -
Goal measured per time interval
Wizard map -
Goal measured over whole scenario run
See also
l
There are two modes for the Service Level Agreement wizard. The wizard pages that follow depend on the measurement that you select on this page. See the wizard maps below.
The
"Service Level Agreement Wizard " on previous page
contains:
Welcome >
"Select a Measurement Page " on previous page
> ( "Select
Transactions Page " below ) >
"Set Load Criteria Page " on next page
>
"Set Threshold Values Page (Goal Per Time Interval)" on page 934
The
"Service Level Agreement Wizard " on previous page
Welcome>
"Service Level Agreements Overview " on page 923
User interface elements are described below: contains:
"Select a Measurement Page " on previous page
Threshold Values Page (Goal Per Whole Run)" on page 935
>
"Set
UI Element
SLA status determined over the whole run
SLA status determined per time intervals over a timeline
Description
Evaluates a single SLA status for the whole scenario run. Select one of the following measurements: l
Total Hits per run
l
Average Hits (hits/second) per run
l
Total Throughput (bytes) per run
l
Average Throughput (bytes/second) per run
Evaluates SLA statuses at set time intervals within the run. Select one of the following measurements: l
Average Transaction Response Time
l
Errors per Second
The time intervals at which the SLA statuses are evaluated are
known as the tracking period. For details, see "Tracking Period " on page 924
.
Select Transactions Page
This wizard page enables you to select transactions to evaluate as part of your goal.
Important information
l
General information about this wizard is available here:
"Service Level
Agreement Wizard " on previous page .
l
This page is displayed only creating an SLA for Average Transaction
Response Time.
l
In order to define an SLA for Average Transaction Response Time, at least one of the Vuser scripts participating in the scenario must include a transaction.
l
You can select multiple transactions using the C
TRL key.
Page 931 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Wizard map -
Goal measured per time interval
See also
The
"Service Level Agreement Wizard " on page 930
contains:
Welcome>
"Select a Measurement Page " on page 930
> (
"Select
Transactions Page " on previous page
) >
"Set Load Criteria Page " below
>
"Set Threshold Values Page (Goal Per Time Interval)" on page 934
"Service Level Agreements Overview " on page 923
User interface elements are described below:
UI Element
Available
Transactions
Selected
Transactions
Description
Lists the transactions in the Vuser scripts participating in the scenario.
To move a script to the Selected Transaction list, select it and click Add.
Lists the transactions in the Vuser scripts participating in the scenario that have been selected for the SLA.
To remove a script from this list, select it and click Remove.
Set Load Criteria Page
This wizard page enables you to select load criteria to take into account when testing your goal.
Important information
Wizard map - Goal measured per time interval
See also
l
General information about this wizard is available here:
"Service Level Agreement Wizard " on page
930 .
l
This page is displayed only when defining an SLA that determines SLA statuses per time interval over a timeline. l
In the next wizard step (Set Threshold Values page), you will set different thresholds per each of the load ranges that you select here.
The
"Service Level Agreement Wizard " on page 930
contains:
Welcome>
"Select a Measurement Page " on page 930
>
(
"Select Transactions Page " on previous page
) >
"Set
Load Criteria Page " above
>
"Set Threshold Values
Page (Goal Per Time Interval)" on page 934
"Service Level Agreements Overview " on page 923
User interface elements are described below:
UI Element Description
Load Criteria
The relevant load criteria that you want to use.
Example: If you want to see the impact of running Vusers on the measurement, select Running Vusers.
To define an SLA without load criteria, select None.
Page 932 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Load Values
Valid load value ranges are consecutive—there are no gaps in the range—and span all values from zero to infinity.
l
Less than. Enter the upper value for the lower range of values for the load criteria.
The lower range is between 0 and the value you entered. It does not include the upper value.
Example: If you enter 5, the lower range of values for the load criteria is l between 0 and 5, but does not include 5.
Between. The in-between range of values for the load criteria. Enter lower and upper values for this range. The lower range is included in this range; it does not include the upper value.
Example: If you enter 5 and 10, the in-between range of values for the load l criteria is from 5 and up to, but not including, 10.
Note: You can set up to three in-between ranges.
Greater than. Enter the lower value for the upper range of values for the load criteria.
The upper range includes values from the value you entered and on.
Example: If you enter 10, the upper range of values for the load criteria is from
10 and on.
Selected
Measurement
The measurement selected for the goal.
Set Percentile Threshold Values Page
This wizard page enables you to select load criteria to take into account when testing your goal.
Important information
Wizard map - Goal measured over whole scenario run
l
General information about this wizard is available here:
"Service
Level Agreement Wizard " on page 930
.
l
The Percentile SLA enables you to measure whether the percentage of transaction samples meets the defined threshold criteria.
l
You can enter a threshold value to 3 decimal places.
The
"Service Level Agreement Wizard " on page 930
contains:
Welcome>
"Select a Measurement Page " on page 930
> (
"Select
Transactions Page " on page 931 ) >
"Set Percentile Threshold
Values Page" above
"Service Level Agreements Overview " on page 923
See also
User interface elements are described below:
UI Element
Selected
Measurement
Description
The measurement selected for the goal.
Page 933 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Percentile
Provide threshold value for all transactions
Transaction name
Threshold
Percentage of transactions to measure against the configured threshold.
To apply one set of threshold values to all transactions selected for the goal, enter the threshold value and click Apply to all. These values are applied to all the transactions in the Thresholds table at the bottom of the page.
The transaction from the scenario run.
The threshold value for the selected transaction.
Set Threshold Values Page (Goal Per Time Interval)
This wizard page enables you to set thresholds for the measurements you are evaluating in your goal.
Important information
l
General information about this wizard is available here:
"Service Level Agreement Wizard " on page
930
.
l
If you defined load criteria in the
"Set Load
Criteria Page " on page 932 , you must set
thresholds per each of the defined load ranges. If you did not define load criteria, you set one threshold value. For Average Transaction response time, you set threshold values for each transaction.
Wizard map - Goal measured per time interval
The
"Service Level Agreement Wizard " on page 930
contains:
Welcome>
"Select a Measurement Page " on page
930
> ( "Select Transactions Page " on page 931
) >
"Set Load Criteria Page " on page 932
>
"Set
Threshold Values Page (Goal Per Time Interval)" above
See also
"Service Level Agreements Overview " on page 923
User interface elements are described below (unlabeled elements are shown in angle brackets):
UI Element
<Thresholds table>
Description
The thresholds for your goal. If you defined load criteria, enter thresholds for each range of values.
Note: If the maximum threshold value is exceeded during a particular time interval during the run,
Analysis displays an SLA status of Failed for that time interval.
Page 934 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Apply to all
(Average Transaction Response Time goal only)
Selected Measurement
To apply one set of threshold values to all transactions selected for the goal, enter the threshold values in this table and click Apply to all
transactions. These values are applied to all the transactions in the Thresholds table at the top of the page.
Note: Threshold values for selected transactions do not have to be the same. You can assign different values for each transaction.
The measurement selected for the goal.
Set Threshold Values Page (Goal Per Whole Run)
This wizard page enables you to set minimum thresholds for the measurements you are evaluating in your goal.
Important information
Wizard map - Goal measured over whole scenario run
See also
General information about this wizard is available here:
"Service Level Agreement Wizard " on page 930
.
The
"Service Level Agreement Wizard " on page 930
contains:
Welcome>
"Select a Measurement Page " on page 930
>
"Set
Threshold Values Page (Goal Per Whole Run)" above
"Service Level Agreements Overview " on page 923
User interface elements are described below:
UI Element Description
Selected measurement
The measurement selected for the goal.
Threshold
The minimum threshold value for the selected measurement.
Note: If the value of the measurement is lower than this threshold during the run, Analysis displays an SLA status of Failed for the entire run.
Multiple IP Addresses
Multiple IP Addresses Overview
Application servers and network devices use IP addresses to identify clients. The application server often caches information about clients coming from the same machine. Network routers try to cache source and destination information to optimize throughput. If many users have the same
IP address, both the server and the routers try to optimize. Since Vusers on the same load generator have the same IP address, server and router optimizations do not reflect real-life situations.
Page 935 of 1812 HP LoadRunner (11.50)
User Guide
Controller
LoadRunner's Multiple IP Address feature enables Vusers running on a single load generator to be identified by many IP addresses. The server and router recognize the Vusers as coming from different load generators and as a result, the testing environment is more realistic.
This feature can be implemented on Windows and Linux platforms, and applies to the following protocols:
Client/Server
Custom
E-business
ERP/CRM
Legacy
Mailing Services
Streaming Data
Wireless
DNS, Windows Sockets
Javascript Vuser, VB Vuser, VB Script Vuser
FTP, Palm, SOAP, Web (HTTP/HTML), Web Services,
WinSock\Web Dual Protocol
Oracle NCA, Oracle Web Applications 11i, PeopleSoft
Enterprise, SAP-Web, Siebel-Web
RTE
Internet Messaging (IMAP), POP3, SMTP
Real i-Mode, VoiceXML, WAP
How to Add IP Addresses to a Load Generator
The following steps describe how to add IP addresses to a load generator.
1. Run the IP Wizard on the load generator n
Windows: LoadRunner includes an IP Wizard program that you run on Windows load generators to create multiple IP addresses. You add new IP addresses to a machine once and use the addresses for all scenarios.
Run the IP Wizard on the load generator to add a specified number of IP addresses.
For details, see
"IP Wizard" on next page .
n
Linux: Manually configure the new IP addresses for Linux load generators.
2. Update the server's routing table with the new addresses
Once the client machine has new IP addresses, the server needs the addresses in its routing table, so that it can recognize the route back to the client. If the server and client share the same netmask, IP class, and network, the server's routing table does not require modification.
Note: If there is a router between the client and server machines, the server needs to recognize the path via the router. Make sure to add the following to the server routing table: route from the Web server to the router, and routes from the router to all of the IP addresses on the load generator.
Update the Web server routing table as follows:
Page 936 of 1812 HP LoadRunner (11.50)
User Guide
Controller a. Edit the batch file that appears in the IP Wizard Summary screen. An example .bat file is shown below.
b. For each occurrence of [CLIENT_IP], insert your IP address instead.
c. Run the batch file on the server machine.
3. Enable the Multiple IP Addresses feature from the Controller.
Once you define multiple IP addresses, you set an option to tell the Controller to use this feature.
a. In the Controller Design view, select Scenario > Enable IP Spoofer.
Note: You must select this option before connecting to a load generator.
b. In the Controller's Tools > Options > General tab (Expert mode only), specify how the
Controller should allocate the IP addresses: per process or per thread. For details, see
"Options > General Tab " on page 965 .
IP Wizard
This wizard enables you to create and save new IP addresses on Windows machines.
To access Start > Program Files > LoadRunner > Tools > IP Wizard
Important information
This wizard resides on each load generator. It enables you to create and save new
IP addresses on Windows machines. The new addresses can be a range of addresses defined by the Internet Assignment Numbers Authority. They are for internal use only, and cannot connect to the Internet. This range of addresses is the default used by the IP Wizard.
Relevant tasks
"How to Add IP Addresses to a Load Generator " on previous page
IP Wizard Welcome - Step 1 of 3
User interface elements are described below:
UI Element Description
Page 937 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Create new settings
Load previous settings from file
Restore Original Settings
Enables you to define new IP settings on the load generator.
Enables you to use an existing file with IP address settings.
Restores original settings.
IP Wizard - Step 2 of 3 - Optional
User interface elements are described below (unlabeled elements are shown in angle brackets):
UI Element
<Web Server
Address box>
Description
If you have more than one network card, enables you to choose the card to use for IP addresses.
This step enables the IP Wizard to check the server's routing table to see if it requires updating after new IP addresses are added to the load generator.
IP Wizard - Step 3 of 3 - Optional
User interface elements are described below:
UI
Element
Add button
Remove button
IP
Address
Subnet
Mask
Number of IPs added
Description
Opens the Add dialog box where you can add a new IP address.
The Add dialog box contains the following options: l
Private Address Spaces. Classes that represents the correct submask for the machine's IP addresses.
l
From IP. Adds IP addresses starting with this number.
l
Submask. IP addresses include two components, a netid and hostid. The submask determines where the netid portion of the address stops and where the hostid begins.
l
Number to add. The number of IP addresses to add.
l
Verify that new IP addresses are not already in use. Instructs the IP Wizard to check the new addresses. The IP Wizard adds only the addresses that are not already in use.
Removes a selected IP Address
The IP addresses on the load generator machine.
The submasks of the IP addresses on the load generator machine.
The number of IP addresses added to the load generator machine.
Page 938 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Finish button
Click Finish to exit the IP Wizard. The IP Wizard will run a netsh batch file to update the NT device drivers with the new addresses.
IP Wizard - Summary
User interface elements are described below (unlabeled elements are shown in angle brackets):
UI Element Description
<Summary area>
Displays a summary of the operations performed by the IP Wizard.
Take note of the location of the netsh batch file (.bat). This is used to update the routing table, if necessary. See
"How to Add IP Addresses to a Load Generator " on page 936 .
Configuring Terminal Services Settings
Terminal Services Overview
You can use LoadRunner's Terminal Services Manager to remotely manage multiple load generators running in your load testing scenario on a terminal server. In addition, you can use a terminal server to overcome the limitation of being able to run only a single GUI Vuser on a
Windows-based load generator. By opening a terminal server session for each GUI Vuser, you can run multiple GUI Vusers on the same application.
A terminal server client can have multiple terminal sessions running simultaneously. Using
LoadRunner's Terminal Services Manager, you can select the number of terminals to be used in your scenario (provided that you have sufficient terminal sessions running), and the maximum number of Vusers that can be run per terminal. The Terminal Services Manager then evenly distributes the number of virtual users among the client sessions.
Note: This feature is not supported if the Controller and the load generators connect over a firewall. To configure terminal services on a load generator over a firewall, see
"How to
Configure Terminal Sessions Over a Firewall " on page 941
.
About Terminal Services
Terminal services allows centralized management of computing resources for each client connected to the server, and provides each user with their own working environment. Using a terminal server client, you can operate in a server-based computing environment from a remote machine. The terminal server transmits applications over the network and displays them via terminal emulation software. Each user logs on and sees only his individual session, which is managed transparently by the server's operating system independent of any other client session.
Note: Only users with administrator privileges can connect from the Controller to a local load generator via a terminal services session.
Page 939 of 1812 HP LoadRunner (11.50)
User Guide
Controller
The following diagram illustrates how the LoadRunner components work together during a terminal session.
How to Use the Terminal Services Manager
This task describes how to set up and use LoadRunner's Terminal Services Manager.
1. Prerequisite
Make sure that a load generator has been installed on the terminal services machine. For more information, see the HP LoadRunner Installation Guide.
2. Set up the LoadRunner agent on the load generator
Perform the following steps: a. Select Start > Programs > LoadRunner > Advanced Settings > Agent Configuration, or run <LR>\launch_service\bin\AgentConfig.exe to open the Agent Configuration dialog box.
b. Select Enable Terminal Services, and click OK.
c. Restart the LoadRunner Agent as a process by double-clicking the shortcut on the desktop, or from Start > Programs > LoadRunner >
LoadRunner Agent Process. You need to run the LoadRunner Agent as a process for each terminal session that you are running.
3. Launch a terminal client session
Be aware of the following: n
You must open a Terminal Client session for each terminal that you want to run Vusers on during the scenario.
n
If you are connecting to an existing Terminal Services session, you need to open a Terminal
Client session, log in to the session, and run the LoadRunner Agent as a process.
4. Distribute Vusers on the terminal server
In the Terminal Services Tab of the Load Generator Information dialog box, Select Enable
Terminal Services Manager and enter information about the terminals and Vusers that you
Page 940 of 1812 HP LoadRunner (11.50)
User Guide
Controller want to use. For more information, see
"Load Generator Configuration > Terminal Services
Tab" on page 902 .
How to Configure Terminal Sessions Over a Firewall
This task describes how to configure a terminal sessions on a load generator that is located over a firewall. You configure the terminal sessions as independent virtual load generators. Each virtual load generator must have its own logical name.
Prerequisite
If the LoadRunner Agent is not running as a process, select Start > Programs > LoadRunner >
LoadRunner Agent Process to run it as a process.
Configure the terminal sessions as independent load generators
Perform the following steps:
1. Select Start > Programs > LoadRunner > Advanced Settings > Agent Configuration to open the Agent Configuration dialog box.
2. Select Enable Firewall Agent and Enable Terminal Services.
3. Click Settings to open the Agent Configuration Over Firewall Settings dialog box.
4. In the Local Machine Key field, enter a logical virtual load generator name, for example, machine_ofw
.
5. Click OK.
6. Create one or more terminal sessions on the load generator console machine.
Keep in mind the following: l
For each terminal session, run the agent configuration as above. For each session, specify a different Local Machine Key name, for example, machine_ofw_1, machine _ofw_2, and so on.
l
If you stop the agent on a terminal session, you must reconfigure the settings for that particular session before restarting the agent.
l
When selecting the load generator for the scenario in the Controller, select the local machine key for each individual virtual load generator used.
Configuring WAN Emulation Settings
WAN Emulation Overview
HP LoadRunner is integrated with 3rd party software that enables you to test point-to-point performance of WAN-deployed products under real-world network conditions. By installing this
WAN emulation software on your load generator, you can introduce highly probable WAN effects such as latency, packet loss, and link settings. As a result of this, your scenario performs the test in a more realistic environment that better represents the actual deployment of your application.
You can create more meaningful results by configuring several load generators with the same unique set of WAN effects, and by giving each set a unique location name, for example, London.
Page 941 of 1812 HP LoadRunner (11.50)
User Guide
Controller
When viewing scenario results in Analysis, you can group metrics from different load generators according to their location names. For information on grouping metrics according to an emulated location name, see the section that deals with applying filter and sort criteria to graphs in the HP
LoadRunner Analysis User Guide.
Typical Network Emulation Settings
The WAN Emulator allows you to emulate probable WAN effects over your network, thereby creating a more realistic scenario. The most typical effects which you can configure are:
Latency
The Latency value you define represents the time, in milliseconds, that it takes an IP packet to cross the WAN. This is usually affected by geographical distance, the available bandwidth, the network load on the route between the two ends, and whether this is a terrestrial link or not.
Packet Loss
The Packet Loss value you define represents the chance of losing IP packets while data travels through a WAN. Packets can get lost due to link faults or due to extreme network load.
Bandwidth
The Bandwidth value you define represents your network's capacity to transfer data over the
WAN.
Emulated Locations Overview
To receive more meaningful results, you can configure your WAN Emulation to emulate conditions unique to specific geographic locations. For example, London and New York.
To view the results for location individually in Analysis, you can group the results of the scenario by the emulated location name. In other words, for any graph in Analysis, all the results of the 'New
York based' load generators can be grouped together, as can all the results of the 'London based' load generators, and so on.
Note: In cases where you have to configure more than one load generator per location, make sure that each load generator designated for a specific location is configured with the same settings.
For information on grouping Analysis graph data by emulated location name, see the section that deals with applying filter and sort criteria to graphs in the HP Analysis User Guide.
Viewing WAN Emulation Monitors
The WAN Emulation starts and stops automatically as you start and stop the scenario. WAN
Emulation monitors are assigned automatically when the scenario run starts and WAN metrics are
Page 942 of 1812 HP LoadRunner (11.50)
User Guide
Controller automatically collected during the scenario run. You can view the WAN metrics during the scenario run in the Windows Resources monitor.
If a load generator is connected over a firewall, you must add the monitors manually using the
Monitor Over Firewall component. For more information, see
"Monitors Over a Firewall" on page
1026
Excluding Machines from WAN Emulation
In some situations, you may need to exclude certain machines from the WAN Emulation, for example, a software update server. This means that you set the WAN Emulator to refrain from affecting traffic from a load generator to the specified machines. When a machine is excluded from the WAN Emulation, network traffic to that machine does not suffer any WAN effects and will not be included in the WAN Emulation results.
During a scenario run, machines, that if emulated, may affect the results of the actual scenario (for example, the Controller) must be excluded. Accordingly, the following machines are excluded by default: l
The Controller or the MI Listener and proxy server.
l
The Diagnostics Commander server.
In addition to the machines which are excluded by default, the integrated 3rd party software may provide an interface for excluding additional machines from the WAN Emulation. For a list of some examples of when you may want to exclude additional machines, see
"Excluding Machines from
WAN Emulation" above
below.
Note: The option to exclude machines from the WAN Emulation might not be available. To check for the availability of this option, consult the relevant 3rd party software documentation.
Additional Reasons to Exclude Machines
Examples of situations where you should exclude machines from an emulated WAN include: l
In a Multiprotocol scenario that includes a Web server and a database server; where information from the database server is not required as a part of the load test. In such a case, you would exclude the database server.
l
You may want to exclude all deployment and software upgrade servers.
l
Where a user runs and stores scripts on a shared network drive.
How to Integrate WAN Emulation Into Your Scenario
This task describes how to run a scenario using WAN Emulation and view the WAN metrics in
Analysis.
1. Prerequisite
Make sure that the relevant 3rd party components are installed on the load generator machines.
Page 943 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Note that in addition to the load generators, you may be required to install the WAN Emulator on additional LoadRunner components. For more information, see the relevant WAN emulation software installation documentation.
2. Determine emulated locations and define the WAN Emulation settings for each load generator
Note: For concept details about emulated locations, see
"Emulated Locations Overview" on page 942
.
On the main Controller toolbar, click the Load Generator button to open the Load
Generator Information dialog box. Select the desired load generator, then click Details.
On the WAN Emulation tab: n
In the Emulated Location box, determine which locations you would like to emulate in your scenario.
n
Click WAN Emulation Settings to open the third party software WAN Emulation setting dialog box. For detailed information on configuring WAN Emulation using this dialog box, see the relevant third party software documentation. If several load generators are being configured to emulate a specific location, make sure that each load generator is configured with the same settings.
For user interface details, see
"Load Generator Configuration > WAN Emulation Tab" on page
906 .
3. View WAN metrics in HP LoadRunner Analysis
The WAN Emulation starts and stops automatically as you start and stop the scenario. WAN metrics are automatically collected during the scenario run.
You can view all the WAN metrics in the Windows Resources monitor, as well as in Analysis using all of the available analysis tools, including the option to group metrics by emulated location, and to correlate data such as response time with WAN metrics. For more information, see the HP LoadRunner Analysis User Guide.
WAN Emulation Best Practices
We recommend the following when running a scenario with WAN Emulation: l
Once the scenario has started, check that WAN Emulation is running in one of the following ways: n
Check for a confirmation message in the notification messages of the Output window. The message should contain the following text:
WAN Emulation started on host <host name> with the following configuration <config> n
Ping the load generator from your machine and check that the latency and packet loss behavior is as defined. Your machine must not be excluded from WAN Emulation to do this.
l
If you kill the LR_Bridge.exe or magentproc.exe processes on a load generator to stop a load
Page 944 of 1812 HP LoadRunner (11.50)
User Guide
Controller test, manually stop the WAN Emulation as well.
Limitations
l
Selecting either Use bandwidth, or Use custom bandwidth in the Network: Speed
Simulation node in the Run Time Settings, may interfere with the WAN Emulation settings and could lead to unexpected behavior. For more information on Run Time Settings, refer to the HP
Virtual User Generator User Guide.
l
There is no backward compatibility between the current LoadRunner/WAN Emulation integration and any previous integrations.
l
The integrated WAN emulation software may not comply with accepted Internationalization
(I18N) conventions.
l
The WAN emulation software may consume large amounts of memory, since the technology delays traffic and captures traffic for later analysis. To verify that the load generator machine has sufficient memory, compare the load generator memory consumption with and without the emulation.
l
WAN emulation software integration may not be available on the Linux platform.
Running Load Test Scenarios
Online Monitor Graphs
Online Monitor Graphs Overview
You can view the data collected by the online monitors using the online monitor graphs.
About Online Monitor Graphs
Online monitor graphs display performance measurements for those resources being monitored during scenario run. Each measurement is represented on the graph by a colored line. Information about the measurements is listed in the legend below the graph. The legend displays the measurements for the selected graph only.
For details about selecting monitor graphs and customizing the graph display area, see
"How to
Display Online Monitor Graphs " on next page
.
For details about customizing graph layout and measurements, see
"How to Customize Online
Graph and Measurement Settings " on page 947
.
Viewing Monitor Data Offline
After monitoring resources during a scenario run, you can view a graph of the data that was gathered using HP LoadRunner Analysis. Analysis processes the data from the scenario run results files, and generates a graph for each measurement that was monitored.
Page 945 of 1812 HP LoadRunner (11.50)
User Guide
Controller
For details about working with Analysis at the end of the scenario run, see the HP LoadRunner
Analysis User Guide.
How to Display Online Monitor Graphs
This task describes how to open other monitor graphs and customize the graph display area.
Prerequisites
To see data in the online monitor graphs, the relevant monitoring environments must be configured.
For details, see
"How to Set Up the Monitoring Environment – Workflow" on page 1044 .
Open a monitor graph
By default, LoadRunner displays the following graphs in the graph display area: l
Running Vusers
l
Transaction Response Time
l
Hits per Second
l
Windows Resources
You can open other graphs one at a time, as follows:
Method 1
1. Select Monitors > Online Graphs > Open a New Graph, or right-click a graph and select
Open a New Graph.
2. In the Open a New Graph dialog box, click the "+" in the left pane to expand the category nodes, and select a graph. You can view a description of the selected graph in the Graph
Description box.
3. Click Open Graph, or drag the selected graph into the right pane of the Run view.
Method 2
In the graph tree on the left of the Run tab, click the "+" to expand the category nodes. Doubleclick a graph or, alternatively, select it and drag it to the graph display area on the right.
Note: If the graph tree is not displayed, select View > Show Available Graphs. To hide the graph tree view, select View > Hide Available Graphs.
Customize the graph display area - Optional
By default, LoadRunner displays four graphs in the graph display area.
To change the number of graphs displayed, right-click a graph in the graph display area and select
View Graphs (or select View > View Graphs).
Do one of the following: l
Select the number of graphs to display from the options given l
Select Custom Number and enter a number of graphs to display.
Page 946 of 1812 HP LoadRunner (11.50)
User Guide
Controller l
To display only one graph, double-click the graph displayed in the graph display area. To return to the previous view, double-click the graph again.
How to Customize Online Graph and Measurement
Settings
This task describes ways to customize online graphs and graph measurements.
Configure the graph settings
You can customize: l
The type of graph display l
What to display on the x-axis and y-axis.
You can apply these settings to all graphs, or to a specific graph only.
To configure the graph settings, in the Run tab, select Monitors > Online Graphs > Configure,
(or right-click a graph and select Configure).
For user interface details, see
"Graph Configuration Dialog Box" on page 950
.
Configure the measurement settings
You can customize the appearance and scale of measurements in a graph, and select whether they should be displayed in the graph or hidden from the graph.
In the Run tab, right-click a measurement in the graph or legend, and select Configure.
For user interface details, see
"Measurement Configuration Dialog Box" on page 951 .
Example: Measurement Scale
In the following example, the same graph is displayed with a scale of 1 and 10:
The actual graph values range from 0-1, as shown in the left graph. You can view the information more accurately using a larger scale for the display, as shown in the right graph.
However, to obtain the actual values, you need to divide the displayed value by the scale. In
Page 947 of 1812 HP LoadRunner (11.50)
User Guide
Controller the example above, the highest value shown in the graph is 5. Since the scale is 10, the actual value is 0.5.
The legend below the graph indicates the scale factor.
Example: Shown/Hidden Measurements
In the following example, the first image displays a line for each of the four measurements. In the second image, the second measurement listed in the legend is hidden in the graph:
Page 948 of 1812 HP LoadRunner (11.50)
User Guide
Controller
How to Manage Online Graphs
The following sections describe ways to work with the online monitor graphs.
l
"How to Manage Online Graphs " above
l
"How to Manage Online Graphs " above
l
"How to Manage Online Graphs " above
Freeze graphs
You can pause a specific graph during a scenario run. Select the graph and select Monitors >
OnlineGraph > Freeze, or right-click the graph and select Freeze. To resume, repeat the above action. When resumed, the graph displays the data for the paused period as well.
Overlay graphs
You can merge or overlay the results of two graphs from the same scenario into a single graph. This enables you to compare several different measurements at once.
In the Run tab, right-click one of the online graphs you want to overlay, and select Overlay Graphs.
Note: The x-axis of both graphs must be the same measurement.
For details, see
"Overlay Graphs Dialog Box" on page 953
.
Export graphs to HTML
You can export graphs displayed on the Run tab to HTML format for offline viewing at a later stage.
When you export to HTML, the legend is also displayed with the graph.
You can export a single graph or all graphs in the online monitor display.
Page 949 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Export a single graph
1. Right-click the graph and select Export to HTML.
2. Specify a path and filename for the exported graph/report.
Graph Configuration Dialog Box
This dialog box enables you to customize the online graph settings.
To access
Use one of the following: l
Select Monitors > Online Graphs > Configure.
l
Right-click a graph and select Configure.
You can apply these settings to all graphs, or to a specific graph only.
Important information
Relevant tasks
"How to Customize Online Graph and Measurement Settings " on page
947
User interface elements are described below:
UI
Element
Description
Apply to all graphs
Applies the dialog box settings to all graphs.
Apply to selected graph
Applies the dialog box settings to the selected graph.
Bar
Values
Type
If the Bar display type is selected, determines the type of value that will be displayed in the bar graph: Average, Last Value, Minimum, Maximum.
Display
Type
The type of graph displayed: line graph or bar graph.
By default, each graph is displayed as a line graph.
Note: For the Network Delay graph, if you right-click the graph and select View
Segments, you can view the network segments of the graph as an area graph or a pie graph.
Graph
Time
Indicates the scale for a graph's x-axis when it is time-based. A graph can show 60 to
3600 seconds of activity. To see the graph in greater detail, decrease the graph time. To view the performance over a longer period of time, increase the graph time. The available graph times are: Whole Scenario, 60, 180, 600, and 3600 seconds.
Network
Delay
View
Available for the Network Delay Time graph only: l
SubPaths. Displays the delay measurements from the source machine to each of the nodes along the network path.
Page 950 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Refresh
Rate
The interval at which the graph is refreshed with new data. By default, the graph is refreshed every five seconds. If you increase the refresh rate, the data is refreshed less frequently.
Note: In a large load test, it is recommended to use a refresh rate of three to five seconds. This enables you to avoid problems with CPU resource usage.
Time
l
DNS name. Displays the DNS names of the measurements displayed in the legend.
Specifies how the graph displays the time (in seconds) on the x-axis: l
Don't Show. Instructs LoadRunner not to display values for the x-axis.
l
Clock Time. Displays the absolute time, based on the system clock.
l
Relative to Scenario Start. Displays the time relative to the beginning of the scenario.
Note: If no step is running, clock time is displayed.
Example: In the left image below the time is not displayed on the x-axis. In the right image, the time is displayed.
Y-Axis
Scale
Displays graphs using the selected y-axis scale: l
Automatic. Displays the default y-axis values.
l
Maximum Y-Axis Value. The maximum value for the y-axis.
l
Minimum Y-Axis Value. The minimum value for the y-axis.
Measurement Configuration Dialog Box
This dialog box enables you to configure settings for measurements in a graph. You can: l
Change line colors l
Configure a measurement's scaling l
Show/hide measurements l
View descriptions of the measurements
To access
In the Run tab, right-click a measurement in the graph or legend,
Page 951 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Relevant tasks
and select Configure.
"How to Customize Online Graph and Measurement Settings " on page 947
User interface elements are described below:
UI Element Description
Configuration tab
l
Color. The color assigned to the selected measurement.
l
Scale. The relationship between the y-axis and the graph's actual value.
n
Autoscale. Automatically scales the measurement by calculating the best ratio for displaying the graph. For some graphs, this option is not available.
l
Default value: Autoscale
Example: A scale of 1 indicates that the measurement's value is the value of the y-axis. If you select a scale of 10, you must multiply the y-axis value by 10 to obtain the true value of the measurement.
Show / Hide. The resource selected in the legend is shown/hidden in the graph.
By default, all resource measurements are shown in the graph. To show only a selected measurement, right-click the measurement, and select Show Only
Selected.
Note: Alternatively right-click a measurement in the graph legend and select
Show/Hide.
Description tab
Information about the measurement: l
Machine. Displays the name of the machine whose resources are being monitored.
l
Note: Displayed only when a machine's resources are being monitored.
Description. Displays a description of the selected measurement.
Note: Also accessible by right-clicking a measurement in the legend and selecting Description.
Machine
The name of the machine whose resources are being monitored.
Note: Displayed only when a machine's resources are being monitored.
Measurement
The name of the selected measurement.
Network Type
Appears only when monitoring a network path.
Open a New Graph Dialog Box
This dialog box enables you to open a new graph.
To access
Use one of the following: l
Run tab > Monitors > Online Graphs > Open a New Graph l
Right-click a graph and select Open a New Graph.
Page 952 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Important information
Relevant tasks
The graph selected in the graph display area will be replaced by the added graph.
"How to Display Online Monitor Graphs " on page 946
User interface elements are described below:
UI Element Description
Opens the selected graph and displays it in the graph tree view.
Display only graphs containing data
Graph
Description
Select Graph box
Select this option to view only those graphs that contain data. To view the entire list of online monitor graphs (even those that do not contain data), clear this option.
Displays a description of the selected graph
Lists the online monitor graphs by category. To expand a category node, click the "+" .
Tip: Graph names displayed in blue contain data.
Note: You can select only one graph at a time.
Overlay Graphs Dialog Box
This dialog box enables you to merge or overlay the results of two graphs from the same scenario into a single graph. The merging enables you to compare several different measurements at once.
For example, you can make an overlaid graph that displays the Web Throughput and Hits per
Second as a function of the elapsed time.
To access
In the Run tab, right-click one of the online graphs you want to overlay, and select
Overlay Graphs.
Important information
l
In order to overlay graphs, the x-axis of both graphs must be the same measurement.
l
When you overlay the contents of two graphs that share a common x-axis, the left y-axis on the overlaid graph shows the current graph's values. The right yaxis shows the values of the graph that was overlaid.
Relevant tasks
"How to Manage Online Graphs " on page 949
User interface elements are described below:
UI Element
Current Graph
Select graph to overlay with
Description
The name of the current graph.
The name of the graph to be merged with the current graph.
Note: The drop-down list displays only the active graphs that have a common x-axis with the current graph.
Page 953 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Title of overlaid graph
The title given to the overlaid graph.
Available Graphs Tree
The Available Graphs Tree displays the online monitor graphs.
Tip: Graph names displayed in blue contain data.
To select measurements to monitor in a particular graph, see the monitor configuration instructions for each specific monitor. For details, see
"How to Set Up the Monitoring Environment – Workflow" on page 1044 .
Graph
Running
Vusers
User-
Defined Data
Points
Displays the real-time values of user-defined data points. You define a data point in your Vuser script by inserting an lr_user_data_point function at the appropriate place (user_data_point for GUI Vusers and lr.user_data_point for
Java Vusers).
Error
Statistics
Vusers with
Errors
Transaction
Response
Time
Provides details about the number of errors that accrue during each second of the scenario run. The errors are grouped by error source—for example, the location in the script or the load generator name.
Provides details about the number of Vusers that generate errors during scenario execution. The errors are grouped by error source.
Shows the average response time of transactions in seconds (y-axis) as a function of the elapsed time in the scenario (x-axis).
Transaction
Per Second
(Passed)
Transaction
Per Second
(Failed,
Stopped)
Description
Provides information about the status of the Vusers running in the current scenario on all load generators. The graph shows the number of running Vusers, while the information in the legend indicates the number of Vusers in each state.
Shows the number of successful transactions performed per second (y-axis) as a function of the elapsed time in the scenario (x-axis).
Shows the number of failed and stopped transactions per second (y-axis) as a function of the elapsed time in the scenario (x-axis).
Total
Transactions
Per Second
(Passed)
Shows the total number of completed, successful transactions per second (yaxis) as a function of the elapsed time in the scenario (x-axis).
Hits Per
Second
Shows the number of hits (HTTP requests) to the Web server (y-axis) as a function of the elapsed time in the scenario (x-axis). You can compare this graph
Page 954 of 1812 HP LoadRunner (11.50)
User Guide
Controller to the Transaction Response Time graph to see how the number of hits affects transaction performance.
Throughput
Shows the amount of throughput on the Web server (y-axis) during each second of the scenario run (x-axis). Throughput is measured in bytes and represents the amount of data that the Vusers received from the server at any given second.
You can compare this graph to the Transaction Response Time graph to see how the throughput affects transaction performance.
HTTP
Responses per Second
Shows the number of HTTP status codes—which indicate the status of HTTP requests, for example, "the request was successful," "the page was not found"—(y-axis) returned from the Web server during each second of the scenario run (x-axis), grouped by status code. You can group the results shown in this graph by script (using the "Group By" function) to locate scripts which generated error codes.
Pages
Downloaded per Second
Shows the number of Web pages (y-axis) downloaded from the server during each second of the scenario run (x-axis). This graph helps you evaluate the amount of load Vusers generate, in terms of the number of pages downloaded.
Retries per
Second
Shows the number of attempted Web server connections (y-axis) as a function of the elapsed time in the scenario x-axis). A server connection is retried when the initial connection was unauthorized, when proxy authentication is required, when the initial connection was closed by the server, when the initial connection to the server could not be made, or when the server was initially unable to resolve the load generator's IP address.
Connections
Shows the number of open TCP/IP connections (y-axis) at each point in time of the scenario (x-axis). One HTML page may cause the browser to open several connections, when links on the page go to different Web addresses. Two connections are opened for each Web server.
Connections per Second
Shows the number of new TCP/IP connections (y-axis) opened and the number of connections that are shut down each second of the scenario (x-axis).
SSLs per
Second
Windows
Resources
Shows the number of new and reused SSL Connections (y-axis) opened in each second of the scenario (x-axis). An SSL connection is opened by the browser after a TCP/IP connection has been opened to a secure server.
Shows the NT and Windows 2000 resources measured during the scenario. The
NT and Windows 2000 measurements correspond to the built-in counters available from the Windows Performance Monitor.
Linux
Resources
Server
Resources
Shows the Linux resources measured during the scenario. The Linux measurements include those available by the rstatd daemon: average load, collision rate, context switch rate, CPU utilization, incoming packets error rate, incoming packets rate, interrupt rate, outgoing packets error rate, outgoing packets rate, page-in rate, page-out rate, paging rate, swap-in rate, swap-out rate, system mode CPU utilization, and user mode CPU utilization.
Shows the resources (CPU, disk space, memory, or services) used on remote
Linux servers measured during the scenario. This helps you determine the impact of Vuser load on the various system resources. The x-axis represents the
Page 955 of 1812 HP LoadRunner (11.50)
User Guide
Controller
SNMP
Resources
SiteScope
Network
Delay Time
CheckPoint
FireWall-1
Apache
elapsed time. The y-axis represents the resource usage.
Shows statistics for machines running an SNMP agent, using the Simple
Network Management Protocol (SNMP). The x-axis represents the elapsed time. The y-axis represents the resource usage.
Displays statistics about the resource usage on the SiteScope machine during the scenario run. The x-axis represents the elapsed time. The y-axis represents the resource usage.
Shows the delays for the complete path between the source and destination machines (for example, the database server and Vuser load generator). The graph maps the delay as a function of the elapsed scenario time.
Shows statistics on Check Point's Firewall server as a function of the elapsed scenario time. The x-axis represents the time that has elapsed since the start of the scenario run. The y-axis represents the resource usage.
Displays statistics about the resource usage on the Apache server during the scenario run. The x-axis represents the time that has elapsed since the start of the scenario run. The y-axis represents the resource usage.
Microsoft IIS
Shows server statistics as a function of the elapsed scenario time. The x-axis represents the time that has elapsed since the start of the scenario run. The yaxis represents the resource usage.
Microsoft
Active
Server
Pages
WebLogic
(SNMP)
Displays statistics about the resource usage on the ASP server during the scenario run. The x-axis represents the time that has elapsed since the start of the scenario run. The y-axis represents the resource usage.
Displays statistics about the resource usage on the WebLogic (SNMP) server
(version 6.0 and earlier) during the scenario run. The x-axis represents the time that has elapsed since the start of the scenario run. The y-axis represents the resource usage.
DB2
Shows the resource usage on the DB2 database server machine as a function of the elapsed scenario time. The x-axis represents the time that has elapsed since the start of the scenario run. The y-axis represents the resource usage.
Oracle
Displays information from Oracle V$ tables: Session statistics, V$SESSTAT, system statistics, V$SYSSTAT, and other table counters defined by the user in the custom query.
SQL Server
Shows the standard Windows resources on the SQL server machine. The x-axis represents the time that has elapsed since the start of the scenario run. The yaxis represents the resource usage.
RealPlayer
Client
Shows statistics on the RealPlayer client machine as a function of the elapsed scenario time. The x-axis represents the time that has elapsed since the start of the scenario run. The y-axis represents the resource usage.
Media Player
Client
Shows statistics on the Windows Media Player client machine as a function of the elapsed scenario time. The x-axis represents the time that has elapsed since
Page 956 of 1812 HP LoadRunner (11.50)
User Guide
Controller
SAPGUI
the start of the scenario run. The y-axis represents the resource usage.
Shows the resource usage of a SAP R/3 system server as a function of the elapsed scenario time. The x-axis represents the time that has elapsed since the start of the scenario run. The y-axis represents the resource usage.
Shows the resource usage of your Siebel Server Manager server as a function of the elapsed scenario time.
Siebel
Server
Manager
PeopleSoft
(Tuxedo)
J2EE
Microsoft
COM+
Citrix
MetaFrame
XP
Tuxedo
IBM
WebSphere
MQ
Network
Client
Shows the resource usage of your Tuxedo server as a function of the elapsed scenario time.
Shows the resource usage of Java 2 Platform, Enterprise Edition (J2EE) objects as a function of the elapsed scenario time. The x-axis represents the time that has elapsed since the start of the scenario run. The y-axis represents the resource usage.
A series of graphs that provide performance information for COM+ interfaces and methods as a function of the elapsed scenario time.
Citrix MetaFrame is an Application Deployment solution which delivers applications across networks. The Citrix MetaFrame Resource Monitor is an
Application Deployment Solution monitor, which provides performance information for the Citrix MetaFrame servers. The Citrix MetaFrame XP graph displays statistics about resource usage on the Citrix server during the scenario run.
Provides information about the server, load generator, workstation handler, and queue in a Tuxedo system.
Shows the resource usage of IBM WebSphere MQ Server channel and queue performance counters as a function of the elapsed scenario time.
Shows statistics for FTP, POP3, SMTP, IMAP, and DNS Vusers on the network client machine as a function of the elapsed scenario time.
Configuring Scenario Options
Configuring Scenario Options Overview
Before you run a scenario, you can configure both the load generator and Vuser behavior for the scenario. Although the default settings correspond to most environments, LoadRunner allows you to modify the settings to customize the scenario behavior. The settings apply to all future scenario runs and generally need to be set only once.
You configure these settings from the Tools > Options dialog box. Settings related to load generator behavior apply to all the load generators in a scenario.
Page 957 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Note: You can configure settings for an individual load generator that override the global settings for that particular load generator. For details, see
"How to Modify Load Generator
Details" on page 895
.
Global scenario configuration settings are unrelated to the Vuser run-time settings. Run-time settings apply to individual Vusers or scripts and contain information about logging, think time, and the network, the number of iterations, and the browser. For information on setting run-time settings, see the HP Virtual User Generator User Guide.
Expert Mode
Expert mode is intended to provide support personnel with access to system information. When you work in the Expert mode, the Controller dialog boxes contain additional options for fine tuning the Controller operation.
To activate the Expert mode, select Tools > Expert Mode.
To deactivate Expert mode, select Tools and clear the Expert Mode option.
Run-Time File Storage Locations
When you run a scenario, by default the run-time files are stored locally on each load generator
(the machine running the Vuser script). The default location of the files is in the temporary folder specified by the load generator's environment variables (on Windows, TEMP or TMP, and on Linux,
$TMPDIR or $TMP). If no environment variable is defined, the files are saved to the /tmp folder.
Alternatively, you can store the run-time files on a shared network. A shared network drive is a drive to which the Controller and all the load generators in the scenario have read and write permission. If you select to save run-time files on a shared network drive, you may need to perform path translation. Path translation ensures that the specified results folder is recognized by the remote load generator. For details about path translation see
"Path Translation " on next page .
You select where to store run-time files in the Tools > Options > Run-Time File Storage tab. For details, see
"Options > Run-Time File Storage Tab " on page 968 .
The primary run-time files are as follows:
Run-Time File Type
Vuser Script files
Description
When you run a Vuser, the Controller sends a copy of the associated Vuser script to the load generator. The script is stored in the load generator's temporary run-time folder.
If you specify that all Vusers access their Vuser scripts directly at some shared location, no transfer of script files occurs at run time. This method often necessitates path translation. For details, see
"Path Translation " on next page .
This method may be useful in either of the following situations: l
The file transfer facility does not work.
Page 958 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Result files
l
The Vuser script files are large and therefore take a long time to transfer. Remember that Vuser script files are transferred only once during a scenario.
While you run a scenario, the participating Vusers write their results to the temporary run-time file folder. After scenario execution, these result files are collated or consolidated— results from all of the load generators are transferred to the results folder. After collating the results, the temporary runtime folder is deleted.
For user interface details, see
"Options > Run-Time File
Storage Tab " on page 968 .
Path Translation
Path translation might be required when storing scripts and run-time data results from a scenario on a shared network drive (Tools > Options > Run-Time File Storage tab).
Path translation is a mechanism used by LoadRunner to convert a remote path name for the
Controller so that all participating machines recognize the same network drive.
Example 1
The scenario runs on a Windows-based machine and includes multiple Vusers running on both
Windows-based and Linux load generators. One remote load generator may map the network drive as F, while another load generator maps the same drive as H. In a complex situation such as this, you need to ensure that all participating load generators recognize the same network drive.
Example 2
The Scenario Groups/Scripts pane in the Design view contains a list of all the Vuser scripts associated with a scenario, and their locations. A script's location (path) is always based on the
Controller machine's mapping of that location. If a load generator maps to the script's path using a different name, path translation is required.
For example, assume that the scenario is running on a Windows-based machine named pc2, and that a Vuser script is located on a network drive. The Controller machine maps the network drive as
m:\lr_tests. If the remote load generator hosting the Vusers also maps the path as m:\lr_tests, no translation is necessary. However, if the remote machine maps the path as another drive or path, for example r:\lr_tests, you must translate the path to enable the load generator to recognize the script location.
Note: If the Controller and load generator machines are all Windows machines, consider using the Universal Naming Convention method instead of manually adding path translation information. On Windows machines, you can tell the Controller to convert all paths to UNC, in which case all the machines are able to recognize the path without requiring path translation.
An example of UNC format is \\machine_a\results.
Page 959 of 1812 HP LoadRunner (11.50)
User Guide
Controller
How to Configure Scenario Options
The following sections describe how to configure options that will be relevant for all your scenarios.
You configure these options in the Options dialog box (Tools > Options).
Configure timeout options
Select Tools > Options > Timeout tab and specify timeout values for commands related to the load generator. For user interface details, see
"Options > Timeout Tab " on page 970 .
If the command is not executed successfully within the timeout period, the load generator status changes to Error.
Configure Vuser run-time settings
Select Tools > Options > Run-Time Settings tab. You can specify: l
The Vuser quota for a scenario l
How to stop running Vusers l
Whether to use a seed number for random sequencing
For user interface details, see
"Options > Run-Time Settings Tab " on page 969
Configure general scenario options for Expert mode
Select Tools > Options > General tab to specify the following general scenario settings that apply when in Expert mode: l
Specify the folder for data table storage l
Disable collation of log files after a scenario run. For details, see
"How to Collate Scenario Run
Results " on page 1005 .
l
Enable multiple IP address allocation. For details, see
"Multiple IP Addresses " on page 935
.
For user interface details, see
"Options > General Tab " on page 965
Configure the default schedule run mode
Select Tools > Options > Execution tab. Under Default Scheduler select a default run mode.
For user interface details, see
"Options > Execution Tab " on page 964
For details about schedule run modes, see
"Schedule Run Modes" on page 910
.
Define a command to run after scenario results are collated
Select Tools > Options > Execution tab. Under Post Collate Command, enter a command to run after collating scenario results. For user interface details, see
"Options > Execution Tab " on page 964 .
For more details about collating run results, see
"How to Collate Scenario Run Results " on page
1005 .
Configure global run-time file storage options
Select Tools > Options > Run-Time File Storage tab, and specify where LoadRunner should save and store scenario run-time files collected on remote load generators:
Page 960 of 1812 HP LoadRunner (11.50)
User Guide
Controller l
On the load generator l
On a shared network drive
For user interface details, see
"Options > Run-Time File Storage Tab " on page 968 .
Note:
l
LoadRunner applies these settings to all the load generators participating in a scenario. You can change the settings for individual load generators as described in
"How to Modify Load
Generator Details" on page 895 .
l
Storing the files on a shared network drive is not recommended as it increases network traffic and necessitates path translation. For details about path translation, see
"Path
Translation " on page 959 .
Configure monitoring options
Select Tools > Options > Monitors tab, and configure the online monitoring settings. For user interface details, see
"Options > Monitors Tab " on page 966 .
Configure debug information options (Expert mode only)
Select Tools > Options > Debug Information tab, and determine the extent of the trace to be performed during a scenario run. For user interface details, see
"Options > Debug Information Tab " on page 963 .
Configure output display options (Expert mode only)
Select Tools > Options > Output tab, and configure how to display running Vusers on the
Controller machine. For user interface details, see
"Options > Output Tab " on page 967 .
Path Translation Table
To translate a path from one Windows-based computer to another, or between Windows-based and
UNIX machines, you create an entry in the Path Translation table. This table contains a list of paths translated into formats that can be recognized by different machines.
Each line of the Path Translation table has the following format:
<controller_host> <controller_path> <remote_path> [<remote_host>] where: l
controller_host is the name or type of the machine that is running the Controller.
The value of controller_host can be: n
<hostname>. The name of the machine running the Controller, for example, LOADPC1 n
win. The Controller is running on a Windows-based computer n
unix. The Controller is running on a UNIX machine n
all. The Controller is running on a Windows-based or a UNIX machine l
controller_path is the path of a specific folder—as recognized by the Controller. For example, if
Page 961 of 1812 HP LoadRunner (11.50)
User Guide
Controller the folder scripts is located on the network drive r—as mapped by the Controller—type the path r:\scripts in the controller_path field.
l
remote_path is the path of a specific folder—as recognized by the remote machine. For example, if the folder scripts is located on the network drive n—as mapped by the remote load generator—type the path n:\scripts in the remote_path field.
If a Vuser on the remote UNIX load generator recognizes the above path as /m/tests, you would type this path in the remote_path field.
l
remote_host is the name or type of the remote load generator. For example, if all the remote machines are UNIX workstations, you could type unix in the remote_host field. The options for the remote_host field are the same as the options for the controller_host field, listed above.
The remote_host parameter is optional.
Examples
The examples below show the use of the Path Translation table for a Windows-based Controller called Merlin.
l
Example 1: Vusers are running on a Windows 2003 machine, Oasis. Merlin maps the network drive as f:, while Oasis maps it as g:\loadtest.
merlin f:\ g:\loadtest\
Oasis l
Example 2: Vusers are running on a UNIX machine, Ultra. Ultra maps the networks drive as /u/tests/load.
merlin f:\ /u/tests/load/
Ultra l
Example 3: The mapping of the network drive by the remote load generator Jaguar, is identical to the Controller's mapping, so no translation is required. This line can be excluded from the Path
Translation table.
merlin n:\ n:\ Jaguar l
Example 4: All Windows-based Vuser load generators map the network drive as m:\loadtest
.
merlin l:\mnt\ m:\loadtest\ win
Options Dialog Box
This dialog box enables you to configure scenario options.
To access Tools > Options
Important information
The settings configured in this dialog box: l
Generally need to be set only once l
Apply to all future scenarios l
Apply globally to all the load generators in a scenario.
Note: You can change the settings for individual load generators (see
"How to
Page 962 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Modify Load Generator Details" on page 895 ). Individual load generator settings
override global scenario settings.
"How to Configure Scenario Options " on page 960
Relevant tasks
User interface elements are described below:
UI Element
Debug
Information tab
(Expert mode only)
Execution tab
Description
Enables you to determine the extent of the trace to be performed during a scenario run.
For details, see
"Options > Debug Information Tab " below
.
General tab
(Expert mode only)
Monitors tab
Output tab
(Expert mode only)
Path Translation
Table tab
Run-Time File
Storage tab
Run-Time
Settings tab
Timeout tab
Enables you to configure the following miscellaneous scenario settings: l
The default schedule run mode for a new scenario l
The command to run after collating scenario results
For details, see
"Options > Execution Tab " on next page
.
Enables you to specify global settings for data table storage, log file collation, and multiple IP address allocation.
For details, see
"Options > General Tab " on page 965 .
Enables you to configure the online monitoring settings.
For details, see
"Options > Monitors Tab " on page 966 .
Enables you to configure how running Vusers are displayed on the
Controller machine.
For details, see
"Options > Output Tab " on page 967
.
Enables you to perform path translation when storing result and script files stored on a shared network drive.
For details, see
"Options > Path Translation Tab " on page 968
.
Enables you to specify where LoadRunner should save and store the runtime files.
Default value: On the current Vuser machine
For details, see
"Options > Run-Time File Storage Tab " on page 968
Enables you to specify scenario run-time settings.
For details, see
"Options > Run-Time Settings Tab " on page 969 .
Enables you to specify timeout values for certain commands related to the load generator.
For details, see
"Options > Timeout Tab " on page 970
.
Options > Debug Information Tab
This tab enables you to configure the settings to determine the extent of the trace to be performed during a scenario run.
Page 963 of 1812 HP LoadRunner (11.50)
User Guide
Controller
To access
Important information
Relevant tasks
See also
Tools > Options > Debug Information tab l
This tab is available only when the Controller is operating in the
Expert mode.
l
The debug information is written to the Output window.
"How to Configure Scenario Options " on page 960
"Output Window " on page 991
User interface elements are described below:
UI Element Description
Sets the default debug information settings.
Keep temporary files
The LoadRunner Agent and Controller create temporary files that collect information such as the parameter file sent to the Vuser, the output compilation file, and the configuration file. The Agent files are saved in brr folders in the TMP or TEMP folder of the Agent machine. The Controller files are saved in lrr folders in the TMP or TEMP folder of the Controller machine. At the end of the scenario, all these files are automatically deleted.
When selected, this option instructs the Agent and Controller not to delete these files so that you can use them for debugging.
Trace Flags
For debugging purposes, you can configure the type of trace performed by
LoadRunner during the scenario run. Select the appropriate options to enable the detailed trace. The available trace flags are: l
General
l
File Transfer
l
Incoming Communication
l
Outgoing Communication
The trace information appears in the log file located in the specified Agent log folder.
Note: Select only the flags relating to your problem. For example, if you encounter specific problems with the transfer of files, select the File Transfer flag.
Options > Execution Tab
This tab enables you to configure miscellaneous scenario execution settings.
To access
Relevant tasks
See also
Tools > Options > Execution tab
"How to Configure Scenario Options " on page 960
"Schedule Run Modes" on page 910
User interface elements are described below:
Page 964 of 1812 HP LoadRunner (11.50)
User Guide
Controller
UI Element Description
Default
Scheduler
Enables you to set the default schedule run mode for new scenarios.
l
Real-world schedule. Runs the scenario according to a real-world set of events l
Basic schedule. Runs a basic schedule, starting the Vuser, running the for a given amount of time, and stopping them.
For more details, see
"Schedule Run Modes" on page 910
).
Post Collate
Command
Enables you to define a command that the Controller will run directly after it collates the results of a scenario run.
Example: You can define a command to run a customer application that runs the
Analysis API to extract data.
Note: In the command, you can use the keyword, %ResultDir%, to refer to the scenario's results folder. (This keyword is not case sensitive.)
Options > General Tab
This tab enables you to specify global settings for data table storage, log file collation, and multiple
IP address allocation.
To access
Important
Information
Relevant tasks
Tools > Options > General tab
This tab is available only when the Controller is operating in Expert mode.
l
"How to Configure Scenario Options " on page 960
l
"How to Add IP Addresses to a Load Generator " on page 936
User interface elements are described below:
UI
Element
Description
Data tables global directory
The network location for data tables used as a source for parameter values.
Note: This setting is only required for scripts created with earlier versions of
LoadRunner.
LoadRunner collates only result files, and not log files.
Do not collate log files
Multiple
IP address mode
Allocates IP addresses when the multiple IP address option is enabled
(Scenario > Enable IP Spoofer). The Controller can allocate an IP address per process or per thread. Allocation per thread results in a more varied range of IP addresses in a scenario.
Note: If the IP Spoofer is not enabled, this option is not available.
Page 965 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Options > Monitors Tab
In this tab you can enable the Transaction monitor, configure the behavior of the transaction data, and set the data sampling rate, error handling, debugging, and frequency settings for the online monitors.
To access
Relevant tasks
See also
Tools > Options > Monitors tab
"How to Configure Scenario Options " on page 960
"How to Set Up the Monitoring Environment – Workflow" on page 1044
User interface elements are described below:
UI Element Description
Sets the default timeout values.
Debug
Error
Handling
Send
(Expert mode only)
If Display debug messages is selected, debug-related messages are sent to the Output window.
For the Network monitor the messages are sent according to the specified debug level (1 - 9).
Controls the way in which LoadRunner issues error messages: l
Send errors to the Output window.
l
Pop-up an error message box.
l
Summary. Sends a summary of the collected data back to the Controller.
Use this option if the speed at which the data is transferred is significant to you.
l
Raw Data. Sends all of the data in raw form back to the Controller. Sending the data in raw form saves time because the data does not need to be processed. However, since all of the data is being transferred to the
Controller, it may cause more network traffic.
Transaction
Data
Configures the behavior of data for the Transaction, Data Point, and Web
Resource online graphs.
l
Enable Transaction Monitor. Enables the online Vuser Transaction monitor to start monitoring transactions at the start of a scenario.
l
Frequency. The frequency, in seconds, at which the online monitor samples the data to produce the Transaction, Data Point, and Web Resource online graphs. For a small scenario, use a lower frequency, for example, 1. For a large scenario, use a higher frequency, for example, 3 - 5. The higher the frequency, the less network traffic there will be. The data is averaged for the frequency period defined, and only one value is sent to the Controller.
Default value: 5 seconds
For information on enabling and disabling the Transaction monitor and Web Page
Diagnostics, see
"Run-Time and Transaction Monitoring " on page 1054 .
Page 966 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Server
Resource
Monitors
Note:
l
Disabling this option conserves resources.
l
You cannot modify these settings during scenario execution; you must stop the scenario before disabling the monitor or changing its frequency.
Configures the behavior of the Server Resource monitors.
l
Data Sampling Rate. The sampling rate is the period of time (in seconds) between consecutive samples. Enter the rate at which LoadRunner samples the scenario for monitoring data. If you increase the sampling rate, the data is monitored less frequently. This setting applies to all graphs.
Default value: 3 seconds
Note:
l
This data sampling rate is applied to all server monitors that are subsequently activated. It is not applied to server monitors that have already been activated.
To apply the new data sampling rate to activated server monitors, save your scenario and reopen it.
l
Each monitor has a different minimum sampling rate. If the default sampling rate or the rate set here is less than a monitor's minimum sampling rate, the monitor will sample data at intervals of its minimum sampling rate. For example, the minimum sampling rate for the Oracle Monitor is 10 seconds. If the sampling rate is set here at less than 10 seconds, the Oracle Monitor will continue to monitor data at 10 second intervals.
Options > Output Tab
This tab enables you to configure how to display running Vusers on the Controller machine.
To access
Important information
Relevant tasks
See also
Tools > Options > Output tab
This tab is available only when the Controller is operating in Expert mode.
"How to Configure Scenario Options " on page 960
"Output Window " on page 991
User interface elements are described below:
UI Element Description
Sets the default output options.
Configuration of the
"Show Vuser" operation
Specifies how to handle the Vuser logs: l
Max. simultaneously displayed. The maximum number of
Vuser logs that may be displayed simultaneously.
Default value: 10
Page 967 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Delete Output window messages upon Reset
l
Refresh timeout (milliseconds). How often the Vuser log should be refreshed.
Default value: Every 1000 milliseconds
When selected, clears all messages in the Output window when you reset a scenario.
Options > Path Translation Tab
This tab enables you to perform path translation when storing result and script files on a shared network drive.
To access
Relevant tasks
See also
Tools > Options > Path Translation tab
"How to Configure Scenario Options " on page 960
l
"Run-Time File Storage Locations " on page 958
l
"Path Translation " on page 959
User interface elements are described below (unlabeled elements are shown in angle brackets):
UI Element
<Path
Translation table>
Convert to
UNC
Mode
Path
Description
Displays a list of paths translated into formats that can be recognized by different machines.
You can insert comments by typing the # symbol at the start of a line in the table.
For details, see
"Path Translation Table " on page 961
.
When selected, LoadRunner ignores the path translation table and converts all paths to the Universal Naming Convention.
Note: This option can be used only when the Controller and load generator machines are all Windows-based machines.
The read/write permissions for the ppath.mnt file which contains the path translation table.
The path to the ppath.mnt file which contains the path translation table.
Options > Run-Time File Storage Tab
This tab enables you to specify where LoadRunner should save run-time files.
To access
Tools > Options > Run-Time File Storage tab
Page 968 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Important information
Relevant tasks
See also
User interface elements are described below:
The run-time file storage options described below apply to all the load generators in a scenario. To change the settings for an individual load generators see
"Load Generator Configuration > Run-Time File
Storage Tab" on page 899 .
l
"How to Configure Scenario Options " on page
960
l
"How to Prepare a Scenario to Run" on page 972
"Run-Time File Storage Locations " on page 958
UI Element
Scripts and results stored
Description
Select one of the following options: l
On the current Vuser machine. Saves the runtime files on the load generator that is running the
Vuser script.
Note: If you select this option, you must collate the results before you can perform any analysis. You can wait for LoadRunner to collate the results when you launch HP LoadRunner Analysis, or you can collate results by choosing
Results > Collate Results. Alternatively, select
Results > Auto Collate Results to automatically l collate the results at the end of each scenario run.
On a shared network drive. Saves the scenario results and/or the Vuser scripts on a shared network drive. A shared network drive is a drive to which the Controller and all the load generators in the scenario have read and write permission.
Note: If you select this option, you may need to perform path translation. Path translation ensures that the specified results folder is recognized by the remote load generator. For information about path translation, see
"Path Translation " on page 959 .
Options > Run-Time Settings Tab
This tab enables you to specify scenario run-time settings relating to Vuser quotas, stopping
Vusers, and the seed for random sequences.
To access
Relevant tasks
Tools > Options > Run-Time Settings tab l
"How to Configure Scenario Options " on page 960
l
"How to Prepare a Scenario to Run" on page 972
Page 969 of 1812 HP LoadRunner (11.50)
User Guide
Controller
User interface elements are described below:
UI Element Description
Sets the default run-time setting values.
Use random sequence with seed
Vuser Quota
When stopping Vusers
Allows LoadRunner to use a seed number for random sequencing. Each seed value represents one sequence of random values used for test execution. Whenever you use this seed value, the same sequence of values is assigned to the
Vusers in the scenario. This setting applies to parameterized
Vuser scripts using the Random method for assigning values from a data file. It also affects the random percentage of recorded think time (see information on the Run-Time Settings dialog box in the HP Virtual User Generator User Guide).
Enable this option if you discover a problem when running the test and want to repeat the test using the same sequence of random values.
Default: 0
To prevent your system from overloading, you can set quotas for
Vuser activity. The Vuser quotas apply to Vusers on all load generators.
l
Number of Vusers that may be initialized at one time - all
load generators. The maximum number of Vusers the load generator can initialize at a time (when an Initialize command is sent).
Default: 999
Controls how Vusers stop running when the Stop button is clicked.
l
Wait for the current iteration to end before stopping.
(Default) The Vuser completes the iteration it is running before stopping. The Vusers move to the Gradual Exitingstatus and exit the scenario gradually.
l
Wait for the current action to end before stopping. The
Vuser completes the action it is running before stopping. The
Vusers move to the Gradual Exitingstatus and exit the scenario gradually.
l
Stop immediately. The Vusers stop running immediately.
The Vusers move to the Exitingstatus and exit the scenario immediately.
Options > Timeout Tab
This tab enables you to specify timeout values for certain commands related to the load generator.
Page 970 of 1812 HP LoadRunner (11.50)
User Guide
Controller
To access
Tools > Options > Timeout tab
Important information
LoadRunner enables you to set the timeout interval for commands and Vuser elapsed time.
The command timeouts are the maximum time limits for various LoadRunner commands. When a command is issued by the Controller, you set a maximum time for the load generator or Vuser to execute the command. If it does not complete the command within the timeout interval, the Controller issues an error message
Note: LoadRunner recognizes the fact that the number of active Vusers influences the timeout values. For example, 1000 Vusers trying to initialize will take much longer than 10 Vusers. LoadRunner adds an internal value, based on the number of active Vusers, to the specified timeout value.
Relevant tasks
"How to Configure Scenario Options " on page 960
User interface elements are described below:
UI Element Description
Sets the default timeout values.
Command
Timeout
(seconds)
Command
Timeout:
Load
Generator
Command
Timeout:
Vuser
If Enable timeout checks is selected, this area defines how LoadRunner should monitor the status of load generators and Vusers after a command is issued by the Controller. If the load generator or Vuser does not complete the command within the timeout interval you specified, the Controller issues an error message.
If Enable timeout checks is not selected, LoadRunner waits an unlimited time for the load generators to connect and disconnect, and for the Initialize, Run,
Pause, and Stop commands to be executed.
l
Connect. The time limit that LoadRunner waits to connect to any load generator. If a connection is not successful within this time, the status of the load generator changes to Failed.
l
Default value: 120 seconds.
Disconnect. The time limit that LoadRunner waits to disconnect from any load generator. If a disconnection is not successful within this time, the status of the load generator changes to Failed.
Default value: 120 seconds.
l
Init. The timeout value for the Initialize command.
l
Default value: 180 seconds.
Run. The timeout value for the Run command.
l
Default value: 120 seconds.
Pause. The timeout value for the Pause command.
l
Default value: 120 seconds.
Stop. The timeout value for the Stop command.
Default value: 120 seconds.
Page 971 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Update
Vuser elapsed time every
The frequency at which LoadRunner updates the value displayed in the Elapsed
Time column in the Vusers dialog box.
Default value: 4 seconds.
Example: If you select a Vuser and click the Initialize button, LoadRunner checks whether the Vuser reaches the READY state within 180 seconds (the default Init timeout period); if it does not, the Controller issues a message indicating that the Init command timed out.
Before Running Your Scenario
How to Prepare a Scenario to Run
This task describes steps to take before you start running your scenario.
For details on designing the scenario, see
"Designing Scenarios " on page 863
.
Specify result file name and location
Select Results > Results Settings.
1. Enter a descriptive name for the result file.
This is especially useful for cross results analysis, in which LoadRunner superimposes the results of several scenario runs in a single graph and lets you compare the results of multiple scenario runs. Giving each run a descriptive name enables you to distinguish between the results of the multiple runs displayed later in the analysis graph.
2. Enter the full path to the folder where the result file will be stored. This depends on the run-time file storage options configured.
For details on setting global run-time file storage options, see
"Options > Run-Time File
Storage Tab " on page 968
. To set run-time file storage options for an individual load generator, see
"Load Generator Configuration > Run-Time File Storage Tab" on page 899 .
n
If you are using the default file storage setting (local machine), specify a folder in which to store all of the collated results after the scenario run.
n
If you specified a shared network drive as the file storage method, specify the folder to which
Vuser groups should write during scenario execution.
3. Select the appropriate options for subsequent scenario runs.
Note:
n
When comparing the results of scenario runs in Analysis, the graph displays all the result sets by name. For example, the image below displays the superimposed results sets of two scenario runs, res12, and res15.
When naming the results files, avoid using the same name when saving to different directories.
Page 972 of 1812 HP LoadRunner (11.50)
User Guide
Controller n
You can use HP's Web-based test management program, HP Application Lifecycle
Management, to store results to a project. For information, see
"Managing Scenarios
Using Application Lifecycle Management" on page 1012 .
Specify Scenario Run-Time Settings
You can instruct LoadRunner to allow an individual Vuser or the Vusers in a group to complete the iterations they are running before stopping, to complete the actions they are running before stopping, or to stop running immediately. For details, see
"Options > Run-Time Settings Tab " on page 969 .
Set up the monitoring environment - optional
LoadRunner enables you to view data generated during the scenario run using the online monitors.
Before the run, specify the server machines that the Controller should monitor during the scenario run.
For details, see
"How to Set Up the Monitoring Environment – Workflow" on page 1044 .
Delete diagnostics log files from servers l
Siebel Diagnostics: Delete Siebel Diagnostics logs (*.sarm files) from all servers involved in the load test.
l
Siebel DB Diagnostics: Delete log files from all servers involved in the load test.
l
Oracle 11i Diagnostics: Delete trace log files from all servers involved in the load test.
Enable Automatic Result Collation - optional
If you are using the default file storage setting—local machine— (see
"How to Prepare a Scenario to Run" on previous page
above), prior to running the scenario you can enable auto-collation. As soon as the scenario run is complete, LoadRunner automatically collates the results from all the load generators and diagnostics mediators/servers.
Page 973 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Note: Alternatively, you can collate the results manually after the scenario run is complete. For details, see
"How to Collate Scenario Run Results " on page 1005
.
To enable automatic collation, select Results > Auto Collate Results. When this feature is enabled, Auto Collate Results is displayed in the status bar.
If you are working in Expert mode, you can disable the collation of the log files. Select Tools >
Options > General tab > Do not collate log files.
To set a post-collation command, select Tools > Options > Execution tab, and enter the command in the Post Collate Command box. For details, see
"Options > Execution Tab " on page
964 .
Enable Auto Load Analysis- optional
To invoke HP LoadRunner Analysis as soon as the scenario is finished running, select Results >
Auto Load Analysis. When this is enabled, Auto Load Analysis is displayed in the status bar.
Schedule scenario - Optional
Define a schedule for the scenario. For details, see
"How to Define a Schedule for the Scenario -
Workflow" on page 911 .
Provide scenario summary information - optional
Select Scenario > Summary Information, and enter the scenario's summary information.
For details, see
"How to Define a Schedule for the Scenario - Workflow" on page 911
.
Set up the scenario to run GUI Vusers - optional
If you have integrated a QuickTest or Unified Functional Testing script into the scenario: l
Ensure that QuickTest or Unified Functional Testing is closed before running the scenario.
l
In the Run-Time Settings for script dialog box, only the General categories and sub-categories
(General, Iterations, Miscellaneous, Think Time) are relevant for QuickTest or Unified
Functional Testing tests. The Replay options are not relevant.
Note: You can run only one GUI Vuser concurrently per machine.
Set Results Directory Dialog Box
This dialog box enables you to set the location in which the Controller saves scenario run results.
To access Results > Results Settings
Page 974 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Important information
If you have an open connection to an HP ALM project, the Controller saves the results to a test set. You can also save the results directly to disk using the standard file system.
Relevant tasks
"How to Prepare a Scenario to Run" on page 972
User interface elements are described below:
UI Element
Automatically create a results directory for each scenario execution
Description
Instructs LoadRunner to create a unique results folder for each scenario run.
By default, the result names are res1, res2, res3, and so on.
Automatically overwrite existing results directory without prompting for confirmation
Directory
Instructs LoadRunner to automatically overwrite previous result sets, without prompting the user.
Specify a location in the file system where the Controller will save the results file. The Controller creates a subfolder in the results folder. All results are saved within this subfolder.
Displays the default LoadRunner folder path.
File System
(only when connected to HP
ALM).
HP ALM
(only when connected to HP
ALM)
Enables you to save the results to a Application Lifecycle Management test set.
Results Name.
Specify a name for the run results.
LoadRunner allows you to give descriptive names to each result set. This is especially useful for cross results analysis, in which LoadRunner superimposes the results of several scenario runs in a single Analysis graph and lets you compare the results of multiple scenario runs. The descriptive graph names enable you to distinguish between the results of the multiple runs.
Results Path
Displays the location for the results as specified in Results Name and
Directory.
Avoid using the same name with different paths. Only the names appear on the Analysis graphs. If the result names are identical it will be difficult to distinguish between the runs.
Page 975 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Summary Information Dialog Box
This dialog box enables you to provide a detailed description of the scenario.
To access
Relevant tasks
User interface elements are described below:
Scenario > Summary Information
"How to Prepare a Scenario to Run" on page 972
UI Element
Author
Description
Scenario Path
Subject
Description
The name of the scenario's author
A description of the scenario
The name and location of the scenario definition file
(.lrs)
A subject name or short title for the scenario
Running Scenarios
Running Scenarios Overview
After planning, designing and scheduling your scenario, you run it to create load on your application and to test its performance.
Start of run
When you instruct LoadRunner to begin the scenario run, the Controller checks the scenario configuration information, invokes the applications that were selected to run with the scenario, and then distributes each Vuser script to its designated load generator. When the Vusers are ready, they start running their scripts.
As the scenario starts, in the Scenario Groups pane you can watch Vusers gradually start running.
During run
During the scenario run, you can see a synopsis of the running scenario in the Scenario Status pane. You can also drill down to see which Vuser actions are causing the application problems.
The Controller's online graphs display performance data collected by the monitors. You use this information to isolate potential problem areas in your system.
Page 976 of 1812 HP LoadRunner (11.50)
User Guide
Controller
End of run
The scenario ends when all the Vusers have completed their scripts, when the duration runs out, or when you terminate it.
At the conclusion of the test run, the Scenario Status pane shows the Down status. This indicates that the Vusers have stopped running.
How to Run a Scenario
This task describes how to run a scenario.
1. Prerequisite
Open an existing scenario, or design a new one.
n
To design a manual scenario, see
"How to Design a Manual Scenario " on page 868
.
n
To design a goal-oriented scenario, see
"How to Design a Goal-Oriented Scenario " on page
866 .
2. Prepare to run the scenario
Before you run the scenario, specify a location for the scenario results and other run-time related settings. For details, see
"How to Prepare a Scenario to Run" on page 972
.
3. Run the scenario
In the Run tab, click the Start Scenario button to begin running the scenario. The scenario runs according to its defined schedule.
4. Manually control the behavior, addition, and stopping of Vusers during the scenario run optional
You can do the following during the scenario run:
Note: For a use-case scenario that explains the differences between the following options, see
"Control Vusers During a Scenario Run - Use-Case Scenario " on page 980 .
n
Control the behavior of Vuser groups. You can initialize, run, and stop Vuser groups during the scenario run.
To initialize, run, or stop an entire Vuser group, select the group in the Scenario Groups pane, and click the desired button on the main Controller toolbar: o
Initialize Vusers.
o
Run Vusers.
o
Stop Vusers immediately.
o
Stop Vusers gradually.
Page 977 of 1812 HP LoadRunner (11.50)
User Guide
Controller n
Run or stop individual Vusers. You can run or stop specific Vusers within a Vuser group.
For user interface details, see
"Vusers Dialog Box" on page 892
.
n
Initialize/Run additional Vusers, or stop currently running Vusers. You can manually control the addition of new Vusers to a running scenario, as well as stop running Vusers. For user interface details, see
"Run/Stop Vusers Dialog Box" on page 996 .
5. View a log containing run-time information about each running Vuser - Optional
For user interface details, see
"Vuser Script Log " on page 1001
.
6. Release Vusers from a rendezvous before the Controller releases them - Optional
For more information, see
"Rendezvous Points" on page 1002
.
7. Log execution notes during the scenario run - Optional
The Controller provides you with a dialog box in which you can log comments while a scenario is running. To open the dialog box select Scenario > Execution Notes. The notes are automatically saved by clicking OK to close the dialog box.
8. Monitor the scenario - optional
During the scenario run, you can view data collected by the online monitors using the online monitor graphs. If you did not set up the monitors before you started the run, you can do so during the run. The data collected by the monitors can be viewed using the LoadRunner online graphs.
n
For details about setting up the online monitors, see
"How to Set Up the Monitoring
Environment – Workflow" on page 1044
.
n
For details about viewing the monitor graphs, see
"Online Monitor Graphs " on page 945
.
9. Collate run results
If you are using the default file storage setting—local machine, when the scenario run is complete, the run results must be collated or consolidated in preparation for result analysis. If
LoadRunner is not set up to collate the results automatically upon completion of the run, you need to collate the results manually after the run.
Select Results > Collate Results > Collate Results. For details, see
"How to Collate
Scenario Run Results " on page 1005 .
For details about result collation, see
"Collating Run Data" on page 1005 .
Initialize, Run, or Stop Vuser Groups - Use-Case Scenario
This use-case scenario describes how David can manipulate the behavior of the Vuser groups during the scenario run, irrespective of their defined schedules. The examples will show how he can initialize, run, and stop all the Vusers in a Vuser group simultaneously.
Initialize a Vuser group
If David wants to initialize all the Vusers in Script_C simultaneously, he selects the script in the
Scenario Groups pane and clicks the Initialize Vusers button on the Controller toolbar. All
Vusers that are still in the Down state are immediately initialized (in this case, only five). Their status changes from Down to Pending to Initializing to Ready. They then run according to their
Page 978 of 1812 HP LoadRunner (11.50)
User Guide
Controller defined schedules.
Note: Only Vusers that are in the Down state can be initialized. Vusers that have been initialized already are unaffected.
Run a Vuser group
If David wants to run all the Vusers in Script_C simultaneously, he selects the script in the
Scenario Groups pane and clicks the Run Vusers button on the Controller toolbar. All Vusers in the group that have not yet started running move to the Run state and begin executing their scripts.
Stop a Vuser Group
If David wants to stop all the Vusers in Script_C from running, he has two options: l
To stop them immediately
He selects the script in the Scenario Groups pane and clicks the Stop Vusers button on the
Controller toolbar. All Vusers that have been initialized, or are already running, stop executing their scripts immediately and move directly to the Stopped state.
l
To stop them gradually
He selects the script in the Scenario Groups pane and clicks the Gradual Stop button
Controller toolbar. All Vusers that have been initialized, or are already running, move to the
Gradual Exiting state and then exit the scenario gradually as per their defined schedules.
on the
Page 979 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Note: The group can only be stopped gradually if Wait for the current iteration to end
before exiting or Wait for the current action to endbefore exiting have been selected in the Run-Time Setting tab of the Options dialog box. For more information, see
"Options >
Run-Time Settings Tab " on page 969 .
Control Vusers During a Scenario Run - Use-Case
Scenario
This use-case scenario describes how to override defined schedules and manually control the behavior, addition, and stopping of Vusers during a scenario run.
Note: For a task related to this scenario, see
"How to Run a Scenario" on page 977
.
David Smith is a load tester at NewSoft Company, currently using LoadRunner to test a new product in preparation for its upcoming release.
His load test contains three Vuser groups, Script_A, Script_B, and Script_C. Each group has been assigned ten Vusers and been given the same schedule definitions, that is, to start two
Vusers every ten seconds, and to stop two Vusers every ten seconds.
If David were to leave these schedules as defined, the start and stop actions in the scenario groups pane would look as follows:
Start
Stop
The following table shows the options available to David should he wish to override these defined schedules and manually manipulate the way the Vusers start or stop:
Page 980 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Note: All the following use-case scenario options refer back to the scenario explained above.
Control Vusers Option
Manipulate an entire Vuser group.
Example: Run or stop all the Vusers in a group simultaneously.
Run/Stop individual Vusers, or add new Vusers.
Example 1: Run/Stop a single Vuser currently in the down/run state.
Example 2: (Vuser Group mode) Add a specified number of Vusers to a group without initializing or running them.
Initialize/Run/Stop any number of Vusers within a group.
Use-Case Scenario
"Initialize, Run, or Stop Vuser Groups -
Use-Case Scenario" on page 978
"Run/Stop Individual Vusers, or Add New
Vusers - Use-Case Scenario" below
"Initialize/Run Additional Vusers or Stop
Running Vusers - Use-Case Scenario " on page 985
Run/Stop Individual Vusers, or Add New Vusers - Use-
Case Scenario
This use-case scenario describes how David can manipulate the behavior of individual Vusers during the scenario run, irrespective of their defined schedules. The examples will show how he can run or stop individual Vusers, as well as how he can add new Vusers to the scenario.
Note: The examples presented in this section demonstrate options in the Vusers dialog box.
Not all information relevant for working with this dialog box necessarily appears here. For full information about working with the Vusers dialog box, see
"Vusers Dialog Box" on page 892
.
Run an individual Vuser
If David wants to immediately run an additional Vuser from Script_A, in the Run tab, he clicks
Vusers to open the Vusers dialog box.
By selecting script_a, and All Vusers in the filter options at the top of the dialog box, the table displays a list of all the Vusers in Script_A, and indicates that five are currently running, and that five are still down.
Page 981 of 1812 HP LoadRunner (11.50)
User Guide
Controller
David then selects Vuser number 6 (or any Vuser in the Down state that he wishes to run), and clicks Run.
That Vuser is immediately initialized and moved to the Run state.
Stop an individual Vuser
If David wants to stop one of the running Vusers in Script_A, in the Run tab, he clicks Vusers to open the Vusers dialog box.
By selecting script_a, and All Vusers in the filter options at the top of the dialog box, the table displays a list of all the Vusers in Script_A, and indicates that five are currently running, and that five are still down.
Page 982 of 1812 HP LoadRunner (11.50)
User Guide
Controller
He then selects Vuser number 1 (or any running Vuser that he wishes to stop), and then selects one of the stopping options: l
Stop the Vuser gradually. David clicks Gradual Stop, and the Vuser immediately moves from the Run state to the Gradual Exiting state, where it completes its current iteration or action before stopping.
l
Stop the Vuser immediately. David clicks Stop,and the Vuser immediately stops running and moves to the Stopped state.
Add new Vusers (Vuser Group mode only)
If David is working in Vuser Group mode, he can add new Vusers to a group without initializing them, as follows:
In the Run tab, he clicks Vusers to open the Vusers dialog box, then he clicks Add Vusers to open the Add Vusers dialog box.
Page 983 of 1812 HP LoadRunner (11.50)
User Guide
Controller
He then enters the following information (as shown in the image above): l
Group Name. script_a l
Quantity to add. 5 l
Load Generator Name. localhost (or any load generator on which the group is running Vusers).
l
Select Script. Script_A
These settings instruct LoadRunner to add five Vusers to Script_A, and that the additional Vusers should run Script_A when they run.
Note: For full information on how to work with the Add Vusers dialog box, see
"Add Vusers
Dialog Box " on page 875
.
He clicks OK. Five Vusers are added to Script_A in the down state, from where they run according to the group's defined schedules.
Page 984 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Initialize/Run Additional Vusers or Stop Running Vusers -
Use-Case Scenario
This use-case scenario describes how David can manipulate the behavior of Vusers during a scenario run, irrespective of their defined schedules. The examples will show how he can initialize or run specified numbers of additional Vusers, or stop specified numbers of running Vusers.
Note: The examples presented in this section demonstrate options in the Run/Stop Vusers dialog box. Not all information relevant for working with this dialog box necessarily appears here. For full information about working with the Run/Stop Vusers dialog box, see
"Run/Stop
Vusers Dialog Box" on page 996
.
Initialize/Run additional Vusers in Vuser group mode
The following procedure shows how David can initialize and run additional Vusers when he is working in Vuser Group mode:
Note: The options to initialize or run additional Vusers can be done as two separate actions, with no connection to each other. They are being shown here together as a single workflow for demonstrative purposes only.
1. Initialize additional Vusers
If he wants to initialize ten Vusers in Script_A immediately, and not wait for them to initialize as per their defined schedules, in the Run tab, he clicks Run/Stop Vusers to open the Run/Stop
Vusers dialog box.
In the dialog box, he makes sure that only the check box by script_a is selected, and he enters
10 in the # (number) column.
To initialize these Vusers, he clicks Initialize. Ten Vusers are immediately initialized and move to the Ready state. From there, they run according to their defined schedules.
Page 985 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Note: The additional initialized Vusers are taken from the Vusers that are in the Down state. If David initializes a greater number of Vusers than there are in the Down state, then all of them will be initialized. In the example above, there were five Vusers in the Down state. All of them have been initialized, while an additional five have been created.
2. Run additional Vusers
If David then wants to run five additional Vusers in Script_A immediately, and not wait for them to run as per their defined schedules, in the Run/Stop Vusers dialog box, he makes sure that only the check box by script_a is selected, and he enters 5 in the # (number) column.
He then has the following two options for how to run these additional Vusers: n
Run initialized Vusers. He can run five Vusers from those he initialized in the previous step. To do this, he clicks the arrow on the Run button and selects Run Initialized. Five
Vusers immediately move from the Ready state to the Run State.
n
Run new Vusers. He can create and run five new Vusers, with no effect on those he initialized in the previous step. To do this, he clicks the arrow on the Run button and selects
Run New. Five Vusers are immediately created and move directly to the Run state.
Note: If there were still vusers in the Down state, the new Vusers would be taken from them.
Initialize/Run additional Vusers in Percentage mode
The following procedure shows how David can initialize and run additional Vusers when he is
Page 986 of 1812 HP LoadRunner (11.50)
User Guide
Controller working in Percentage mode:
Note: The options to initialize or run additional Vusers can be done as two separate actions, with no connection to each other. They are being shown here together as a single workflow for demonstrative purposes only.
1. Initialize new Vusers
If he wants to initialize ten Vusers in Script_A immediately, and not wait for them to initialize as per their defined schedules, in the Run tab, he clicks Run/Stop Vusers to open the Run/Stop
Vusers dialog box.
In the dialog box, he makes sure that only the check box by script_a is selected, and he enters
10 in the Distribute X Vusers among all the scripts box. It is also important that the percentage values for Script_B and Script_C are set to 0%. See the note below for a detailed explanation why.
Note: When a check box is deselected, no Vusers are distributed to that script. However, the amount of Vusers that would have been assigned to it are not redistributed to the scripts that remain selected, unless you specify 0% in the percentage column.
For example, in our use-case scenario, when David enters 10 in the Distribute X Vusers
among all the scripts box, LoadRunner automatically distributes these Vusers as equally as possible among the available scripts, that is: n
script_a. 4 Vusers n
script_b. 3 Vusers n
script_c. 3 Vusers
However, should David wish to distribute all 10 Vusers to script_a, it is not sufficient to simply deselect script_b and script_c.This only ensures that no Vusers are added to these scripts, but it does not change the original Vuser distribution.
In other words, should David complete the step now, the four Vusers that are assigned to
script_a will be added, while the three each assigned to script_b and script_c will not, though they will still appear under the # (number) column. To distribute these six Vusers to script_a instead, David must first change the % (percentage) columns for these scripts to 0%.
He then clicks Initialize. Ten Vusers are immediately initialized and move to the Ready state.
From there, they run according to their defined Scheduler settings.
Page 987 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Note: The additional initialized Vusers are taken from the Vusers that are in the Down state. If you initialize a greater number of Vusers than there are in the Down state, then all of them will be initialized. In the example above, there were five Vusers in the Down state. All of them have been initialized, while an additional five have been created.
n
Run additional Vusers
If David then wants to run five additional Vusers in Script_A immediately, and not wait for them to run as per their defined schedules, in the Run/Stop Vusers dialog box, he makes sure that only the check box by script_a is selected, and he enters 5 in the Distribute X Vusers
among all the scripts box at the top of the dialog box. It is also important that the percentage values for Script_B and Script_C are set to 0%. See the note in the step above for a detailed explanation why.
He then has the following two options for how to actually run these additional Vusers: n
Run initialized Vusers. He can run five Vusers from those he initialized in the previous step. To do this, he clicks the arrow on the Run button and selects Run Initialized. Five
Vusers immediately move from the Ready state to the Run State.
n
Run new Vusers. He can create and run five new Vusers, with no effect on those he initialized in the previous step. To do this, he clicks the arrow on the Run button and selects
Run New. Five Vusers are immediately created and move directly to the Run state.
Note: If there were still vusers in the Down state, the new Vusers would be taken from
Page 988 of 1812 HP LoadRunner (11.50)
User Guide
Controller them.
Stop running Vusers in Vuser group mode
If David wants to stop three of the five runningVusers in Script_A, and not wait for them to stop as per their defined schedules, in the Run tab, he clicks Run/Stop Vusers to open the Run/Stop
Vusers dialog box.
In the dialog box, he makes sure that only the check box by script_a is selected, and he enters 3 in the # (number) column.
He then clicks Stop. Three of the running Vusers in Script_A move from the Run state to the
Gradual Exiting state.
Stop running Vusers in Percentage mode
If David wants to stop three of the five runningVusers in Script_A, and not wait for them to stop as per their defined schedules, in the Run tab, he clicks Run/Stop Vusers to open the Run/Stop
Vusers dialog box.
In the dialog box, he makes sure that only the check box by script_a is selected, and he enters 3 in the Distribute X Vusers among all the scripts box. It is also important that the percentage values for Script_B and Script_C are set to 0%. See the note below for a detailed explanation why.
Note: When a check box is deselected, no Vusers are distributed to that script. However, the
Page 989 of 1812 HP LoadRunner (11.50)
User Guide
Controller amount of Vusers that would have been assigned to it are not redistributed to the scripts that remain selected, unless you specify 0% in the percentage column.
For example, in our use-case scenario, when David enters 3 in the Distribute X Vusers
among all the scripts box, LoadRunner automatically distributes these Vusers as equally as possible among the available scripts, that is:
3. script_a. 1Vuser
4. script_b. 1Vuser
5. script_c. 1Vuser
However, should David wish to distribute all 3 Vusers to script_a, it is not sufficient to simply deselect script_b and script_c.This only ensures that no Vusers are added to these scripts, but it does not change the original Vuser distribution.
In other words, should David complete the step now, the single Vuser that is assigned to
script_a will be stopped, while the one each assigned to script_b and script_c will not, though they will still appear under the # (number) column. To distribute these two Vusers to script_a instead, David must first change the % (percentage) columns for these scripts to 0%.
He then clicks Stop. Three of the running Vusers in Script_A move from the Run state to the
Gradual Exiting state.
Execution Notes Dialog Box
This page dialog box enables you to log comments while a scenario is running.
To access
Relevant tasks
Important Information
Select Scenario > Execution Notes
"How to Run a Scenario" on page 977
Only enabled while the scenario is running.
User interface elements are described below (unlabeled elements are shown in angle brackets):
UI Element
<note writing area>
Description
Enter your notes in this area.
Page 990 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Output Window
This window displays error, notification, warning, debug, and batch messages that are sent to the
Controller by the Vusers and load generators during a scenario run.
To access
Use one of the following: l
Run tab > Scenario Status pane > Errors > l
Select View > Show Output
Important information
l
LoadRunner clears the messages in the Output window at the start of each scenario execution. If you reset a scenario, messages remain in the
Output window unless you instruct LoadRunner to delete messages from the window upon reset. For more information, see
"Options > Output Tab " on page 967
.
l
TheSummary tab is displayed by default when you open this window.
Relevant tasks
l
"How to Run a Scenario" on page 977
l
"How to Configure Scenario Options " on page 960
User interface elements are described below:
UI Element
Filtered Tab
Summary Tab
Description
See
"Filtered Tab" below
See
"Summary Tab" on page 993
Filtered Tab
This tab displays a drilled down view by message, Vuser, script, or load generator. For example, if you drill down on the Vuser column, the Filtered tab displays all the messages with the code you selected, grouped by the Vusers that sent the messages.
To access
Important information
See also
Output window > Filtered tab. Click the blue link on the column about which you wish to view more information.
The tab appears when you click on a blue link in the
Summary tab.
"Summary Tab" on page 993
User interface elements are described below (unlabeled elements are shown in angle brackets):
UI Element Description
Page 991 of 1812 HP LoadRunner (11.50)
User Guide
Controller
<Message icon>
Active Filter
Viewed By
Detailed Message Text
Message
Script
Action
Line #
# Lines
Previous/Next View. Enables you to move between the various drill down levels.
Displays the full text of the selected output message in the
Detailed Message Text area at the bottom of the Output window.
Export the view. Saves the output to a specified file.
Refreshes the Filtered tab with new log information that arrived in the Output window updated in the Summary tab.
Displays an icon indicating the type of message by which the current Output view is filtered.
Displays the category or categories by which the current
Output view is filtered.
Displays the name of the column on which you selected to drill down. The following icons indicate the various message types: l
Batch l
Debug l l
Errors
Notifications l
Warnings
Displays the full text of the selected output message when the
Details button is selected.
Displays all instances of the sample message text.
The script on which the message was generated. If you click the blue link, VuGen opens displaying the script.
The action in the script where the message was generated. If you click the blue link, VuGen opens the script to the relevant action.
The line in the script where the message was generated. If you click the blue link, VuGen opens the script and highlights the relevant line.
The total number of lines in the script where the Vuser failed.
Page 992 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Time
Iteration
Vuser
Generator
The time the message was generated.
The iteration during which the message was generated.
The Vuser that generated the message.
The load generator on which the message was generated. If you click the blue link, the Load Generator dialog box opens.
The number of messages generated by a specific Vuser.
# Messages
# Diff Texts
Summary Tab
This tab displays summary information about the messages sent during a scenario run.
To access
Important information
See also
User interface elements are described below:
Output window > Summary tab
You can drill down further on any information displayed in blue.
"Filtered Tab" on page 991
UI Element
Detailed Message Text
Generators
Help
Description
Displays the full text of the selected output message in the Detailed Message Text area at the bottom of the Output window.
Remove all messages. Clears all log information from the Output window.
Export the view. Saves the output to a specified file.
l
Freeze. Stops updating the Output window with messages.
l
Resume. Resumes updating the Output window with messages. The newly updated log information is displayed in a red frame.
Displays the full text of the selected output message when you click the Details button.
Displays the number of load generators that generated messages with the specified message code.
Displays an icon if there is a link to troubleshooting for the message.
Page 993 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Message Code
Sample Message Text
Scripts
Total Messages
Type
Type of Message
Page 994 of 1812
Displays the code assigned to all similar messages. The number in parentheses indicates the number of different codes displayed in the
Output window.
Displays an example of the text of a message with the specified code.
Displays the number of scripts whose execution generated messages with the specified code.
Displays the total number of sent messages with the specified code.
The type of message being displayed. The following icons indicate the various message types. For more information about each type, see
Type of Message below: l
Batch l
Debug l l
Errors
Notifications l
Warnings
Filters the output messages to display only certain message types. Select one of the following filters: l
All messages. Displays all message types.
l
Batch. Sent instead of message boxes appearing in the Controller, if you are using automation.
l
Debug. Sent only if the debugging feature is enabled in the Controller. (Expert mode: Tools
> Options > Debug Information). For more information, see
"Options > Debug Information
Tab " on page 963 .
l
Errors. Usually indicate that the script failed.
l
Notifications. Provides run-time information, such as message sent using lr_output_
message.
HP LoadRunner (11.50)
User Guide
Controller
Vusers
l
Warnings. Indicates that the Vuser encountered a problem, but the scenario continued to run.
Displays the number of Vusers that generated messages with the specified code.
Run Tab
The Run tab enables you to run and monitor scenarios.
To access
Relevant tasks
Run tab l
"How to Run a Scenario" on page 977
l
"Control Vusers During a Scenario Run - Use-Case Scenario " on page 980
User interface elements are described below (unlabeled elements are shown in angle brackets):
UI Element Description
Instructs the Controller to initialize the Vusers and distribute them to their designated load generators, where they begin running their Vuser scripts.
Notes:
l
The Controller begins running the scenario according to the start time defined in the scenario schedule.
l
We do not recommend changing the Time/Date and Time Zone settings on the Controller and load generators during the load test run.
Terminates the scenario.
The behavior depends on your selection in the Tools > Options > Run-
Time Settings tab: l
If you selected Stop immediately, all Vusers in the scenario move to the Exitingstatus.
l
If you selected Wait for the current iteration to end before exiting, or Wait for the current action to end before exiting, the button text changes to Stop Now and the Vusers status changes to Gradual
Exiting. To stop the Vusers immediately, click Stop Now.
For more information about the Run-Time Settings options, see
"Options
> Run-Time Settings Tab " on page 969 .
Resets all Vuser groups to the Down status.
Opens the Vusers dialog box, where you can view the status of each of the Vusers in a Vuser group.
Page 995 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Opens the Run/Stop Vusers dialog box, where you can activate additional
Vusers.
Pauses or resumes the scenario schedule.
<Graph Legend>
<Graph Viewing
Pane>
Available Graphs
Scenario Groups pane
Scenario Status pane
Displays statistics for the selected graph. For more information, see
"Online Monitor Graphs " on page 945
.
Displays the graphs that are listed in the Available Graphs pane. For more information, see
"Online Monitor Graphs " on page 945
.
Default: Displays four graphs
Displays the available online monitor graphs. For more information, see
"Online Monitor Graphs " on page 945
.
Displays each Vuser group and it's current status. For more information.
see
"Scenario Groups Pane" on page 998 .
Displays a synopsis of the running scenario. For more information, see
"Scenario Status Pane" on page 999
.
Run/Stop Vusers Dialog Box
This dialog box enables you to manually control the addition of new Vusers to a running scenario, as well as to stop running vusers.
To access
Important information
Run tab > Scenario Groups pane > l
The dialog box differs depending on which mode you are working in.
n
Vuser group mode. You specify the number of new Vusers to be added to each Vuser group, as well as the load generators on which these additional
Vusers will run.
n
Percentage mode. You specify the percentage of Vusers to be added to each script, as well as the load generators on which these additional Vusers will run.
l
When you add Vusers to a running scenario or Vuser group, the current scheduler settings are automatically applied to all new Vusers. For example, if the scenario or Vuser group has a set duration of five minutes, all Vusers that are subsequently added run only for the remaining part of that time period.
Vusers that are added to a scenario or Vuser group which has finished running, are not affected by schedule settings and run according to the scenario run-time settings.
Relevant tasks
l
"How to Run a Scenario" on page 977
l
"Control Vusers During a Scenario Run - Use-Case Scenario " on page 980
User interface elements are described below (unlabeled elements are shown in angle brackets):
Page 996 of 1812 HP LoadRunner (11.50)
User Guide
Controller
UI Element
<check box>
Description
Distributes the added Vusers to their designated load generators so that they are ready to execute their scripts. The Controller first initializes the
Vusers in your scenario that have not yet run and then adds additional
Vusers, as required, to reach the defined quantity.
l
Run Initialized. Runs the Vusers in the scenario that have already been initialized.
n
Note: You cannot run more Vusers than are currently initialized using this option.
l
Run New. Runs the number of Vusers you specified. The Controller first runs the Vusers in your scenario that have not yet been run and then adds additional Vusers, as required, to reach the defined quantity.
Stops the Vusers that are running. The Controller stops the Vusers according to the settings you defined in the Run-Time Settings tab. For more information, see
"Options > Run-Time Settings Tab " on page 969 .
Selects the Vuser groups/scripts you add Vusers to.
Notes:
l
To disable a Vuser group/script, clear the check box to the left of the group/script name. A group/script automatically appear disabled if it is disabled in the Design view.
l
When you disable a Vuser group (Vuser Group mode), no Vusers are added to the group.
l
When you disable a script (Percentage mode), no Vusers are distributed to the script, and the unused percentage of the Vusers are not distributed among the remaining scripts, unless you define a zero percent value for the disabled script.
Example: If you have three scripts, A, B, and C, and you enter 10 in the
Distribute X Vusers among all the scripts box, LoadRunner automatically distributes these Vusers as equally as possible among the scripts, that is: n
A. 4 Vusers n
B. 3 Vusers n
C. 3 Vusers
However, if you want LoadRunner to distribute all 10 Vusers to A, it is not sufficient to simply deselect B and C. This only ensures that no Vusers are added to these scripts, but it does not change the original Vuser distribution.
In other words, if you were to finish the step now, the four Vusers that are assigned to Awould beadded to the script, while the three each assigned to B and C would not, though they would still appear under the # (number) column. To distribute these six Vusers to A instead, you must first change the % (percentage) columns B and C to 0%.
Page 997 of 1812 HP LoadRunner (11.50)
User Guide
Controller
%
(Percentage mode)
Enter the percentage of Vusers to be distributed to each Vuser script.
#
Indicates the number of Vusers distributed to each script.
Distribute x
Vusers among the checked scripts
(Percentage mode)
Enter the number of Vusers to be distributed. The Vusers will be distributed according to the values you entered in the percentage (%) column.
Load Generators
The load generators assigned to the Vuser group/script.
If you select multiple load generators for a group/script, the Vusers assigned to the Vuser group/script are distributed evenly among the load generators.
Default value (in Percentage mode): All Load Generators
Note: To add a load generator to the list, select Add from the list. For more details see
"Add Load Generator/Load Generator Information Dialog Box " on page 896
.
Scenario Groups Pane
This pane enables you to monitor the actions of all the Vusers and Vuser groups in the scenario.
To access
Relevant tasks
Run tab l
"How to Run a Scenario" on page 977
l
"Control Vusers During a Scenario Run - Use-Case
Scenario " on page 980
User interface elements are described below (unlabeled elements are shown in angle brackets):
UI Element
<Right-click menu>
Description
Additional actions available only via the right-click menu: l
Reset IDs. Resets the IDs of the Vusers in the group.
l
Run Vusers Until Complete. Runs the selected Vusers until complete. If you run Vusers in the Down or Error state, the Controller initializes and then runs the Vusers.
l
Run One Vuser Until Complete. Instructs the Controller to run a randomly selected Vuser in the Vuser group, until it completes running. The Vuser Log opens, displaying run-time information about the Vuser. For more information, see
"Vuser Script Log " on page 1001
.
l
Pause Vusers. Temporarily pauses running the Vusers group. The status of the Vuser group changes from Running to Paused. Note that pausing a
Vuser group affects its transaction response time.
l
Enable. Enables the Vuser group to participate in the scenario.
Page 998 of 1812 HP LoadRunner (11.50)
User Guide
Controller l
Disable. Disables the Vuser group so that it no longer participates in the scenario.
l
Show Vuser Log. Opens a script log containing run-time information for each
Vuser in the group. The Vuser script log is refreshed, by default, every 1000 milliseconds.
l
Hide Vuser Log. Closes the Vuser script logs.
l
Sort By Name. Sorts the groups alphabetically, by name.
Done/Failed
The number of Vusers that have finished running and the script failed.
Done/Passed
The number of Vusers that have finished running and the script passed.
Down
Error
Exiting
The number of Vusers that have stopped running.
The number of Vusers that encountered problems. Check the Status field on the
Vuser dialog box or the output window for a complete explanation of the error.
The number of Vusers that have finished running or have been stopped, and are now exiting.
Gradual
Exiting
Initializing
Pending
The number of Vusers that are completing their iterations or actions before exiting (as defined in Tools > Options > Run-Time Settings).
The number of Vusers that are being initialized on the remote machine.
The number of Vusers that are ready to be initialized and are waiting for an available load generator, or are transferring files to the load generator.
Ready
Rendezvous
The number of Vusers that have arrived at the rendezvous and are waiting to be released by the Controller.
Running
The number of Vusers that have already performed the init section of the script and are ready to run.
Stopped
The number of Vusers that are running, and the Vuser script is being executed on a load generator.
The Vuser stopped when the Stop command was invoked.
Scenario Status Pane
This pane displays a synopsis of the running scenario.
To access:
Run tab
Important
Information
To detach the Scenario Status pane from the Run tab, click the detach pane button in the upper right corner.
Relevant tasks
"How to Run a Scenario" on page 977
User interface elements are described below:
Page 999 of 1812 HP LoadRunner (11.50)
User Guide
Controller
UI Element
Elapsed Time
Errors
Hits/Second
Description
Indicates how much time has elapsed since the scenario started running.
Indicates the number of Vusers with errors.
To display the errors, click the Show Snapshot button to display the
Output Window. For more information, see
"Output Window " on page 991
.
Indicates how many hits (HTTP requests) there have been to the Web site being tested per second that each Vuser has been running.
Passed/Failed
Transactions
Indicates how many transactions have been executed successfully or unsuccessfully. For more information, see
"Transactions Dialog Box " below .
RunningVusers
Indicates the number of Vusers that are currently running.
Scenario
Status
Indicates whether the scenario is Running or Down.
Transactions Dialog Box
This dialog box indicates how many transactions have been executed successfully or unsuccessfully.
To access
Run tab > Scenario Status pane. Click the Show Snapshot
Passed/Failed Transactions.
button by
Important information
VuGen automatically defines each Init, Action, and End unit as a transaction. In addition, you can insert a static transaction in your script using the Start
Transaction and End Transaction functions. For details, see the HP Virtual User
Generator User Guide.
"How to Run a Scenario" on page 977
Relevant tasks
See also
"Scenario Status Pane" on previous page
User interface elements are described below:
UI Element
Failed
Name
Passed
Stopped
TPS
Description
The number of times the transaction failed.
The names of the individual transactions in a script.
The number of times the transaction passed.
The number of times the transaction stopped.
The number of times per second the transaction has run.
Page 1000 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Vuser Script Log
This page enables you to view run-time information about each running Vuser.
To access
Important information
Manual scenario > Run tab > Scenario Groups pane >
Vusers
. In the Vusers dialog box select the Vuser whose log you want to view and click Show Vuser
Log
.
l
If you disabled the logging feature in the Run-Time Settings
Log node, the Vuser script log will contain output only if your script contains the lr_output_message or lr_
message function.
l
If you selected the Send messages only when an error
occurs option in the Log node, the Vuser script log will contain output only if there are script errors.
"How to Run a Scenario" on page 977
Relevant tasks
User interface elements are described below (unlabeled elements are shown in angle brackets):
UI Element Description
Show Text/Tree View. Displays the run-time information in text/tree format. To revert to the previous view, click the button again.
<message icons>
Display. Displays a snapshot of the Web page where an error occurred, when the error is highlighted in the Vuser log.
Notes:
l
To view a snapshot of the Web page where an error occurred, you must select the Activate snapshot on error option in the General node of the
Run-Time Settings dialog box before running the scenario.
l
Snapshots on errors is supported for TruClient.
Find Text. Enables you to search for text in the Vuser log.
Expand/Collapse Node. Expands the node so that you can view additional run-time information details about the Vuser. To revert to the collapsed tree view, click the button again.
The following icons may can appear in the script log: l
Action. Displays the name and description of an action.
l
End iteration. Indicates the end of an iteration.
Page 1001 of 1812 HP LoadRunner (11.50)
User Guide
Controller l
Errors. Indicates that the Vuser encountered a problem, but test execution continued. Displays the error code and a description of the error.
l
Notifications. Provides action information.
l l
Start/End Transaction. Indicates the start or end of a transaction.
Start iteration. Indicates the start of an iteration.
<Right-click options>
l
Start User Script. Indicates the start of the Vuser script.
l
Copy. Enables you to copy selected text from the Vuser log.
l
Copy path from status bar. Enables you to copy the path of the Vuser log.
Refresh
(every 1000 milliseconds)
When selected, instructs LoadRunner to refresh the run-time information displayed every 1000 milliseconds.
Note: For information on how to change the default refresh settings, see
"Options > Output Tab " on page 967
.
Rendezvous Points
Rendezvous Points Overview
During a scenario run, you can instruct multiple Vusers to perform tasks simultaneously by using
rendezvous points. A rendezvous point creates intense user load on the server and enables
LoadRunner to measure server performance under load.
Suppose you want to measure how a Web-based banking system performs when ten Vusers simultaneously check account information. To emulate the required user load on the server, you instruct all the Vusers to check account information at exactly the same time.
You ensure that multiple Vusers act simultaneously by creating a rendezvous point. When a Vuser arrives at the rendezvous point, it is held there by the Controller. You then set a rendezvous policy according to which the Controller releases the Vusers from the rendezvous point either when the required number of Vusers arrives, or when a specified amount of time has passed.
You define rendezvous points in the Vuser script. For information about inserting rendezvous points into Vuser scripts, see the HP Virtual User Generator User Guide.
Using the Controller, you can influence the level of server load by selecting: l
Which of the rendezvous points will be active during the scenario l
How many Vusers will take part in each rendezvous
For example, to test a bank server, you could create a scenario that contains two rendezvous points. The first rendezvous ensures that 1000 Vusers simultaneously deposit cash. The second rendezvous ensures that another 1000 Vusers simultaneously withdraw cash. If you want to measure how the server performs when only 500 Vusers deposit cash, you can deactivate the
withdraw rendezvous, and instruct 500 Vusers to participate in the deposit rendezvous only.
Page 1002 of 1812 HP LoadRunner (11.50)
User Guide
Controller
How to Set Up a Rendezvous in a Scenario
This task describes set up rendezvous points and policies in a scenario.
1. Prerequisites
To set up a rendezvous in the scenario, your scenario must include Vuser scripts that have rendezvous points inserted in them. For information about inserting rendezvous points into
Vuser scripts, see the HP Virtual User Generator User Guide.
When you add a Vuser group or script to the scenario, LoadRunner scans the included scripts for the names of the rendezvous points and adds them to the list of rendezvous points. You can the list of all the rendezvous points in your scenario by selecting Scenario > Rendezvous.
Note: In goal-oriented scenarios, a script's rendezvous points are disabled.
2. Set the level of emulated user load
Select the rendezvous points to take part in the scenario, and the number of Vusers to participate in each rendezvous. For user interface details, see
"Rendezvous Information Dialog
Box " below .
You can temporarily disable a rendezvous and exclude it from the scenario. You can disable a rendezvous point for all Vusers in a scenario, or you can temporarily disable specific Vusers from participating in the rendezvous.
By disabling and enabling a rendezvous, you influence the level of server load.
3. Set the attributes for the rendezvous policy - Optional
In the Rendezvous Information dialog box, for each rendezvous: a. Select the rendezvous, and click the Policy button.
b. In the Policy dialog box, set the policy attributes as follows: o
Release. How many Vusers will be released from a rendezvous at a time.
o
Timeout. How long the Controller waits before releasing Vusers from a rendezvous.
For user interface details, see
"Rendezvous Information Dialog Box " below
.
Rendezvous Information Dialog Box
This dialog box enables you to view and modify the attributes of each rendezvous point in the scenario. It displays general information about the rendezvous point: which script is associated with the rendezvous, and release history.
To access
Important information
Relevant tasks
Manual scenario > Design tab > Scenario > Rendezvous
Available only if one of the Vuser scripts participating in the scenario contains a rendezvous point.
"How to Set Up a Rendezvous in a Scenario " above
User interface elements are described below:
Page 1003 of 1812 HP LoadRunner (11.50)
User Guide
Controller
UI Element
Rendezvous
Scripts
Status Information
Description
Disables the rendezvous, excluding it from the scenario, thereby influencing the level of server load.
Enables a disabled rendezvous point.
Opens the Policy dialog box, where you can set the number Vusers to be released from a rendezvous at a time, as well as the amount of time the Controller waits before releasing Vusers from a rendezvous.
l
Release when X% of all Vusers arrive at the rendezvous.
Releases the Vusers only when the specified percentage of all
Vusers arrives at the rendezvous point.
Note: This option interferes with the scheduling of your scenario. If l you select this option, your scenario will not run as scheduled.
Release when X% of all running Vusers arrive at the
rendezvous. Releases the Vusers only when the specified percentage of all Vusers running in the scenario arrives at the rendezvous point.
l
Release when X Vusers arrive at the rendezvous. Releases the
Vusers only when the specified number arrives at the rendezvous point.
l
Timeout between Vusers. The timeout value (in seconds). After each Vuser arrives at the rendezvous point, LoadRunner waits up to the maximum timeout period specified for the next Vuser to arrive. If the next Vuser does not arrive within the timeout period, the
Controller releases all the Vusers from the rendezvous. Each time a new Vuser arrives, the timer is reset to zero. You set a timeout for each rendezvous point.
Default value: 30 seconds
Disables a Vuser from taking part in the rendezvous.
Enables a Vuser to take part in the rendezvous.
Resets the Status Information, removing the information currently displayed.
While a scenario is running, enables you to manually release Vusers from a rendezvous before the Controller releases them. Use this option if you want the scenario to continue running even though all the Vusers did not reach the rendezvous.
The names of the rendezvous points in the scenario.
The Vuser scripts that are associated with the rendezvous points.
During and after a scenario, displays:
Page 1004 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Vusers
l
Current Status. The number of Vusers that arrived at the rendezvous point out of the total number of Vusers assigned to the rendezvous.
l
Time. The time at which the Vusers at the rendezvous point were released.
l
Reason. The reason the Vusers at the rendezvous point were released. The possible reasons are Timeout or Arrived.
The Vusers associated with the rendezvous points.
After the Scenario Run
Post Scenario Run Procedures - Overview
After the scenario runs you analyze the results using HP LoadRunner Analysis. If the run results are stored locally on each participating load generator, they need to be gathered into one location so that they can be processed for analysis. Diagnostics results on the mediators and severs must also be gathered. This process is known as data collation.
For details about collating run results and diagnostics data, see
"Collating Run Data" below .
For details about analyzing the scenario run, see the HP LoadRunner Analysis User Guide.
Collating Run Data
When you run a scenario, by default all the run data is stored locally on each load generator. After scenario execution, the results must be collated—that is, the results from all of the load generators must be gathered and transferred to the results folder–before any analysis data can be generated.
In addition, data from the diagnostics servers or mediators must be collated as well.
You can set LoadRunner to collate the run data automatically, as soon as the run is complete.
Alternatively, you can collate the run data manually after the run. This way, you can save and close a scenario and collate the data after reopening the scenario in the Controller.
The data that is collated include the result, diagnostics, and log files. After LoadRunner has successfully collated the data, these files are deleted from the load generators and diagnostics mediators from which they were gathered.
Note: In Expert mode, you can disable the collation of the log file collation (see
"How to
Configure Scenario Options " on page 960
).
For details on how to collate run data, see
"How to Collate Scenario Run Results " below .
How to Collate Scenario Run Results
This task describes how to collate results after a scenario run.
Page 1005 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Note:
l
Data collation includes result, diagnostics, and log files. If you are working in Expert mode, you can disable the collation of the log files. Before collating the results, select Tools >
Options > General tab > Do not collate log files.
l
You can set a command to run when collation is complete. Select Tools > Options >
Execution tab, and enter the command in the Post Collate Command box.
Collate results automatically
Select Results > Auto Collate Results.
Collate results manually
Select Results > Collate Results > Collate Results.
Stop the collation process
In the Collate Results dialog box, click Stop.
Resume the collation process
If you stopped the collation process, to resume select Results > Collate Results >
Continue stopped collation.
If collation fails due to a lack of disk space
To recollate, select Results > Collate Results > Recollate. LoadRunner attempts to collate the results again, without compressing the .eve file.
Results Folder File Structure
Before you run a scenario, you specify where the run results should be stored. LoadRunner saves all the data it gathers during the run to the specified folder. A typical results folder has the following structure:
Page 1006 of 1812 HP LoadRunner (11.50)
User Guide
Controller
The content of the results folder are described in the following table:
Folder/File log folder sum_data folder
*_bd directories
*.cfg files
*.def files
*.usp files
_t_rep.eve
<Controller>.eve
<Load_
Generator>.eve.gzl files
Description
Contains output information generated during replay for each Vuser
Contains the graph summary data (.dat) files.
Contain diagnostics breakdown information.
Contain a listing of the script's run-time settings as defined in VuGen
(think time, iterations, log, Web, and so on). The results folder contains a .cfg file for each script.
Definition files for graphs that describe the online and other custom monitors.
Contain the script's run logic, including how the actions sections run.
The results folder contains a .usp file for each script.
Contains Vuser and rendezvous information.
Contains information from the Controller host.
The <load generator>.eve files contain information from the load generators in the scenario. These files are zipped and saved to the results folder in .gzl format.
Page 1007 of 1812 HP LoadRunner (11.50)
User Guide
Controller
<Load_Generator>.map
<results_name> folder
<results_name>.lrr
collate.txt
Maps transactions and data points on the load generator to IDs.
Contains the scenario run results.
Contains information about the scenario run, such as the name, duration, scripts included, and so on.
Contains the file paths of the result files, and collation status information.
collateLog.txt
Contains the status (succeeded, failed) of result, diagnostics, and log file collation from each load generator.
HostEmulatedLocation.txt
Contains the emulated locations defined for WAN Emulation.
Contains sample monitor information.
offline.dat
output.mdb
The database created by the Controller. Stores all the output messages reported during the scenario run.
Contains the file paths for the host event files
remote_results.txt
SLAConfiguration.xml
Contains SLA definition information for the scenario.
When you generate analysis graphs and reports, the Analysis engine copies all of the scenario result files (.eve and .lrr) to a database. After the database is created, Analysis works directly with the database and does not use the result files.
Collate Results Dialog Box
This dialog box enables you to view the progress of result collation after a scenario run.
To access
l
Results > Collate Results > Collate Results
l
If Auto Collate Results is activated, this dialog box opens automatically when
LoadRunner starts collating the run results after a scenario run.
Relevant tasks
l
"How to Collate Scenario Run Results " on page 1005
l
"How to Prepare a Scenario to Run" on page 972
User interface elements are described below:
UI Element Description
Stops collating the results.
Close automatically
Select to automatically close the Collate Results dialog box after collation is completed.
General
Status
Progress
Details
The collation status and file size of the Event, Diagnostics, and Log files.
Note: The file size shown is before compression.
The status (succeeded, failed) of result, diagnostics, and log file collation from each load generator or mediator. This information is stored in the collateLog.txt
Page 1008 of 1812 HP LoadRunner (11.50)
User Guide
Controller file.
Using QuickTest or Unified Functional Testing
Scripts in LoadRunner
Using QuickTest or Unified Functional Testing Scripts in
LoadRunner - Overview
HP Functional Testing software (QuickTest or Unified Functional Testing) enables you to create complex tests that examine the full spectrum of your application's functionality.
LoadRunner can integrate QuickTest or Unified Functional Testing scripts into a load testing scenario in the form of GUI Vuser scripts. These scripts, that have already been designed and debugged in QuickTest or Unified Functional Testing can be used as the basis of your load test.
The main uses of running QuickTest or Unified Functional Testing scripts in LoadRunner are: l
To check how your application's functionality is affected by heavy load l
To measure the response time that a typical user experiences on the client side while your application is under load (end-to-end response time)
For example, you can add QuickTest or Unified Functional Testing scripts to specific points in a
LoadRunner scenario to confirm that the application's functionality is not affected by the extra load at those sensitive points.
Another advantage of using a GUI Vuser script as part of your LoadRunner scenario is that the GUI
Vuser script runs on your screen during the scenario, enabling you to watch the actual steps executed by the Vuser in real time.
About GUI Vuser Scripts
GUI Vusers enable you to measure and monitor end-to-end user response times while your client/server system is under load. A GUI Vuser emulates the complete environment of a human user.
For example, a human user sits at a machine, operates applications using the keyboard and the mouse, and reads information on the machine's monitor. Similarly, a GUI Vuser runs on its own machine and operates applications. A GUI Vuser can be programmed to read and act on information that appears on its machine's display.
Suppose that you have a bank server that services many automatic teller machines (ATMs). You could create a GUI Vuser script that: l
Opens the ATM application l
Enters an account number l
Enters the amount of cash to be withdrawn l
Withdraws cash from the account
Page 1009 of 1812 HP LoadRunner (11.50)
User Guide
Controller l
Checks the balance of the account l
Closes the ATM application l
Repeats the process
The actions of each GUI Vuser are described in a GUI Vuser script. You use QuickTest or Unified
Functional Testing to create GUI Vuser scripts.
You monitor and manage GUI Vusers using the LoadRunner Controller. For instance, you can use the Controller to run, pause, or view Vusers, and to monitor scenario status.
Note: You cannot use VuGen to run a GUI Vuser script. You use the Controller to run a GUI
Vuser script as part of a scenario; you use QuickTest or Unified Functional Testing to run a
GUI Vuser script in standalone mode.
Understanding GUI Vuser Technology
GUI Vusers measure real end-to-end response times. End-to-end response times represent the total time that a user waits for a response after submitting a request. End-to-end response times include GUI response times as well as network and server response times.
Page 1010 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Guidelines for Using QuickTest or Unified Functional
Testing Scripts in LoadRunner
When creating test scripts in QuickTest or Unified Functional Testing that are going to be used as
GUI Vuser scripts in a LoadRunner testing scenario, you need to follow certain guidelines to ensure smooth integration of the script. For detailed explanations about creating tests in QuickTest or
Unified Functional Testing, see the QuickTest or Unified Functional Testing documentation.
Limitations
QuickTest or Unified Functional Testing offers several features that are designed specifically for integration with LoadRunner. Some QuickTest or Unified Functional Testing features, however, may not be available when they are integrated with LoadRunner. For more information about specific limitations, see the QuickTest or Unified Functional Testing readme.
Including Transactions
To measure the performance of the server, you define transactions. A transaction represents an action or a set of actions that you are interested in measuring. You define transactions within your
Vuser script by enclosing the appropriate sections of the script with start and end transaction statements.
For example, you can define a transaction that measures the time it takes for the server to process a request to view the balance of an account and for the information to be displayed at the ATM.
Note: LoadRunner only provides performance information for data that is included within a transaction. Therefore, your QuickTest or Unified Functional Testing test must include transactions to be used by LoadRunner.
For more information about using transactions in QuickTest or Unified Functional Testing, see the
QuickTest or Unified Functional Testing documentation.
Adding Statements
You can use the Services object and its associated methods to insert statements that are specifically relevant to performance testing. These include Abort, GetEnvironmentAttribute,
LogMessage, SetTransactionStatus, ThinkTime, UserDataPoint, StartTransaction and
EndTransaction. For more information on these methods, see the QuickTest or Unified Functional
Testing documentation.
Designing Tests for LoadRunner
Consider the following design guidelines when designing tests for use with LoadRunner: l
The QuickTest or Unified Functional Testing tests you use with LoadRunner should be simple tests, designed to pinpoint specific operations.
l
LoadRunner cannot run nested action iterations.
l
Do not include references to external actions or other external resources, such as an external
Data Table file, environment variable file, shared object repositories, and so forth.
l
Include transactions in your QuickTest or Unified Functional Testing test since LoadRunner only
Page 1011 of 1812 HP LoadRunner (11.50)
User Guide
Controller provides performance information for data that is included within a transaction.
How to Add a QuickTest or Unified Functional Testing
Script to a Load Test Scenario
This task describes how to integrate a QuickTest or Unified Functional Testing script into
LoadRunner.
1. Navigate to the folder containing the script.
n
For a new scenario, click Browse in the New Scenario dialog box.
n
When adding the script to an existing scenario, click Browse in the Add Group/Add Script dialog box. The Open Test dialog box opens.
2. In the Files of Type box select QuickTest Tests or Unified Functional TestingTests.
3. Navigate to the appropriate script and add it to your scenario.
Managing Scenarios Using Application Lifecycle
Management
Managing Scenarios Using Application Lifecycle
Management Overview
The Controller works together with Application Lifecycle Management (ALM), HP's Web-based test management tool. HP ALM provides an efficient method for storing and retrieving Vuser scripts, scenarios, and results. You can store scenarios in an ALM project and organize them into unique groups.
In order for the Controller to access an ALM project, you must connect it to the Web server on which HP Application Lifecycle Management is installed. You can connect to either a local or remote Web server.
For more information on working with Application Lifecycle Management, see the Application
Lifecycle Management User's Guide.
How to Work with Scenarios in ALM Projects
The following steps describe the workflow of how to work with scenarios saved in an Application
Lifecycle Management project.
1. Connect to ALM
Open a connection to the ALM server and project that contains the scenario. For task details, see
"Connect to ALM " on next page
.
2. Open the scenario
Select File > Open and specify the location of the scenario.
Page 1012 of 1812 HP LoadRunner (11.50)
User Guide
Controller
3. Save the scenario
Select File > Save as. If the scenario is in a project that uses version control and is not checked out, the scenario is only saved as a temporary file on your local machine.
Connect to ALM
To store and retrieve scenarios from ALM, you need to connect to an ALM project. You can connect or disconnect from an ALM project at any time during the testing process.
You can connect to one version of HP ALM from Controller and a different version from your browser. For more information, see the Important Information section in
" HP ALM Connection
Dialog Box" on next page
.
Connect to Application Lifecycle Management:
1. Select Tools > HP ALM Connection. The HP ALM Connection dialog box opens.
2. Enter the required information in the HP ALM Connection dialog box, as described in
" HP ALM
Connection Dialog Box" on next page .
3. To disconnect from ALM, click Disconnect.
How to Save Scenarios to ALM Projects
The following steps describe how to save a scenario to an ALM project.
1. Open/create the scenario
Create or open the desired scenario.
2. Connect to HP Application Lifecycle Management
Open a connection to the ALM server and project that you want to store the scenario. For task details, see
"Connect to ALM " above .
3. Define a test set
Define a Application Lifecycle Management test set where to save results as follows: a. Select Results > Results Settings. The Set Results Directory dialog box opens.
b. Click HP ALM...
c. Enter the required information in the Set Results Directory dialog box. For user interface details, see
"Set Results Directory Dialog Box " on page 974
.
d. Click OK.
4. Save the scenario to ALM
Select File > Save as and specify the location.
How to Add Vuser Scripts from a Application Lifecycle
Management Project
The following steps describe how to add Vuser scripts from a Application Lifecycle Management project to the Controller's script list. You can add the script to either a manual or a goal-oriented
Page 1013 of 1812 HP LoadRunner (11.50)
User Guide
Controller scenario.
l
"How to Add Vuser Scripts from a Application Lifecycle Management Project" on previous page
l
"How to Add Vuser Scripts from a Application Lifecycle Management Project" on previous page
Add a Vuser script to a manual scenario
1. Open a connection to the ALM server and project where the scripts are located. For task details, see
"Connect to ALM " on previous page .
2. In the Scenario Groups pane, click the Add Group button
.
3. In the Add Group dialog box, click Browse. The Open Test from HP ALM Project dialog box opens.
4. Select the script and click OK. The Script Path field displays [TD], the full subject path, and the script name.
For example:
[TD]\Subject\System\test_alm
5. Click OK. The script is displayed in the Scenario Groups pane.
Add a Vuser script to a goal-oriented scenario
1. Open a connection to the ALM server and project where the scripts are located. For task details, see
"Connect to ALM " on previous page .
2. On the Scenario Scripts pane toolbar, click the Add Script box opens.
button. The Add Script dialog
3. Click Browse. The Open Test from HP ALM Project dialog box opens and displays the test plan tree.
4. Select the script and click OK. The Script Path field displays [TD], the full subject path, and the script name.
For example:
[TD]\Subject\System\test_alm
5. Click OK to close the Add Script dialog box. The script appears in the Script Path column in the
Scenario Scripts pane.
HP ALM Connection Dialog Box
This dialog box enables you to connect to an ALM project from within the Controller.
To access
Important information
Tools > ALM Connection > Connect
You can connect to one version of HP ALM from Controller and a different version of HP ALM from your browser.
You can only connect to different versions of HP ALM if one of the versions is HP ALM 11.00 or higher.
If you are connecting from VuGen to a different HP ALM version than the one in your browser, you must first
Page 1014 of 1812 HP LoadRunner (11.50)
User Guide
Controller download the client files.
1. From the browser, navigate to the HP ALM server that you will be connecting to from Controller.
2. Once the login screen is displayed, the client files have been downloaded. There is no need to log in.
User interface elements are described below:
UI Element Description
Step 1:
Connect to
Server
l l
Server URL. The URL of the server that contains HP ALM.
Reconnect to server on startup. Automatically reconnect to the server every time you start the application.
l
/ . Connects to the server specified in the
Server URL box. Only one button is visible at a time, depending on your connection status.
Step 2:
Authenticate
User
Information
l
User Name. Your ALM user name.
l
Password. Your ALM password.
l
Authenticate on startup. Authenticates your user information automatically, the next time you open the application. This option is only available if you selected Reconnect to server on startup above.
Step 3:
Login to
Project
l
. Authenticates your user information against the ALM server.
After your user information has been authenticated, the fields in the
Authenticate user information area are displayed in read-only format. The
Authenticate button changes to .
You can log in to the same ALM server using a different user name by clicking
Change User, entering a new user name and password, and then clicking
Authenticate again.
l
Domain. The domain that contains the ALM project. Only those domains containing projects to which you have permission to connect to are displayed.
(If you are working with a project in versions of TestDirector earlier than version 7.5, the Domain box is not relevant.) l
Project. Enter the ALM project name or select a project from the list. Only those projects that you have permission to connect to are displayed.
l
Login to project on startup. This option is only enabled when the
Authenticate on startup check box is selected.
l
/ .Logs into and out of the ALM project.
Page 1015 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Upload Scenario Dialog Box
This dialog box enables you to open a scenario from an ALM project or save a scenario to an ALM project.
To access Tools > ALM Connection...>
User interface elements are described below:
UI
Element
Upload run time files
Upload all files
Description
Uploads only the files needed to replay the scenario. Does not upload recording snapshot files and other unnecessary files. This results in a shorter download time.
Uploads all of the files associated with this scenario. This results in a longer upload time.
Working with Firewalls in LoadRunner
Monitors Over a Firewall
To monitor servers over a firewall, you need to configure the Monitor Over Firewall machine. On the
Monitor Over Firewall machine, you use the Server Monitor configuration tool to select which servers to monitor and to define specific measurements that LoadRunner collects for each monitored server.
To enable monitoring of your servers over a firewall, you install the Monitor Over Firewall component on a dedicated machine.
Caution: Before you configure your system to monitor your servers over a firewall, ensure that you have completed the configuration steps described in
"How to Configure the Over-
Firewall System" on page 1018 .
After you have set up your LoadRunner system to work with firewalls, you need to configure the monitor settings on the Monitor Over Firewall machine.
You use the Server Monitor configuration tool to select which servers to monitor and to define specific measurements that LoadRunner collects for each monitored server. For more information, see
"How to Configure Monitors Over a Firewall" on page 1023
.
How to Set Up Your System to Use Firewalls
Setting up your system to use firewalls involves the following stages of configuration:
Page 1016 of 1812 HP LoadRunner (11.50)
User Guide
Controller
1. Install Components and Perform Initial Configuration
Perform the following steps: a. Install the over-firewall components.
To enable over firewall communication, ensure that you have installed the following
LoadRunner components: o
MI Listener. Serves as a router between the Controller and the LoadRunner agent. You install the MI Listener component on a dedicated machine. For installation instructions, refer to the HP LoadRunner Installation Guide.
For instructions on configuring the MI Listener machine, see
"How to Configure the Over-
Firewall System" on next page .
Note: You can also use the Controller machine as the MI Listener without the need for a separate installation. When acting as the MI Listener, the Controller machine cannot have Vusers running on it. In this case, the Controller must be a pure
Controller and not a Controller + Load Generator.
o
Monitor Over Firewall component. Used to monitor the servers that are located over a firewall. You install the Monitors over Firewall component on a dedicated machine. For installation instructions, refer to the HP LoadRunner Installation Guide.
For information about configuring the Monitor Over Firewall machine, see
"How to
Configure Monitors Over a Firewall" on page 1023
.
b. Perform the initial configuration of the over-firewall system.
See
"How to Configure the Over-Firewall System" on next page .
2. Set Up Your System to Run Vusers Over the Firewall
Note: Before configuring your system to run Vusers over a firewall, make sure that you have completed the steps described in
"How to Configure the Over-Firewall System" on next page .
To set up your system to run Vusers over a firewall, you configure the LoadRunner agent to communicate with the MI Listener on each load generator machine that will be running over the firewall. For more information, see
"How to Configure the System to Monitor Servers Over a
Firewall" on page 1020
.
You then configure the Controller to recognize the load generator and MI Listener machines.
For more information, see
"How to Configure the System to Monitor Servers Over a Firewall" on page 1020 .
3. Configure Your System to Monitoring Servers Over a Firewall
See
"How to Configure the System to Monitor Servers Over a Firewall" on page 1020
.
4. Check Connectivity
After installing a configuring all the necessary components, check that you are able to
Page 1017 of 1812 HP LoadRunner (11.50)
User Guide
Controller establish a connection between the LoadRunner agent, MI Listener, and the Controller machine. For more information, see
"Troubleshooting and Limitations" on page 1029 .
How to Configure the Over-Firewall System
This task describes how to configure the Over-Firewall System.
1. Prerequisites
Before configuring the over-firewall system, make sure you have installed the necessary components as described in
"How to Set Up Your System to Use Firewalls" on page 1016
.
2. Set Up Your Deployment (TCP or HTTPS)
To run Vusers or monitor servers over the firewall, configure your system according to one of the following configurations. Note that these configurations contain a firewall on each LAN.
There may also be configurations where there is a firewall for the Over-Firewall LAN only.
n
TCP Configuration
The TCP configuration requires every LoadRunner agent machine behind the customer's firewall to be allowed to open a port in the firewall for outgoing communication.
n
HTTPS Configuration
In the HTTPS configuration, only one machine (the proxy server) is allowed to open a port in the firewall. Therefore, it is necessary to tunnel all outgoing communications through the proxy server.
Page 1018 of 1812 HP LoadRunner (11.50)
User Guide
Controller
3. Configure the Firewall to Allow Agent Access
Modify your firewall settings to enable communication between the machines inside the firewall and machines outside the firewall.
a. If your system has a TCP configuration:
The LoadRunner agent attempts to establish a connection with the MI Listener using port
443, at intervals specified in the Connection Timeout field in the Agent Configuration dialog box. To enable this connection, allow an outgoing connection for HTTPS service on the firewall for port 443. The agent can then connect to the MI Listener, and the MI Listener can connect back to the agent. From this point on, the agent listens to commands from the MI
Listener.
b. If your system has an HTTPS configuration:
The LoadRunner agent attempts to establish a connection with the MI Listener, using the proxy port specified in the Proxy Port field, and at intervals specified in the Connection
Timeout field in the Agent Configuration dialog box. When the connection is established, the proxy server connects to the MI Listener. To enable this connection, allow an outgoing connection for HTTPS service on the firewall for port 443. The proxy server can then connect to the MI Listener, and the MI Listener can connect back to the agent through the proxy server. From this point on, the agent listens to commands from the MI Listener.
4. Configure the MI Listener
To enable running Vusers or monitoring over a firewall, you need to install the MI Listener on one or more machines in the same LAN as the Controller outside the firewall. For installation instructions, refer to the HP LoadRunner Installation Guide.
Note:
Page 1019 of 1812 HP LoadRunner (11.50)
User Guide
Controller n
The Controller installation automatically includes the MI Listener, so you can designate the Controller as the MI Listener machine.
n
The MI Listener can only be installed on Windows machines.
For information on how to configure the MI Listener, see
"MI Listener Configuration Dialog Box" on page 1026 .
How to Configure the System to Monitor Servers
Over a Firewall
This task describes how to set up your system to monitor the servers over a firewall.
1. Prerequisites
Before configuring the system to monitor servers over a firewall, make sure that you have completed the task
"How to Configure the Over-Firewall System" on page 1018 .
2. Configure the LoadRunner Agent on Each Monitor Over Firewall Machine
See
"How to Configure the LoadRunner Agent on Each Monitor Over Firewall Machine" on next page .
3. Configure the Controller for Running Over a Firewall
To run or monitor Vusers over a firewall, you need to create a unique connection between the
Controller and the agent machines. Agent machines include load generator machines that will be running over a firewall and all Monitor Over Firewall machines.
This connection is made through the MI Listener, which serves as a router between the
Controller and the LoadRunner agent. To establish this connection, you configure the
Controller machine to define the agent machine as a load generator.
To configure the Controller for running vusers or monitoring over the firewall, define the load generator settings as described in
"Load Generators Dialog Box " on page 907
. For the server name, be sure to use the same Local Machine Key setting as in the Agent Configuration.
Then, define the settings in the
"MI Listener Configuration Dialog Box" on page 1026 , using the
same MI Listener name as in the Agent Configuration.
Note: You cannot change the temporary folder on the host running or monitoring Vusers over the firewall.
4. Enable and Confirm your Connection
After you have configured the LoadRunner Agent, the MI Listener and the Controller, select the load generator in the Load Generators window and click Connect.
A green or red light next to the LoadRunner agent in the system tray indicates a successful or unsuccessful connection respectively.
5. Configure the Servers to Monitor and Define Measurements for Collection
Page 1020 of 1812 HP LoadRunner (11.50)
User Guide
Controller
You configure the monitor settings from the Monitor Over Firewall machine, using the Monitor
Configuration tool (Start > Programs > LoadRunner > Advanced Settings >
Monitor Configuration).
You select the type of monitors to run and the server whose resources you want to monitor, add the measurements to monitor for each server, and specify the frequency with which you want the monitored measurements to be reported.
For detailed information about how to use the Monitor Configuration tool, see
"How to
Configure Monitors Over a Firewall" on page 1023 .
How to Configure the LoadRunner Agent on Each
Monitor Over Firewall Machine
On each load generator machine that will be running over a firewall and on each Monitor Over
Firewall machine, you configure the LoadRunner agent to communicate with the MI Listener. The
MI Listener serves as a router between the LoadRunner agent and the Controller.
1. Configure the Windows LoadRunner Agent a. Stop the LoadRunner agent by right-clicking its icon in the system tray and selecting
Close, and then setting the options in the Agent Configuration dialog box as described in
"Agent Configuration Dialog Box" on page 1024 .
b. Restart the LoadRunner agent by double-clicking the shortcut on the desktop.
2. Configure and Run the Linux LoadRunner Agent a. Open <LoadRunner root folder>/dat/br_lnch_server.cfg in a text editor.
b. In the Firewall section, set FireWallServiceActive to 1 and save your changes.
c. Run agent_config from the <LoadRunner root folder>/bin folder to display the following menu: d. Enter 1 to display the current settings:
Page 1021 of 1812 HP LoadRunner (11.50)
User Guide
Controller e. To change a setting, enter 2 to display the settings menu:
Enter the setting and continue according to the menu instructions. Set each option according to the
"Agent Configuration Settings Dialog Box" on page 1024 .
f. Restart the agent for the configuration changes to take effect.
3. Restart the LoadRunner Agent a. To remove the LoadRunner agent, run the command m_daemon_setup -remove from the <LoadRunner root folder>/bin folder.
Note: When the LoadRunner agent is configured to run over a firewall, and the agent is connected to the MI Listener, a file called <local_machine_key>_connected_
Page 1022 of 1812 HP LoadRunner (11.50)
User Guide
Controller to_MI_Listener is created in the temporary folder of the LoadRunner agent machine. The file is removed when the LoadRunner agent disconnects from the MI
Listener.
b. To start the LoadRunner agent, run the command m_daemon_setup -install from the
<LoadRunner root folder>/bin folder.
How to Configure Monitors Over a Firewall
After you have installed and configured the LoadRunner agent, the Monitors over Firewall component, the MI Listener, and the Controller machine, you need to choose the server measurements that you want the Monitor Over Firewall machine to monitor.
You configure the server monitor properties from the Monitor Over Firewall machine, using the
"Monitor Configuration Dialog Box" on page 1027 . You can select the type of monitors to run and
the server whose resources you want to monitor, add the measurements to monitor for each server, and specify the frequency with which you want the monitored measurements to be reported.
The following steps describe how to configure monitors over a firewall:
1. Open the Monitor Configuration Dialog Box
Select Start > Programs > LoadRunner > Advanced Settings > Monitor Configuration.
For machines without the complete LoadRunner installation, select
Start > Programs > Server Monitor >Monitor Configuration.
2. Add Monitored Servers a. To add servers, click the Add Server button . Type the name or IP address of the server whose resources you want to monitor in the Monitored Server field.
Note: To add several servers simultaneously, separate the server names or IP ranges with commas. For example: 255.255.255.0-255.255.255.5, server1, server2
.
b. From the Available Monitors list, select the monitors appropriate for the server being monitored.
Note: Data can only be viewed for the monitors that are enabled with your LoadRunner license key. To preview your license key information, select
Start > Programs > LoadRunner. HP LoadRunner opens. Click the License button to display the LoadRunner license information.
For certain monitors, LoadRunner displays default measurements in the Measurements to be Monitored section. You can specify the frequency at which LoadRunner reports the measurement in the Measurement Properties section. For details on selecting measurements, see
"How to Set Up the Monitoring Environment – Workflow" on page
1044
.
3. (Optional) Clone a Monitored Server's Properties
Page 1023 of 1812 HP LoadRunner (11.50)
User Guide
Controller
If you want to monitor the same properties on different server machines, you can clone a selected server's properties using the Clone Monitored Server Properties dialog box.
To clone a monitored server's properties, right-click the server you want to clone, and select
Clone. In the Monitored Server box, type the name or IP address of the clone server you want to create.
Agent Configuration Dialog Box
This dialog box enables you to open the Agent Configuration Settings dialog box in order to configure the LoadRunner agent on Windows machines.
To access
l
Start > All Programs > HP Software > HP LoadRunner > Advanced
Settings > Agent Configuration l
Run <LoadRunner root>\launch-service\bin
\AgentConfig.exe
Stop the LoadRunner agent before working with this dialog box.
Important information
Relevant tasks
See also
"How to Configure the LoadRunner Agent on Each Monitor Over Firewall
Machine" on page 1021
"Agent Configuration Settings Dialog Box" below
.
User interface elements are described below:
UI Element
Enable
Terminal
Services
Description
Enable
Firewall Agent
Select if you are enabling or running Vusers over a firewall.
Enabled only when the Enable Firewall Agent check box is selected. Click to open the Agent Configuration Settings dialog box.
Select to enable distributing Vusers on a terminal server.
Agent Configuration Settings Dialog Box
This dialog box enables you to define the relevant settings in order to enable the LoadRunner agent on Windows machines.
To access
Relevant tasks
Start > All Programs > HP Software > HP LoadRunner > Advanced Settings
> Agent Configuration > Settings
"How to Configure the LoadRunner Agent on Each Monitor Over Firewall Machine" on page 1021
See also
"Agent Configuration Dialog Box" above .
Page 1024 of 1812 HP LoadRunner (11.50)
User Guide
Controller
User interface elements are described below:
UI Element
MI Listener
Name
Local
Machine Key
Connection
Timeout
(seconds)
Description
The name, full name, or IP address of the MI Listener.
A symbolic string identifier used to establish a unique connection between the
Controller host and the agent machine, via the MI Listener machine.
The length of time you want the agent to wait before retrying to connect to the
MI Listener machine. If zero, the connection is kept open from the time the agent is run.
Default value: 20 seconds
The user name needed to connect to the MI Listener machine.
MI Listener
User Name
MI Listener
Password
Server
Domain
Connection
Type -
TCP/HTTP
Connection
Type - HTTP
Proxy Name
Connection
Type - HTTP
Proxy Port
Connection
Type - HTTP
Proxy User
Name
Connection
Type - HTTP
Proxy
Password
Connection
Type - HTTP
Proxy
Domain
The password needed to connect to the MI Listener machine.
The domain name needed to connect to the MI Listener machine. This field is required only if NTLM is used.
Select either TCP or HTTP, depending on the configuration you are using.
Default: TCP
The name of the proxy server. This field is mandatory if the Connection Type setting is HTTP.
The proxy server connection port. This field is mandatory if the Connection
Type setting is HTTP
The user name of a user with connection rights to the proxy server.
The password of the user with connection rights to the proxy server.
The user's domain if defined in the proxy server configuration. This option is required only if NTLM is used.
Page 1025 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Use Secure
Connection
(SSL)
Enable to connect using the Secure Sockets Layer protocol.
Default: disabled
Use Secure
Connection
(SSL) - Check
Server
Certificates
Authenticates the SSL certificates that are sent by the server. Select Medium to verify that the server certificate is signed by a trusted Certification Authority.
Select High to verify that the sender IP matches the certificate information.
This setting is available only if Use Secure Connection is enabled.
The password that might be required during the SSL certificate authentication process. This option is relevant only if the Client Certificate Owner option is enabled.
Use Secure
Connection
(SSL) -
Private Key
Password
Use Secure
Connection
(SSL) - Use
Client
Certificate
Enable to load the SSL certificate (if required by the server to allow the connection to be made). This setting is available only if Use Secure
Connection is enabled.
Default: disabled
Monitors Over a Firewall
To monitor servers over a firewall, you need to configure the Monitor Over Firewall machine. On the
Monitor Over Firewall machine, you use the Server Monitor configuration tool to select which servers to monitor and to define specific measurements that LoadRunner collects for each monitored server.
To enable monitoring of your servers over a firewall, you install the Monitor Over Firewall component on a dedicated machine.
Caution: Before you configure your system to monitor your servers over a firewall, ensure that you have completed the configuration steps described in
"How to Configure the Over-
Firewall System" on page 1018 .
After you have set up your LoadRunner system to work with firewalls, you need to configure the monitor settings on the Monitor Over Firewall machine.
You use the Server Monitor configuration tool to select which servers to monitor and to define specific measurements that LoadRunner collects for each monitored server. For more information, see
"How to Configure Monitors Over a Firewall" on page 1023
.
MI Listener Configuration Dialog Box
This dialog box enables you to configure the MI Listener.
To access
l
Select Start > Programs > LoadRunner > Advanced Settings l
Run <LoadRunner root folder>\launch_service\bin\MILsnConfig.exe
Page 1026 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Important information
l
Before configuring the MI Listener: n
Open incoming HTTPs service for port 443. The port settings are set by your system administrator.
n
Stop the LoadRunner agent on the MI Listener machine by right-clicking it's icon in the system tray and selecting Close from the popup menu.
l
After configuring the MI Listener: n
Restart the LoadRunner agent by double-clicking the shortcut on the desktop, or by selecting Start > Programs > LoadRunner.
l
Make sure that no Web Servers are running on the MI Listener or Monitor over
Firewall machine. These servers use port 443 and will not allow the access required by the listening and monitoring processes.
Relevant tasks
"How to Configure the Over-Firewall System" on page 1018
User interface elements are described below:
UI Element
Check Client
Certificates
Private Key
Password
Description
Select True to request that the client send an SSL certificate when connecting, and to authenticate the certificate. Default value is False.
The password that may be required during the SSL certificate authentication process. There is no default value.
Monitor Configuration Dialog Box
This dialog box enables you to select the type of monitors to run and the server whose resources you want to monitor, add the measurements to monitor for each server, and specify the frequency with which you want the monitored measurements to be reported.
Page 1027 of 1812 HP LoadRunner (11.50)
User Guide
Controller
To access
Start > Programs > LoadRunner > Advanced Settings > Monitor Configuration.
For machines without the complete LoadRunner installation, select
Start > Programs > Server Monitor >Monitor Configuration.
Relevant tasks
"How to Configure Monitors Over a Firewall" on page 1023
User interface elements are described below:
UI Element Description
Adds a server or measurement to the monitored server list. Type the name or IP address of the server whose resources you want to monitor in the Monitored
Server field.
Note: To add several servers simultaneously, separate the server names or IP ranges with commas. For example: 255.255.255.0-255.255.255.5, server1, server2
.
From the Available Monitors list, select the monitors appropriate for the server being monitored.
Note: Data can only be viewed for the monitors that are enabled with your
LoadRunner license key. To preview your license key information, select
Start > Programs > LoadRunner. HP LoadRunner opens. Click the License button to display the LoadRunner license information.
Removes a server or measurement.
Opens the Monitored Server Properties dialog box, allowing you to modify the settings.
Page 1028 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Measurement
Properties
Allows you to set a measurement schedule for each measurement to be reported. Select the configured server measurement you want to schedule and specify the frequency at which you want LoadRunner to report the measurement. Click Apply to save your settings.
Troubleshooting and Limitations
This section describes troubleshooting for working with firewalls in LoadRunner.
Checking Connectivity
To run Vusers or monitor servers over a firewall, you must be able to establish a connection between the LoadRunner agent, MI Listener, and the Controller machine.
If you encounter connectivity problems after installing and configuring all the necessary components, check the table below for troubleshooting tips.
Check
To check that the Firewall service was activated on the agent machine:
To check that port 443 is open:
To check that port 443 is available:
Solution
There should be a traffic light on the right side of the LoadRunner Agent icon on the machine running/ monitoring Vusers over a firewall. If there is no traffic light, this indicates that the
`FirewallServiceActive=1' is not set in the
[FireWall] section of the Agent Settings. See
"Agent Configuration Settings Dialog Box" on page 1024
.
On the agent machine, open a Command
Prompt window, and type the following: telnet <MI_Listener_IP>443
.
For example: telnet 111.111.111.1111
443
.
If port 443 is open, a new Telnet window will open. If port 443 is not open, contact your network administrator.
If a Web server is running on the MI Listener or
Monitor over Firewall machine, port 443 will not allow the access required by the listening and monitoring processes. Contact your network administrator to change the Web server port.
Page 1029 of 1812 HP LoadRunner (11.50)
User Guide
Controller
To check connectivity between the agent and the
MI Listener, when running the LoadRunner agent as a service:
To check connectivity between the agent and the
Controller, when monitoring over a firewall
If there is a red light on the right side of the
LoadRunner Agent icon when running the
LoadRunner agent as a service, do the following: l
Check that port 443 is open. See the troubleshooting tip
"To check that port 443 is open:" on previous page
.
l
Check that the Agent Settings and Agent
Configuration are correctly set. See
"Agent
Configuration Settings Dialog Box" on page 1024 .
l
Run the agent as a Process. Launch
<Installation>\Launch_service\bin\
magentproc.exe. If this works, this indicates an authentication issue with the
LoadRunner Agent Service. Browse to the
Service > LoadRunner Agent Service, and change the properties of this service to
System User Account or provide the user name and password of someone who has administrative privileges on this machine.
l
Check that you entered the servers that you want to monitor in the Monitor
Configuration dialog box. (See
"Monitor
Configuration Dialog Box" on page 1027 ).
l
Start the LoadRunner Agent Process on the Monitor Over Firewall machine. (See
"How to Configure the LoadRunner Agent on Each Monitor Over Firewall Machine" on page 1021 ).
l
On the Controller, enter the name of the
Monitor Over Firewall machine in the Load
Generators dialog box, and click Connect.
After about a minute, data should start streaming in from the Monitor Over Firewall machine through the MI Listener to the
Controller. (See
"How to Configure
Monitors Over a Firewall" on page 1023
).
l
If no data arrives at the Controller, try connecting the Controller to the MI Listener as if the Listener were used as a load
Page 1030 of 1812 HP LoadRunner (11.50)
User Guide
Controller generator. This will help identify the cause of the problem. Examine the log file on the
Monitor Over Firewall machine by rightclicking the LoadRunner Agent icon. There should be no error messages.
l
Start the MI Listener, and then manually start the LoadRunner Agent Process by running <installation>\launch_service\
bin\magnetproc.exe on the Monitor Over
Firewall machine. Allow the Monitor Over
Firewall machine sufficient time to connect to the MI Listener, then connect the
Controller to the Monitor Over Firewall machine. If the LoadRunner Agent Process crashes, either restart the agent or reboot the Monitor Over Firewall machine.
Working with Diagnostics
LoadRunner ERP/CRM Diagnostics Modules
ERP/CRM Diagnostics Modules Overview
During a performance test, LoadRunner's diagnostics modules trace, time, and troubleshoot individual transactions across the Web, application, and database servers. You can drill down from a slow end-user transaction all the way to the bottlenecked method or SQL statement. The
LoadRunner diagnostics modules enable organizations to: l
Trace the application components exercised by business processes l
Rapidly isolate application components that have a significant impact on end-user experience l
Provide developers with precise data on how to make performance improvements
ERP/CRM Diagnostics Modules Architecture
ERP/CRM Diagnostics architecture, as shown in the diagram below, is composed of the following components:
Page 1031 of 1812 HP LoadRunner (11.50)
User Guide
Controller l
Mediator. The ERP/CRM Mediator ("Mediator") gathers and correlates offline transaction data from the Web, database, and application servers. For information on installing the Mediator, see the HP LoadRunner Installation Guide.
For information on how the Mediator connects to remote Windows and Linux servers, see
"Connecting the Mediator to a Remote Server" below .
l
Controller. Before scenario execution, the Controller transfers all server information to the
Mediator and distributes the percentage of users that will participate in the monitoring. After scenario execution, the Controller collects the aggregated transaction data files from the
Mediators and collates the results. The files are then transferred to the results folder per diagnostics type.
You can view the status of diagnostics file collation in the Collate Results dialog box. For details, see
"Collate Results Dialog Box" on page 1008 .
l
Load Generator. When you execute a scenario, the Controller distributes each Vuser to a load generator, and the load generator executes the Vuser script.
l
Analysis. Displays detailed diagnostics graphs and reports. For more information about the diagnostics graphs, see the HP LoadRunner Analysis User Guide.
Connecting the Mediator to a Remote Server
When you set up the ERP/CRM Diagnostics modules, you define a server to monitor by entering the user name of the server where trace/log files are stored. This section explains how the Mediator connects to the server when it is a remote Windows or Linux server.
l
"Connecting to a Remote Windows Server " below
l
"Connecting to a Remote Linux Server " on next page
Connecting to a Remote Windows Server
When monitoring a remote Windows server, the Mediator attempts to connect to the server using the configuration details which you enter in the <diagnostics type> Server Configuration Dialog Box
Page 1032 of 1812 HP LoadRunner (11.50)
User Guide
Controller during the diagnostics configuration process. This configuration should give administrator permissions to the remote machine.
If the Mediator is already connected to the remote machine using another configuration, it maintains that prior connection. This may lead to an error if the remote machine user is a non-administrator.
For more information, see
"Troubleshooting and Limitations " on page 1038 .
Connecting to a Remote Linux Server
When monitoring a remote Linux server, the Mediator supports two types of connections:
Remote Shell (RSH/RCP) Connection
For more information on remote shell connections, see the Verifying your Linux Installation section in the HP LoadRunner Installation Guide.
Secured Shell (PLINK/PSCP) Connection
The secured shell connection is based on the SSH protocol, which enables a secure connection to a remote machine by an authentication mechanism (using RSA and DSA) and encrypted communication.
SSH Protocol Security
The SSH protocol has the following security levels: l
Using a user name and password.
l
Using a user name and key pair without passphrase protection.
l
Using a user name, key pair and a passphrase protected private key.
SSH Protocol Implementation
The Mediator uses PuTTY as an SSH implementation.
You can find the following PuTTY tools in the bin folder of the LoadRunner installation: l
PUTTY.EXE
l
PAGEANT.EXE
l
PLINK.EXE
l
PSCP.EXE
l
PSFTP.EXE
l
PUTTYGEN.EXE
l
PUTTY.HLP
You can use the Import command from the Conversions menu of PuTTYgen to load the private key in OpenSSH format and ssh.com format and then generate it as a PuTTY format key. For more information, see the PuTTY User Manual which resides in the bin folder of the LoadRunner installation.
Page 1033 of 1812 HP LoadRunner (11.50)
User Guide
Controller
For more information on secured shell connections, see the Verifying your Linux Installation section in the HP LoadRunner Installation Guide.
For troubleshooting information about connecting to a remote Linux server, see
"Troubleshooting and Limitations " on page 1038 .
How to Enable and Disable Logging on the Siebel Server
This task describes how to enable and disable logging on the Siebel server.
Note: Enabling logging on the Siebel server can negatively impact server performance. We recommend that you disable logging and restore the default logging settings at the conclusion of the load test scenario.
To enable logging on the Siebel server
Perform the following steps:
1. Open a command window and run the following command.
<Siebel bin directory>\srvrmgr /g <gateway server> /s <Siebel server> /e <enterprise server name> /u <username> /p <password>
where:
/u <username> is the server administrator username
/p <password> is the server administrator password
/g <gateway server> is the gateway server address
/e <entrpr server> is the enterprise server name
/s <siebel server > is the siebel server (the default server)
2. Enter the following commands.
change evtloglvl ObjMgrsqllog=4 for comp <component name> evtloglvl EventContext=3 for comp <component name> evtloglvl ObjMgrSessionInfo =3 for comp <component name>
Example
For the Call Center component, enter sccobjmgr_enu as the component name, as follows: change evtloglvl ObjMgrsqllog=4 for comp sccobjmgr_enu
To disable logging on the Siebel server
Perform the following steps:
1. Open a command window and run the following command.
Page 1034 of 1812 HP LoadRunner (11.50)
User Guide
Controller
<Siebel bin directory>\srvrmgr /g <gateway server> /s <Siebel server> /e <enterprise server name> /u <username> /p <password>
where:
/u <username> is the server administrator username
/p <password> is the server administrator password
/g <gateway server> is the gateway server address
/e <entrpr server> is the enterprise server name
/s <siebel server > is the siebel server (the default server)
2. Enter the following commands: change evtloglvl ObjMgrsqllog=0 for comp <component name> change evtloglvl EventContext=0 for comp <component name> change evtloglvl ObjMgrSessionInfo =0 for comp <component name>
How to Enable Logging on the Oracle Server
This task describes how to enable logging on the Oracle server.
1. Verify that the trace diagnostics are enabled
Perform the following steps: a. Log on to the Oracle application server with administrator privileges, and select the desired modulein theOracle application. The Responsibilities dialog box opens.
b. Select System Administrator and click OK.
c. In the Functions tab, select Profile > System and click Open. The System Profile Values dialog box opens.
d. In the Display section, select Site and Profiles with No Values, enter %Diagnostics% in the Profiles field, and then click Find.
e. If any diagnostics profiles are disabled (denoted by a "Yes" in the Site column), change the setting to "No".
f. Save your settings.
2. Set the trace file size to unlimited
For Oracle 9i:
On the Oracle server, run the following command in the SQL editor:
Alter system set max_dump_file_size=UNLIMITED scope=both;
For Oracle 8i:
a. On the Oracle server, run the following command in the SQL editor:
Page 1035 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Alter system set max_dump_file_size=2048000; b. Edit the init*.ora file on $ORACLE_HOME\admin\<sid>\pfile\init<sid>.ora. Find the line of the parameter, change its value, and then save the file.
Note: Verify that you have enough disk space on the database server since these trace files can be very large.
How to Set and Disable the Oracle Server Diagnostics
Password
To help LoadRunner deal with the Oracle server diagnostics password, you can either set the password in the Vuser script, or you can disable the password request on the server itself.
Set the diagnostics password in the Vuser script
In VuGen, add the nca_set_diagnostics_password(<password>) function to your script and select a password.
Note: The nca_set_diagnostics_password function must come after the nca_connect_
server function.
Disable the diagnostics password request on the Oracle server
Perform the following steps:
1. Log on to the Oracle server with administrator privileges, and select the desired module in the
Oracle application. The Responsibilities dialog box opens.
2. Select System Administrator and click OK.
3. In the Functions tab, select Profile > System and click Open. The System Profile Values dialog box opens.
4. In the Display section, select User, and enter the required user name. In the Profile field, enter %Utilities:Diagnostics% and click Find. The Utilities:Diagnostics profile values are displayed.
5. In the User column of the Utilities:Diagnostics profile, set the value to Yes.
6. Save your settings.
How to View Diagnostics Results
1. Open Analysis
In the Run tab of the Controller, select Results > Analyze Results, or click the Analyze
Results button .
2. View results in the Analysis diagnostics graphs
You can use the Analysis diagnostics graphs and reports to view the performance data and drill
Page 1036 of 1812 HP LoadRunner (11.50)
User Guide
Controller down to pinpoint problem areas in any layer of the application.
For information about specific diagnostics graphs, see the following sections in the HP
LoadRunner Analysis User Guide: n
Siebel Diagnostics Graphs n
Siebel DB Diagnostics Graphs n
Oracle 11i Diagnostics Graphs n
SAP Diagnostics Graphs
Diagnostics Distribution Dialog Box
This dialog box enables you to enable the ERP/CRM diagnostics modules.
To access
Select Diagnostics > Configuration
Important information
l
The Diagnostics Distribution dialog box is disabled during scenario execution.
You must enable and configure the diagnostics modules before running the scenario.
l
The settings that you configure are per scenario. All scripts in the scenario will run under the same diagnostics configuration.
Relevant tasks
l
"How to Configure a LoadRunner Scenario to use J2EE/.NET Diagnostics" on page 1040
User interface elements are described below:
UI Element Description
Enables/Disables Web Page Diagnostics graphs.
Click to enable and configure the relevant diagnostics graphs.
Indicates that the diagnostics type is disabled.
Indicates that the diagnostics type is enabled.
Enable the following diagnostics
Enables LoadRunner to generate offline Web Page Diagnostics graphs, and online and offline J2EE & .NET Diagnostics graphs.
For X% of all the relevant
Vusers in the current scenario
Specify the percentage of Vusers for which you want to collect diagnostics data.
This value determines how many of the transactions on the application server are reported to the Controller. Reducing this percentage will reduce the overhead on the application server for Web Page, and J2EE & .NET Diagnostics.
Example: If you enter a sampling value of 25% and run 12 Vusers in group1, 8
Vusers in group2, and 1 Vuser in group3, diagnostics data will be collected for
3 Vusers in group1, 2 Vusers in group2, and 1 Vuser in group3.
Page 1037 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Web Page
Diagnostics
J2EE/.NET
Note: The minimum percentage of Vuser sampling allowed is 1%, or 1 Vuser per group, whichever is more.
The maximum percentage allowed is the lowest of the Max. Vuser Sampling values of all the selected diagnostics types.
Example: If you enable Web Page (max 10%), and J2EE/.NET (max 100%) diagnostics, the percentage of Vuser participation for J2EE/.NET Diagnostics cannot exceed 5%.
Generates offline Web Page Diagnostics graphs.
The maximum percentage of Vusers for which diagnostics data can be collected is 10%.
Default: Enabled
See also: Web Resource Graphs in the HP LoadRunner Analysis User Guide.
Generates online and offline J2EE/.NET Diagnostics graphs.
The maximum percentage of Vusers for which J2EE/.NET Diagnostics data can be collected is 100% of the amount of Vusers selected in the For X% of all the
relevant Vusers in the current scenario setting.
To enable and configure J2EE/.NET Diagnostics, click Configure.
Troubleshooting and Limitations
This section describes troubleshooting and limitations for ERP/CRM Diagnostics.
Microsoft Windows networking limitation: Failed to establish connection. System error 1219
Possible causes:
l
The limitation might be a result of running the LoadRunner agent as a process.
l
The limitation might appear if the Mediator is already connected to the Server with a prior configuration and if the server user is a non-administrator.
Solution: You can try the following: l
Run the LoadRunner agent as a service. For more information, see
"How to Use the Terminal
Services Manager " on page 940
.
l
Disconnect all previous Mediator connections to the server and try to connect again.
n
To check that a connection exists, at the Command prompt run the following: net use n
To remove a connection, at the Command prompt run the following: net use \\servername\sharename /DELETE n
Use your own connection to the log folder by supplying the UNC-path to the log folder and marking the operating system as WINDOWS. When the Mediator runs, it will not try to create a connection but will rely on the given UNC-path instead.
Error: RSH Command Failed
Solution: Run the same command from the DOS command prompt to determine if it is a problem with the command or with LoadRunner. If it runs at the DOS command prompt, the command is valid and you should contact HP Software Support for further help.
Page 1038 of 1812 HP LoadRunner (11.50)
User Guide
Controller
If you cannot run the command from the DOS command prompt either, then contact your Linux administrator for further assistance.
Error: SSH Command Failed
Solution: Run the same command from the DOS command prompt to determine if it is a problem with the command or with LoadRunner. If it runs at the DOS command prompt, the command is valid and you should contact HP Software Support .
If you cannot run this command from the DOS command prompt either, then contact your Linux administrator for further assistance.
Configuring J2EE/.NET Diagnostics
J2EE/.NET Diagnostics Overview
The HP Diagnostics integration with LoadRunner allows you to monitor and analyze the performance of Java 2 Enterprise Edition (J2EE), .NET-connected, SAP, Oracle, and other complex environments.
For more information about working with diagnostics for J2EE and .NET, see the HP Diagnostics
User Guide.
Monitoring Server Requests
When configuring a LoadRunner scenario to use J2EE/.NET Diagnostics, you can instruct
LoadRunner to capture a percentage of server requests which occur outside the context of any
Vuser transaction.
The benefit of enabling this functionality is that calls into a back-end VM can be captured even in the case where: l
The probe is not capturing RMI calls l
RMI calls cannot be captured (perhaps because an unsupported application container is being used) l
The application uses some other mechanism for communications between multiple VMs
How to Specify J2EE/.NET Diagnostics Server Details
The first time you use LoadRunner to capture J2EE or .NET diagnostics data, you need to identify the machine on which the Diagnostics Server in Commander mode is running, and the port that it is using for communication with LoadRunner.
Note: You must update this information if you want to integrate with a different Diagnostics
Server in Commander mode, or if you change the port it is using.
Update the LoadRunner configuration settings for HP Diagnostics
In the HP Diagnostics Commander, enter the details for the Diagnostics Server in Commander mode. For user interface details, see
"Diagnostics for J2EE/.NET Setup Dialog Box " on next page
.
Page 1039 of 1812 HP LoadRunner (11.50)
User Guide
Controller
How to Configure a LoadRunner Scenario to use
J2EE/.NET Diagnostics
This task describes how to capture J2EE/.NET diagnostics metrics in a LoadRunner scenario and how to select the probes that will be included in the scenario.
1. Prerequisite n
Start application server.
Make sure that the application server you are monitoring has already been started.
n
Make sure that the load test scenario is not already running.
You must configure J2EE/.NET diagnostics before running the load test scenario.
2. Enable J2EE/.NET Diagnostics
Perform the following steps: a. In the Controller, select Diagnostics > Configuration to open the Diagnostics Distribution dialog box. Then select Enable the following diagnostics and specify the percentage of
Vusers for which you want to collect J2EE/.NET Diagnostics data. For user interface details, see
"Diagnostics for J2EE/.NET Setup Dialog Box " on next page
.
b. In the Diagnostics Distribution dialog box, click Configure by J2EE/.NET Diagnostics to enable the module. For user interface details, see
"J2EE/.NET Configuration Dialog Box " on page 1042 .
How to View J2EE/.NET Diagnostics Data in LoadRunner
During a Scenario Run
This task describes how to view diagnostics data for J2EE/.NET Diagnostics in LoadRunner for the whole scenario or for a specific transaction during a scenario run.
View diagnostics data for the whole scenario
In the Controller, select the Diagnostics for J2EE/.NET tab. HP Diagnostics opens, displaying the Scenario Summary dashboard view.
The Scenario Summary dashboard view displays monitoring versions of the transactions, server requests, load, and probe views for the current run.
Note: If you move to another tab during the scenario run and then return to the Diagnostics for
J2EE/.NET tab, the last screen that you viewed will be displayed.
View Diagnostics Data for a Specific Transaction
Perform the following steps:
1. Select one of the Transaction graphs (for example, Transaction Response Time), to open the graph.
Page 1040 of 1812 HP LoadRunner (11.50)
User Guide
Controller
2. Right-click the relevant transaction in the graph legend and select Show J2EE/.NET server
side.
HP Diagnostics opens, displaying the Transactions view, which contains performance metrics and drill-down options for the selected transaction.
For more information about interpreting data in the Diagnostics Transactions view, see the HP
Diagnostics User Guide.
How to View Offline J2EE/.NET Diagnostics Results
1. Open Analysis
In the Run tab of the Controller, select Results > Analyze Results, or click the Analyze
Results button .
2. View results in the Analysis diagnostics graphs
You can use the Analysis diagnostics graphs and reports to view the performance data and drill down to pinpoint problem areas in any layer of the application.
For specific information about J2EE/.NET diagnostics graphs, see J2EE & .NET Diagnostics
Graphs in the HP LoadRunner Analysis User Guide.
Diagnostics for J2EE/.NET Setup Dialog Box
This dialog box enables you to update the LoadRunner configuration settings for HP Diagnostics.
To access Start > All programs > HP Software > LoadRunner > Tools > Diagnostics for J2EE/.NET Setup
Relevant tasks
"How to Specify J2EE/.NET Diagnostics Server Details " on page 1039
User interface elements are described below:
UI Element Description
Login
Click to verify that you entered the correct information for the Diagnostics Server in Commander mode and that there is connectivity between the server and
LoadRunner.
The user name with which you log in to Diagnostics.
Default: admin
Note: The user name that you specify should have view, change, and execute privileges. For more information about user privileges, see the HP Diagnostics
Installation and Configuration Guide.
Password
Port
Enter the password with which you log in to Diagnostics.
Default: admin
Enter the port number used by the Diagnostic server in Commander mode.
Default: 2006
Note: LoadRunner does not support communication with the Diagnostics Server
Page 1041 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Server
Name
in Commander mode using HTTPS.
Enter the name of the machine that is to host the Diagnostics Server in
Commander mode.
J2EE/.NET Configuration Dialog Box
This dialog box enables you to set up the J2EE/.NET Diagnostics module.
To access
Select Diagnostics > Configuration. Click Configure by J2EE/.NET
Diagnostics.
The dialog box is read only while a scenario is running.
Important information
Relevant tasks
See also
"How to Configure a LoadRunner Scenario to use J2EE/.NET
Diagnostics" on page 1040
"J2EE & .NET Diagnostics Graphs" in the HP LoadRunner Analysis User
Guide
User interface elements are described below:
UI Element Description
Enable
J2EE/.NET
Diagnostics
Select probes table
Enables J2EE/.NET Diagnostics and allows you to configure the J2EE/.NET
Diagnostics settings
Selects a probe for monitoring. At least one probe must be selected. Clear the check box to disable a probe for the duration of the scenario.
Name. The name of the probe.
Group. The probe group.
Host Name. The host the probe is running on (or the application server on which the probe is installed) la.
Note: If you upgraded your Diagnostics installation, probes from existing scenarios may appear with a red status. Clear any probes that appear in red.
There is a firewall between the
Mediator and the
Controller
Select if the Diagnostics server (or a Diagnostics server in Mediator mode in a distributed environment) is located behind a firewall.
Note: If there is a firewall between the LoadRunner Controller and the
Diagnostics Server involved in a load test, you must configure the Controller and the Diagnostics Server to use the MI Listener to enable the transfer of the offline analysis file. For more information, refer to the HP Diagnostics
Installation and Configuration Guide.
MI Listener server
Monitor server requests
Enter the name of the MI Listener server when the Diagnostics server (or a
Diagnostics server in Mediator mode in a distributed environment) is located behind a firewall.
Select to capture a percentage of server requests which occur outside the
context of any Vuser transaction. For more information,see "Monitoring Server
Requests " on page 1039 .
Page 1042 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Notes:
l
The server requests will be captured at the same percentage that was selected for the percentage of Vusers in the Diagnostics Distribution dialog box.
l
Enabling this option imposes an additional overhead on the probe.
Troubleshoot
Diagnostics for
J2EE/.NET
connectivity
Click to open the HP Diagnostics System Health Monitor to enable you to investigate any connectivity issues between the Diagnostics components.
Monitoring Load Test Scenarios
Working with LoadRunner Online Monitors
Monitoring Process Overview
Before monitoring a scenario, you need to set up and configure the LoadRunner monitoring components. Each monitor has different configuration requirements that are explained in the specific monitoring chapters. The following diagram illustrates the LoadRunner monitoring process.
Before monitoring a server, perform the following steps: l
Configure the monitoring environment on the server machine (if necessary).
l
Configure the monitor on the Controller machine.
For details, see
"How to Set Up the Monitoring Environment – Workflow" below
.
Page 1043 of 1812 HP LoadRunner (11.50)
User Guide
Controller
How to Set Up the Monitoring Environment – Workflow
This task describes how to set up the LoadRunner online monitoring environment. You specify the machines and measurements that the Controller will monitor during a scenario execution in the
Controller's Run tab. During scenario execution, the collected measurement data appears in the online graphs.
1. Configure the monitoring environment on the server machine
To use the following monitors, you must first install or configure monitoring components on the server machine. For details about configuring the monitoring components, see the specific monitoring sections.
n
"How to Set up the Citrix Monitoring
Environment" on page 1107
n
"How to Set Up the Oracle Monitoring
Environment " on page 1077
n
"How to Set Up the DB2 Monitoring
Environment" on page 1076
n
"How to Set Up the PeopleSoft
(Tuxedo) Resource Monitor" on page
1095
n
"How to Set Up the IBM WebSphere MQ
Monitor" on page 1114
n
"How to Configure a LoadRunner Scenario to use J2EE/.NET Diagnostics" on page 1040
n n
"How to Set Up the SAPGUI Server
Resource Monitor" on page 1096
"How to Set Up the Tuxedo Monitor" on page 1113
n
"How to Set Up the Network Monitoring
Environment" on page 1065
n
"How to Set up the Linux Monitoring
Environment " on page 1058
Note: For information on how to set up the SiteScope monitoring environment, refer to the Sitescope documentation.
2. Add the monitored server to the Controller
Select the server whose monitors you want to configure.
To monitor a server from the Controller, you need to add the machine and the measurements that you want to monitor.
a. Click the desired monitor graph in the graph tree, and drag it into the right pane of the Run tab.
o
Some monitors are native LoadRunner monitors (by default), but you can also monitor through the SiteScope monitor engine. To monitor through the SiteScope monitor, in the
Resource Graphs section of the Available Graphs tree, click SiteScope and drag it into the right pane of the Run tab. Alternatively you can double-click SiteScope in the graph tree, to add it to the right pane of the Run tab.
b. Right-click the graph and select Add Measurements, or click anywhere on the graph and select Monitors > Add Measurements. The <Monitor> dialog box opens.
Page 1044 of 1812 HP LoadRunner (11.50)
User Guide
Controller c. In the Monitored Server Machines section of the <Monitor> dialog box, click Add. The
Add Machine dialog box opens.
o
Enter the server name or IP address of the machine you want to monitor. Select the platform on which the machine runs.
o
For Sitescope monitors enter the name and port number of the SiteScope server, and specify whether you are using a Secure HTTP connection. To use an account, enter the relevant account information.
For user interface details, see
"Add Machine Dialog Box" on page 1048
.
3. Select the measurements that you want to monitor a. Make sure that the monitor you are configuring is selected in the Monitored Server
Machines area of the <Monitor> dialog box.
b. In the Resource Measurements section of the <Monitor> dialog box, click Add. The
<monitor> Configuration dialog box opens. Choose the measurements for the specific server.
Note: For the Citrix monitor, if the dialog box freezes after clicking Add, you may need to rebuild the localhost cache on the Citrix server machine.
For user interface details, see
"<Monitor> Configuration Dialog Box" on page 1049
.
For details about each monitor's default measurements, refer to the relevant reference section for the monitor.
4. Change the monitor's default counters - Optional
When you configure the System Resource, Microsoft IIS, Microsoft ASP, and SQL Server monitors, you are presented with a list of default counters that you can measure on the server you are monitoring. You can change the default counters for these monitors by editing the res_
mon.dft file found in the LoadRunner\dat folder.
a. Open a new scenario and click the Run tab.
b. For each of the monitors, select the counters you want to measure.
c. Save the scenario and open the scenario .lrs file and res_mon.dft file with an editor.
d. From the scenario .lrs file, copy the MonItemPlus section of the each counter you selected into the res_mon.dft file.
e. Count the number of new counters in the res_mon.dft file and update the ListCount parameter with this number.
5. Improve the level of measurement information - Optional
You can improve the level of measurement information for the SNMP, iPlanet (SNMP), or
Check Point FireWall-1 monitor by enabling measurements with string values to be listed (in addition to measurements with numeric values), and by enabling the name modifier (which displays the string value as an identifying part of the measurement name).
In the following example of a measurement using the name modifier, the string value of
ProcessName
(sched) is displayed in addition to its instance ID (0):
Page 1045 of 1812 HP LoadRunner (11.50)
User Guide
Controller
To enable this feature, add the following line to the snmp.cfg file in the
LoadRunner\dat\monitors folder:
SNMP_show_string_nodes=1
Note: You can select more than one name modifier, but the first in the hierarchy will be used. Each time the SNMP Add Measurements dialog box opens, the information is reread from the snmp.cfg file. You cannot add the same measurement twice (once with a name modifier and once without it). If you do so, an error message is issued.
You can modify the list of resources that you want to monitor at any point during the scenario run. A scenario does not have to be active in order for you to monitor the resources on a remote machine.
Monitor Types
All of the monitors allow you to view a summary of the collected data at the conclusion of the scenario. Using LoadRunner Analysis, you can generate a graph for any of the monitors. For more information, see the HP LoadRunner Analysis User Guide.
The online monitors are divided into the following categories:
Web
Resource
Monitors
Run-Time and
Transaction
Monitors
System
Resource
Monitors
Network
Delay
Monitors
Firewall
Monitor
Web Server
Resource
Monitors
Provide information about the number of Web connections, throughput volume,
HTTP responses, server retries, and downloaded pages at the Web servers during the scenario run. For more information, see
"Web Resource Monitors" on page 1050
.
Display the transaction rate and response times, and the number and status of
Vusers participating in the scenario, as well as the number and types of errors that the Vusers generate. For more information, see
"Run-Time and Transaction
Monitoring " on page 1054
.
Measure the Windows, Linux, Server, SNMP, and SiteScope resources used during a scenario run. For more information, see
"System Resource Monitoring " on page 1056
.
Displays information about the network delays on your system. For more information, see
"Network Delay Monitoring" on page 1064 .
Measures statistics related to the firewall servers during the scenario run.
Measure statistics related to the Microsoft IISand Apache Web servers during the scenario run. For more information, see
"Web Server Resource Monitoring " on page 1061
.
Page 1046 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Web
Application
Server
Resource
Monitors
Database
Server
Resource
Monitors
Streaming
Media
Monitors
ERP/CRM
Server
Resource
Monitors
Measure statistics related to the Microsoft ASP and WebLogic (SNMP) application servers during the scenario run. For more information, see
Application Server Resource Monitoring" on page 1071
the scenario run. For more information, see
page 1075
.
.
"Web
Measure statistics related to the SQL server, Oracle, and DB2 databases during
"Database Resource Monitoring " on
Measure statistics related to the RealPlayer Client and Media Player Client servers during the scenario run. For more information, see
Monitoring" on page 1092 .
"Streaming Media
Measure statistics related to web servers during the scenario run. For more information, see
"ERP/CRM Server Resource Monitoring " on page 1094 .
J2EE & .NET
Diagnostics
Monitors
Provide information to trace, time, and troubleshoot individual transactions through J2EE Web, application, and database servers. For more information, see the HP Diagnostics User Guide.
Application
Component
Monitors
Application
Deployment
Solutions
Monitors
Measures statistics related to the Microsoft COM+ server during a scenario run.
For more information, see
"Application Component Monitoring " on page 1104 .
Measures statistics related to the Citrix MetaFrame XP server during a scenario run. For more information, see
page 1107
.
"Application Deployment Solution Monitoring " on
Middleware
Performance
Monitors
Infrastructure
Resources
Monitor
Displays information about network client data points during a scenario run using the Network Client graph. For more information, see
"Infrastructure
Resources Monitoring" on page 1122
.
Security
Monitor
Measure statistics related to the Tuxedo and IBM WebSphere MQ servers during a scenario run. For more information, see
"Middleware Performance
Monitoring " on page 1113
Displays information about simulated attacks on the server during a scenario run using the Distributed Denial of Service graph. For more information, see
"Appendixes" on page 1130
Add Machine Dialog Box
This dialog box enables you to add the machine that you want to monitor to the Monitored Server
Machines list.
Page 1047 of 1812 HP LoadRunner (11.50)
User Guide
Controller
To access
Right-click a graph > Add Measurements > Monitored Servers section of
Monitored Server Machine > Add.
Relevant tasks
"How to Set Up the Monitoring Environment – Workflow" on page 1044
Monitored Machine Information
User interface elements are described below:
UI
Element
Description
Name
The name or IP address of the machine that you want to monitor.
l
Server Resource monitors: If you are using the HTTP method, enter the full
URL of the CGI script.
Example: http://demo.thiscompany.com/cgi-bin/run.sh
l
DB2 monitor: Enter the DB2 server machine name followed by the @ sign and the database instance you specified in the DB2 Control Center.
Example:localhost@DB2 l
CheckPoint FireWall-1 monitor: You can specify a machine name and port number using the format: <machine name>:<port number> l
iPlanet (SNMP) monitor: If the iPlanet SNMP agent is running on a different port than the default SNMP port, you need to define the port number using the format:
<server name>:<port number>
l
MS-COM+ monitor: To the monitor over a firewall, use the format:
<MI Listener machine>:<server machine key> where server machine key is the unique key that you chose when configuring the firewall Agent on the server machine. Example: 12.12.12.3:serverid l
MS IIS monitor: To monitor an IIS server through a firewall, use TCP, port 139.
l
Tuxedo or PeopleSoft (Tuxedo) monitor: For multiple instances of the Tuxedo or PeopleSoft (Tuxedo) monitor on the same machine, enter the port number of each monitor to distinguish each instance using the format: <machine
name>:<port number>
l
WebLogic: If the WebLogic SNMP agent is running on a different port than the default SNMP port, use the format: <server name>:<port number>.
Platform
The platform of the machine you want to monitor.
SiteScope Server Information
User interface elements are described below:
UI Element
Name
Port
Description
The name of the SiteScope server.
The SiteScope port.
Default: 8888
Page 1048 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Use Account
Select this option to use a specific SiteScope user account. Enter the following account details: l
Account. The SiteScope account name or number l
Username. The user name defined to log in to the SiteScope account l
Password. The password defined to log in to the SiteScope account
Use Secure
HTTP
Select this to use a Secure HTTP connection.
<Monitor> Configuration Dialog Box
This dialog enables you to select the measurements to monitor during a scenario run.
To access
Right-click a graph > Add Measurements
Click Add in the Resource Measurements section of <monitor name> dialog.
Important information
For DB2 monitors: If there is no application working with a database, you can only monitor the database manager instance.
Relevant tasks
"How to Set Up the Monitoring Environment – Workflow" on page 1044
User interface elements are described below:
UI Element Description
Component/Counter
Description
Describes the selected component or counter.
Host
Measured
Components
Performance
Counters
The name of the monitored machine.
A hierarchical view of the available components. Browse the tree and select the component you want to monitor. A description of the highlighted component appears in the Component/Counter
Description box.
Select the required performance counters. For details about the default monitor counters, see the relevant reference section for your monitor.
<monitor name> Dialog Box
This dialog box enables you to add monitored server machines and access the dialogs to configure the measurements and data collection method.
To access
Right-click a graph > Add Measurements
Important information
Before configuring a monitor's measurements, many servers require initial setup.
The first step of
"How to Set Up the Monitoring Environment – Workflow" on page
Page 1049 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Relevant tasks
1044
contains links to the setup instructions.
"How to Set Up the Monitoring Environment – Workflow" on page 1044
User interface elements are described below :
UI Element
Advanced
Description
Monitored Server
Machines
Resource
Measurements on
<machine name>
Description
Disabled.
Displays a description of the selected resource measurement.
The machines whose resources are being monitored.
Displays the Add Machine dialog box, which adds the machine that you want to monitor to the existing list.
Removes the selected machine from the list.
Displays the resource measurements being monitored on the selected machine.
Displays the Resources dialog box that lets you create a list of resource measurements on the selected machine.
Removes the selected resource measurement from the list.
Web Resource Monitors
Web Resource Monitoring Overview
The Web Resource monitor enables you to analyze the following resources on the Web server during a scenario run: throughput, HTTP requests, downloaded pages, server retries, TCP/IP connections, and SSL Connections.
You can view the following resource monitor graphs during a scenario run:
Hits per Second Graph
The Hits Per Second graph shows the number of hits (HTTP requests) to the Web server (y-axis) as a function of the elapsed time in the scenario (x-axis). This graph can display the whole step, or the last 60, 180, 600, or 3600 seconds. You can compare this graph to the Transaction Response
Time graph to see how the number of hits affects transaction performance.
Throughput Graph
The Throughput graph shows the amount of throughput (y-axis) on the Web server during each second of the scenario run (x-axis). Throughput is measured in bytes and represents the amount of data that the Vusers received from the server at any given second. You can compare this graph to the Transaction Response Time graph to see how the throughput affects transaction performance.
Page 1050 of 1812 HP LoadRunner (11.50)
User Guide
Controller
In the following example, the Transaction Response time graph is compared with the Throughput graph. It is apparent from the graph that as the throughput decreases, the transaction response time also decreases. The peak throughput occurred at approximately 1 minute into the step. The highest response time also occurred at this time.
Example
HTTP Responses per Second Graph
The HTTP Responses per Second graph shows the number of HTTP status codes (y-axis)— which indicate the status of HTTP requests, for example, "the request was successful" or "the page was not found"—returned from the Web server during each second of the scenario run (xaxis).
The HTTP responses are grouped by status code. You can also group the results shown in this graph by script (using the "Group By" function) to locate scripts which generated error codes.
For a list of status codes and their explanations, see
"HTTP Status Codes" on page 1062
.
Pages Downloaded per Second Graph
The Pages Downloaded per Second graph shows the number of Web pages (y-axis) downloaded from the server during each second of the scenario run (x-axis). This graph helps you evaluate the amount of load Vusers generate, in terms of the number of pages downloaded.
Note: To view the Pages Downloaded per Second graph, you must select Pages per second
(HTML Mode only) from the script's run-time settings Preferences tab before running your scenario.
Page 1051 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Like throughput, downloaded pages per second is a representation of the amount of data that the
Vusers received from the server at any given second.
l
The Throughput graph takes into account each resource and its size (for example, the size of each .gif file, the size of each Web page).
l
The Pages Downloaded per Second graph takes into account simply the number of pages.
In the following example, the Throughput graph is compared with the Pages Downloaded per
Second graph. It is apparent from the graph that throughput is not proportional to the number of pages downloaded per second. For example, between 15 and 16 seconds into the scenario, the throughput decreased while the number of pages downloaded per second increased.
Example
Retries per Second Graph
The Retries Per Second graph shows the number of attempted Web server connections (y-axis) as a function of the elapsed time in the scenario (x-axis).
A server connection is retried when: l
The initial connection was unauthorized l
Proxy authentication is required l
The initial connection was closed by the server l
The initial connection to the server could not be made l
The server was initially unable to resolve the load generator's IP address
Page 1052 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Connections Graph
The Connections graph shows the number of open TCP/IP connections (y-axis) at each point in time of the scenario (x-axis). One HTML page may cause the browser to open several connections, when links on the page go to different Web addresses. Two connections are opened for each Web server.
This graph is useful in indicating when additional connections are needed. For example, if the number of connections reaches a plateau, and the transaction response time increases sharply, adding connections would probably cause a dramatic improvement in performance (reduction in the transaction response time).
Connections per Second Graph
The Connections Per Second graph shows the number of new TCP/IP connections (y-axis) opened and the number of connections that are shut down each second of the scenario (x-axis).
This number should be a small fraction of the number of hits per second, because new TCP/IP connections are very expensive in terms of server, router and network resource consumption.
Ideally, many HTTP requests should use the same connection, instead of opening a new connection for each request.
SSLs per Second Graph
The SSLs per Second graph shows the number of new and reused SSL Connections (y-axis) opened in each second of the scenario (x-axis). An SSL connection is opened by the browser after a
TCP/IP connection has been opened to a secure server.
Because creating a new SSL connection entails heavy resource consumption, you should try to open as few new SSL connections as possible; once you have established an SSL connection, you should reuse it. There should be no more than one new SSL connection per Vuser.
If you set your run-time settings to simulate a new Vuser at each iteration (using the run-time settings Browser Emulation node), you should have no more than one new SSL connection per
Vuser per iteration. Ideally, you should have very few new TCP/IP and SSL connections each second.
HTTP Status Codes
The following table displays a list of HTTP status codes. These codes appear in the
"Web
Resource Monitoring Overview " on page 1050
:
Code
200
201
202
203
204
205
Description
OK
Created
Accepted
Non-Authoritative Information
No Content
Reset Content
Code Description
406 Not Acceptable
407 Proxy Authentication Required
408
409
410
411
Request Timeout
Conflict
Gone
Length Required
Page 1053 of 1812 HP LoadRunner (11.50)
User Guide
Controller
305
307
400
401
402
403
404
405
206
300
301
302
303
304
Partial Content
Multiple Choices
Moved Permanently
Found
See Other
Not Modified
Use Proxy
Temporary Redirect
Bad Request
Unauthorized
Payment Required
Forbidden
Not Found
Method Not Allowed
500
501
502
406
407
503
504
505
412
413
414
415
416
417
Precondition Failed
Request Entity Too Large
Request - URI Too Large
Unsupported Media Type
Requested range not satisfiable
Expectation Failed
Internal Server Error
Not Implemented
Bad Gateway
Not Acceptable
Proxy Authentication Required
Service Unavailable
Gateway Timeout
HTTP Version not supported
For more information on the status codes above, see http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10
Run-Time and Transaction Monitoring
Run-Time Graphs Overview
The Run-Time monitor provides information about the status of the Vusers participating in the scenario, and the number and types of errors that the Vusers generate. In addition, the Run-Time monitor provides the User-Defined Data Points graph, which displays the real time values for userdefined points in a Vuser script.
The Run-Time monitor is enabled by default—it automatically begins monitoring Vusers at the start of a scenario.
You can view the following Run-Time monitor graphs during a scenario run:
Running Vusers Graph
The monitor's Running Vusers graph provides information about the status of the Vusers running in the current scenario on all load generator machines. The graph shows the number of running
Vusers, while the information in the legend indicates the number of Vusers in each state.
Page 1054 of 1812 HP LoadRunner (11.50)
User Guide
Controller
The Status field of each Vuser displays the current status of the Vuser. The following table describes each Vuser status.
Status Description
Running
The total number of Vusers currently running on all load generators.
Ready
The number of Vusers that completed the initialization section of the script and are ready to run.
Finished
The number of Vusers that have finished running. This includes both Vusers that passed and failed.
Error
The number of Vusers whose execution generated an error. Check the Status field in the Vuser view or the Output window for a complete explanation of the error.
User-Defined Data Points Graph
The User-Defined Data Points graph displays the real-time values of user-defined data points.
You define a data point in your Vuser script by inserting an lr_user_data_point function at the appropriate place (user_data_point for GUI Vusers and lr.user_data_point for Java Vusers).
Action1()
{
lr_think_time(1);
lr_user_data_point ("data_point_1",1);
lr_user_data_point ("data_point_2",2);
return 0;
}
For Vuser protocols that support the graphical script representations such as Web and Oracle NCA, you insert a data point as a user-defined step. Data point information is gathered each time the script executes the function or step. For more information about data points, see the Function
Reference.
By default, LoadRunner displays all of the data points in a single graph. The legend provides information about each data point. If desired, you can hide specific data points using the legend below the graphs.
You can also view data points offline, after the completion of the scenario. For more information, see the HP LoadRunner Analysis User Guide.
Error Statistics Graph
The monitor's Error Statistics graph provides details about the number of errors that accrue during each second of the scenario run. The errors are grouped by error source—for example, the location in the script or the load generator name.
Page 1055 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Vusers with Errors Graph
The Vusers with Errors graph provides details about the number of Vusers that generate errors during scenario execution. The errors are grouped by error source.
Transaction Monitor Graphs Overview
The Transaction monitor displays the transaction rate and response time during a scenario run. The
Transaction monitor is enabled by default—it automatically begins monitoring Vuser transactions at the start of a scenario run. To conserve resources, you can disable the Transaction monitor from the Controller.
You can view the following Transaction monitor graphs during a scenario run: l
The Transaction Response Time graph shows the average response time of transactions in seconds (y-axis) as a function of the elapsed time in the scenario (x-axis).
l
The Transactions per Second (Passed) graph shows the number of successful transactions performed per second (y-axis) as a function of the elapsed time in the scenario (x-axis).
l
The Transactions per Second (Failed, Stopped) graph shows the number of failed and stopped transactions per second (y-axis) as a function of the elapsed time in the scenario (xaxis).
l
The Total Transactions per Second (Passed) graph shows the total number of completed, successful transactions per second (y-axis) as a function of the elapsed time in the scenario (xaxis).
Note:
n
If there are no transactions defined in your Vuser script or if no transactions are being executed, no data will be displayed in the online monitor graphs.
n
To generate Web Page diagnostics for each transaction, configure the Diagnostics options from the Controller.
System Resource Monitoring
System Resource Monitors Overview
You use LoadRunner's System Resource monitors to monitor a machine's system resource usage during a scenario run and isolate server performance bottlenecks.
A primary factor in a transaction's response time is its system resource usage. Using the
LoadRunner resource monitors, you can monitor the Windows, UNIX, Server, SNMP, FireWall server, and SiteScope resources on a machine during a scenario run, and determine why a bottleneck occurred on a particular machine.
The resource monitors are automatically enabled when you execute a scenario. However, you must specify the machine you want to monitor and which resources to monitor for each machine. You can also add or remove machines and resources during the scenario run.
Page 1056 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Windows Resource Monitoring
The Windows Resources monitor shows the Windows resources measured during the scenario run. Windows measurements correspond to the built-in counters available from the Windows
Performance Monitor.
By default, LoadRunner monitors Windows resources using the native LoadRunner monitor engine.
If you are using the SiteScope monitor engine, ensure that SiteScope has been installed on a server. You can install SiteScope on the same server as the Controller, or on a dedicated server.
If you want to monitor a remote Windows server that does not use Windows domain security, you must authenticate the Controller on the remote Windows server. To authenticate the Controller, create an account, or change the password of the account used to log on to the Controller so that it matches the password and user name used to log on to the remote monitored Windows machine.
When the remote Windows machine requests another machine's resources, it sends the logged-in user name and password of the machine requesting the resources.
Linux Resource Monitoring
The Linux Resources monitor shows the Linux resources measured during the scenario. This graph helps you determine the impact of Vuser load on the various system resources.
The Linux kernel statistics measurements include those available by the rstatd daemon. For a description of the measurements, see
"Linux Resources Performance Counters " on page 1060 .
Note: You must configure an rstatd daemon on all Linux machines being monitored. For information, refer to the Linux man pages, or see
"How to Set up the Linux Monitoring
Environment " on next page .
Server Resource Monitoring
The Server Resources monitor shows the resources of monitors (CPU, disk space, memory, or applications) used on remote Windows and UNIX servers measured during the scenario. This helps you determine the impact of Vuser load on the various system resources.
The Server Resources monitor includes the following monitors: l
CPU Monitor. Monitors CPU usage.
l
Disk Space Monitor. Monitors disk space.
l
Memory Monitor. Monitors pages per second and percentage of virtual memory used.
l
Service Monitor. Verifies that specific processes are listed as running and checks CPU usage.
To display server resource data during a scenario run, you need to first select the desired measurements for the online monitor (from the Controller) before running the scenario.
Page 1057 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Server Resource Monitor Environment l
Ensure that SiteScope has been installed on a server. You can install SiteScope on the same machine as the Controller, or on a dedicated server.
l
Verify that SiteScope is collecting the required data from the servers it is monitoring. From the
SiteScope Panel, select the monitor group polling the Server Resource machines, and check that the monitor displays a list of server measurements in the Status column.
SNMP Resource Monitoring
The SNMP Resource monitor shows statistics for a Windows or UNIX machine using the Simple
Network Management Protocol (SNMP). The SNMP Resources monitor is available for monitoring any machine that runs an SNMP agent, using the Simple Network Management Protocol (SNMP).
SiteScope Resource Monitoring
The SiteScope Resources monitor graph shows the SiteScope resources measured during the scenario run. The SiteScope monitor can measure server, network, and processor performance counters. For detailed information on the performance counters that SiteScope can monitor, refer to the relevant SiteScope documentation.
Before setting up the SiteScope monitor, ensure that SiteScope has been installed on a server. You can install SiteScope on the same machine as the Controller, or on a dedicated server. If SiteScope is installed on a machine other than the Controller, verify that the SiteScope machine is accessible from the Controller machine.
How to Set up the Linux Monitoring Environment
This task describes how to configure the Linux environment before setting up the Linux monitor.
1. Verify whether the rstatd daemon is already configured
The rstatd daemon might already be configured, because when a machine receives an rstatd request, the inetd on that machine automatically activates the rstatd.
n
The rup command reports various machine statistics, including rstatd configuration. Run the following command on the Linux machine to view the machine statistics:
>rup host n
You can also use lr_host_monitor and see if it returns any relevant statistics.
If the command returns meaningful statistics, the rstatd daemon is already configured and activated. If not, or if you receive an error message, the rstatd daemon is not configured.
2. Configure the rstatd daemon
If the rstatd daemon is not yet configured, follow these steps to configure it: a. On the Linux machine, run the command: su root b. Go to /etc/inetd.conf and look for the rstatd row (it begins with the word rstatd). If it is
Page 1058 of 1812 HP LoadRunner (11.50)
User Guide
Controller commented out (with a #), remove the comment directive, and save the file.
c. From the command line, run: kill -1 inet_pid where inet_pid is the pid of the inetd process. This instructs the inetd to rescan the
/etc/inetd.conf file and register all daemons which are uncommented, including the rstatd daemon.
d. Run rup again.
If the command still does not indicate that the rstatd daemon is configured, contact your system administrator.
3. Configure the monitor for a Linux machine over a firewall (optional)
To monitor a Linux machine over a firewall, you must run a Linux utility called rpcinfo and identify the rstatd's port number.
Run rpcinfo -p <hostname>. You will receive a list of all RPC servers registered in the host's portmapper, along with the port number. This list will not change until rstatd is stopped and rerun.
Some firewalls allow you to open an RPC program number instead of a port. In such cases, open program 100001. If are prompted to include a version number, specify versions 3 and 4.
4. Configure the monitor measurements in the Controller
For task details, see
"How to Set Up the Monitoring Environment – Workflow" on page 1044
.
Click Add in the Resource Measurements on: <machine> section of the Linux Resources dialog box to open the Linux Kernel Statistics dialog box and select the available measurements and server properties.
For a description of the available Linux monitor measurements, see
"Linux Resources
Performance Counters " on next page
.
Server Resources Performance Counters
The following monitor measurements are available on the server machine:
Monitor
CPU
Monitor
Disk Space
Monitor
Memory
Monitor
Services
Measurements Description
Utilization
Measures CPU utilization.
Disk space
Measures the percentage of disk space used.
MB free
Pages/sec
Measures the amount of disk space free, in MB.
Measures the number of virtual memory pages that are moved between main memory and disk storage.
Percent used
Measures the percentage of memory and paging file space used.
Monitors processes locally or on remote systems. Can be used
Page 1059 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Monitor
to verify that specific processes are running.
Linux Resources Performance Counters
The following default measurements are available for the Linux machine:
Measurement
Average load
Description
Average number of processes simultaneously in Ready state during the last minute
Collision rate
Context switches rate
CPU utilization
Collisions per second detected on the Ethernet
Number of switches between processes or threads, per second
Percent of time that the CPU is utilized
Disk rate
Incoming packets error rate
Rate of disk transfers
Errors per second while receiving Ethernet packets
Incoming packets rate
Incoming Ethernet packets per second
Interrupt rate
Outgoing packets errors rate
Number of device interrupts per second
Errors per second while sending Ethernet packets
Outgoing packets rate
Page-in rate
Page-out rate
Outgoing Ethernet packets per second
Number of pages read to physical memory, per second
Number of pages written to pagefile(s) and removed from physical memory, per second
Paging rate
Swap-in rate
Swap-out rate
System mode CPU utilization
User mode CPU utilization
Number of pages read to physical memory or written to pagefile(s), per second
Number of processes being swapped
Number of processes being swapped
Percent of time that the CPU is utilized in system mode
Percent of time CPU is utilized in user mode
Add Windows Resources Measurements Dialog Box
This dialog box enables you to select the Windows resources to monitor. The Windows resources correspond to the built-in counters available from the Windows Performance Monitor.
Page 1060 of 1812 HP LoadRunner (11.50)
User Guide
Controller
To access
Right-click a graph > Add Measurements
In the Resource Measurements section of the Windows Resources dialog, click Add.
"How to Set Up the Monitoring Environment – Workflow" on page 1044
Relevant tasks
User interface elements are described below:
UI Element Description
Displays a description of the selected counter.
Counters/Measurements
The resource counter/measurement to monitor. Select multiple counters using the CTRL key. For a list of available measurements, see Windows Resource Performance Counters .
Instances
If multiple instances of the selected counter are running, select one or more instances to monitor for the selected counter.
Object
The object to monitor on the specified Windows machine.
Web Server Resource Monitoring
Web Server Resource Monitoring Overview
Web Server Resource monitors provide you with information about the resource usage of the
Microsoft IIS and Apache Web servers during performance test execution. To obtain this data, you need to activate the online monitor for the server and specify which resources you want to measure before executing the test.
Note: Certain measurements or counters are especially useful for determining server performance and isolating the cause of a bottleneck during an initial stress test on a Web server.
How to change the Apache default server properties
This task describes how to modify the Apache default server properties that are defined in the monitor configuration file.
1. Open the apache.cfg file in the <performance center root folder>\dat\monitors folder.
2. Edit the following parameters after the Delimiter=: statement:
InfoURL. Server statistics information URL
ServerPort. Server port number
SamplingRate. Rate (milliseconds) at which the LoadRunner monitor will poll the server for the statistics information. If this value is greater than 1000, LoadRunner will use it as its sampling
Page 1061 of 1812 HP LoadRunner (11.50)
User Guide
Controller rate. Otherwise, it will use the sampling rate defined in the Monitors tab of the Options dialog box.
3. Save and close the file.
HTTP Status Codes
The following table displays a list of HTTP status codes. These codes appear in the
"Web
Resource Monitoring Overview " on page 1050
:
205
206
300
301
302
303
304
305
Code
200
201
202
203
204
307
400
401
402
403
404
405
Description
OK
Created
Accepted
Non-Authoritative Information
No Content
Reset Content
Partial Content
Multiple Choices
Moved Permanently
Found
See Other
Not Modified
Use Proxy
Temporary Redirect
Bad Request
Unauthorized
Payment Required
Forbidden
Not Found
Method Not Allowed
501
502
406
407
503
504
505
411
412
413
414
415
416
417
500
Code Description
406 Not Acceptable
407 Proxy Authentication Required
408
409
410
Request Timeout
Conflict
Gone
Length Required
Precondition Failed
Request Entity Too Large
Request - URI Too Large
Unsupported Media Type
Requested range not satisfiable
Expectation Failed
Internal Server Error
Not Implemented
Bad Gateway
Not Acceptable
Proxy Authentication Required
Service Unavailable
Gateway Timeout
HTTP Version not supported
Page 1062 of 1812 HP LoadRunner (11.50)
User Guide
Controller
For more information on the status codes above, see http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10
Microsoft IIS Performance Counters
The following table describes the measurements and server properties that can be monitored on the
Microsoft IIS Web server during the test run:
Object
Web Service
Web Service
Web Service
Web Service
Web Service
Web Service
Web Service
Web Service
Process
Measurement
Bytes Sent/sec
Description
The rate at which the data bytes are sent by the Web service
Bytes Received/sec
The rate at which the data bytes are received by the Web service
Get Requests/sec
The rate at which HTTP requests using the
GET method are made. Get requests are generally used for basic file retrievals or image maps, though they can be used with forms.
Post Requests/sec
The rate at which HTTP requests using the
POST method are made. Post requests are generally used for forms or gateway requests.
Maximum
Connections
The maximum number of simultaneous connections established with the Web service
Current
Connections
Current
NonAnonymous
Users
Not Found
Errors/sec
The current number of connections established with the Web service
The number of users that currently have a nonanonymous connection using the Web service
Private Bytes
The rate of errors due to requests that could not be satisfied by the server because the requested document could not be found.
These are generally reported to the client as an
HTTP 404 error code.
The current number of bytes that the process has allocated that cannot be shared with other processes.
Apache Performance Counters
The following table describes the measurements and server properties that can be monitored on the
Apache Web server during the test run:
Page 1063 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Measurement
# Busy Servers
# Idle Servers
Apache CPU Usage
Hits/sec
KBytes Sent/sec
Description
The number of servers in the Busy state
The number of servers in the Idle state
The percentage of time the CPU is utilized by the
Apache server
The HTTP request rate
The rate at which data bytes are sent from the Web server
Network Delay Monitoring
Network Monitoring Overview
Network configuration is a primary factor in the performance of applications. A poorly designed network can slow client activity to unacceptable levels.
You use Network monitoring to determine whether your network is causing a delay in the scenario.
You can also determine the problematic network segment.
In a true Web or client/server system, there are many network segments. A single network segment with poor performance can affect the entire system.
The following diagram shows a typical network. To go from the server machine to the Vuser machine, data must travel over several segments.
The Network Delay Time monitor shows the delays for the complete path between the source and destination machines (for example the database server and Vuser host). The graph maps the delay as a function of the elapsed scenario time. Each defined path is represented by a separate line with a different color in the graph.
To measure network performance, the Network monitor sends packets of data across the network.
When a packet returns, the monitor calculates the time it takes for the packet to go to the requested node and return. This time is the delay which appears in the Network Delay Time graph.
Page 1064 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Note: The delays from the source machine to each of the nodes are measured concurrently, yet independently. It is therefore possible that the delay from the source machine to one of the nodes could be greater than the delay for the complete path between the source and destination machines.
How to Set Up the Network Monitoring Environment
This task describes how to prepare your environment for network monitoring.
1. Prerequisites
To enable network monitoring, you must install the LoadRunner agent on the source machine.
You do not have to install the LoadRunner agent on the destination machine.
To run the Network monitor, you must have administrator privileges on the Windows source machine (unless you are using the ICMP protocol).
2. Configure the Linux source machine - optional
You can run the Network monitor on Linux source machines, using UDP or ICMP. Before running the Network monitor from a Linux source machine, configure the source machine. For task details, see
"How to Configure the Linux Source Machine for Network Monitoring" on next page .
3. Configure the firewall between the source and destination machines - Optional
If you are monitoring a network in which there are firewalls between the source and the destination machines, you must configure the firewalls to allow the network data packets to reach their destinations.
n
If you are using the TCP protocol, the firewall that protects the destination machine should not block outgoing ICMP_TIMEEXCEEDED packets (packets that are sent outside the firewall from the machine). In addition, the firewall protecting the source machine should allow ICMP_TIMEEXCEEDED packets to enter, as well as TCP packets to exit.
n
If you are using the ICMP protocol, the destination machine's firewall should not block incoming ICMP_ECHO_REQUEST packets, or outgoing ICMP_ECHO_REPLY and
ICMP_ECHO_TIMEEXCEEDED packets. In addition, the firewall protecting the source machine should allow ICMP_ECHO_REPLY and ICMP_ECHO_TIMEEXCEEDED packets to enter, and ICMP_ECHO_REQUEST packets to exit.
n
If you are using the UDP protocol, ensure that the UDP protocol can access the destination machine from the source machine. The destination machine's firewall should not block outgoing ICMP_DEST_UNREACHABLE and ICMP_ECHO_TIMEEXCEEDED packets.
In addition, the firewall protecting the source machine should allow ICMP_DEST_
UNREACHABLE and ICMP_ECHO_TIMEEXCEEDED packets to enter.
Note: To run the Network Delay monitor when there are firewalls between the Controller and the source machine, you must configure the LoadRunner agent, MI Listener, and
Network Delay monitor for monitoring over a firewall.
Page 1065 of 1812 HP LoadRunner (11.50)
User Guide
Controller
4. Specify the network monitor paths
In the Controller Run tab graph tree view, select the Network Delay Time graph and drag it into the right pane. Right-click the graph and select Add Measurements. Define the paths using the following three dialog boxes: a. Add source and destinations machines. For details, see the
"Network Delay Time Dialog
Box" on page 1068
.
b. Define the network monitor path. For details, see the
"Adding Destination Machines for
Network Delay Monitoring Dialog Box" on next page
.
c. Configure the monitor settings for the defined path. For details, see the
"Network Monitor
Settings for Defined Path Dialog Box" on page 1069 .
How to Configure the Linux Source Machine for Network
Monitoring
This task describes how to configure a Linux source machine before running the network monitor.
1. Assign permissions where LoadRunner is installed locally.
Follow these steps to assign root permissions to the merc_webtrace process: a. Log in to the source machine as root.
b. Type: cd <LoadRunner_installation>/bin to change to the bin folder.
c. Type: chown root merc_webtrace to make the root user the owner of the merc_
webtrace file.
d. Type: chmod +s merc_webtrace to add the s-bit to the file permissions.
e. To verify, type ls -l merc_webtrace. The permissions should look like this: -rwsrwsr-x.
2. Assign permissions where LoadRunner is installed on the network.
In a LoadRunner network installation, the merc_webtrace process is on the network, not on the source machine disk. The following procedure copies the merc_webtrace file to the local disk, configures mdrv.dat to recognize the process, and assigns root permissions to merc_
webtrace: a. Copy merc_webtrace from <LoadRunner_installation>/bin to anywhere on the local disk of the source machine. For example, to copy the file to the /local/<LoadRunner> folder, type: cp /net/tools/LoadRunner_installation/bin/merc_webtrace
/local/<LoadRunner>
Note: All of the source machines that use the same network installation must copy
merc_webtrace to the identical folder path on their local disk (for example,
/local/<LoadRunner>
), since all of them use the same mdrv.dat.
b. Add the following line to the <LoadRunner_installation>/dat/mdrv.dat file, in the
[monitors_server] section:
ExtCmdLine=-merc_webtrace_path /local/xxx
Page 1066 of 1812 HP LoadRunner (11.50)
User Guide
Controller c. Log in to the source machine as root.
d. Type: cd LoadRunner_installation/bin to change to the bin folder.
e. Type: chown root merc_webtrace to make the root user the owner of the merc_
webtrace file.
f. Type: chmod +s merc_webtrace to add the s-bit to the file permissions.
g. To verify, type ls -l merc_webtrace. The permissions should look like:
-rwsrwsr-x
.
3. Connect to the Linux Source Machine through RSH
Follow these instructions if the Controller is connected to the source machine through RSH
(default connection mode). In this case you do not need to activate the agent daemon.
Before running the Network monitor the first time, you enter an encrypted user name and password in the Network monitor configuration file.
a. On the Windows taskbar, click Start, point to All Programs > LoadRunner > Tools, and click Password Encoder. The Password Encoder window opens.
b. In the Password box, type your RSH user name and password, separated by a vertical bar symbol. For example, myname|mypw.
c. Click Generate. An encoded string is displayed in the Encoded string field.
d. Click Copy to copy the encoded string to the clipboard.
e. Add the following line to the <LoadRunner_installation>/dat/monitors/ndm.cfg file, in the [hosts] section:
Host = <encrypted string copied from clipboard> f. Close and open the current scenario. LoadRunner will read the updated configuration file and recognize the source machine for monitoring.
4. Connect to the Linux Source Machine through the Agent
Follow these instructions for activating agent daemon on the source machine if the Controller is not connected to the source machine through RSH.
a. Type m_daemon_setup -install from the <LoadRunner_installation>/bin folder.
b. Make sure that the agent daemon is running whenever you activate the Network monitor.
c. To stop the Network Delay Monitor agent daemon, type m_daemon_setup -remove.
Adding Destination Machines for Network Delay
Monitoring Dialog Box
This dialog box enables you to add destination machines for network delay monitoring, and configure additional network monitor settings.
To access
Network Delay Time dialog box > To machine(s) section> Click Add
Page 1067 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Important information
The Network Delay Time Monitor cannot be configured to work in TCP mode on Windows XP SP2 or Vista.
Relevant tasks
"How to Set Up the Network Monitoring Environment" on page 1065
User interface elements are described below:
UI Element Description
Enter the name or URL of the machine at the final destination of the path you want to monitor in the New Machine Name dialog box. Repeat this for each path you want to monitor.
Note: If the destination machine is localhost, enter the local machine's name and not localhost.
Deletes the destination machine, to remove this path from the monitor graph.
Renames the destination machine.
Opens the Configuring Network Monitor Settings for Defined Path dialog box.
Displays the name of the source machine.
From
Machine
To
Machines
Displays the names or URLs of the destination machines.
Network Delay Time Dialog Box
This dialog box enables you to select the network path you want to monitor.
To access
Important information
Relevant tasks
Right-click the Network Delay Time graph and select Add Measurements.
This dialog appears only when you add measurements for the first time.
To run the Network monitor, you must have administrator privileges on the source machine (unless you are using the ICMP protocol).
"How to Set Up the Network Monitoring Environment" on page 1065
User interface elements are described below:
UI Element Description
Monitor the network delay from machine
Displays the name of the machine from which network monitoring begins (source machine).
To add a machine, click and machine platform.
and specify the server name or IP address
Repeat this for each path you want to monitor.
Important: If there is a firewall between the Controller machine and the source
Page 1068 of 1812 HP LoadRunner (11.50)
User Guide
Controller
To machine(s)
machine, enter the server name or IP address of the source machine according to the following format:
<MI Listener machine>:<source machine local key> where source machine local key is the Local Machine Key that you chose when configuring the LoadRunner agent on the source machine. (See "Agent
Configuration Settings" on page 355.)
Example: 12.12.12.3:vds
Displays the network path in the format of sourcemachine -> destination
machine. To add a new destination machine, click and define the machine in the Adding Destination Machines for Network Delay Monitoring dialog box.
Network Delay Time Graph
The Network Delay Time graph shows the delay for the complete path between the source and destination machines (y-axis) as a function of the elapsed scenario time (x-axis).
Each path defined in the Add Destination Machines for Network Delay Monitoring dialog box is represented by a separate line with a different color in the graph.
Network Monitor Settings for Defined Path Dialog Box
This dialog box enables you to set the network protocol, port, monitoring frequency, and monitoring packet retries.
To access
Add Destination Machines for Newtork Delay Monitoring > Click
Properties.
Relevant tasks
"How to Set Up the Network Monitoring Environment" on page 1065
User interface elements are described below:
UI Element Description
Page 1069 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Monitor
Settings
l
Send request using X protocol. Select the network protocol you want the monitor to use: TCP, UDP, or ICMP. It is recommended that you use the default protocol. The default in Windows is TCP, and in Linux is UDP.
Note: When you use TCP or UDP protocols, administrator privileges are required l on the source machine.
Send request to port. Enter the port number to be used by the network path.
l
Enable display of network nodes by DNS names. Enables you to view the
DNS name of each node along the network path, in addition to its IP address.
Note: Selecting this option will decrease the speed of the Network monitor.
Monitoring
Frequency
Send next packet X milliseconds after receipt of previous packet. Select the number of milliseconds the monitor should wait between receiving a packet and sending out the next packet.
Default: 3000 milliseconds.
Note: If you have a long, steady scenario, you can increase the interval by several seconds.
Monitoring
Packet
Retries
l
Wait X seconds for packet to return before retrying. Select the maximum number of seconds that the monitor should wait for a packet to return before it retries to send the packet.
Default: 3 seconds.
Note: If your network is very large and loaded (an internet connection with a low capacity), you should increase the value by several seconds. If you have a small l network (such as a LAN), you can decrease the value.
Number of retries. Select the number of times the monitor should try resending a packet to a node if the packet is not initially returned.
Default: 0.
Troubleshooting and Limitations
This section describes troubleshooting for the Network Delay monitor.
If monitoring is unsuccessful and LoadRunner cannot locate the source or destination machines, make sure that the specified machines are available to your machine. Perform a "ping" operation. At the command line prompt, type: ping server_name
To check the entire network path, use the trace route utility to verify that the path is valid.
For Windows, type tracert <server_name>.
For Linux, type traceroute <server_name>.
If the monitoring problem persists once you verify that the machines are accessible and that the network path is valid, perform the following procedures:
1. If you are using the TCP protocol, run <LoadRunner root folder>\bin\webtrace.exe from the source machine to determine whether the problem is related to the Controller, or the WebTrace technology on which the Network Delay monitor is based. If you are using the UDP or ICMP protocols, the problem must be related to the Controller and not WebTrace, since these
Page 1070 of 1812 HP LoadRunner (11.50)
User Guide
Controller protocols are not WebTrace technology-based.
2. If you receive results by running webtrace.exe, the problem is related to the Controller. Verify that the source machine is not a Linux machine, and contact the Customer Support Web site with the following information: n the Controller log file, drv_log.txt, located in the temp folder of the Controller machine.
n the traceroute_server log file, located on the source machine.
n the debug information located in the TRS_debug.txt and WT_debug.txt files in the path folder. These files are generated by adding the following line to the [monitors_server] section of the <LoadRunner root folder>\dat\mdrv.dat file, and rerunning the Network monitor:
ExtCmdLine=-traceroute_debug path
3. If you do not receive results by running webtrace.exe, the problem is related to the WebTrace technology, on which the Network Delay monitor is based. Perform the following procedures on the source machine: n
Verify that the packet.sys file (the Webtrace driver) exists in the WINNT\system32\drivers folder.
n
Check whether a driver (such as "Cloud" or "Sniffer") is installed on top of the network card driver. If so, remove it and run WebTrace again.
n
Verify that there are administrator permissions on the machine.
n
Using ipconfig /all, check that only one IP address is assigned to the network card.
WebTrace does not know how to handle multiple IP addresses assigned to the same card (IP spoofing).
n
Check the number of network cards installed. Run webtrace –devlist to receive a list of the available network cards.
n
If there is more than one card on the list, run webtrace -dev <dev_name>
<destination>
, where <dev_name> is one of the network card names shown in the list.
If you discover that WebTrace is binding to the wrong card, you can use webtrace set_ device <dev_name> to set a registry key that instructs WebTrace to use a specified card instead of the default one.
n
Verify that the network card is of the Ethernet type.
n
Contact the Customer Support Web site with the output of webtrace.exe –debug (for example, webtrace.exe –debug www.merc-int.com) and ipconfig /all on the machine.
Web Application Server Resource Monitoring
Web Application Server Resource Monitoring Overview
You use LoadRunner's Web Application Server Resource monitors to monitor Microsoft Active
Server Pages and Weblogic (SNMP) Web application servers during a scenario run and isolate application server performance bottlenecks.
Page 1071 of 1812 HP LoadRunner (11.50)
User Guide
Controller l
The Microsoft Active Server Pages (ASP) monitor displays statistics about the resource usage on the ASP server during the scenario run.
l
The WebLogic (SNMP) monitor displays statistics about the resource usage on the WebLogic
(SNMP) server (version 6.0 and earlier) during the scenario run. The WebLogic (SNMP) monitor uses SNMP to retrieve server statistics.
How to Set Up the WebLogic (SNMP) Monitoring
Environment
This task describes the working order for setting up the monitoring environment.
1. Prerequisites n
Verify that a version prior to WebLogic 6.0 is installed on the server.
n
Install and activate the SNMP agent on the server.
2. Set the port
To monitor a WebLogic (SNMP) server, use port 161 or 162, depending on the configuration of the agent.
To define a different default port for your WebLogic server, modify the configuration file,
snmp.cfg, located in <LoadRunner root folder>\dat\monitors. For example, if the port used by the SNMP agent on your WebLogic server is 8888, you should edit the snmp.cfg file as follows:
; WebLogic
[cm_snmp_mon_isp] port=8888
3. Configure the WebLogic (SNMP) monitor from the Controller
For task details (beginning with step 2), see
"How to Set Up the Monitoring Environment –
Workflow" on page 1044 .
MS Active Server Pages Performance Counters
The following table describes the default counters that can be monitored:
Measurement
Errors per
Second
Requests Wait
Time
Requests
Executing
Requests
Queued
Requests
Description
The number of errors per second.
The number of milliseconds the most recent request was waiting in the queue.
The number of requests currently executing.
The number of requests waiting in the queue for service.
The total number of requests not executed because there were insufficient
Page 1072 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Rejected
Requests Not
Found
Requests/sec
Memory
Allocated
resources to process them.
The number of requests for files that were not found.
The number of requests executed per second.
The total amount of memory, in bytes, currently allocated by Active Server
Pages.
Errors During
Script
Run-Time
Sessions
Current
The number of failed requests due to run-time errors.
The current number of sessions being serviced.
Transactions/sec
The number of transactions started per second.
WebLogic (SNMP) Performance Counters
The following tables describe the measurements and server properties that can be monitored.
Server Table
The Server Table lists all WebLogic (SNMP) servers that are being monitored by the agent. A server must be contacted or be reported as a member of a cluster at least once before it will appear in this table. Servers are only reported as a member of a cluster when they are actively participating in the cluster, or shortly thereafter.
Measurement
ServerState
ServerLoginEnable
ServerMaxHeapSpace
ServerHeapUsedPct
Description
The state of the WebLogic server, as inferred by the SNMP agent. Up implies that the agent can contact the server.
Down implies that the agent cannot contact the server.
This value is true if client logins are enabled on the server.
The maximum heap size for this server, in KB.
The percentage of heap space currently in use on the server.
ServerQueueLength
ServerQueueThroughput
The current length of the server execute queue.
The current throughput of execute queue, expressed as the number of requests processed per second.
ServerNumEJBDeployment
The total number of EJB deployment units known to the server.
ServerNumEJBBeansDeployed
The total number of EJB beans actively deployed on the server.
Page 1073 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Listen Table
The Listen Table is the set of protocols, IP addresses, and port combinations on which servers are listening. There will be multiple entries for each server: one for each protocol, ipAddr, port combination. If clustering is used, the clustering-related MIB objects will assume a higher priority.
Measurement
ListenPort
Description
Port number.
ListenAdminOK
True if admin requests are allowed on this (protocol, ipAddr, port) combination; otherwise false.
ListenState
Listening if the (protocol, ipAddr, port) combination is enabled on the server;
Not Listening if it is not. The server may be listening but not accepting new clients if its server Login Enable state is false. In this case, existing clients will continue to function, but new ones will not.
WebLogic (SNMP) Resources Dialog Box
This dialog box lets you select the items to monitor on the WebLogic (SNMP) application server.
To access
Relevant tasks
See also
Right-click a graph > Add Measurements
Click Add in the Resource Measurements section of the WebLogic (SNMP) dialog box
"How to Set Up the WebLogic (SNMP) Monitoring
Environment" on page 1072
"How to Set Up the Monitoring Environment –
Workflow" on page 1044
"WebLogic (SNMP) Performance Counters" on previous page
User interface elements are described below:
UI Element
Explain >>
WebLogic (SNMP) objects
Description
Adds the selected object to the list of measurements.
Note: The WebLogic (SNMP) monitor can only monitor up to 25 measurements.
Displays a description of the selected object.
A tree for browsing the list of available measurements. You can select only one object at a time in the tree.
Page 1074 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Microsoft Active Server Pages Dialog Box
This dialog box enables you to select the items to monitor on the MS Active Server Pages application server.
To access
Right-click a graph > Add Measurements
Click Add in the Resource Measurements section of
Microsoft Active Server Pages dialog.
Relevant tasks
See also
"How to Set Up the Monitoring Environment – Workflow" on page 1044
"MS Active Server Pages Performance Counters" on page
1072
User interface elements are described below:
UI Element Description
Counters
Adds the selected measurement to the list of measurements in the
Measurements on <machine> section of the Microsoft Active Server Pages dialog box.
Select a resource counter to monitor. Select multiple counters using the CTRL key. For a definition of each counter, click Explain.
Instances
Object
If multiple instances of the selected counter are running, select one or more instances to monitor for the selected counter.
Select the object being monitored on the specified machine.
Database Resource Monitoring
Database Resource Monitoring Overview
LoadRunner's Database Server Resource monitors measure database resource usage statistics for DB2, Oracle, or SQL Servers during a scenario run. You use these monitors to isolate database server performance bottlenecks.
The DB2 monitor is a native LoadRunner monitor. The SQL monitor can be configured as a native
LoadRunner monitor, or as a SiteScope monitor.
There are two methods of monitoring Oracle database servers: l
The Oracle native LoadRunner monitor displays information from Oracle V$ tables: Session statistics, V$SESSTAT, system statistics, V$SYSSTAT, and other table counters defined by the user in the custom query.
l
The SiteScope Oracle JDBC Monitor monitors the server performance statistics from Oracle
Database servers. You can monitor multiple parameters or counters with a single monitor
Page 1075 of 1812 HP LoadRunner (11.50)
User Guide
Controller instance. This allows you to watch server loading for performance, availability, and capacity planning. You can create a separate Oracle JDBC Monitor instance for each Oracle database server in your environment.
Before defining the monitoring measurements for the DB2 and Oracle monitors in the Controller, you must set up the monitoring environment on the database server: l
For details about the DB2 monitor configuration, see
"How to Set Up the DB2 Monitoring
Environment" below .
Note: If there is no application working with a database, you can only monitor the database manager instance.
l
For details about the Oracle monitor configuration, see
"How to Set Up the Oracle Monitoring
Environment " on next page .
You then enable each database resource monitor from the Controller by selecting the counters you want the monitor to measure.
How to Set Up the DB2 Monitoring Environment
This task describes how to set up the monitor environment before monitoring a DB2 database server.
1. Prerequisites
Install all the DB2 client files and libraries on the Controller machine.
2. Connect to the DB2 server and define the monitor client a. Select Start > All Programs > DB2 for Windows NT > Control Center.
b. Enter your DB2 server username and password (with administrative privileges).
c. In the console that opens, right-click Systems, and select Add.
d. Enter the following settings in the dialog box: o
System Name. <server name> o
Remote Instance. DB2 o
Host Name. <server name> o
Service Name. The DB2 server port. The default value is 50000.
e. Click Retrieve, and then OK.
Note: If you receive an error message after clicking Retrieve, repeat steps c and d, and click OK.
3. Add the Database Manager instance to the server
You can only work with a single Database Manager instance during each monitoring session.
Page 1076 of 1812 HP LoadRunner (11.50)
User Guide
Controller a. Expand the <server name> node in the console tree.
b. Right-click Instance, and select Add.
c. Enter the following settings in the dialog box: o
Remote Instance.DB2 o
Instance Name. the database instance to be called from the Controller o
Host Name.<server name> o
Service Name. The DB2 server port. The default value is 50000.
d. Click OK and close the Control Center.
4. Configure the DB2 monitor from the Controller
For task details (beginning with step 2), see
"How to Set Up the Monitoring Environment –
Workflow" on page 1044 .
How to Set Up the Oracle Monitoring Environment
This task describes how to set up the monitor environment before monitoring an Oracle database server using the native LoadRunner monitor.
Note: If a problem occurs in setting up the Oracle environment, check the Oracle server to view the error messages.
1. Prerequisites n
Ensure that the Oracle client libraries are installed on the Controller machine.
n
Verify that %OracleHome%\bin is included in the path environment variable. If it is not, add it.
n
Ensure that the registries are updated for the version of Oracle that you are using and that they have the following key: HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE n
Verify that the Oracle server you want to monitor is up and running. Note that it is possible to monitor several Oracle database servers concurrently.
Note: Only the 32-bit Oracle client should be installed on the Controller machine running the Oracle monitor. If you have a 16-bit and a 32-bit Oracle client installation on the
Controller machine, the 16-bit installation should be uninstalled.
2. Configure the Oracle client/server connection
Set the connection parameters so the Oracle client (Controller machine) can communicate with the Oracle server(s) you plan to monitor.
On the Controller machine, set the following configuration parameter either by editing the
tnsnames.ora file in a text editor, or using the Oracle service configuration tool (for example,
Start > Programs > Oracle for Windows NT > Oracle Net8 Easy Config):
Page 1077 of 1812 HP LoadRunner (11.50)
User Guide
Controller n a new service name (TNS name) for the Oracle instance n
TCP protocol n the host name (name of monitored server machine) n the port number (usually 1521) n the database SID (the default SID is ORCL)
For example:
3. Connect to the monitored server machine and verify the connection a. Obtain a username and password for the service from your database administrator, and ensure that the Controller has database administrator privileges for the Oracle V$ tables
(V$SESSTAT, V$SYSSTAT, V$STATNAME, V$INSTANCE, V$SESSION).
b. Verify connection with the Oracle server by performing tns ping from the Controller machine.
Note: There may be a problem connecting if the Oracle server is behind a DMZ/firewall that limits its communication to application servers accessing it.
c. Run SQL*Plus from the Controller and attempt to log in to the Oracle server(s) with the desired username/password/server combination.
d. Type SELECT * FROM V$SYSSTAT to verify that you can view the V$SYSSTAT table on the Oracle server. Use similar queries to verify that you can view the V$SESSTAT,
V$SESSION, V$INSTANCE, V$STATNAME, and V$PROCESS tables on the server.
4. Modify the monitoring sample rate (optional)
To change the length of each monitoring sample (in seconds), edit the dat\monitors\vmon.cfg file in the LoadRunner root folder. The default rate is 10 seconds.
The minimum sampling rate for the Oracle Monitor is 10 seconds. If you set the sampling rate at less than 10 seconds, the Oracle Monitor will continue to monitor at 10 second intervals.
5. Configure the Oracle monitor from the Controller
For task details (beginning with step 2), see
"How to Set Up the Monitoring Environment –
Workflow" on page 1044 .
Page 1078 of 1812 HP LoadRunner (11.50)
User Guide
Controller
DB2 Performance Counters
DatabaseManager
The following table lists the DatabaseManager counters:
Measurement Description rem_cons_in
The current number of connections initiated from remote clients to the instance of the database manager that is being monitored.
rem_cons_ in_exec local_cons local_cons_ in_exec
The number of remote applications that are currently connected to a database and are currently processing a unit of work within the database manager instance being monitored.
The number of local applications that are currently connected to a database within the database manager instance being monitored.
The number of local applications that are currently connected to a database within the database manager instance being monitored and are currently processing a unit of work.
The number of local databases that have applications connected.
con_local_ dbases agents_ registered agents_ waiting_on_ token
The number of agents registered in the database manager instance that is being monitored (coordinator agents and subagents).
The number of agents waiting for a token so they can execute a transaction in the database manager.
idle_agents
The number of agents in the agent pool that are currently unassigned to an application and are therefore "idle".
agents_ from_pool
The number of agents assigned from the agent pool.
agents_ created_ empty_pool
The number of agents created because the agent pool was empty.
agents_ stolen
The number of times that agents are stolen from an application. Agents are stolen when an idle agent associated with an application is reassigned to work on a different application.
comm_ private_mem
The amount of private memory that the instance of the database manager has currently committed at the time of the snapshot.
inactive_gw_ agents
The number of DRDA agents in the DRDA connections pool that are primed with a connection to a DRDA database, but are inactive.
num_gw_
The number of times that an agent from the agents pool was primed with a connection and was stolen for use with a different DRDA database.
Page 1079 of 1812 HP LoadRunner (11.50)
User Guide
Controller
conn_ switches sort_heap_ allocated post_ threshold_ sorts
The total number of allocated pages of sort heap space for all sorts at the level chosen and at the time the snapshot was taken.
The number of sorts that have requested heaps after the sort heap threshold has been reached.
piped_sorts_ requested
The number of piped sorts that have been requested.
piped_sorts_ accepted
The number of piped sorts that have been accepted.
Database
The following table lists the Database counters:
Measurement Description appls_cur_ cons
Indicates the number of applications that are currently connected to the database.
appls_in_ db2
Indicates the number of applications that are currently connected to the database, and for which the database manager is currently processing a request.
total_sec_ cons num_assoc_ agents sort_heap_ allocated
The number of connections made by a sub-agent to the database at the node.
At the application level, this is the number of sub-agents associated with an application. At the database level, it is the number of sub-agents for all applications.
The total number of allocated pages of sort heap space for all sorts at the level chosen and at the time the snapshot was taken.
total_sorts total_sort_ time sort_ overflows
The total number of sorts that have been executed.
The total elapsed time (in milliseconds) for all sorts that have been executed.
The total number of sorts that ran out of sort heap and may have required disk space for temporary storage.
active_sorts
The number of sorts in the database that currently have a sort heap allocated.
total_hash_ joins
The total number of hash joins executed.
Page 1080 of 1812 HP LoadRunner (11.50)
User Guide
Controller
total_hash_ loops hash_join_ overflows hash_join_ small_ overflows
The total number of times that a single partition of a hash join was larger than the available sort heap space.
The number of times that hash join data exceeded the available sort heap space.
The number of times that hash join data exceeded the available sort heap space by less than 10%.
pool_data_l_ reads
Indicates the number of logical read requests for data pages that have gone through the buffer pool.
pool_data_ p_reads
The number of read requests that required I/O to get data pages into the buffer pool.
pool_data_ writes pool_index_ l_reads pool_index_ p_reads pool_index_ writes
Indicates the number of times a buffer pool data page was physically written to disk.
Indicates the number of logical read requests for index pages that have gone through the buffer pool.
Indicates the number of physical read requests to get index pages into the buffer pool.
Indicates the number of times a buffer pool index page was physically written to disk.
pool_read_ time pool_write_ time
Provides the total amount of elapsed time spent processing read requests that caused data or index pages to be physically read from disk to buffer pool.
Provides the total amount of time spent physically writing data or index pages from the buffer pool to disk.
files_closed
The total number of database files closed.
pool_async_ data_reads
The number of pages read asynchronously into the buffer pool.
pool_async_ data_writes
The number of times a buffer pool data page was physically written to disk by either an asynchronous page cleaner, or a pre-fetcher. A pre-fetcher may have written dirty pages to disk to make space for the pages being pre-fetched.
pool_async_ index_writes
The number of times a buffer pool index page was physically written to disk by either an asynchronous page cleaner, or a pre-fetcher. A pre-fetcher may have written dirty pages to disk to make space for the pages being pre-fetched.
pool_async_ index_reads
The number of index pages read asynchronously into the buffer pool by a prefetcher.
pool_async_ read_time
The total elapsed time spent reading by database manager pre-fetchers.
pool_async_
The total elapsed time spent writing data or index pages from the buffer pool to
Page 1081 of 1812 HP LoadRunner (11.50)
User Guide
Controller
write_time pool_async_ data_read_ reqs pool_lsn_ gap_clns
disk by database manager page cleaners.
The number of asynchronous read requests.
The number of times a page cleaner was invoked because the logging space used had reached a pre-defined criterion for the database.
The number of times a page cleaner was invoked because a synchronous write was needed during the victim buffer replacement for the database.
pool_drty_ pg_steal_ clns pool_drty_ pg_thrsh_ clns
The number of times a page cleaner was invoked because a buffer pool had reached the dirty page threshold criterion for the database.
prefetch_ wait_time pool_data_ to_estore pool_index_ to_estore
The time an application spent waiting for an I/O server (pre-fetcher) to finish loading pages into the buffer pool.
The number of buffer pool data pages copied to extended storage.
The number of buffer pool index pages copied to extended storage.
pool_data_ from_estore
The number of buffer pool data pages copied from extended storage.
pool_index_ from_estore
The number of buffer pool index pages copied from extended storage.
direct_reads
The number of read operations that do not use the buffer pool.
direct_writes
The number of write operations that do not use the buffer pool.
direct_read_ reqs
The number of requests to perform a direct read of one or more sectors of data.
direct_write_ reqs
The number of requests to perform a direct write of one or more sectors of data.
direct_read_ time
The elapsed time (in milliseconds) required to perform the direct reads.
direct_write_ time
The elapsed time (in milliseconds) required to perform the direct writes.
cat_cache_ lookups cat_cache_ inserts cat_cache_
The number of times that the catalog cache was referenced to obtain table descriptor information.
The number of times that the system tried to insert table descriptor information into the catalog cache.
The number of times that an insert into the catalog cache failed due the catalog
Page 1082 of 1812 HP LoadRunner (11.50)
User Guide
Controller
overflows cat_cache_ heap_full pkg_cache_ lookups pkg_cache_ inserts
cache being full.
The number of times that an insert into the catalog cache failed due to a heap-full condition in the database heap.
The number of times that an application looked for a section or package in the package cache. At a database level, it indicates the overall number of references since the database was started, or monitor data was reset.
The total number of times that a requested section was not available for use and had to be loaded into the package cache. This count includes any implicit prepares performed by the system.
The number of times that the package cache overflowed the bounds of its allocated memory.
pkg_cache_ num_ overflows appl_ section_ lookups appl_ section_ inserts sec_logs_ allocated log_reads
Lookups of SQL sections by an application from its SQL work area.
Inserts of SQL sections by an application from its SQL work area.
The total number of secondary log files that are currently being used for the database.
The number of log pages read from disk by the logger.
log_writes total_log_ used locks_held
The number of log pages written to disk by the logger.
The total amount of active log space currently used (in bytes) in the database.
The number of locks currently held.
lock_list_in_ use
The total amount of lock list memory (in bytes) that is in use.
deadlocks
The total number of deadlocks that have occurred.
lock_escals
The number of times that locks have been escalated from several row locks to a table lock.
x_lock_ escals lock_ timeouts lock_waits lock_wait_
The number of times that locks have been escalated from several row locks to one exclusive table lock, or the number of times an exclusive lock on a row caused the table lock to become an exclusive lock.
The number of times that a request to lock an object timed-out instead of being granted.
The total number of times that applications or connections waited for locks.
The total elapsed time waited for a lock.
Page 1083 of 1812 HP LoadRunner (11.50)
User Guide
Controller
time locks_ waiting rows_ deleted rows_ inserted rows_ updated rows_ selected int_rows_ deleted int_rows_ updated int_rows_ inserted static_sql_ stmts
Indicates the number of agents waiting on a lock.
The number of row deletions attempted.
The number of row insertions attempted.
The number of row updates attempted.
The number of rows that have been selected and returned to the application.
The number of rows deleted from the database as a result of internal activity.
The number of rows updated from the database as a result of internal activity.
The number of rows inserted into the database as a result of internal activity caused by triggers.
The number of static SQL statements that were attempted.
dynamic_ sql_stmts failed_sql_ stmts
The number of dynamic SQL statements that were attempted.
The number of SQL statements that were attempted, but failed.
commit_sql_ stmts
The total number of SQL COMMIT statements that have been attempted.
rollback_ sql_stmts
The total number of SQL ROLLBACK statements that have been attempted.
The number of SQL SELECT statements that were executed.
select_sql_ stmts uid_sql_ stmts ddl_sql_ stmts int_auto_ rebinds
The number of SQL UPDATE, INSERT, and DELETE statements that were executed.
The number of SQL Data Definition Language (DDL) statements that were executed.
The number of automatic rebinds (or recompiles) that have been attempted.
Page 1084 of 1812 HP LoadRunner (11.50)
User Guide
Controller
int_commits
The total number of commits initiated internally by the database manager.
int_rollbacks
The total number of rollbacks initiated internally by the database manager.
int_ deadlock_ rollbacks
The total number of forced rollbacks initiated by the database manager due to a deadlock. A rollback is performed on the current unit of work in an application selected by the database manager to resolve the deadlock.
binds_ precompiles
The number of binds and pre-compiles attempted.
Application
The following table lists the Application counters:
Measurement Description agents_ stolen
The number of times that agents are stolen from an application. Agents are stolen when an idle agent associated with an application is reassigned to work on a different application.
num_assoc_ agents
At the application level, this is the number of sub-agents associated with an application. At the database level, it is the number of sub-agents for all applications.
total_sorts total_sort_ time
The total number of sorts that have been executed.
The total elapsed time (in milliseconds) for all sorts that have been executed.
sort_ overflows total_hash_ joins total_hash_ loops hash_join_ overflows
The total number of sorts that ran out of sort heap and may have required disk space for temporary storage.
The total number of hash joins executed.
The total number of times that a single partition of a hash join was larger than the available sort heap space.
The number of times that hash join data exceeded the available sort heap space
hash_join_ small_ overflows
The number of times that hash join data exceeded the available sort heap space by less than 10%.
pool_data_l_ reads
The number of logical read requests for data pages that have gone through the buffer pool.
pool_data_ p_reads
The number of read requests that required I/O to get data pages into the buffer pool.
Page 1085 of 1812 HP LoadRunner (11.50)
User Guide
Controller
pool_data_ writes pool_index_ l_reads pool_index_ p_reads pool_index_ writes pool_read_ time prefetch_ wait_time pool_data_ to_estore pool_index_ to_estore
The number of times a buffer pool data page was physically written to disk.
The number of logical read requests for index pages that have gone through the buffer pool.
The number of physical read requests to get index pages into the buffer pool.
The number of times a buffer pool index page was physically written to disk.
Provides the total amount of elapsed time spent processing read requests that caused data or index pages to be physically read from disk to buffer pool.
The time an application spent waiting for an I/O server (pre-fetcher) to finish loading pages into the buffer pool.
The number of buffer pool data pages copied to extended storage.
The number of buffer pool index pages copied to extended storage.
pool_data_ from_estore pool_index_ from_estore
The number of buffer pool data pages copied from extended storage.
The number of buffer pool index pages copied from extended storage.
direct_reads
The number of read operations that do not use the buffer pool.
direct_writes
The number of write operations that do not use the buffer pool.
direct_read_ reqs
The number of requests to perform a direct read of one or more sectors of data.
direct_write_ reqs
The number of requests to perform a direct write of one or more sectors of data.
direct_read_ time
The elapsed time (in milliseconds) required to perform the direct reads.
direct_write_ time
The elapsed time (in milliseconds) required to perform the direct writes.
cat_cache_ lookups cat_cache_ inserts
The number of times that the catalog cache was referenced to obtain table descriptor information.
The number of times that the system tried to insert table descriptor information into the catalog cache.
Page 1086 of 1812 HP LoadRunner (11.50)
User Guide
Controller
cat_cache_ overflows cat_cache_ heap_full pkg_cache_ lookups pkg_cache_ inserts
The number of times that an insert into the catalog cache failed due to the catalog cache being full.
The number of times that an insert into the catalog cache failed due to a heap-full condition in the database heap.
The number of times that an application looked for a section or package in the package cache. At a database level, it indicates the overall number of references since the database was started, or monitor data was reset.
The total number of times that a requested section was not available for use and had to be loaded into the package cache. This count includes any implicit prepares performed by the system.
Lookups of SQL sections by an application from its SQL work area.
appl_ section_ lookups appl_ section_ inserts uow_log_ space_used locks_held deadlocks rows_ deleted rows_
Inserts of SQL sections by an application from its SQL work area.
The amount of log space (in bytes) used in the current unit of work of the monitored application.
The number of locks currently held.
The total number of deadlocks that have occurred.
lock_escals
The number of times that locks have been escalated from several row locks to a table lock.
x_lock_ escals
The number of times that locks have been escalated from several row locks to one exclusive table lock, or the number of times an exclusive lock on a row caused the table lock to become an exclusive lock.
lock_ timeouts
The number of times that a request to lock an object timed-out instead of being granted.
The total number of times that applications or connections waited for locks.
The total elapsed time waited for a lock.
lock_waits lock_wait_ time locks_ waiting uow_lock_ wait_time
Indicates the number of agents waiting on a lock.
The total amount of elapsed time this unit of work has spent waiting for locks.
The number of row deletions attempted.
The number of row insertions attempted.
Page 1087 of 1812 HP LoadRunner (11.50)
User Guide
Controller
inserted rows_ updated
The number of row updates attempted.
rows_ selected
The number of rows that have been selected and returned to the application.
rows_written
The number of rows changed (inserted, deleted or updated) in the table.
rows_read
The number of rows read from the table.
The number of rows deleted from the database as a result of internal activity.
int_rows_ deleted int_rows_ updated
The number of rows updated from the database as a result of internal activity.
int_rows_ inserted open_rem_ curs
The number of rows inserted into the database as a result of internal activity caused by triggers.
The number of remote cursors currently open for this application, including those cursors counted by `open_rem_curs_blk'.
open_rem_ curs_blk
The number of remote blocking cursors currently open for this application.
rej_curs_blk
The number of times that a request for an I/O block at server was rejected and the request was converted to non-blocked I/O.
acc_curs_blk
The number of times that a request for an I/O block was accepted.
open_loc_ curs
The number of local cursors currently open for this application, including those cursors counted by `open_loc_curs_blk'.
open_loc_ curs_blk
The number of local blocking cursors currently open for this application.
static_sql_ stmts dynamic_ sql_stmts failed_sql_ stmts
The number of static SQL statements that were attempted.
The number of dynamic SQL statements that were attempted.
The number of SQL statements that were attempted, but failed.
commit_sql_ stmts
The total number of SQL COMMIT statements that have been attempted.
rollback_ sql_stmts
The total number of SQL ROLLBACK statements that have been attempted.
Page 1088 of 1812 HP LoadRunner (11.50)
User Guide
Controller
select_sql_ stmts uid_sql_ stmts ddl_sql_ stmts
The number of SQL SELECT statements that were executed.
The number of SQL UPDATE, INSERT, and DELETE statements that were executed.
The number of SQL Data Definition Language (DDL) statements that were executed.
int_auto_ rebinds
The number of automatic rebinds (or recompiles) that have been attempted.
int_commits
The total number of commits initiated internally by the database manager.
int_rollbacks
The total number of rollbacks initiated internally by the database manager.
int_ deadlock_ rollbacks
The total number of forced rollbacks initiated by the database manager due to a deadlock. A rollback is performed on the current unit of work in an application selected by the database manager to resolve the deadlock.
binds_ precompiles
The number of binds and pre-compiles attempted.
Oracle Performance Counters
The following measurements are most commonly used when monitoring the Oracle server (from the
V$SYSSTAT table):
Measurement Description
CPU used by this session
The amount of CPU time (in 10s of milliseconds) used by a session between the time a user call started and ended. Some user calls can be completed within 10 milliseconds and, as a result, the start and end-user call time can be the same.
In this case, 0 milliseconds are added to the statistic. A similar problem can exist in the operating system reporting, especially on systems that suffer from many context switches.
Bytes received via
SQL*Net from client
The total number of bytes received from the client over Net8.
Logons current
Opens of replaced files
The total number of current logons
The total number of files that needed to be reopened because they were no longer in the process file cache.
User calls
Oracle allocates resources (Call State Objects) to keep track of relevant user call data structures every time you log in, parse, or execute. When determining activity, the ratio of user calls to RPI calls gives you an indication of how much internal work is generated as a result of the type of requests the user is sending
Page 1089 of 1812 HP LoadRunner (11.50)
User Guide
Controller
SQL*Net roundtrips to/from client
Bytes sent via SQL*Net to client
Opened cursors current
DB block changes
Total file opens
to Oracle.
The total number of Net8 messages sent to, and received from, the client.
The total number of bytes sent to the client from the foreground process(es).
The total number of current open cursors.
Closely related to consistent changes, this statistic counts the total number of changes that were made to all blocks in the SGA that were part of an update or delete operation. These are changes that generate redo log entries and hence will cause permanent changes to the database if the transaction is committed.
This statistic is a rough indication of total database work and indicates (possibly on a per-transaction level) the rate at which buffers are being dirtied.
The total number of file opens being performed by the instance. Each process needs a number of files (control file, log file, database file) to work against the database.
SQL Server Performance Counters
The following table describes the default counters that can be monitored on version 6.5 of the SQL
Server:
Measurement
% Total
Processor Time
Description
The average percentage of time that all the processors on the system are busy executing non-idle threads. On a multi-processor system, if all processors are always busy, this is 100%, if all processors are 50% busy this is 50% and if 1/4 of the processors are 100% busy this is 25%. It can be viewed as the fraction of the time spent doing useful work. Each processor is assigned an Idle thread in the Idle process which consumes those unproductive processor cycles not used by any other threads.
Page 1090 of 1812 HP LoadRunner (11.50)
User Guide
Controller
% Processor
Time
The percentage of time that the processor is executing a non-idle thread.
This counter was designed as a primary indicator of processor activity. It is calculated by measuring the time that the processor spends executing the thread of the idle process in each sample interval, and subtracting that value from 100%. (Each processor has an idle thread which consumes cycles when no other threads are ready to run). It can be viewed as the percentage of the sample interval spent doing useful work. This counter displays the average percentage of busy time observed during the sample interval. It is calculated by monitoring the time the service was inactive, and then subtracting that value from 100%.
Cache Hit Ratio
The percentage of time that a requested data page was found in the data cache (instead of being read from disk).
I/O - Batch
Writes/sec
The number of 2K pages written to disk per second, using Batch I/O. The checkpoint thread is the primary user of Batch I/O.
The number of 2K pages flushed to disk per second by the Lazy Writer.
I/O - Lazy
Writes/sec
I/O -
Outstanding
Reads
The number of physical reads pending.
I/O -
Outstanding
Writes
The number of physical writes pending.
I/O - Page
Reads/sec
The number of physical page reads per second.
I/O -
Transactions/sec
The number of Transact-SQL command batches executed per second.
User
Connections
The number of open user connections.
Configuring Oracle JDBC Monitor Dialog Box
This dialog box enables you to configure the connection parameters for the SiteScope Oracle JDBC monitor.
To access
Right-click the graph and select Add Measurements.
This dialog appears only when you add measurements for the first time.
Relevant tasks
See also
"How to Set Up the Oracle Monitoring Environment " on page 1077
"Oracle Performance Counters " on page 1089
User interface elements are described below:
UI Element Description
Instance
The database SID.
Page 1091 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Example: ORCL
Database
Connection
URL
The connection URL to the database you want to monitor. The URL should contain a database user name and password in the following format (including the colons and @ symbol):
jdbc:oracle:thin:@<tcp addr>:<tcp port>:<db sid>
Example: To connect to the ORCL database on a machine using port 1521 you would use jdbc:oracle:thin:@206.168.191.19:1521:ORCL
Database
User Name
The user name that SiteScope should use to connect to the database.
Important: You must have a valid Oracle user login that SiteScope will use to access the Oracle server for the Oracle JDBC Monitor. To verify that SiteScope will be able retrieve the Oracle database counters, sign in to the Oracle server with your user and try to execute the SQL statements found in the file:
SiteScope\templates.applications\commands.oraclejdbc
Database
Password
Database
Driver
The password for the user name that SiteScope should use to connect to the database.
The driver used to connect to the database. Specify the the Oracle Database
Driver that was installed on the SiteScope server when setting up the monitor.
Example: The Database Driver for the Oracle thin JDBC driver is:
oracle.jdbc.driver.OracleDriver
Connection
Timeout
An optional the time out value, in seconds, that SiteScope should to wait for a database connection to respond.
Query
Timeout
Update every
An optional the time out value, in seconds, that SiteScope should to wait for a response from the database query. If the database does not respond within the period specified, SiteScope will report an error.
Note: Some commonly used databases and database drivers do not support the
Query Timeout feature. In these cases the Query Timeout value should be set to zero.
How often the monitor should read the server statistics. The default interval is to run or update the monitor once every 10 seconds.
Important: The sum of the Connection Timeout value and Query Timeout value should always be less than the Update every value for the monitor.
Streaming Media Monitoring
Streaming Media Monitoring Overview
To isolate server and client performance bottlenecks during a scenario run, you monitor the
Windows Media Server and RealPlayer audio/video servers, as well as the RealPlayer and Media
Player clients.
Note: For instructions on recording a script containing streaming media functions, see the HP
Virtual User Generator.
Page 1092 of 1812 HP LoadRunner (11.50)
User Guide
Controller
The streaming media monitors provide you with performance information for the Windows Media
Server and RealPlayer audio/video servers, as well as the RealPlayer and Media Player clients. To obtain data for the Windows Media Server and RealPlayer Server, you need to activate the streaming media monitor before executing the scenario, and indicate which statistics and measurements you want to monitor. The RealPlayer Client and Media Player Client do not require pre-session or scenario activation or configuration.
l
The Real Client monitor graph shows statistics on the RealPlayer client machine as a function of the elapsed scenario time. The x-axis represents the time that has elapsed since the start of the scenario run. The y-axis represents the resource usage.
l
The Media Player Client monitor graph shows statistics on the Windows Media Player client machine as a function of the elapsed scenario time. The x-axis represents the time that has elapsed since the start of the scenario run. The y-axis represents the resource usage.
RealPlayer Client Performance Counters
The following table describes the RealPlayer Client measurements that are monitored:
Measurement
Current Bandwidth
(Kbits/sec)
Buffering Event Time (sec)
Network Performance
Description
The number of kilobytes in the last second
The average time spent on buffering
The ratio (percentage) between the current bandwidth and the actual bandwidth of the clip
Percentage of Recovered
Packets
The percentage of error packets that were recovered
Percentage of Lost Packets
The percentage of packets that were lost
Percentage of Late Packets
The percentage of late packets
Time to First Frame
Appearance (sec)
The time for first frame appearance (measured from the start of the replay)
Number of Buffering Events
The average number of all buffering events
Number of Buffering Seek
Events
Buffering Seek Time
The average number of buffering events resulting from a seek operation
The average time spent on buffering events resulting from a seek operation
Number of Buffering
Congestion Events
The average number of buffering events resulting from network congestion
Buffering Congestion Time
The average time spent on buffering events resulting from network congestion
Page 1093 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Number of Buffering Live
Pause Events
Buffering Live Pause Time
The average number of buffering events resulting from live pause
The average time spent on buffering events resulting from live pause
Media Player Client Performance Counters
The following table describes the Media Player Client measurements that are monitored:
Measurement
Average Buffering Events
Average Buffering Time (sec)
Current bandwidth (Kbits/sec)
Number of Packets
Stream Interruptions
Stream Quality (Packet-level)
Stream Quality (Sampling-level)
Total number of recovered packets
Total number of lost packets
Description
The number of times Media Player Client had to buffer incoming media data due to insufficient media content.
The time spent by Media Player Client waiting for sufficient amount of media data in order to continue playing media clip.
The number of kbits per second received.
The number of packets sent by server for a particular media clip.
The number of interruptions encountered by media player client while playing a media clip.
This measurement includes the number of times Media Player Client had to buffer incoming media data, and any errors that occurred during playback.
The percentage ratio of packets received to total packets.
The percentage of stream samples received on time (no delays in reception).
The number of lost packets that were recovered. This value is only relevant during network playback.
The number of lost packets that were not recovered. This value is only relevant during network playback.
ERP/CRM Server Resource Monitoring
Page 1094 of 1812 HP LoadRunner (11.50)
User Guide
Controller
ERP/CRM Server Resource Monitoring Overview
You use LoadRunner's ERP/CRM server resource monitors to monitor ERP/CRM servers during a scenario run and isolate server performance bottlenecks.
l
The PeopleSoft (Tuxedo) monitor displays statistics about the resource usage of a PeopleSoft
(Tuxedo) server during the scenario run.
l
The Siebel Server Manager monitor displays statistics about the resource usage of a Siebel
Server Manager during the scenario run.
l
The SAPGUI monitor displays statistics about the resource usage of an SAP R/3 system during the scenario run. You can use the SAPGUI monitor to view: n
The number of configured instances for each SAP system n
Data for all application instances (not just the one you logged on to) n
Transactions used and the users that call them n
Number of users working on the different instances n
Performance history for recent periods of all instances n
Response time distribution n
Resource consumption for any application server n
Application server workload for the current day or for a recent period
How to Set Up the PeopleSoft (Tuxedo) Resource Monitor
This task describes the working order for setting up the monitoring environment. If Tuxedo 7.1 or later is installed, you can monitor more than one PeopleSoft (Tuxedo) application server at a time. If
Tuxedo 6.5 or earlier is installed, you can monitor only one PeopleSoft (Tuxedo) application server at a time.
1. Prerequisites
Ensure that a Tuxedo workstation client (not a native client), version 6.3 or later, is installed on the Controller machine.
Use a Tuxedo 6.x client if a Tuxedo 6.x server is used, and Tuxedo 7.1 or later client if a
Tuxedo 7.1 or later server is used.
If you use a Tuxedo 6.5 or earlier server, you can still use a Tuxedo 7.1 or later client in order to monitor it, provided that you set the WSINTOPPRE71 environment variable to yes.
Note: A Tuxedo workstation client communicates with the application server over the network, and is not required to run the Tuxedo application server on the same machine. A native client can only communicate with the Tuxedo application server if it is part of the relevant Tuxedo domain.
2. Define the environment variables on the Controller machine
Page 1095 of 1812 HP LoadRunner (11.50)
User Guide
Controller a. Set the TUXDIR variable to the Tuxedo installation folder (for example,
V:\environ\32\Tuxedo 8.0).
b. Add the Tuxedo bin folder to the PATH variable.
3. Check the Workstation Listener (WSL) Process
Ensure that the workstation listener (WSL) process is running. This enables the application server to accept requests from workstation clients.
The address and port number used to connect to the application server must match those dedicated to the WSL process.
4. Configure the PeopleSoft (Tuxedo) Resource monitor from the Controller
The first time you click Add to add a measurement in the Controller, you specify the PeopleSoft
(Tuxedo) server logon information. For user interface details, see
"PeopleSoft (Tuxedo) Logon
Dialog Box" on page 1101 .
For task details (beginning with step 2), see
"How to Set Up the Monitoring Environment –
Workflow" on page 1044 .
How to Set Up the SAPGUI Server Resource Monitor
This task describes the working order for setting up the monitoring environment.
Note: The SAPGUI monitor supports SAP server versions 3.1 to 4.6, regardless of the SAP
R/3 server's operating system and the platform on which it is installed.
1. Prerequisites
Note: Once the SAPGUI monitor is activated on the Controller machine, you cannot record a SAPGUI protocol script on that machine.
n
Install the SAPGUI for Windows 6.20 client on the Controller machine.
n
Install the latest patch for the SAPGUI for Windows 6.20 client. The lowest supported level is patch 36.
2. Enable the last minute load from the client
From the SAPGUI client application, click F6 to determine whether you can access the st03 transaction and query for last minute load information.
If this functionality is not already enabled, enable it from the SAP R/3 client on the Controller machine, using the username and password defined in the Controller.
3. Configure the SAPGUI Server Resource monitor from the Controller
The SAP server information comes from the SAP Logon application. Before you configure this monitor from the Controller, verify the logon information on the SAP server.
Page 1096 of 1812 HP LoadRunner (11.50)
User Guide
Controller
The first time you click Add to add a measurement in the Controller, you specify the SAPGUI server logon information. For user interface details, see
"SAPGUI Logon Dialog Box" on page
1102 .
For task details (beginning with step 2), see
"How to Set Up the Monitoring Environment –
Workflow" on page 1044 .
PeopleSoft (Tuxedo) Performance Counters
The following table describes the default counters that can be measured. It is recommended to pay particular attention to the following measurements: % Busy Clients, Active Clients, Busy Clients,
Idle Clients, and all the queue counters for the APPQ/PSAPPSRV queue.
Monitor
Machine
Measurements
% Busy Clients - The percent of active clients currently logged in to the Tuxedo application server that are waiting for a response from the application server.
Active Clients - The total number of active clients currently logged in to the
Tuxedo application server.
Busy Clients - The total number of active clients currently logged in to the
Tuxedo application server that are waiting for a response from the application server.
Current Accessers - The number of clients and servers currently accessing the application either directly on this machine or through a workstation handler on this machine.
Current Transactions - The number of in use transaction table entries on this machine.
Idle Clients - The total number of active clients currently logged in to the Tuxedo application server that are not waiting for a response from the application server.
Workload Completed/second - The total workload on all the servers for the machine that was completed, per unit time.
Workload Initiated/second - The total workload on all the servers for the machine that was initiated, per unit time.
Page 1097 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Queue
Server
% Busy Servers - The percent of active servers currently handling Tuxedo requests.
Active Servers - The total number of active servers either handling or waiting to handle Tuxedo requests.
Busy Servers - The total number of active servers currently busy handling
Tuxedo requests.
Idle Servers - The total number of active servers currently waiting to handle
Tuxedo requests.
Number Queued - The total number of messages which have been placed on the queue.
Requests/second -The number of server requests handled per second.
Workload/second -The workload is a weighted measure of the server requests.
Some requests could have a different weight than others. By default, the workload is always 50 times the number of requests.
Workstation
Handler
(WSH)
Bytes Received/sec - The total number of bytes received by the workstation handler, per second.
Bytes Sent/sec - The total number of bytes sent back to the clients by the workstation handler, per second.
Messages Received/sec - The number of messages received by the workstation handler, per second.
Messages Sent/sec - The number of messages sent back to the clients by the workstation handler, per second.
Number of Queue Blocks/sec - The number of times the queue for the workstation handler blocked, per second. This gives an idea of how often the workstation handler was overloaded.
SAPGUI Performance Counters
The following table lists the most commonly monitored counters:
Measurement Description
Average
CPU time
The average CPU time used in the work process.
Average response time
The average response time, measured from the time a dialog sends a request to the dispatcher work process, through the processing of the dialog, until the dialog is completed and the data is passed to the presentation layer. The response time between the SAP GUI and the dispatcher is not included in this value.
Average wait time
The average amount of time that an unprocessed dialog step waits in the
Page 1098 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Average load time
Database calls
dispatcher queue for a free work process. Under normal conditions, the dispatcher work process should pass a dialog step to the application process immediately after receiving the request from the dialog step. Under these conditions, the average wait time would be a few milliseconds. A heavy load on the application server or on the entire system causes queues at the dispatcher queue.
The time needed to load and generate objects, such as ABAP source code and screen information, from the database.
The number of parsed requests sent to the database.
Database requests
The number of logical ABAP requests for data in the database. These requests are passed through the R/3 database interface and parsed into individual database calls. The proportion of database calls to database requests is important. If access to information in a table is buffered in the SAP buffers, database calls to the database server are not required. Therefore, the ratio of calls/requests gives an overall indication of the efficiency of table buffering. A good ratio would be 1:10.
The number of rolled-in user contexts.
Roll ins
Roll outs
The number of rolled-out user contexts.
Roll in time
The processing time for roll ins.
Roll out time
The processing time for roll outs.
Roll wait time
The queue time in the roll area. When synchronous RFCs are called, the work process executes a roll out and may have to wait for the end of the RFC in the roll area, even if the dialog step is not yet completed. In the roll area, RFC server programs can also wait for other RFCs sent to them.
Average time per logical DB call
The average response time for all commands sent to the database system (in milliseconds). The time depends on the CPU capacity of the database server, the network, the buffering, and on the input/output capabilities of the database server. Access times for buffered tables are many magnitudes faster and are not considered in the measurement.
Siebel Server Manager Performance Counters
The following table shows the default counters that can be measured:
Measurement
Average Connect Time
Average Reply Size
Average Request Size
Average Requests Per Session
Description
The average connection time.
The average size of a user reply.
The average size of a user request.
The average number of user requests per
Page 1099 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Average Response Time
Average Think Time
Avg SQL Execute Time
Avg SQL Fetch Time
Avg SQL Parse Time
CPU Time
Elapsed Time
Num of DBConn Retries
Num of DLRbk Retries
Num of Exhausted Retries
Number of SQL Executes
Number of SQL Fetches
Number of SQL Parses
Number of Sleeps
Object Manager Errors
Reply Messages
Request Messages
SQL Execute Time
SQL Fetch Time
SQL Parse Time
Sleep Time
Tests Attempted
Tests Failed
Tests Successful
Total Reply Size
Total Request Size
Total Response Time
Page 1100 of 1812 session.
The average amount of time that it takes the server to respond to a request.
The average amount of think time taken to respond to a request.
The average SQL execute time.
The average SQL fetch time.
The average SQL parse time.
The CPU time used in the work process.
The total amount of elapsed time.
The number of database connection retries.
The number of DLRbk retries.
The total number of retries that expired.
The total number of SQL executes.
The total number of SQL fetches.
The total number of SQL parses.
The number of sleeps.
The total number of object manager errors.
The total number of reply messages.
The total number of request messages.
The total SQL execute time.
The total SQL fetch time.
The total SQL parse time.
The total sleep time.
The number of tests attempted.
The number of tests that failed.
The number of tests that were successful.
The total reply size, measured in bytes.
The total request size, measured in bytes.
The total response time.
HP LoadRunner (11.50)
User Guide
Controller
Total Tasks
Total Think Time
The total number of tasks.
The total think time.
Add Measurements Dialog Box
This dialog box allows you to select the PeopleSoft (Tuxedo) or SAPGUI resources to monitor.
To access
Relevant tasks
"How to Set Up the PeopleSoft (Tuxedo) Resource Monitor" on page 1095
"How to Set Up the SAPGUI Server Resource Monitor" on page 1096
"How to Set Up the Monitoring Environment – Workflow" on page 1044
See also
Right-click a graph > Add Measurements
Click Add in the Resource Measurements section of monitor dialog.
"PeopleSoft (Tuxedo) Performance Counters" on page 1097
"SAPGUI Performance Counters " on page 1098
User interface elements are described below:
UI Element Description
Adds the selected measurement to the list of measurements in the
Measurements on <machine> section of the PeopleSoft (Tuxedo) or SAPGUI dialog box.
Counters/Measurements
Select a resource counter to monitor. Select multiple counters using the CTRL key. For a definition of each counter, click Explain.
Instances
If multiple instances of the selected counter are running, select one or more instances to monitor for the selected counter.
Object
Select the object being monitored on the specified machine.
PeopleSoft (Tuxedo) Logon Dialog Box
This dialog box configures the connection information for the Tuxedo server.
To access
Right-click the Tuxedo graph and select Add Measurements.
This dialog appears only when you add measurements for the first time.
Important information
If you are using PeopleSoft 7.x, you can determine the logon information from the
Logon section of the tpinit.ini file in the recorded script's folder.
If you are using Tuxedo 6.5 or below, the monitor can only connect to one application server during a Controller scenario. Once it connects to an application server, that server is the only one used by the monitor until the Controller is closed. This applies even when all of the counters are deleted from the monitor.
Relevant tasks
"How to Set Up the PeopleSoft (Tuxedo) Resource Monitor" on page 1095
"How to Set Up the Monitoring Environment – Workflow" on page 1044
User interface elements are described below:
Page 1101 of 1812 HP LoadRunner (11.50)
User Guide
Controller
UI Element Description
Enables you to navigate to the tpinit.ini file of a recorded Tuxedo script. It is recommended that you use the Browse button and select the tpinit.ini file from a recorded script, rather than enter the values manually. For more information, see
"Tuxedo tpinit.ini File" on page 1120 .
Advanced
To authenticate the Tuxedo monitor, click Advanced, and enter the authentication data as a hexadecimal string (beginning with "0x") in the data field. The authentication data value can be obtained from the tpinit.ini file of an existing Tuxedo script.
Login Name
The user login name to access the Tuxedo server.
Default: PS
Note: You can determine the client name from the lrt_tpinitialize statement in the recorded script
Password
The user password to access the Tuxedo server
Default: PS
Server Name
Enter the name of the server. The format of the server name is //<machine
name>:<port number>. The default port is 7000. Alternatively, you can specify the IP address or the hexadecimal format used by old versions of
Tuxedo.
Note: You cannot use quotation marks.
Client Name
Enter the name of the client machine. If a Tuxedo server was previously monitored, its name is displayed in the Server Name box.
SAPGUI Logon Dialog Box
This dialog box enables you to connect to the SAPGUI server. The server information comes from the definitions in the SAP Logon application.
To access
Right-click the SAPGUI graph and select Add Measurements.
This dialog appears only when you add measurements for the first time.
Important information
Once the SAPGUI monitor is activated on the Controller machine, you cannot record a SAPGUI protocol script on that machine.
Relevant tasks
See also
"How to Set Up the SAPGUI Server Resource Monitor" on page 1096
"How to Set Up the Monitoring Environment – Workflow" on page 1044
"SAPGUI Performance Counters " on page 1098
User interface elements are described below:
UI Element Description
Advanced..
To change the default language, click Advanced.. and enter a 2-letter string in the
Language field.
Client
Number used in the Client field of the SAP logon details
Page 1102 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Login
Name
Login name used to access the SAPGUI server.
Password
Password for the login name.
Server
Name
Name of the SAPGUI server. Use one of the following formats: l
Server Description as displayed in the SAP Logon application l
String in the format server_network_name[:system_number where server_network_name is the name or IP address of the application server (for example: pipeline.HP.com), and system_number (preceded by
":") is the system number as displayed in the SAP Server Properties dialog box. If the system number is omitted, "00" is used by default.
Note: If an SAP router string is also specified in the Properties dialog box, the
server_network_name should be the concatenation of the router string and the application server (for example, /H/199.35.107.9/H/204.79.199.5/H/cpce801)
Siebel Server Manager Configuration Dialog Box
This dialog box allows you to select the Siebel Server Manager resources to monitor.
To access
Right-click a graph > Add Measurements
Click Add in the Resource Measurements section of Siebel Server Manager monitordialog.
"How to Set Up the Monitoring Environment – Workflow" on page 1044
Relevant tasks
See also
"Siebel Server Manager Performance Counters" on page 1099
"Troubleshooting and Limitations " below
User interface elements are described below:
UI Element
Component/Counter
Description
Host
Measured
Components
Performance
Counters
Description
Displays a description of the highlighted component.
Displays the name of the monitored machine.
Displays the available components. Browse the tree and select the component you want to monitor.
Displays the available counters for the selected component. Select the resource counter to monitor.
Troubleshooting and Limitations
This section describes troubleshooting for the Siebel Server Manager Monitor
Page 1103 of 1812 HP LoadRunner (11.50)
User Guide
Controller
The Siebel Server Manager monitor uses a Siebel command line utility (srvrmgr) to gather it's statistics. If you are having trouble getting the Siebel Server Manager monitor to work, run this command from the Siebel Server Manager client: srvrmgr /s <server> /g <gateway> /e <enterprise> /u <user> /p <pw>
If this command works from the command line, but SiteScope has trouble executing the command, open /sitescope/templates.applications/commandline.siebel, and verify that you can run the following command from the command line:
CONNECT_COMMAND:$PATH$/srvrmgr /g $GATEWAY$ /e $ENTERPRISE$ /s
$SERVERS$ /u $USERNAME$ /p $PASSWORD$
Note: On a Windows 2000 Advanced Server platform this command must be changed to:
CONNECT_COMMAND:$PATH$\srvrmgr.exe /g $GATEWAY$ /e $ENTERPRISE$ /s
$SERVERS$ /u $USERNAME$ /p $PASSWORD$
Application Component Monitoring
Application Component Monitoring Overview
Using LoadRunner's Application Component monitors, you can monitor the Microsoft COM+ server during a scenario run in order to isolate server performance bottlenecks.
The Microsoft COM+ monitor is an Application Component monitor that provides performance information for the Microsoft COM+ server. Before monitoring a Microsoft COM+ server, you install the Microsoft COM+ Server Monitor Probe on the server machine. You can then specify which measurements and resources you want the Microsoft COM+ monitor to measure. You select these counters using the Controller's monitor configuration dialog box.
Setting up the Monitoring Environment
To monitor the Microsoft COM+ server performance, you must first install the Microsoft COM+
Server Monitor Probe on the server machine. You can then specify which measurements and resources you want the Microsoft COM+ monitor to measure. You select these counters using the
Controller's monitor configuration dialog box.
Note: The data sampling rate for the COM+ monitor is fixed and cannot be modified using the
Controller Tools > Options > Monitors dialog.
For more information on installing the Microsoft COM+ server add-in, refer to the HP LoadRunner
Installation Guide.
Configuring the Microsoft COM+ Monitor Over a Firewall
Before running the Microsoft COM+ Monitor over a firewall:
Page 1104 of 1812 HP LoadRunner (11.50)
User Guide
Controller l
Make sure that the MI Listener is installed on any machine (including the Controller machine) outside of the firewall. Refer to the HP LoadRunner Installation Guide for installation instructions.
l
Configure the firewall agent on the server machine. For details, see
"Working with Firewalls in
LoadRunner" on page 1016 .
l
Specify the correct connection string on the client machine. For details, see
"Add Machine
Dialog Box" on page 1048 .
Microsoft COM+ Performance Counters
The following tables describe the default counters that can be measured:
Authentication Metrics
Measurement Description
Authenticate
Frequency of successful method call level authentication. When you set an authentication level for an application, you determine what degree of authentication is performed when clients call into the application.
Authenticate
Failed
Frequency of failed method call level authentication.
Application Events
Measurement
Activation
Shutdown
Description
Frequency of application activation or startup.
Frequency of application shutdown or termination.
Thread Events
Measurement Description
Thread Start
Rate at which single-threaded apartment (STA) thread for application have been started.
Thread
Terminate
Rate at which single-threaded apartment (STA) thread for application have been terminated.
Work Enque
Event sent if a work is queued in single thread apartment object (STA). Note:
These events are not signaled/sent in Windows Server 2003 and later.
Work Reject
Event sent if a work is rejected from single thread apartment object (STA). Note:
These events are not signaled/sent in Windows Server 2003 and later.
Transaction Events
Measurement Description
Page 1105 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Transaction
Duration
Duration of COM+ transactions for selected application.
Transaction Start
Rate at which transactions have started.
Transaction
Prepared
Transaction
Aborted
Rate at which transactions have completed the prepare phase of the twophase protocol.
Rate at which transactions have been aborted.
Transaction
Commit
Rate at which transactions have completed the commit protocol.
Object Events
Measurement Description
Duration of object existence (from instantiation to destruction).
Object Life
Time
Object
Create
Object
Destroy
Rate at which new instances of this object are created.
Rate at which instances of the object are destroyed.
Object
Activate
Object
Deactivation
Disable
Commit
Rate of retrieving instances of a new JIT-activated object.
Rate of freeing JIT-activated object via SetComplete or SetAbort.
Enable
Commit
Set
Complete
Set Abort
Rate of client calls to DisableCommit on a context. DisableCommit declares that the object's transactional updates are inconsistent and can't be committed in their present state.
Rate of client calls to EnableCommit on a context. EnableCommit declares that the current object's work is not necessarily finished, but that its transactional updates are consistent and could be committed in their present form.
Rate of client calls to SetComplete on a context. SetComplete declares that the transaction in which the object is executing can be committed, and that the object should be deactivated on returning from the currently executing method call.
Rate of client calls to SetAbort on a context. SetAbort declares that the transaction in which the object is executing must be aborted, and that the object should be deactivated on returning from the currently executing method call.
Page 1106 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Method Events
Measurement Description
Method Duration
Average duration of method.
Frequency of method invocation.
Method
Frequency
Method Failed
Method
Exceptions
Frequency of failed methods (i.e. methods that return error HRESULT codes).
Frequency of exceptions thrown by selected method.
Application Deployment Solution Monitoring
Application Deployment Solution Monitoring Overview
Using LoadRunner's Application Deployment Solution monitor, you can isolate server performance bottlenecks by monitoring the Citrix server during a scenario run.
LoadRunner's Citrix monitor provides you with information about the application deployment usage of the Citrix server during scenario execution. The Citrix monitor allows you to monitor the server performance statistics from Citrix servers. You can monitor multiple parameters (counters) with a single monitor instance. This allows you to watch server loading for performance, availability, and capacity planning.
To obtain performance data, you need to activate the online monitor for the server and specify which resources you want to measure before executing the scenario.
How to Set up the Citrix Monitoring Environment
This task describes the working order for setting up the monitoring environment.
1. Prerequisites n
Make sure that Citrix Server has been installed and is running.
n
If Citrix Server machine is running Windows 2000, make sure that the server machine is also running the Remote Registry service.
n
Make sure that the LoadRunner machine has administrator privileges to access the Citrix server.
n
Measurements that monitor instances are valid for the currently running Citrix session only.
If you run this test again, you will need to reconfigure the measurements that are instanceoriented.
Page 1107 of 1812 HP LoadRunner (11.50)
User Guide
Controller
To monitor the different instances, ensure that the server login and logout procedures are recorded in the Vuser_init and Vuser_end sections respectively, and not in the Action section of the script. For more information, see the HP Virtual User Generator User Guide.
2. Map the Network Drive
From the Controller machine, map a network drive to the Citrix server machine. This ensures that the required authentication is provided to the Controller to access the resource counters.
3. Launch PerfMon
Launch PerfMon from the Controller machine to enable the counters on the Citrix server. This allows you to monitor the same counters for the ICA Session object on the Citrix monitor.
4. Open the Connection with the Citrix Server
You can configure the Citrix monitor to view ICA Session object counters only if at least one session is being run on the Citrix server. If no "real" user has opened a connection with the
Citrix server, you need to first initialize or run a Citrix Vuser against the server, and only then configure the Citrix Monitor and add the ICA Session counters. If you configure the Citrix monitor without first initializing or running a Citrix Vuser (or connecting to the Citrix server as a
"real" user), you will not be able to view the ICA Session object.
5. Configure the Citrix monitor from the Controller
For task details, see
"How to Set Up the Monitoring Environment – Workflow" on page 1044
.
Citrix MetaFrame Performance Counters
The following sections describe some of the counters that can be measured.
l
"Citrix MetaFrame Performance Counters" above
l
"Citrix MetaFrame Performance Counters" above
Non-Virtual Counters
The following table describes non-virtual counters:
Measurement Description
% Disk Time
The percentage of elapsed time that the selected disk drive services read or write requests.
% Processor
Time
The percentage of time that the processor executes a non-Idle thread. This counter is a primary indicator of processor activity. It is calculated by measuring the time that the processor spends executing the thread of the Idle process in each sample interval, and subtracting that value from 100%. (Each processor has an Idle thread which consumes cycles when no other threads are ready to run.) It can be viewed as the percentage of the sample interval spent doing useful work. This counter displays the average percentage of busy time observed during the sample interval. It is calculated by monitoring the time the service was inactive, and then subtracting that value from 100%.
Page 1108 of 1812 HP LoadRunner (11.50)
User Guide
Controller
File data
Operations/sec
The rate that the computer issues Read and Write operations to file system devices. This does not include File Control Operations.
Interrupts/sec
The average number of hardware interrupts the processor receives and services per second. It does not include DPCs, which are counted separately.
This value is an indirect indicator of the activity of devices that generate interrupts, such as the system clock, the mouse, disk drivers, data communication lines, network interface cards and other peripheral devices.
These devices normally interrupt the processor when they have completed a task or require attention. Normal thread execution is suspended during interrupts. Most system clocks interrupt the processor every 10 milliseconds, creating a background of interrupt activity. This counter displays the difference between the values observed in the last two samples, divided by the duration of the sample interval.
This value represents the line speed from server to client for a session in bps.
Output
Session Line
Speed
Input Session
Line Speed
This value represents the line speed from client to server for a session in bps.
Page
Faults/sec
Pages/sec
Pool
Nonpaged
Bytes
A count of the Page Faults in the processor. A page fault occurs when a process refers to a virtual memory page that is not in its Working Set in main memory. A Page Fault will not cause the page to be fetched from disk if that page is on the standby list, and hence already in main memory, or if it is in use by another process with whom the page is shared.
The number of pages read from the disk or written to the disk to resolve memory references to pages that were not in memory at the time of the reference. This is the sum of Pages Input/sec and Pages Output/sec. This counter includes paging traffic on behalf of the system Cache to access file data for applications. This value also includes the pages to/from non-cached mapped memory files. This is the primary counter to observe if you are concerned about excessive memory pressure (that is, thrashing), and the excessive paging that may result.
The number of bytes in the Nonpaged Pool, a system memory area where space is acquired by operating system components as they accomplish their appointed tasks. Nonpaged Pool pages cannot be paged out to the paging file, but instead remain in main memory as long as they are allocated.
Private Bytes
The current number of bytes this process has allocated that cannot be shared with other processes.
Processor
Queue Length
The instantaneous length of the processor queue in units of threads. This counter is always 0 unless you are also monitoring a thread counter. All processors use a single queue in which threads wait for processor cycles.
This length does not include the threads that are currently executing. A sustained processor queue length greater than two generally indicates processor congestion. This is an instantaneous count, not an average over the time interval.
Page 1109 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Threads
The number of threads in the computer at the time of data collection. Notice that this is an instantaneous count, not an average over the time interval. A thread is the basic executable entity that can execute instructions in a processor.
This value represents the average client latency over the life of a session.
Latency –
Session
Average
Latency – Last
Recorded
This value represents the last recorded latency measurement for this session.
Latency –
Session
Deviation
Input Session
Bandwidth
This value represents the difference between the minimum and maximum measured values for a session.
Input Session
Compression
Output
Session
Bandwidth
Output
Session
Compression
Output
Session
Linespeed
This value represents the bandwidth from client to server traffic for a session in bps.
This value represents the compression ratio for client to server traffic for a session.
This value represents the bandwidth from server to client traffic for a session in bps.
This value represents the compression ratio for server to client traffic for a session.
This value represents the line speed from server to client for a session in bps.
Virtual Channel Counters
The following table describes virtual channel counters:
Measurement
Input Audio
Bandwidth
Input Clipboard
Bandwidth
Input COM1
Bandwidth
Input COM2
Bandwidth
Input COM
Description
This value represents the bandwidth from client to server traffic on the audio mapping channel. This is measured in bps.
This value represents the bandwidth from client to server traffic on the clipboard mapping channel. This is measured in bps.
This value represents the bandwidth from client to server traffic on the
COM1 channel. This is measured in bps.
This value represents the bandwidth from client to server traffic on the
COM2 channel. This is measured in bps.
This value represents the bandwidth from client to server traffic on the
Page 1110 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Bandwidth
Input Control
Channel
Bandwidth
Input Drive
Bandwidth
COM channel. This is measured in bps.
This value represents the bandwidth from client to server traffic on the ICA control channel. This is measured in bps.
Input Font Data
Bandwidth
Input Licensing
Bandwidth
Input LPT1
Bandwidth
Input LPT2
Bandwidth
This value represents the bandwidth from client to server traffic on the client drive mapping channel. This is measured in bps.
This value represents the bandwidth from client to server traffic on the local text echo font and keyboard layout channel. This is measured in bps.
This value represents the bandwidth from server to client traffic on the licensing channel. This is measured in bps.
This value represents the bandwidth from client to server traffic on the
LPT1 channel. This is measured in bps.
This value represents the bandwidth from client to server traffic on the
LPT2 channel. This is measured in bps.
This value represents the bandwidth from client to server traffic on the client management channel. This is measured in bps.
Input
Management
Bandwidth
Input PN
Bandwidth
Input Printer
Bandwidth
Input Seamless
Bandwidth
Input Text Echo
Bandwidth
Input Thinwire
Bandwidth
This value represents the bandwidth from client to server traffic on the
Program Neighborhood channel. This is measured in bps.
This value represents the bandwidth from client to server traffic on the printer spooler channel. This is measured in bps.
This value represents the bandwidth from client to server traffic on the
Seamless channel. This is measured in bps.
This value represents the bandwidth from client to server traffic on the local text echo data channel. This is measured in bps.
This value represents the bandwidth from client to server traffic on the
Thinwire (graphics) channel. This is measured in bps.
Input
VideoFrame
Bandwidth
Output Audio
Bandwidth
This value represents the bandwidth from client to server traffic on the
VideoFrame channel. This is measured in bps.
This value represents the bandwidth from server to client traffic on the audio mapping channel. This is measured in bps.
Output Clipboard
Bandwidth
This value represents the bandwidth from server to client traffic on he clipboard mapping channel. This is measured in bps.
Output COM1
Bandwidth
Output COM2
This value represents the bandwidth from server to client traffic on the
COM1 channel. This is measured in bps.
This value represents the bandwidth from server to client traffic on the
Page 1111 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Bandwidth
Output COM
Bandwidth
COM2 channel. This is measured in bps.
This value represents the bandwidth from server to client traffic on the
COM channel. This is measured in bps.
This value represents the bandwidth from server to client traffic on the ICA control channel. This is measured in bps.
Output Control
Channel
Bandwidth
Output Drive
Bandwidth
This value represents the bandwidth from server to client traffic on the client drive channel. This is measured in bps.
Output Font Data
Bandwidth
This value represents the bandwidth from server to client traffic on the local text echo font and keyboard layout channel. This is measured in bps.
Output Licensing
Bandwidth
This value represents the bandwidth from server to client traffic on the licensing channel. This is measured in bps.
Output LPT1
Bandwidth
This value represents the bandwidth from server to client traffic on the
LPT1 channel. This is measured in bps.
Output LPT2
Bandwidth
Output
Management
Bandwidth
This value represents the bandwidth from server to client traffic on the
LPT2 channel. This is measured in bps.
This value represents the bandwidth from server to client traffic on the client management channel. This is measured in bps.
Output PN
Bandwidth
Output Printer
Bandwidth
This value represents the bandwidth from server to client traffic on the
Program Neighborhood channel. This is measured in bps.
This value represents the bandwidth from server to client traffic on the printer spooler channel. This is measured in bps.
Output Seamless
Bandwidth
This value represents the bandwidth from server to client traffic on the
Seamless channel. This is measured in bps.
Output Text Echo
Bandwidth
This value represents the bandwidth from server to client traffic on the local text echo data channel. This is measured in bps.
Output Thinwire
Bandwidth
Output
VideoFrame
Bandwidth
This value represents the bandwidth from server to client traffic on the
Thinwire (graphics) channel. This is measured in bps.
This value represents the bandwidth from server to client traffic on the
VideoFrame channel. This is measured in bps.
Citrix Monitor Dialog Box
This dialog box enables you to configure the measurements for the Citrix monitor.
Page 1112 of 1812 HP LoadRunner (11.50)
User Guide
Controller
To access
Right-click a graph > Add Measurements
Click Add in the Resource Measurements section of Citrix Monitor dialog.
Important information
Note: For Citrix monitoring, if the dialog box freezes after clicking Add, you may need to rebuild the localhost cache on the Citrix server machine.
Relevant tasks
"How to Set up the Citrix Monitoring Environment" on page 1107
See also
"How to Set Up the Monitoring Environment – Workflow" on page 1044
User interface elements are described below:
UI Element Description
Adds the selected measurement to the list of measurements in the
Measurements on <machine> section of the Citrix dialog box.
Counters
Instances
Object
Select a resource counter to monitor. Select multiple counters using the CTRL key. For a definition of each counter, click Explain.
If multiple instances of the selected counter are running, select one or more instances to monitor for the selected counter.
Select the object being monitored on the specified machine.
Middleware Performance Monitoring
Middleware Performance Monitoring Overview
A primary factor in a transaction's response time is the Middleware performance usage.
LoadRunner's Middleware Performance monitors provide you with information about the
Middleware performance usage of the Tuxedo and IBM WebSphere MQ servers during a scenario execution. To obtain performance data, you need to activate the online monitor for the server and specify which resources you want to measure before executing the scenario.
l
The Tuxedo monitor allows you to measure and view your Tuxedo server performance. It provides information about the host machine, workstation handler, and queue in a Tuxedo system. To run the Tuxedo monitor, you must install the Tuxedo client libraries on the machine you want to monitor.
l
The IBM WebSphere MQ monitor is used to monitor channel and queue performance counters on an IBM WebSphere MQ (version 5.x) Server.
The procedures for selecting monitor measurements and configuring the monitors vary according to server type. The following sections contain specific configuration instructions for each server type.
How to Set Up the Tuxedo Monitor
This task describes the working order for setting up the monitoring environment.
Page 1113 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Note: If Tuxedo 7.1 or higher is installed on the Controller machine, more than one Tuxedo application server can be monitored at a time. However, if Tuxedo 6.5 or below is installed on the Controller machine, only one Tuxedo application server can be monitored at a time.
1. Prerequisites
Ensure that a Tuxedo workstation client (not a native client) is installed on the Controller machine. Use a Tuxedo 6.x client if a Tuxedo 6.x server is used, and Tuxedo 7.1 or above client if a Tuxedo 7.1 or above server is used.
If you use a Tuxedo 6.5 or earlier server, you can still use a Tuxedo 7.1 or later client to monitor it, provided that you set the WSINTOPPRE71 environment variable to "yes".
Note: A Tuxedo workstation client communicates with the application server over the network, and is not required to run the Tuxedo application server on the same machine. A native client can only communicate with the Tuxedo application server if it is part of the relevant Tuxedo domain.
2. Define the Tuxedo Environment Variables
Define the Tuxedo environment variables on the Controller machine—set the TUXDIR variable to the Tuxedo installation folder (for example, V:\environ\32\Tuxedo8.0), and add the
Tuxedo bin folder to the PATH variable.
3. Check the Workstation Listener (WSL) Process
Ensure that the workstation listener (WSL) process is running. This enables the application server to accept requests from workstation clients.
The address and port number used to connect to the application server must match those dedicated to the WSL process.
Note: For information on configuring the WSL, refer to the BEA Tuxedo Website
4. Configure the Tuxedo monitor from the Controller
The first time you click Add to add a measurement in the Controller, you specify the Tuxedo server logon information. For user interface details, see
"Tuxedo Logon Dialog Box" on page
1121 .
For task details (beginning with step 2), see
"How to Set Up the Monitoring Environment –
Workflow" on page 1044 .
How to Set Up the IBM WebSphere MQ Monitor
This task describes how to configure the Controller and IBM WebSphere MQ machines:
1. Prerequisites
Ensure that an IBM WebSphere MQ Client Connection (version 5.21 only) is installed on the
Controller machine.
Page 1114 of 1812 HP LoadRunner (11.50)
User Guide
Controller
2. Configure the server environment to monitor events
The LoadRunner MQ Monitor retrieves event messages from two standard MQSeries queues only: n
SYSTEM.ADMIN.PERFM.EVENT – performance events, such as "queue depth high" n
SYSTEM.ADMIN.CHANNEL.EVENT – channel events, such as "channel stopped"
Events must be enabled for the queue manager (and in many cases, on the applicable object, as well). Performance events are enabled by setting attributes for the queue on the MQ
Server. Channel events are enabled by default, and cannot be disabled.
Note: The IBM WebSphere MQ monitor does not retrieve data from a queue manager after the queue manager has been restarted.
a. Run the following MQSC command:
ALTER QMGR PERFMEV(ENABLED)
.
b. Set the queue attributes. For a list of queue attributes,
"IBM WebSphere MQ Queue
Attributes" on page 1117 .
3. Add the monitored server to the Controller a. In the Controller Run view, click the IBM WebSphere MQ graph in the graph tree, and drag it into the right pane.
b. Right-click the graph and select Add Measurements, or click anywhere on the graph and select Monitors > Add Measurements. The IBM WebSphere MQ dialog box opens.
In the Monitored Server Machines section, click Add. The Add Machine dialog box opens.
c. The first time that you add measurements, enter the server name or IP address of the machine you want to monitor. The format of the server name is <machine name>:<port number>
. Select the platform on which the machine runs, and click OK.
d. In the Resource Measurements section of the IBM WebSphere MQ dialog box, click
Add.
4. Configure the IBM WebSphere MQ monitor
The IBM WebSphere MQ monitor connects to the IBM WebSphere MQ server (via the MQ
Client Connection installed on the Controller machine). In MQ Client environments, the client machine connects to an MQ Server instance, and uses the Server's resources as if they were local to the client machine.
n
Specify the connection information and measurements in the MQ Monitor Add
Measurements dialog. For user interface details,
IBM WebSphere MQ Performance Counters
The following tables list the available IBM WebSphere MQ monitor measurements:
Page 1115 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Queue Performance Counters
The following table describes the Queue Performance counters:
Measurement
Event - Queue Depth High
(events per second)
Event - Queue Depth Low
(events per second)
Event - Queue Full (events per second)
Description
An event triggered when the queue depth reaches the configured maximum depth.
An event triggered when the queue depth reaches the configured minimum depth.
An event triggered when an attempt is made to put a message on a queue that is full.
An event triggered when no messages are put to or retrieved from a queue within the timeout threshold.
Event - Queue Service
Interval High (events per second)
Event - Queue Service
Interval OK (events per second)
An event triggered when a message has been put to or retrieved from a queue within the timeout threshold.
Status - Current Depth
Current count of messages on a local queue. This measurement applies only to local queues of the monitored queue manager.
Status - Open Input Count
Current count of open input handles. Input handles are opened so that an application may "put" messages to a queue.
Status - Open Output Count
Current count of open output handles. Output handles are opened so that an application may "get" messages from a queue.
Channel Performance Counters
The following table describes the Channel Performance counters:
Measurement
Event -
Channel
Activated
(events per second)
Description
Event generated when a channel, waiting to become active but inhibited from doing so due to a shortage of queue manager channel slots, becomes active due to the sudden availability of a channel slot.
Event -
Channel Not
Activated
(events per second)
Event -
Channel
Started (events per second)
Event generated when a channel, attempts to become active but inhibited from doing so due to a shortage of queue manager channel slots.
Event generated when a channel is started.
Page 1116 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Event -
Channel
Stopped
(events per second)
Event -
Channel
Stopped by
User (events per second)
Status -
Channel State
Event generated when a channel is stopped, regardless of source of stoppage.
Event generated when a channel is stopped by a user.
Status -
Messages
Transferred
Status - Buffer
Received
Status - Buffer
Sent
Status - Bytes
Received
Status - Bytes
Sent
The current state of a channel. Channels pass through several states from stopped (inactive state) to running (fully active state). Channel states range from 0 (stopped) to 6 (running).
The count of messages that have been sent over the channel. If no traffic is occurring over the channel, this measurement will be zero. If the channel has not been started since the queue manager was started, no measurement will be available.
The count of buffers that have been received over the channel. If no traffic is occurring over the channel, this measurement will be zero. If the channel has not been started since the queue manager was started, no measurement will be available.
The count of buffers that have been sent over the channel. If no traffic is occurring over the channel, this measurement will be zero. If the channel has not been started since the queue manager was started, no measurement will be available.
The count of bytes that have been received over the channel. If no traffic is occurring over the channel, this measurement will appear as zero. If the channel has not been started since the queue manager was started, no measurement will be available.
The count of bytes that have been sent over the channel. If no traffic is occurring over the channel, this measurement will appear as zero. If the channel has not been started since the queue manager was started, no measurement will be available.
IBM WebSphere MQ Queue Attributes
You set the following queue attributes using the MQSC command ALTER QMGR
PERFMEV(ENABLED):
Measurement Set Event Attributes
Page 1117 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Event -
Queue Depth
High
Event -
Queue Depth
Low
To enable the event for a queue, the following attributes of the queue must be set: l
QDEPTHLO(integer) - where integer is a value expressed as a percentage of maximum messages allowed, and is in the range of 0 to 100 inclusive.
l
QDPLOEV(action) - where action is the word "ENABLED" or "DISABLED", enabling or disabling the generation of the event, respectively.
Event -
Queue Full
l
QDEPTHHI(integer) - where integer is a value expressed as a percentage of maximum messages allowed, and is in the range of 0 to 100 inclusive.
l
QDPHIEV(action) - where action is the word "ENABLED" or "DISABLED", enabling or disabling the generation of the event, respectively.
l
QDEPTHHI(integer) – where integer is a value expressed as a percentage of maximum messages allowed, and is in the range of 0 to 100 inclusive.
l
QDPMAXEV(action) – where action is the word "ENABLED" or
"DISABLED", enabling or disabling the generation of the event, respectively.
Event -
Queue
Service
Interval High
Event -
Queue
Service
Interval OK
l
QSVCINT(integer) – where integer is a value expressed as milliseconds, in the range of 0 and 999,999,999, inclusive. Note: this value is shared with
Queue Service Interval OK.
l
QSVCIEV(type) – where type is the word "HIGH", "OK", or "NONE", enabling service interval high events, enabling service interval ok events, or disabling the generation of the event, respectively.
l
QSVCINT(integer) – where integer is a value expressed as milliseconds, in the range of 0 and 999,999,999, inclusive. Note: this value is shared with
Queue Service Interval High.
l
QSVCIEV(type) – where type is the word "HIGH", "OK", or "NONE", enabling service interval high events, enabling service interval ok events, or disabling the generation of the event, respectively.
Tuxedo Performance Counters
The following table lists the available Tuxedo monitor measurements. It is recommended to pay particular attention to the following measurements: % Busy Clients, Active Clients, Busy Clients,
Idle Clients, and all the queue counters for relevant queues:
Monitor Measurements
Page 1118 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Machine
Queue
Server
% Busy Clients - The percent of active clients currently logged in to the Tuxedo application server that are waiting for a response from the application server.
Active Clients - The total number of active clients currently logged in to the
Tuxedo application server.
Busy Clients - The total number of active clients currently logged in to the
Tuxedo application server that are waiting for a response from the application server.
Current Accessers - The number of clients and servers currently accessing the application either directly on this machine or through a workstation handler on this machine.
Current Transactions - The number of in-use transaction table entries on this machine.
Idle Clients - The total number of active clients currently logged in to the Tuxedo application server that are not waiting for a response from the application server.
Workload Completed/second - The total workload on all the servers for the machine that was completed, per unit time.
Workload Initiated/second - The total workload on all the servers for the machine that was initiated, per unit time.
% Busy Servers - The percent of active servers currently handling Tuxedo requests.
Active Servers - The total number of active servers either handling or waiting to handle Tuxedo requests.
Busy Servers - The total number of active servers currently busy handling
Tuxedo requests.
Idle Servers - The total number of active servers currently waiting to handle
Tuxedo requests.
Number Queued - The total number of messages which have been placed on the queue.
Requests/second -The number of server requests handled per second
Workload/second - Workload is a weighted measure of the server requests.
Some requests could have a different weight than others. By default, the workload is always 50 times the number of requests.
Page 1119 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Workstation
Handler
(WSH)
Bytes Received/sec - The total number of bytes received by the workstation handler, per second.
Bytes Sent/sec - The total number of bytes sent back to the clients by the workstation handler, per second.
Messages Received/sec - The number of messages received by the workstation handler, per second.
Messages Sent/sec - The number of messages sent back to the clients by the workstation handler, per second.
Number of Queue Blocks/sec - The number of times the queue for the workstation handler blocked, per second. This gives an idea of how often the workstation handler was overloaded.
Tuxedo tpinit.ini File
The tpinit.ini file is saved in the recorded script's folder. It contains information for connecting the
Tuxedo monitor to the server. The client logon information is located in the Logon section of the tpinit.ini file.
In the following example of a tpinit.ini file, the Tuxedo monitor was configured for a server named psft1 using port 7000, and a client named bankapp. The logon user name was PS and the password was PS.
[Logon]
LogonServername=//psft1:7000
LogonUsrName=PS
LogonCltName=bankapp
LogonGrpName=
LogonPasswd=PS
LogonData=
MQ Monitor Add Measurements Dialog Box
This dialog box enables you to configure the monitor by choosing which measurements to monitor on the machine.
To access
Right-click a graph > Add Measurements
Click Add in the Resource Measurements section of the IBM
WebSphere MQ dialog.
User entries for any text box are limited to 48 characters.
Important information
Relevant tasks
See also
"How to Set Up the IBM WebSphere MQ Monitor" on page 1114
"IBM WebSphere MQ Performance Counters" on page 1115
User interface elements are described below:
Page 1120 of 1812 HP LoadRunner (11.50)
User Guide
Controller
UI Element
Alternate
Queue
Description
If the event configured for monitoring is from a remote queue manager (other than the one identified in the queue manager field of the IBM WebSphere MQ
Add Measurements dialog box), click Alternate Queue to enter the name of an alternate queue manager.
Note: When you add an alternate queue manager, this becomes the default queue manager for any events that you subsequently add. To return to the queue manager to which you are connected, enter that name in the Alternate
Queue Manager dialog box.
Available
Measurements
Object Type.Select an object type from either Channel or Queue.
Object Name. Enter a name for object you want to monitor.
Event/Attribute. Select the events and attributes you want to monitor for the selected object.
Filter System Objects. Select to enable the system objects filter.
Add Object. Enables you to add a new object name to the Object name list.
Add. Enables you to add an Event or Attribute to an object.
Remove. Enables you to remove a monitored object event or attribute from the
Object name list.
Alternate Queue. Enter the name of an alternate queue manager if the event is from a remote queue manager.
Connections
Information
Filter system objects
Monitored
Object list
Server. The name of the server you are monitoring.
Client Channel. Enter the name of the channel through which a client connection is made to an MQ Server.
l
Note: You can set up a specific channel on an MQ Server instance, or use the default "SYSTEM.DEF.SVRCONN" channel. If the client channel is undefined, the MQ Server will be inaccessible via client connections (the
MQ Monitor will not work, as it will not be able to connect to the queue manager which it is supposed to monitor).
Queue Manager. Enter the name of the queue manager to be monitored.
l
Note: The monitor is not restricted to monitoring only the queue manager to which it is connected. You can configure multiple queue managers to write to the event queue of a central queue manager for centralized monitoring
(this applies to Events only, not polled object attributes). All events contain a queue manager attribute identifying their source.
l
Note: A queue manager can only be accessed by one Controller or monitoring application at any one time.
By default, only user-defined objects are displayed in the Object name list. To show all objects, clear the Filter System Objects check box. You can modify the filter settings, in the <LoadRunner_
installation>\dat\monitors\mqseries.cfg file.
A list of monitored objects, including the object's name, events and attributes, and alternate queue manager.
Tuxedo Logon Dialog Box
This dialog box configures the connection information for the Tuxedo server.
Page 1121 of 1812 HP LoadRunner (11.50)
User Guide
Controller
To access
Right-click the Tuxedo graph and select Add Measurements.
This dialog appears only when you add measurements for the first time.
Important information
If you are using Tuxedo 6.5 or below, the monitor can only connect to one application server during a scenario. Once it connects to an application server, the server is the only one used by the monitor until the Controller is closed. This applies even when all of the counters are deleted from the monitor.
Relevant tasks
"How to Set Up the Tuxedo Monitor" on page 1113
"How to Set Up the Monitoring Environment – Workflow" on page 1044
User interface elements are described below:
UI Element Description
Enables you to navigate to the tpinit.ini file of a recorded Tuxedo script. It is recommended that you use the Browse button and select the tpinit.ini file from a recorded script, rather than enter the values manually. For more information, see
"Tuxedo tpinit.ini File" on page 1120 .
Advanced
To authenticate the Tuxedo monitor, click Advanced, and enter the authentication data as a hexadecimal string (beginning with "0x") in the data box. The authentication data value can be obtained from the tpinit.ini file of an existing Tuxedo script.
Login Name
The user login name to access the Tuxedo server.
Note: You can determine the client name from the lrt_tpinitialize statement in the recorded script
Password
The user password to access the Tuxedo server
Server Name
Enter the name of the server. The format of the server name is //<machine
name>:<port number>. Alternatively, you can specify the IP address or the hexadecimal format used by old versions of Tuxedo.
Note: You cannot use quotation marks.
Client Name
Enter the name of the client machine. If a Tuxedo server was previously monitored, its name is displayed in the Server Name box.
Infrastructure Resources Monitoring
Infrastructure Resources Monitoring Overview
Using LoadRunner's Network Client monitor, you can monitor network client resources for FTP,
POP3, SMTP, IMAP, and DNS Vusers during a scenario run and isolate client performance bottlenecks.
Activating the Network Client Monitor
The Network Client online monitor graph is only available during scenarios that run relevant scripts, such as FTP, POP3, and so forth.
Page 1122 of 1812 HP LoadRunner (11.50)
User Guide
Controller
You can view this graph by dragging it from the Infrastructure Resources Graph section in the graph tree into the right pane of the Run view. The graph appears in the graph view area.
Network Client Performance Counters
The following table describes the Network Client measurements that are monitored:
Measurement
Pings per sec
Data transfer bytes per sec
Data receive bytes per sec
Connections per sec
Accept connections per sec
SSL Connections per sec
SSL Data transfer bytes per sec
SSL Data receive bytes per sec
SSL Accept connections per sec
Description
Number of pings per second
Number of data bytes transferred per second
Number of data bytes received per second
Number of connections per second
Number of connections accepted per seconds
Number of SSL connections per second
Number of SSL data bytes transferred per second
Number of SSL data bytes received per second
Number of SSL connections accepted per seconds
Service Virtualization Integration
HP Service Virtualization Integration - Overview
Some business processes contain services that are not available. For example, your business process might include a service that is in development or incurs a cost, such as processing a credit card through a third-party vendor. To facilitate load testing these business processes, LoadRunner
Controller integrates with HP Service Virtualization. This integration allows you to run virtual services that simulate actual services. By using a virtual service, you can load test and replace actual services with a simulated services that mirror both the
data model
1 and the
performance model
2
.
For details on creating virtualized services, see the HP Service Virtualization User Guide.
The workflow below explains how HP Service Virtualization integrates with LoadRunner processes:
1
Definition of the data that is sent by the service to the server and the expected response. You can define several data models for one service.
2
Definition of the expected performance, such as reponse time, of the service.
Page 1123 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Page 1124 of 1812 HP LoadRunner (11.50)
User Guide
Controller
For details, see
"How to Use Service Virtualization when Designing Scenarios" on page 1127
"Service Virtualization Monitoring Overview" below
" Service Virtualization User Interface" on page 1129
Virtual Service Locks
When your scenario contains virtualized services, these services are automatically locked and cannot be used by other users while the scenario is running. Virtualized services may locked by you or other users for editing, simulation,or deployment.
l
If your scenario includes a service that has been locked by an other user, start run will fail and an error message appears in the output window.
l
If your scenario is running and you update the scenario to include a service that has been locked by another user, the scenario continues running; however, an error message appears in the output window.
Service Virtualization Monitoring Overview
The HP Service Virtualization monitors enable you to analyze the status and performance of the simulated services during the load test run.
For example, you may integrate a payment process service containing the following services and operations into your script:
Type
Service
Operation
Operation
Operation
Example Name
CreditServ
CreditServ.PurchaseRequest
CreditServ.AuthorizationRequest
CreditServ.AuthorizationApproval
Example Description
Process online credit card payments
Cardholder requests product/service
Merchant request authorization for payment
Credit card company authorizes or denies payment
The online monitors measure the overall behavior of the service and each operation. The following flowchart illustrates using a service and operations for credit card payment.
Page 1125 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Monitor
Operations
Measurements
Average Response
Time
Hit Rate
Description
Average response time of virtual service in milliseconds.
Throughput
Number of requests per second of the virtual service operation.
Data sent and received by virtual service operation measured in megabytes.
Page 1126 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Monitor
Services
Measurements
Average Response
Time
Data Simulation
Accuracy
Hit Rate
Performance
Simulation Accuracy
Throughput
Description
Average response time of virtual service in milliseconds.
Accuracy of data model emulation on virtual service, displayed as a percentage.
The number of requests per second of the virtual service.
Accuracy of performance model emulation on virtual service, displayed as a percentage.
Data sent and received on virtual service measured in megabytes.
How to Use Service Virtualization when Designing
Scenarios
As part of your load test, you may want to test services which are a part of your business scenario.
Instead of loading actual services, you can use simulated services in your test run. The virtualized services are a simulation of actual services.
Using simulated services in your test is helpful if using actual services involves an additional cost or requires the service of an application that is under development or inaccessible at the time when you run your scenario test.
When designing a goal-oriented scenario, you can load virtual services to run with your load test.
You can open the Service Virtualization dialog box from the Design tab of a Manual or Goal-
Oriented Scenario. The task describes how to load services to your test run.
In the task Controller User Guide > Controller > Designing Load Test Scenarios >
Designing Scenarios > How to Design a Manual Scenario, after the step, Define a schedule
for the scenario, or
In the task Controller User Guide > Controller > Designing Load Test Scenarios >
Designing Scenarios > How to Design a Goal-Oriented Scenario, after the step, Assign each
script a percentage of the total scenario target,
do the following:
Prerequisites
l
If your script requires the service to be running while you record your business process, open HP
Service Virtualization simultaneously and deploy the virtualized service. Record the script as usual.
l
There are two scenarios in which you may want to instruct your application to use a virtual service in place of the actual service:
Page 1127 of 1812 HP LoadRunner (11.50)
User Guide
Controller
1. Application components that use the service are embedded in the code or in a configuration file. In this case, you will need to update the code in your application or update the configuration file to point to the new URL.
Examples:
A .NET Desktop application uses a web service, and the url is set using a constant: stringURL = http://hp.com
Service or back-end component uses the web service and the URL is configured in the app.config file.
2. The service is consumed by accessing UDDI or other registry component(Systinet) and the
URL is retrieved at run-time . In this case, you will need to update the end point URL in
UDDI/Systinet.
Create a Load Test in Controller
1. In the Design tab, click the Service Virtualization button
2. In the Service Virtualization dialog box click Add Project.
.
3. In the Add Project dialog box, search and select for the relevant project containing the simulated services you want to run with your load test.
4. Click the Simulate checkbox of the service you want to run.
5. For each selected service, select the relevant Data model and Performance model to associate with the virtual service. In the
"How to Use Service Virtualization when Designing
Scenarios" on previous page , we used credit card processing as an example of a virtual
service. In this case, possible data models could be the requests and responses for Visa,
MasterCard or PayPal and possible performance models could be peak and slow.
6. In the Simulation Server cell for the selected service, verify that the address of the simulation server is correct. If necessary, you can change the address of the simulation server.
7. Click the Check Deployment button to load the services. One of the following statuses are displayed:
Green X - indicates the service is deployed
Red X - indicates the service is not deployed
Note. The virtual service must be loaded on the simulation server to be able to deploy the service as part of your load test in Controller.
8. Optional - Select Set all simulated services to standby -ignore all calls to all simulated
services to ignore all of the Performance model and Data model settings configured for each service.
Run a Load Test In Controller
You can stop, start, or load a new project during your load test run.
The following task describes how to update services during your load test run.
1. In the Run tab, in the Scenario Status pane, click the status (ON or OFF). link for the Service
Virtualization to open the Service Virtualization dialog box.
Page 1128 of 1812 HP LoadRunner (11.50)
User Guide
Controller
2. In the Service Virtualization dialog box, select the Simulate check box of the service you want to stop or start.
3. Click Add Project to load the project containing the virutalized services to run with your load test.
Note: If you are using a service that can be accessed by other machines, the service is locked until it is not deployed on the machine on which you are running the load test.
View Online Monitors
For details, see
"Service Virtualization Monitoring Overview" on page 1125
Service Virtualization User Interface
The Service Virtualization user interface provides integration with HP Service Virtualization designer. This integration allows you to test services with virtualized servers instead of real-time services..
To access
Click the Virtualized Service Settings button from the Controller toolbar.
Relevant tasks
"How to Use Service Virtualization when Designing Scenarios" on page 1127
User interface elements are described below(unlabeled elements are shown in angle brackets):
UI Element Description
Set all simulated services to standby -ignore all calls to all simulated services.
Ignores calls to the virtual services.
Page 1129 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Add Project
Delete Project
Check Deployment
<Virtualization services>
Opens the Add Project dialog box, enabling you to specify or browse for an HP Service Virtualization project. Project files have a .vproj extension.
Remove the selected project from the list of virtualized services.
Checks if the virtual service was deployed (started) on the virtualization server.
Lists the virtualized services displaying the following information: l
Simulate.A check box indicating if the virtual service will be included in the test.
l
Project Name. The name of the HP Service Virtualization project containing the virtual service.
l
Service Name. The name of the virtual service to use during test execution.
l
Data Model. The defined set of data sent from the client
(request) to the application server and the expected data sent back to the client (response).
l
Performance Model.The model that defines how fast the response and request are processed.
l
Emulation Server. The machine used for emulating the virtual service. If the value was configured on the server machine as localhost, make sure to change it to the actual server name.
l
Deployed. An indicator showing the deployment status: n
Unknown Status. Click Check Deployment to check the status.
n
Deployed. Successfully deployed.
n
Not Deployed. The service is not deployed on the specified emulation server.
Appendixes
Add Tuxedo Measurements Dialog Box
This dialog box allows you to select the resources to monitor on the Tuxedo client.
To access
Right-click a graph > Add Measurements
Click Add in the Resource Measurements section of
Tuxedo dialog.
Page 1130 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Relevant tasks
"How to Set Up the Monitoring Environment – Workflow" on page 1044
"Tuxedo Performance Counters" on page 1118
See also
User interface elements are described below:
UI Element Description
Counters
Instances
Object
Adds the selected measurement to the list of measurements in the
Measurements on <machine> section of the Tuxedo dialog box.
Select a resource counter to monitor. Select multiple counters using the CTRL key. For a definition of each counter, click Explain.
If multiple instances of the selected counter are running, select one or more instances to monitor for the selected counter.
Select the object being monitored on the specified machine.
Secure Host Communication
Secure Host Communication Overview
The need to secure communication channels from hackers attacking the corporate networks is critical. Securing communication channels ensures confidentiality, integrity, and the user's authenticity within the scope of the load testing application.
Secure communication is established between the Controller and load generator hosts using a
security key. Each host in the system must be set up with the identical security key. If security keys on the hosts do not match, secure communication cannot be established.
A host is in secure mode when it has a security key and security is enforced.
A host is in non-secure mode:
Page 1131 of 1812 HP LoadRunner (11.50)
User Guide
Controller l
If it has no security key l
If it has a security key but security is not enforced
When a host in secure mode tries to communicate with a host in non-secure mode, security is automatically enforced on the non-secure host—assuming their security keys match—allowing secure communication to be established.
Note:
l
When you run a scenario, if secure communication cannot be established between a secure host (Controller or load generator) and another host participating in the scenario run, the scenario cannot run.
l
By definition, non-secure hosts can communicate with each other and participate in scenario runs over non-secure channels.
This can be summarized in the following table:
Security keys match
Security keys do not match
Both Hosts in
Secure Mode
Scenario runs over secure channel
Security Mode on
Hosts Differ
Scenario runs over secure channel
Both Hosts in Non-
Secure Mode
Scenario runs over nonsecure channel
Scenario does not run Scenario does not run Scenario runs over nonsecure channel
Host Security Configuration
When you install the hosts (Controllers and load generators), by default no security settings are defined on them, and communication channels between the hosts are not secure. To enforce secure communication between the hosts, you must configure security settings on each host machine immediately after installing the hosts.
When configuring these settings for the first time, to avoid configuration over non-secure channels, we recommend setting the security on each host locally using the Host Security Setup utility. For details, see
"How to Configure Security Settings Locally on Hosts" on page 1134 .
After initial security configuration, you can update security settings locally or simultaneously across all the hosts in the LoadRunner system from a remote location using the
HP Host Security Manager utility. This utility is installed on the same machine as the Controller.
For details, see
"How to Update Host Security Settings Remotely" on page 1136
.
Remote Security Configuration
You can align security settings across all the hosts in LoadRunner simultaneously from a remote location using HP Host Security Manager.
The utility lists all the hosts in LoadRunner, as well as the MI Listeners required to connect to the hosts that are over a firewall, where applicable.
Page 1132 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Using Host Security Manager, you can update the security key on all the hosts, or update the security mode on selected hosts. For details, see
"How to Update Host Security Settings
Remotely" on page 1136 .
Master Security Key
To update security settings on the hosts, Host Security Manager uses a master key that matches the security keys on all the hosts. This enables secure communication between
Host Security Manager and the hosts for the purpose of remotely updating the security settings.
If the master key and security key on a particular host do not match, Host Security Manager cannot update security settings on that host.
When you open Host Security Manager for the first time, you are prompted for a key.
Host Security Manager stores this key as a master key for secure communication with the hosts. If you do not enter the key at this point, you are prompted for it again when you try to update the security settings.
Considerations for Updating Linux Load Generators l
Linux load generators that use rsh (remote shell) to connect to the Controller cannot be updated using Host Security Manager. To update security settings on such load generators, use the local
Host Security Setup utility. See
"How to Configure Security Settings Locally on Hosts" on next page
for Linux load generators on
"How to Configure Security Settings Locally on Hosts" on next
Page 1133 of 1812 HP LoadRunner (11.50)
User Guide
Controller
page .
l
To update security settings on a Linux load generator using Host Security Manager, you must launch the load generator daemon for a user and manually grant write permissions to the user on
<installation folder>/config.
Host Security Best Practices
l
To avoid sending security settings over a non-secure channel, perform initial configuration of the security settings on each host locally (see
"How to Configure Security Settings Locally on
Hosts" below ).
l
Security settings should be changed once a month.
l
Security settings can be updated: n
Manually on each host n
Remotely on all hosts simultaneously using the Host Security Manager utility
If, when using the Host Security Manager utility, updating a host's settings fails, update the settings manually.
How to Configure Security Settings Locally on Hosts
This task describes how to configure security settings locally on Controllers and load generators.
Windows Hosts
1. On the host, launch the Host Security Setup utility (Start > All Programs > LoadRunner >
Tools > Host Security Setup).
For user interface details, see
"Host Security Setup Dialog Box " on page 1139
.
2. Select a security mode for the host.
3. If you selected to enforce secure communication, enter a security key (6 - 16 characters).
Enter the key a second time for confirmation.
Linux Hosts
1. Log in as root user and change for tcsh.
2. Go to the /opt/HP/HP_LoadGenerator folder and type:
>source ./env.csh
3. Run SecurityKeyConsole.exe, located in <Installation_folder>/bin/ folder.
Page 1134 of 1812 HP LoadRunner (11.50)
User Guide
Controller
4. In the Console window, enter an option as follows: n
To change the security mode, enter 1.
n
To change the security key, enter 2.
5. If you are changing the security mode: n
To turn the security on, enter 1.
n
To turn the security on, enter 0.
6. If you are changing the security key, enter the new key. A valid key is 6 - 16 characters long.
How to Register Hosts in Host Security Manager
This task describes how to register hosts in Host Security Manager.
1. Add hosts to the Hosts list
In Host Security Manager (Start > All Programs > LoadRunner > Tools >
Host Security Manager), click Add Hosts.
Enter the names or IP addresses of the Controllers and load generators you want to add. When entering multiple hosts, separate entries by a comma.
For user interface details, see
"Add Hosts Dialog Box" on page 1137 .
2. For hosts over a firewall, specify the MI Listener
In the main Host Security Manager window: a. Select the host that is over the firewall. If other hosts over a firewall communicate through the same MI Listener, select these hosts as well to set the MI Listener for all of the hosts simultaneously.
Tip: To select multiple hosts, hold down the C
TRL key on your keyboard while selecting the relevant hosts.
b. Click Set MI Listener, and enter the name / IP address of the MI Listener that the host uses to communicate over the firewall.
Page 1135 of 1812 HP LoadRunner (11.50)
User Guide
Controller
How to Update Host Security Settings Remotely
This task describes how to use Host Security Manager to update security settings on the
LoadRunner hosts remotely, from the Controller.
Prerequisites l
Hosts to be updated must be registered in Host Security Manager. For details, see
"How to
Register Hosts in Host Security Manager " on previous page
.
l
Hosts in the Host Security Manager list that are not relevant must be deleted from the list.
l
Each host must have a security key defined on it, and all of the hosts' security keys must be identical.
l
Host Security Manager must have a master security key that is identical to the security key on all of the hosts. For details, see
"Remote Security Configuration " on page 1132 .
Update the security settings
1. Open Host Security Manager (Start > All Programs > LoadRunner > Tools >
Host Security Manager).
2. Update the desired security setting: n
Security key. Click Update Security Key, enter the new key, and enter it again for confirmation.
n
Security Mode. Select the hosts in the list that you want to update. To select multiple hosts, hold down the C
TRL key on your keyboard while selecting the relevant hosts. Click Update
Security Mode, and select a security mode.
3. Click Update.
Host Security Manager attempts to update the security setting on the hosts listed under Update
progress. As it attempts to update each host, it displays the update status, Updated or Failed, before attempting to update the next host.
If a host is not updated successfully, check for possible reasons. You can stop the update process by clicking Stop.
If there is a mismatch between Host Security Manager's master security key and the host's security key, the Update Error dialog box opens, prompting you for an appropriate action: n
Skip host. Skip updating this host.
n
Establish a secure channel using this key. Use a different security key to communicate securely with the host.
n
Communicate over non-secure channel. Update the security setting over a non-secure channel. This action is not recommended, especially when updating the host security to secure mode. You should rather update the security setting locally on the host (see
"How to
Configure Security Settings Locally on Hosts" on page 1134
).
To apply the selected action to all similar mismatches, select Use this solution with all
similar mismatches.
Page 1136 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Note: The security key update also updates Host Security Manager's master security key.
If the update fails on all the hosts, the Host Security Manager's master key is not updated.
Results
If the update was successful, Host Security Manager displays the time and status of the security key/mode update for each host.
Add Hosts Dialog Box
This window enables you to add hosts to the Hosts list in Host Security Manager.
To access
Start > All Programs > LoadRunner > Tools > Host Security Manager >
Add Hosts
"How to Register Hosts in Host Security Manager " on page 1135
Relevant tasks
User interface elements are described below:
UI Element Description
Adds the Controller and load generators to the list of hosts.
Controller (name or IP)
Load Generators (name or
IP), separated by commas
Enter the name or IP address of the Controller you want to register in Host Security Manager.
Note: You can enter more than one Controller at a time, separated by commas.
Enter the names or IP addresses of the load generator hosts you want to register in Host Security Manager.
Note: You can enter more than one load generator at a time, separated by commas.
Host Security Manager Window
This window enables you to update security settings remotely on all of the hosts in the load testing system.
To access
Start > All Programs > LoadRunner > Tools > Host Security Manager
Page 1137 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Important information
l
You must provide Host Security Manager with a master security key before you can update the security settings.
l
Every time you use Host Security Manager to update security settings, make sure that the list of hosts is up to date. Hosts that were added to the system must be added to the list, and those deleted, should be deleted from the list.
To add a host, see
"How to Register Hosts in Host Security Manager " on page
1135
.
To delete a host, select it and click Delete.
"How to Update Host Security Settings Remotely" on page 1136
Relevant tasks
See also
"Secure Host Communication Overview " on page 1131
User interface elements are described below (unlabeled elements are shown in angle brackets):
UI Element
<Hosts table>
Description
Opens the Add Hosts dialog box where you can register hosts in
Host Security Manager.
Enables you to delete hosts from the Hosts list in
Host Security Manager.
Enables you provide the name/IP address of the MI Listener that the host (or hosts) uses to communicate over the firewall.
Opens the Update Security Key dialog box where you can update the security key on all the hosts.
Opens the Update Security Mode dialog box where you can update the security mode on selected hosts.
Opens the Set Master Key dialog box where you update
Host Security Manager's master security key.
Opens the History dialog box where you can view the history of updates made to the hosts. The information displayed includes the date of the update, the operation (key/mode update), and the update status (Passed/Failed).
Displays the following information: l
Host Name/IP. The name or IP address of the host.
l
Host Type. The type of host: Controller / Load Generator.
l
MI Listener. When the host is over a firewall, the name of the MI
Listener through which the host communicates with the other hosts.
l
Last Key Update. The last time the security key was updated.
Page 1138 of 1812 HP LoadRunner (11.50)
User Guide
Controller l
Key Update Status. The status of the last security key update.
l
Last Security Mode Update. The last time the security mode was updated.
l
Security Mode Update Status. The status of the last security mode update.
Tip: You can sort the details on this page in ascending or descending order by clicking the heading of the column by which you want to sort.
Click the column heading again to reverse the sort order.
Host Security Setup Dialog Box
This dialog box enables you to update a host's security settings manually.
To access
On the Controller machine, select Start > All Programs > LoadRunner > Tools
> Host Security Setup
Important information
When configuring security settings on hosts for the first time, to avoid configuration over non-secure channels, it is recommended to configure security settings on each host locally using the Host Security Setup utility.
After initial security configuration, you can update security settings locally, or simultaneously across all the hosts in the LoadRunner system from the Controller using the HP Host Security Manager utility. For details, see
"Remote Security
Configuration " on page 1132
.
Relevant tasks
See also
"How to Configure Security Settings Locally on Hosts" on page 1134
(Windows)
"Host Security Configuration " on page 1132
User interface elements are described below:
UI
Element
Description
Select a security mode
Select one of the following security modes: l
Allow non-secure communication. Allows the host to communicate with other machines over a non-secure channel. (Default) l
Enforce secure communication. Enforces the host to communicate with other machines over a secure channel. If you select this option, you must provide the key (6 - 16 characters long) matching the security key on the other hosts with which it needs to communicate.
Update Security Key Dialog Box
This dialog box enables you to update the security key simultaneously on all the hosts.
Page 1139 of 1812 HP LoadRunner (11.50)
User Guide
Controller
To access
Important information
Host Security Manager > Update Security Key button
When you update the security key, the Host Security Manager's master security key is also updated.
If the update fails on all the hosts, the Host Security Manager's master key is not updated.
Relevant tasks
"How to Update Host Security Settings Remotely" on page 1136
User interface elements are described below:
UI Element Description
Updates the security key on all of the hosts.
Security Key/Confirm
Security Key
Update progress
Stops updating the hosts.
Enter the new security key to be updated on all of the hosts, and a second time for confirmation.
Note: The key must be 6 - 16 characters long.
Displays the hosts and their status during and after the update.
Update Security Mode Dialog Box
This dialog box enables you to update the security mode simultaneously on selected hosts.
To access
Relevant tasks
Host Security Manager > Update Security Mode button
"How to Update Host Security Settings Remotely" on page 1136
User interface elements are described below:
UI Element Description
Updates the security mode on the selected hosts.
Stops updating the hosts.
Secure mode
Select a security mode: l
Non-secure. Allows non-secure communication.
l
Secure. Enforces secure communication
Update progress
Displays the hosts, their previous status (if known), and their status during and after the update.
Troubleshooting and Limitations
This section describes troubleshooting for secure host communication.
Page 1140 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Cannot Run Scenario Over Secure Channels
Problem description: When you try to run a scenario over secure channels, the scenario cannot initialize because cannot connect to Controller or load generator.
Troubleshooting
Verify that the reason the scenario cannot run is because of a security key mismatch: try to run the same scenario with the same hosts from a local Controller.
If a Security Key Mismatch error is displayed in the error log, then the keys do not match and you need to align the security keys on all the host machines.
Scenario Run Fails. Load Generator Status is Changed to Resource Failure
Problem description: When trying to run a scenario over secure channels, the scenario fails to run and the load generator status changes to Resource Failure.
Troubleshooting
When trying to run a scenario over secure channels, if the security keys on the Controller and load generator do not match the scenario run fails, and the status of the load generators changes to
Resource Failure. To re-enable the load generators, manually reset the status on each affected load generator to Operational.
Controller Command Line Arguments
Controller Command Line Arguments Overview
When you invoke the Controller from the command line, you can pass arguments to instruct the
Controller how to behave. By passing arguments in the command line, you configure Controller scenario settings without the need to manually define them using the Controller UI.
When invoked, the Controller checks all of the received arguments and sets its start-up environment accordingly. If no arguments are passed, the Controller uses its default settings.
For example, you can instruct Controller to Connect to HP Application Lifecycle Management on start-up, save results to a folder other than the folder defined in the scenario, and invoke Analysis upon scenario termination.
For information on how to invoke the Controller from the command line, see
"Invoke the Controller from the Command Line " below .
For a list of rules relating to invoking the Controller from the command line, see
"Command Line
Arguments - Rules" on next page .
Invoke the Controller from the Command Line
This task describes how to invoke the Controller from the command line and enter command line arguments.
Page 1141 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Prerequisite
Before invoking the Controller from the command line, you should be familiar with the rules relating to command line arguments. For details, see
"Command Line Arguments - Rules" below .
Invoke the Controller from the command line and enter the desired command line arguments
Type wlrun in the command line, followed by the desired arguments.
Notes:
l l
The arguments are case sensitive.
Each argument should be preceded by a dash.
Example:
wlrun -TestPath C:\LoadRunner\scenario\Scenario.lrs -Run
Command Line Arguments - Rules
When you invoke the Controller from the command line, the following rules apply: l
If the Controller is invoked with no arguments in the command line, the Controller uses its default settings.
l
The Controller will always overwrite results.
l
The Controller will automatically terminate upon scenario termination and results will be collected. If you don't want the Controller to automatically terminate upon scenario termination, add the flag -DontClose to the command line.
l
The Controller launched through the command line behaves normally except when using the -
Run option. Using the -Run option, dialogs and message boxes that usually open and require the user to close them in a usual launch, do not open in a command line launch.
l
The Controller's settings are loaded from wlrun5.ini, located in Windows folder.
Application Lifecycle Management Arguments
These arguments define the LoadRunner integration with Application Lifecycle Management. For more information about the LoadRunner Application Lifecycle Management integration, see
"Managing Scenarios Using Application Lifecycle Management" on page 1012
.
ConnectToQC
QCServer
QCDB
Specifies whether the Controller should connect to ALM on startup (0/1 or
ON/OFF)
Application Lifecycle Management server name. Must be a machine where
Application Lifecycle Management is installed
Application Lifecycle Management database name. Use the format:
<Domain name>.<Project name>.
Page 1142 of 1812 HP LoadRunner (11.50)
User Guide
Controller
UserName
Password
TestPath
User name for connecting to Application Lifecycle Management
Password corresponding to the user name
Path to scenario in Application Lifecycle Management database. For example,
"[TD]\Subject\LoadRunner\Scenario1"
If path includes blank spaces, use quotation marks.
Test ID (used by ALM only)
TestId
ResultCleanName
For use with ResultCycle only. Example: "Res1"
ResultCycle
Application Lifecycle Management cycle. For example, "LR_60_SP1_
247
"
Note: The ResultCycle and ResultCleanNamearguments are required if you wish to store the results within the Application Lifecycle Management database.
Run Time Arguments
These arguments specify the run-time related scenario settings. For more information on scenario settings, see
"Before Running Your Scenario " on page 972 .
TestPath
Run
Path to the scenario, for example,
C:\LoadRunner\scenario\Scenario.lrs
This argument can also be used for a scenario residing in a Application
Lifecycle Management database. For example,
"[TD]\Subject\LoadRunner\Scenario1"
If the path includes blank spaces, use quotation marks.
Runs the scenario, dumps all output messages into res_dir\output.txt, and closes Controller
InvokeAnalysis
Instructs LoadRunner to invoke Analysis upon scenario termination. If this argument is not specified, LoadRunner uses the scenario default setting.
ResultName
Full results path. For example, "C:\Temp\Res_01"
ResultCleanName
Results name. For example, "Res_01"
ResultLocation
Results folder. For example, "C:\Temp"
Working with Digital Certificates
Digital Certificates Overview
A Digital Certificate is an electronic "credit card" that establishes your credentials when doing business or other transactions on the Web. It is issued by a Certification Authority (CA). It contains the IP address of the machine for which it was issued, a validation date, and the digital signature of the certificate-issuing authority.
Page 1143 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Using Digital Certificates with Firewalls
When the MI Listener sends its Public Key to the LoadRunner agent, it always sends its certificate as well (this is the server-side certificate). The LoadRunner agent can be configured to authenticate the certificate which it received, as described in
"Working with Firewalls in LoadRunner" on page
1016 .If the agent is configured to authenticate the certificate, it can verify whether the sender is
really the machine that it claims to be by: l
Comparing the certificate's IP address with the sender's IP address l
Checking the validation date l
Looking for the digital signature in its Certification Authorities list
The MI Listener may also require the LoadRunner agent to send a certificate at any point in the session. This is called the client-side certificate, as described in the MI Listener Configuration
Settings in
"Working with Firewalls in LoadRunner" on page 1016
. If the LoadRunner agent owns a certificate, it sends it to the MI Listener for the same authentication process. If the LoadRunner agent does not own a certificate, the communication might not be continued.
An SSL CA list and an SSL Certificate are included in each LoadRunner installation. This certificate is the same for all LoadRunner installations, which means that it can be obtained by third parties.
Therefore, if you are interested in a more secure process, you should create your own Certificate
Authority and include it in the list, and issue matching certificates for your machines.
Create and Use Digital Certificates
This task describes how to create a Certification Authority and a Digital Certificate.
1. Create a Certification Authority (CA)
Note: This step describes how to create a CA using the gen_ca_cert.exe utility. If you are working on a Linux platform, use the gen_ca_cert utility instead.
To create the CA, perform the following steps: a. Run the gen_ca_cert utility from the <LoadRunner root folder>
\launch_service\bin folder.
b. Run the gen_ca_certcommand with at least one of the following options: o
-country_name o
-organization name o
-common_name
This process creates two files in the folder from which the utility was run: the CA
Certificate (cacert.cer), and the CA Private Key (capvk.cer). To provide different file names, use the -CA_cert_file_name and the -CA_pk_file_name options respectively.
Page 1144 of 1812 HP LoadRunner (11.50)
User Guide
Controller
Note: By default, the CA is valid for three years from when it is generated. To change the validation dates, use the -nb_time (beginning of validity) and/or -na_time(end of validity) options.
The following example creates two files: ca_igloo_cert.cer and ca_igloo_pk.cer in the current folder: c. Install the CA using one of the following options: o
-install <name of certificate file>. Replaces any previous CA list and creates a new one that includes this CA only.
o
-install_add <name of certificate file>. Adds the new CA to the existing CA list.
Note: The -install and -install_add options install the certificate file only.
Keep the private key file in a safe place and use it only for issuing certificates.
2. Create a Digital Certificate
Note: This step describes how to create a digital certificate using the gen_cert.exe utility.
If you are working on a Linux platform, use the gen_cert utility instead.
To create a digital certificate, perform the following steps: a. Run the gen_cert utility from the <LoadRunner root folder>\launch_service\bin folder.
b. Run the gen_cert command with at least one of the following options: o
-country_name
o
-organization_name
o
-organization_unit_name
o
-eMail
o
-common_name
It is important to note the following: o
The CA Certificate and the CA Private Key files are necessary for the creation of the
Page 1145 of 1812 HP LoadRunner (11.50)
User Guide
Controller certificate. By default, it is assumed that they are in the current folder, and are named
cacert.cer and capvk.cer respectively. In any other case, use the -CA_cert_file_
nameand -CA_pk_file_name options to give the correct files and locations.
o
The certificate file is created in the folder from which the utility was run. By default, the file name is cert.cer. To provide a different name, use the -cert_file_name option.
Page 1146 of 1812 HP LoadRunner (11.50)
User Guide
Analysis
Analysis
Welcome to the HP LoadRunner Analysis User Guide. This guide describes how to use the
LoadRunner Analysis graphs and reports in order to analyze system performance.
You use Analysis after running a load test scenario in the HP LoadRunner Controller or HP
Performance Center.
HP LoadRunner, a tool for performance testing, stresses your entire application to isolate and identify potential client, network, and server bottlenecks.
HP Performance Center implements the capabilities of LoadRunner on an enterprise level.
Page 1147 of 1812 HP LoadRunner (11.50)
User Guide
Introduction to Analysis
Working with Analysis
Page 1148 of 1812 HP LoadRunner (11.50)
User Guide
Page 1149 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 8:
Analysis Overview
During load test scenario execution, Vusers generate result data as they perform their transactions.
To monitor the scenario performance during test execution, use the online monitoring tools described in the HP LoadRunner Controller User Guide. To view a summary of the results after test execution, you can use one or more of the following tools: l
The Vuser log files contain a full trace of the load test scenario run for each Vuser. These files are located in the scenario results folder. (When you run a Vuser script in standalone mode, these files are placed in the Vuser script folder.) For more information on Vuser log files, refer to the HP Virtual User Generator User Guide.
l
The Controller Output window displays information about the load test scenario run. If your scenario run fails, look for debug information in this window.
l
The Analysis graphs help you determine system performance and provide information about transactions and Vusers. You can compare multiple graphs by combining results from several load test scenarios or merging several graphs into one.
l
The Graph Data and Raw Data views display the actual data used to generate the graph in a spreadsheet format. You can copy this data into external spreadsheet applications for further processing.
l
The Report utilities enable you to view a Summary of each graph. A report automatically summarizes and displays the test's significant data in graphical and tabular format. You can generate reports based on customizable report templates.
Page 1150 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 8:
Page 1151 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 9:
Analysis Basics
This section describes basic concepts that will enhance your understanding of how to work with
Analysis.
Creating Analysis Sessions
When you run a load test scenario, data is stored in a result file with an .lrr extension. Analysis is the utility that processes the gathered result information and generates graphs and reports.
When you work with the Analysis utility, you work within a session. An Analysis session contains at least one set of scenario results (.lrr file). Analysis stores the display information and layout settings for the active graphs in a file with an .lra extension.
Starting Analysis
You can open Analysis as an independent application or directly from the Controller. To open
Analysis as an independent application, choose one of the following: l
Start > Programs > LoadRunner > Applications > Analysis l
Start > Programs > LoadRunner > LoadRunner, select the Load Testing tab, and then click
Analyze Load Tests.
To open Analysis directly from the Controller, select Results > Analyze Results. This option is only available after running a load test scenario. Analysis takes the latest result file from the current scenario, and opens a new session using these results. You can also instruct the Controller to automatically open Analysis after it completes scenario execution by selecting
Results > Auto Load Analysis.
Collating Execution Results
When you run a load test scenario, by default all Vuser information is stored locally on each Vuser host. After scenario execution, the results are automatically collated or consolidated—results from all of the hosts are transferred to the results folder. You disable automatic collation by choosing
Results > Auto Collate Results from the Controller window, and clearing the check mark adjacent to the option. To manually collate results, choose Results > Collate Results. If your results have not been collated, Analysis will automatically collate the results before generating the analysis data. For more information about collating results, refer to the HP LoadRunner Controller User
Guide.
Page 1152 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 9:
Page 1153 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 10:
Analysis Graphs
Analysis graphs are divided into the following categories: l
Application Component Graphs. Provide information about resource usage of the Microsoft
COM+ server and the Microsoft NET CLR server. For more information, see
"Application
Component Graphs" on page 1628 .
l
Application Deployment Solutions Graphs. Provide information about resource usage of the
Citrix MetaFrame server. For more information, see
"Application Deployment Solutions Graphs" on page 1670 .
l
Database Server Resource Graphs. Provide information about database resources. For more information, see
"Database Server Resource Graphs" on page 1548
.
l
ERP/CRM Server Resource Graphs. Provide information about ERP/CRM server resource usage. For more information, see
"ERP/CRM Server Resource Graphs" on page 1602
.
l
Error Graphs. Provide information about the errors that occurred during the load test scenario.
For more information, see
"Error Graphs" on page 1404
.
l
Firewall Server Monitor Graphs. Provide information about firewall server resource usage. For more information, see
"Firewall Server Monitor Graphs" on page 1508
.
l
Flex RTMP Graphs. Provide information about resource usage of the Flex server. For more information, see
"Flex Graphs" on page 1382
.
l
Infrastructure Resources Graphs. Provide information about resource usage of FTP, POP3,
SMTP, IMAP, and DNS Vusers on the network client. For more information,
"Infrastructure
Resources Graphs" on page 1694
.
l
J2EE & .NET Diagnostics Graphs. Provide information to trace, time, and troubleshoot individual transactions through J2EE & .NET Web, application, and database servers. For more information, see
"J2EE & .NET Diagnostics Graphs" on page 1783 .
l
Middleware Performance Graphs. Provide information about resource usage of the Tuxedo and IBM WebSphere MQ servers. For more information, see
"Middleware Performance Graphs" on page 1682 .
l
Network Monitor Graphs. Provide information about the network delays. For more information, see
"Network Monitor Graphs" on page 1452 .
l
Oracle 11i Diagnostics Graphs. Provide detailed breakdown diagnostics for SQLs generated by transactions on the Oracle NCA system. For more information, see
"Oracle 11i Diagnostics
Graphs " on page 1760
.
l
SAP Diagnostics Graphs. Provide detailed breakdown diagnostics for SAP data generated by transactions on the SAP Server. For more information, see
"SAP Diagnostics Graphs" on page
1766 .
l
Siebel Diagnostics Graphs. Provide detailed breakdown diagnostics for transactions generated on Siebel Web, Siebel App, and Siebel Database servers. For more information, see
"Siebel Diagnostics Graphs" on page 1738 .
l
Siebel DB Diagnostics Graphs. Provide detailed breakdown diagnostics for SQLs generated
Page 1154 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 10: by transactions on the Siebel system. For more information, see
"Siebel DB Diagnostics
Graphs" on page 1752
.
l
Streaming Media Graphs. Provide information about resource usage of streaming media. For more information, see
"Streaming Media Graphs" on page 1582
.
l
System Resource Graphs. Provide statistics relating to the system resources that were monitored during the load test scenario using the online monitor. This category also includes graphs for SNMP monitoring. For more information, see
"System Resource Graphs " on page
1488 .
l
Transaction Graphs. Provide information about transaction performance and response time.
For more information, see
"Transaction Graphs" on page 1360
.
l
User-Defined Data Point Graphs. Provide information about the custom data points that were gathered by the online monitor. For more information, see
"User-Defined Data Point Graphs" on page 1444 .
l
Vuser Graphs. Provide information about Vuser states and other Vuser statistics. For more information, see
"Vuser Graphs" on page 1394
.
l
Web Application Server Resource Graphs. Provide information about the resource usage for various Web application servers. For more information see
"Web Application Server Resource
Graphs" on page 1528
.
l
Web Page Diagnostics Graphs. Provide information about the size and download time of each
Web page component. For more information, see
"Web Page Diagnostics Graphs" on page
1462 .
l
Web Resource Graphs. Provide information about the throughput, hits per second, HTTP responses per second, number of retries per second, and downloaded pages per second for Web
Vusers. For more information, see
"Web Resources Graphs" on page 1418
.
l
Web Server Resource Graphs. Provide information about the resource usage for the Apache, iPlanet/Netscape, iPlanet(SNMP), and MS IIS Web servers. For more information see
"Web
Resources Graphs" on page 1418
.
Page 1155 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 11:
Analysis API
The LoadRunner Analysis API enables you to write programs to perform some of the functions of the Analysis user interface, and to extract data for use in external applications. Among other capabilities, the API allows you to create an analysis session from test results, analyze raw results of an Analysis session, and extract key session measurements for external use. An application can be launched from the LoadRunner Controller at the completion of a test. For more information, see the Analysis API Reference.
Page 1156 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 11:
Page 1157 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 12:
WAN Emulation
LoadRunner is integrated with 3rd party software that enables you to test point-to-point performance of WAN-deployed products under real-world network conditions. By installing this 3rd party software on your load generators, you introduce highly probable WAN effects such as latency, packet loss, and link faults over your LAN. As a result of this, your scenario performs the test in an environment that better represents the actual deployment of your application.
You can create more meaningful results by configuring several load generators with the same unique set of WAN effects, and by giving each set a unique location name, for example, London.
When viewing scenario results in Analysis, you can group metrics from different load generators according to their location names.
Page 1158 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 12:
Page 1159 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 13:
How to Customize the Layout of Analysis Windows
This task describes ways to customize the layout of the windows of the Analysis session.
Open Windows
You can open a window or restore a window that was closed by selecting the name of the relevant window from the Windows menu.
Lock/Unlock the Layout of the Screen
Select Windows > Layout locked to lock or unlock the layout of the screen.
Restore the Window Placement to the Default Layout
Select Windows > Restore Default Layout to restore the placement of the Analysis windows to their default layout.
Note: This option is available only when no Analysis session is open.
Restore the Window Placement to the Classic Layout
Select Windows > Restore Classic Layout to restore the placement of the Analysis windows to their classic layout. The classic layout resembles the layout of earlier versions of Analysis.
Note: This option is available only when no Analysis session is open.
Reposition and Dock Windows
You can reposition any window by dragging it to the desired position on the screen. You can dock a window by dragging the window and using the arrows of the guide diamond to dock the window in the desired position.
Notes: l
Only document windows (graphs or reports) can be docked in the center portion of the screen.
l
Windows > Layout Locked must not be selected when repositioning or docking windows.
Using Auto Hide
You can use the Auto Hide feature to minimize open windows that are not in use. The window is minimized along the edges of the screen.
Click the Auto Hide button on the title bar of the window to enable or disable Auto Hide.
Page 1160 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 13:
Page 1161 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 14:
Analysis Toolbars
This section describes the buttons that you access from the main Analysis toolbars.
Common Toolbar
This toolbar is always accessible from the toolbar at top of the page and includes the following buttons:
User interface elements are described below:
UI Element Description
Create a new session.
Open an existing session.
Generate a Cross Result graph.
Save a session.
Print item.
Create an HTML report.
View runtime settings.
Set global filter options.
Analyze a transaction.
Undo the most recent action.
Reapply the last action that was undone.
Graph Toolbar
This toolbar is accessible from the top of the page when you have a graph open and includes the following buttons
User interface elements are described below:
UI Element Description
Set filter settings.
Clear filter settings.
Page 1162 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 14:
UI Element Description
Set granularity settings.
Merge graphs.
Configure auto correlation settings.
View raw data.
Add comments to a graph.
Add arrows to a graph.
Set display options.
Page 1163 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 15:
Session Explorer Window
This window displays a tree view of the items (graphs and reports) that are open in the current session.When you click an item in the Session Explorer, it is activated in the main Analysis window.
To access
Use one of the following: l
Session Explorer
l
Session Explorer > Reports > Summary Report
l
Session Explorer > Reports >Service Level Agreement Report
l
Session Explorer > > Analyze Transaction
l
Session Explorer > Graphs
User interface elements are described below:
UI
Element
Description
Add a new graph or report to the current Analysis session. Opens the Open a New
Graph dialog box. For details, see
"Open a New Graphs Dialog Box" on page 1166
Delete the selected graph or report.
Rename the selected graph or report.
Create a copy of the selected graph.
Page 1164 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 15:
Page 1165 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 16:
Open a New Graphs Dialog Box
This dialog box enables you to select the graph type to activate in the main Analysis window.
To access
Session Explorer > Graphs >
User interface elements are described below:
UI Element
Select a graph
Display only graphs containing data
Graph
Description
Description
Displays list of graph types.
If checked, only graphs that contain data are listed (in blue) in the Select a graph area.
Displays detailed information about the selected graph.
Analysis generates the selected graph and adds it to the
Session Explorer.
Page 1166 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 16:
UI Element Description
Opens the graphs Graph Settings dialog box. For details, see
"Filter Dialog
Boxes" on page 1232 . This option enables you to apply filter conditions on the
selected graph before the graph is displayed.
Page 1167 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 17:
Print Graphs or Reports
This dialog box enables you to print graphs or reports
To access
Select from one of the two options: l
File > Print
l
Main toolbar >
User interface elements are described below:
UI Element
Select Items to
Print
Include
Description
l
All Items - Prints all graphs and reports in the current session.
l
Current Item - Prints the graph or report currently selected in the
Session Explorer.
l
Specific Item(s) - Select the graphs or reports to print.
l
User Notes - Prints the notes in the User Notes window.
l
Graph Details - Prints details such as graph filters and granularity settings.
Configuring Analysis
Page 1168 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 17:
Page 1169 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 18:
Summary Data Versus Complete Data
In large load test scenarios, with results exceeding 100 MB, it can take a long time for Analysis to process the data. When you configure how Analysis generates result data from load test scenarios, you can choose to generate complete data or summary data.
Complete data refers to the result data after it has been processed for use within Analysis.
Summary data refers to the raw, unprocessed data. The summary graphs contain general information such as transaction names and times. Some fields are not available for filtering when you work with summary graphs.
The following graphs are not available when viewing summary data only: l
Data Point (Sum) l
Error l
Network Monitor l
Rendezvous l
Siebel DB Side Transactions l
Siebel DB Side Transactions by SQL Stage l
SQL Average Execution Time l
Web Page Diagnostics
Page 1170 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 18:
Page 1171 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 19:
Importing Data Directly from the Analysis Machine
If you are using an SQL server / MSDE machine to store Analysis result data, you can configure
Analysis to import data directly from the Analysis machine.
Importing Data from the SQL Server
If you do not select the option to import data directly from the Analysis machine, Analysis creates
CSV files in a local temp folder. The CSV files are copied to a shared folder on the SQL Server machine. The SQL server engine then imports the CSV files into the database. The following diagram illustrates the data flow:
Importing Data from the Analysis Machine
If you selected the option to import data directly from the Analysis machine, Analysis creates the
CSV files in a shared folder on the Analysis machine and the SQL server imports these CSV files from the Analysis machine directly into the database. The following diagram illustrates the data flow:
Page 1172 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 19:
Page 1173 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 20:
How to Configure Settings for Analyzing Load Test
Results
The following steps describe how to configure certain Analysis settings that significantly impact the way in which Analysis analyzes load test results.
Configure how Analysis processes result data
You define how Analysis processes result data from load test scenarios in the Tools > Options >
Result Collection tab. For example, you can configure how Analysis aggregates result data, to what extent the data is processed, and whether output messages are copied from the Controller.
For details on the user interface, see
"Result Collection Tab (Options Dialog Box)" on page 1186
.
Configure template settings
For details on the user interface, see
"Template Dialog Box" on page 1214
.
Configure analysis of transactions
You configure how transactions are analyzed and displayed in the summary report in the Summary
Report area of the Tools > Options > General tab. For details, see the description of
"General
Tab (Options Dialog Box) " on page 1184 .
Page 1174 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 20:
Page 1175 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 21:
Advanced Options Dialog Box (Database Tab)
This dialog box enables you to increase performance when processing LoadRunner results or importing data from other sources.
To access
See also
Tools > Options > Database tab > Advanced button
"Database Tab (Options Dialog Box)" on page 1180
User interface elements are described below:
UI Element
Create separate threads for inserting Analysis data into the database.
Use SQL parameters to utilize the SQL Server memory buffer.
Description
This option may consume a large amount of memory on your database server, and should only be used if you have sufficient memory resources.
This option is only enabled when you store Analysis result data on an SQL server or MSDE machine.
Page 1176 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 21:
Page 1177 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 22:
Data Aggregation Configuration Dialog Box (Result
Collection Tab)
If you choose to generate the complete data from the load lest scenario results, Analysis aggregates the data using either built-in data aggregation formulas, or aggregation settings that you define. This dialog box enables you to define custom aggregation settings.
To access
Select Tools > Options > Result Collection. Select the Apply user-defined
aggregation option and click the Aggregation Configuration button.
Important information
In this dialog box, you can select granularity settings. To reduce the size of the database, increase the granularity. To focus on more detailed results, decrease the granularity.
User interface elements are described below:
UI Element
Aggregate
Data
Description
Select this option to define your custom aggregation settings using the following criteria: l
Select the type of data to aggregate. Use the check boxes to select the types of graphs for which you want to aggregate data.
l
Select graph properties to aggregate. Use the check boxes to select the graph properties you want to aggregate.
Page 1178 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 22:
UI Element
Web data aggregation only
Description
To exclude data from failed Vusers, select Do not aggregate failed Vusers.
Note: You will not be able to drill down on the graph properties you select in this list.
l
Select the granularity you want to use. Specify a custom granularity for the data. The minimum granularity is 1 second.
Select this option to aggregate Web data only. In the Use Granularity of X for
Web data box, specify a custom granularity for Web data.
The minimum granularity is 1 second. By default, Analysis summarizes Web measurements every 5 seconds.
Page 1179 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 23:
Database Tab (Options Dialog Box)
This tab enables you to specify the database in which to store Analysis session result data and to configure the way in which CSV files will be imported into the database.
To access
Important information
See also
Tools > Options > Database tab.
If your Analysis result data exceeds two gigabytes, it is recommended that you store it on an SQL server / MSDE machine.
"Importing Data Directly from the Analysis Machine" on page 1172
User interface elements are described below:
UI Element
Access 2000
Description
Instructs LoadRunner to save Analysis result data in an Access 2000 database format. This setting is the default.
Page 1180 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 23:
UI Element Description
SQL Server/MSDE
Instructs LoadRunner to save Analysis result data on an SQL server /
MSDE machine. If you select this option, you have to complete the
Server Details and Shared Folder Details, described below.
Server Details area
SQL server / MSDE machine details. See description below.
Shared Folder
Details area
SQL server / MSDE machine shared folder details. See description below.
Depending on which database you are using, this button performs the following action: l
For Access. Lets you connect to the Access database and verify that the list separator registry options on your machine are the same as those on the database machine.
l
For SQL server / MSDE. Lets you connect to the SQL server / MSDE machine and see that the shared folder you specified exists on the server, and that you have write permissions on the shared server folder. If so, Analysis synchronizes the shared and physical server directories.
When you configure and set up your Analysis session, the database containing the results may become fragmented. As a result, it will use excessive disk space. For Access databases, the Compact database button enables you to repair and compress your results and optimize your database.
Note: Long load test scenarios (duration of two hours or more) will require more time for compacting.
Opens the Advanced Options dialog box, allowing you to increase performance when processing LoadRunner results or importing data from
other sources. For user interface details see "Advanced Options Dialog
Box (Database Tab)" on page 1176
.
Server Details Area
If you choose to store Analysis result data on an SQL server / MSDE machine, you need to complete the server details. User interface elements are described below:
UI Element
Server Name
Use Windows integrated security
User Name
Password
Description
The name of the machine on which the SQL server / MSDE is running.
Enables you to use your Windows login, instead of specifying a user name and password. By default, the user name "sa" and no password are used for the
SQL server.
The user name for the master database.
The password for the master database.
Page 1181 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 23:
Shared Folder Details Area
If you store Analysis result data on an SQL server / MSDE machine, you need to provide the shared folder details. User interface elements are described below:
UI Element Description
Import
Data
Directly from
Analysis machine
Shared
Folder on
MS SQL
Server
Shared
Folder on
Analysis
Host
Select this option to import data directly from the Analysis machine. For details on this option, see
"Importing Data Directly from the Analysis Machine" on page
1172 .
l
Shared folder path. Enter a shared folder on the SQL server / MSDE machine.
For example, if your SQL server's name is fly, enter \\fly\<Analysis database folder>\
.
This folder has different functions, depending on how you import the Analysis data: n
If you did not select the option to import data directly from the Analysis
machine, this folder stores permanent and temporary database files. Analysis results stored on an SQL server / MSDE machine can only be viewed on the machine's local LAN.
n
If you selected the option to import data directly from the Analysis
machine, this folder is used to store an empty database template copied from the Analysis machine.
l
Local folder path. Enter the real drive and folder path on the SQL server /
MSDE machine that correspond to the above shared folder path. For example, if the Analysis database is mapped to an SQL server named fly, and fly is mapped to drive D, enter D:\<Analysis database folder>.
If the SQL server / MSDE and Analysis are on the same machine, the logical storage location and physical storage location are identical.
If you selected the option to import data directly from the Analysis machine, the
Shared folder path box is enabled. Analysis detects all shared folders on your
Analysis machine and displays them in a drop-down list. Select a shared folder from the list.
Note:
l
Ensure that the user running the SQL server (by default, SYSTEM) has access rights to this shared folder.
l
If you add a new shared folder on your machine, you can click the refresh button to display the updated list of shared folders.
l
Analysis creates the CSV files in this folder and the SQL server imports these
CSV files from the Analysis machine directly into the database. This folder stores permanent and temporary database files.
Page 1182 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 23:
Page 1183 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 24:
General Tab (Options Dialog Box)
This tab enables you to configure general Analysis options, such as date formats, temporary storage location, and transaction report settings.
To access
See Also
Tools > Options > General tab.
"How to Configure Settings for Analyzing Load Test Results" on page
1174
User interface elements are described below:
UI Element Description
Date
Format
Select a date format for storage and display. (For example, the date displayed in the Summary report)
Page 1184 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 24:
UI Element Description
File
Browser
l
European. Displays the European date format.
l
US. Displays the U.S. date format.
l
Traditional Chinese. Displays the Traditional Chinese date format.
l
Local Regional Options. Displays the date format as defined in the current user's regional settings.
Note: When you change the date format, it only affects newly created Analysis sessions. The date format of existing sessions is not affected.
Select the folder location at which you want the file browser to open.
l
Open at most recently used directory. Opens the file browser at the previously used folder location.
l
Open at specified directory. Opens the file browser at a specified folder.
In the Directory path box, enter the folder location where you want the file browser to open.
Start Page
Select Show start page on start up to display the Welcome to Analysis tab every time you open the Analysis application.
Summary
Report
Set the following transaction settings in the Summary Report: l
Transaction Percentile. The Summary Report contains a percentile column showing the response time of 90% of transactions (90% of transactions that fall within this amount of time). To change the value of the default 90 percentile, enter a new figure in the Transaction Percentile box.
Since this is an application level setting, the new value is only applied the next time you analyze a result file (File > New).
Note: If a template is automatically applied to new sessions, the transaction settings are defined according to the definitions in the template, and not according to those in the Options dialog box. You define template settings in the Template dialog box (Tools > Templates > Apply/Edit Template).
Temporary
Storage
Location
Select the folder location in which you want to save temporary files.
l
Use Windows temporary directory. Saves temporary files in your Windows temp folder.
l
Use a specified directory. Saves temporary files in a specified folder.
In the Directory path box, enter the folder location in which you want to save temporary files.
Graph
Select the way in which graphs shows the Elapsed Scenario Time on the x-axis.
Use Absolute time. Shows an elapsed time based on the absolute time of the machine's system clock. If not checked, shows the elapsed time relative to the start of the scenario. The default is unchecked.
Page 1185 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 25:
Result Collection Tab (Options Dialog Box)
This tab enables you to configure how Analysis processes result data from load test scenarios.
To access
Important information
See Also
Tools > Options > Result Collection tab.
The options in this tab are pre-defined with default settings. It is recommended to use these default settings unless there is a specific need to change them. Changing some of the settings, such as default aggregation, can significantly impact the amount of data stored in the Analysis database.
"How to Configure Settings for Analyzing Load Test Results" on page 1174
User interface elements are described below:
Page 1186 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 25:
UI Element
Data Source
Data Aggregation
Data Time Range
Description
In this area, you configure how Analysis generates result data from load test scenarios.
Complete data refers to the result data after it has been processed for use within Analysis. Summary data refers to the raw, unprocessed data. The summary graphs contain general information such as transaction names and times. For more details on summary data versus complete data, see
"Summary Data Versus Complete Data" on page 1170 .
Select one of the following options: l
Generate summary data only. If this option is selected, Analysis will not process the data for advanced use with filtering and grouping.
l
Generate complete data only. If this option is selected, the graphs can then be sorted, filtered, and manipulated.
l
Display summary data while generating complete data.
Enables you to view summary data while you wait for the complete data to be processed.
Note: If you selected one of the options to generate complete data, you can define how Analysis aggregates the complete data in the
Data Aggregation area.
If you chose to generate complete data in the Data Source area, you use this area to configure how Analysis aggregates the data.
Data aggregation is necessary in order to reduce the size of the database and decrease processing time in large scenarios.
Select one of the following options: l
Automatically aggregate data to optimize performance.
Aggregates data using built-in data aggregation formulas.
l
Automatically aggregate Web data only. Aggregates Web data only using built-in data aggregation formulas.
l
Apply user-defined aggregation. Aggregates data using settings you define.
Click the Aggregation Configuration button to open the Data
Aggregation Configuration Dialog Box and define your custom aggregation settings. For details on the user interface, see
"Data
Aggregation Configuration Dialog Box (Result Collection Tab)" on page 1178 .
In this area you specify whether to display data for the complete duration of the scenario, or for a specified time range only. Select one of the following options:
Page 1187 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 25:
UI Element
Copy Controller
Output Messages to
Analysis Session
Description
l
Entire scenario. Displays data for the complete duration of the load test scenario l
Specified scenario time range. Specify the time range using the following boxes: n
Analyze results from. Enter the amount of scenario time you want to elapse (in hh:mm:ss format) before Analysis begins displaying data.
n
until. Enter the point in the scenario (in hh:mm:ss format) at which you want Analysis to stop displaying data.
Notes:
l
It is not recommended to use the Specified scenario time range optionwhen analyzing the Oracle 11i and Siebel DB Diagnostics graphs, since the data may be incomplete.
l
The Specified scenario time range settings are not applied to the
Connections and Running Vusers graphs.
Controller output messages are displayed in Analysis in the Controller
Output Messages window. Select one of the following options for copying output messages generated by the Controller to the Analysis session.
l
Copy if data set is smaller than X MB. Copies the Controller output data to the Analysis session if the data set is smaller than the amount you specify.
l
Always Copy. Always copies the Controller output data to the
Analysis session.
l
Never Copy. Never copies the Controller output data to the
Analysis session.
Click this button to apply the settings in the Result Collection tab to the current session. The Controller output data is copied when the
Analysis session is saved.
Page 1188 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 25:
Page 1189 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 26:
Session Information Dialog Box (Options Dialog Box)
This dialog box enables you to view a summary of the configuration properties of the current
Analysis session.
To access File > Session Information
User interface elements are described below:
UI Element Description
Displays the type of data aggregated, the criteria according to which it is aggregated, and the time granularity of the aggregated data.
Displays the properties of the SQL server and MSDE databases.
Aggregation
Indicates whether the session data has been aggregated.
Data Collection Mode
Indicates whether the session displays complete data or summary data.
Data Time Filter
Indicates whether a time filter has been applied to the session.
Database Name
Displays the name and directory path of the database.
Page 1190 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 26:
UI Element
Database Type
Results
Session Name
Web Granularity
Description
Displays the type of database used to store the load test scenario data.
Displays the name of the LoadRunner result file.
Displays the name of the current session.
Displays the Web granularity used in the session.
Page 1191 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 27:
Web Page Diagnostics Tab (Options Dialog Box)
This tab enables you to set Web page breakdown options. You can choose how to aggregate the display of URLs that include dynamic information, such as a session ID. You can display these
URLs individually, or you can unify them and display them as one line with merged data points.
To access
Tools > Options > Web Page Diagnostics tab
User interface elements are described below:
UI Element
Display individual URLs
Display an average of merged URLs
Description
Displays each URL individually
Merges URLs from the same script step into one URL, and displays it with merged (average) data points.
Configuring Graph Display
Analysis allows you to customize the display of the graphs and measurements in your session so that you can view the data displayed in the most effective way possible.
Page 1192 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 27:
Page 1193 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 28:
Sorting Graph Data Overview
You can sort graph data to show the data in more relevant ways. For example, Transaction graphs can be grouped by the Transaction End Status, and Vuser graphs can be grouped by Scenario
Elapsed Time, Vuser End Status, Vuser Status, and VuserID.
You can sort by one or several groups—for example by Vuser ID and then Vuser status. The results are displayed in the order in which the groups are listed. You can change the grouping order by rearranging the list. The following graph shows the Transaction Summary grouped according to
Vusers.
Page 1194 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 28:
Page 1195 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 29:
How to Customize the Analysis Display
The following steps describes how to customize the display of analysis. You can customize the display of the graphs and measurements in your session so that you can view the data displayed in the most effective way possible.
Enlarging a section of the graph
To zoom in or enlarge a section of the graph, move and hold down the left mouse button over the section of the graph you want to enlarge.
Using comments in a graph
To add a comment to a graph, click and then click the mouse over the section of the graph where you would like to add a comment. Type your comment in the Add Comment dialog box.
To edit, format or delete a comment from the graph, click the comment and apply your change in the
Edit Comments dialog box. In the left pane, verify the relevant comment is selected before you edit, format or delete.
Using arrows in a graph
To add an arrow to a graph, click the base of the arrow.
and then click the mouse button within the graph to position
To delete an arrow from a graph, select the arrow and press Delete.
Using the User Notes Window
In the User Notes window (Windows > User Notes), you can enter text about the graph or report that is currently open. The text in the User Notes window is saved with the session.
To view the text that you entered for a specific graph or report, select the relevant graph or report and open the User Notes window (Windows > User Notes).
Page 1196 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 29:
Page 1197 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 30:
Display Options Dialog Box
This dialog box enables you to select the graph type and configure the display of the graph.
Note: This option is not available for all graph types.
To access View > Display Options
See also
l
"Editing MainChart Dialog Box (Display Options Dialog Box)" on page 1200
l
"Chart Tab (Editing MainChart Dialog Box)" on page 1202
l
"Series Tab (Editing MainChart Dialog Box)" on page 1204
User interface elements are described below:
UI Elements> Description
Type
Graph X Axis
(Bar graphs only)
Select the type of graph to display from the drop-down list.
Values Types
Select the type of display information from the list of available values. For example, a bar graph displaying Average Transaction Response Time can be configured to display minimum, maximum, average, STD, count, and sum averages.
Select the bar arrangement along the x-axis. You can arrange the bars by value types or measurement.
Time Options
Select the way in which the graph shows the Elapsed Scenario Time on the x-
Page 1198 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 30:
UI Elements> Description
Show
Breaking
Measurement
axis. You can choose an elapsed time relative to the beginning of the scenario or an elapsed time from the absolute time of the machine's system clock.
Select this check box to display the name and properties of the breaking measurement at the top of the graph (disabled by default).
3 Dimensional
Select this check box to enable a 3-dimensional display of the graph.
3D %
Specify a percentage for the 3-dimensional aspect of lines in the graph. This percentage indicates the thickness if the bar, grid, or pie chart.
Select this check box to display a legend at the bottom of the graph.
Show Legend on Graph
Drawing
Arrows
Allows you to configure the style, color, and width of arrows you draw to highlight graph information.
Opens the Editing MainChart dialog box. For more information, see
"Editing
MainChart Dialog Box (Display Options Dialog Box)" on page 1200
.
Page 1199 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 31:
Editing MainChart Dialog Box (Display Options Dialog
Box)
This dialog box enables you to configure the look and feel of your graph as well as its title and the format of the data.
To access
See also
View > Display Options > Advanced button
"Display Options Dialog Box" on page 1198
"Chart Tab (Editing MainChart Dialog Box)" on page 1202
"Series Tab (Editing MainChart Dialog Box)" on page 1204
User interface elements are described below:
UI
Element
Description
Chart tab
Series tab
Export tab
Enables you to configure the look and feel of your entire graph. You set Chart preferences using the following tabs: For details, see
"Chart Tab (Editing MainChart
Dialog Box)" on page 1202 .
Enables you to control the appearance of the individual points plotted in the graph. You set Series preferences using the following tabs. For details, see
"Series Tab (Editing
MainChart Dialog Box)" on page 1204
.
Enables you to store the current graph to an image file in the format of your choice—
BMP, JPG, or EMF. You can also export the graph's data to HTML, Excel, or XML
Page 1200 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 31:
UI
Element
Description
Print tab
Enables you to print only the graph itself without the legend and other data such as the
User Notes.
Page 1201 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 32:
Chart Tab (Editing MainChart Dialog Box)
This tab enables you to configure the look and feel of your entire graph.
To access
View > Display Options > Advanced button > Chart tab
See also
"Display Options Dialog Box" on page 1198
"Editing MainChart Dialog Box (Display Options Dialog Box)" on page 1200
"Series Tab (Editing MainChart Dialog Box)" on page 1204
User interface elements are described below:
UI
Element
Description
Series tab
Axis tab
Select the graph style (for example, bar or line), the hide/show settings, line and fill color, and the title of the series.
General tab
Select options for print preview, export, margins, scrolling, and magnification.
Select which axes to show, as well as their scales, titles, ticks, and position.
Titles tab
Legend tab
Set the title of the graph, its font, background color, border, and alignment.
Set all legend related settings, such as position, fonts, and divider lines.
Panel tab
Paging tab
Walls tab
3D
Show the background panel layout of the graph. You can modify its color, set a gradient option, or specify a background image.
Set all page related settings, such as amount of data per page, scale, and page numbering. These settings are relevant when the graph data exceeds a single page.
Set colors for the walls of 3-dimensional graphs.
Select the 3-dimensional settings, offset, magnification, and rotation angle for the active graph.
Page 1202 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 32:
Page 1203 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 33:
Series Tab (Editing MainChart Dialog Box)
This page enables you to control the appearance of the individual points plotted in the graph.
To access
View > Display Options > Advanced button > Series tab
See also
"Display Options Dialog Box" on page 1198
"Editing MainChart Dialog Box (Display Options Dialog Box)" on page 1200
"Chart Tab (Editing MainChart Dialog Box)" on page 1202
User interface elements are described below:
UI
Element
Description
Format tab
Point tab
Set the border color, line color, pattern, and invert property for the lines or bars in your graph.
Set the size, color, and shape of the points that appear within your line graph.
General tab
Select the type of cursor, the format of the axis values, and show/hide settings for the horizontal and vertical axes.
Marks tab
Configure the format for each point in the graph.
Page 1204 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 33:
Page 1205 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 34:
Legend Window
This window enables you to configure the color, scale, minimum, maximum, average, median, and standard deviation of each measurement appearing in the graph.
To access
See also
Analysis Window > Legend window
"Measurement Description Dialog Box" on page 1208
"Measurement Options Dialog Box" on page 1210
Legend Toolbar
User interface elements are described below:
UI Element Description
Displays a measurement in the graph.
Hides a measurement in the graph.
Displays the highlighted measurement only.
Displays all the available measurements in the graph.
Filters the graph by the measurements selected in the Legend window. You can select multiple measurements. To clear the filter, select View > Clear
Filter/Group by.
Opens the Measurement Options dialog box that enables you to configure measurement options (for example, set color and measurement scale). For more information, see
"Measurement Options Dialog Box" on page 1210
.
Opens the Measurement Description dialog box that displays the name, monitor type, and description of the selected measurement. For more information, see
"Measurement Description Dialog Box" on page 1208 .
Displays the selected measurement as a flashing line.
Opens the Legend Columns Options dialog box that enables you to configure the columns displayed in the Legend window. For more information, see
"Legend Window" above .
Page 1206 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 34:
UI Element Description
Copies the data that you have selected to the Clipboard. You can paste the data in a text file or a spreadsheet.
Copies all the legend data to the Clipboard, regardless of what is selected.
You can paste the data in a text file or a spreadsheet.
Saves the legend data to a CSV file.
Legend grid shortcut menu
User interface elements are described below:
UI Element Description
Auto Correlate
Opens the Auto Correlate dialog box that enables you to correlate the selected measurement with other monitor measurements in the load test scenario. For more information on auto correlation, see
"Auto Correlating Measurements " on page 1250 .
Web Page
Diagnostics for <selected measurement>
Appears for measurements in the Average Transaction Response Time and
Transaction Performance Summary graphs): Displays a Web Page
Diagnostics graph for the selected transaction measurement.
Sort by measurement column
Break down
Sorts the measurements according to the selected column, in ascending or descending order.
(appears for measurements in the Web Page Diagnostics graphs). Displays a graph with a breakdown of the selected page.
Page 1207 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 35:
Measurement Description Dialog Box
This dialog box shows you additional information about the selected measurement.
To access
See also
Legend Toolbar >
"Legend Window" on page 1206
"Measurement Options Dialog Box" on page 1210
User interface elements are described below:
UI Element Description
Measurement
Displays the name of the selected measurement. Click the drop-down arrow to select a different measurement.
Monitor Type
Displays the type of monitor used to obtain the selected measurement.
Description
SQL
Displays a description of the selected monitored measurement.
If an SQL logical name is in use, displays the full SQL statement.
Page 1208 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 35:
Page 1209 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 36:
Measurement Options Dialog Box
This dialog box enables you to set the color and the scale for any measurement of the graph you selected.
To access
See also
Legend Toolbar >
"Legend Window" on page 1206
"Measurement Description Dialog Box" on page 1208
User interface elements are described below:
UI Element Description
Measurement
Select a measurement to configure.
Select a new color for the selected measurement.
Change
Color
Scale
Select the desired scale option: l
Set measurement scale to x. Select the scale with which you want to view the selected measurement.
l
Set automatic scale for all measurements. Uses an automatic scale optimized to display each measurement in the graph.
Page 1210 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 36:
UI Element Description
l
Set scale 1 for all measurements. Sets the scale to one for all measurements in the graph.
l
View measurement trends for all measurements. Standardizes the y-axis values in the graph, according to the following formula: New Y value =
(Previous Y Value - Average of previous values) / STD of previous values.
Page 1211 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 37:
Legend Columns Options Dialog Box
This dialog box enables you to select the columns to be displayed.
To access
See also
View > Legend Columns
"Legend Window" on page 1206
User interface elements are described below:
UI
Element
Description
Available
Columns
Select or deselect the check boxes to the left of the column names to show or hide the columns respectively.
Notes:
l
The Color, Scale, and Measurement columns are mandatory and cannot be deselected.
l
To rearrange the order in which the columns appear (from left to right), you use the vertical arrows to the right of the Available Columns list to place the columns in the desired order.
Page 1212 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 37:
Page 1213 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 38:
Template Dialog Box
This dialog box enables you to set template settings, automatic activity options, and select report template options.
To access Tools > Templates
User interface elements are described below (unlabeled elements are shown in angle brackets):
UI Element
Templates
Description
Select one of the following buttons: l
Select to browse for a template.
l
- Select to add a template. Enter the title of the new template in the
Add new template dialog box.
l l
- Select a template to duplicate.
- Select to delete the selected template.
l
- Select to set the selected template as the default.
Use automatic granularity
Applies the default Analysis granularity (one second) to the template. For information about setting Analysis granularity, see
"Changing the Granularity of the Data " on page 1246 .
Generate the following automatic
Generates an HTML report using the template. Specify or select a report name.
For information about generating HTML reports, see
"HTML Report " on page
1716
.
Page 1214 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 38:
UI Element
HTML report
Description
Open html report after creation
Automatically save the session as
If you selected the option of generating an automatic HTML report, select this option to automatically open the HTML report after it is created.
Automatically saves the session using the template you specify. Specify or select a file name.
Automatically analyze the top problematic transactions
Automatically generates Transaction Analysis reports for the transactions with the worst SLA violations. Reports are generated for a maximum of five transactions. For more information about Transaction Analysis reports, see
"Analyze Transactions Dialog Box" on page 1714 .
Automatically close
Analysis after saving session
Automatically closes Analysis after a session is automatically saved (using the previous option). This prevents the running of multiple instances of
Analysis.
Generate the following automatic
Rich Reports
<Check-box on left of
Template's
Name>
Word
The selected reports are added to the template.
Select to add report template to selected template. The reports are added to the session.
Generates a report using the selected report template to MS Word.
Note: Take into account that the content load may affect the table format within the MS Word document.
Generates a report using the selected report template to Excel.
Excel
PDF
HTML
Generates a report using the selected report template to PDF.
Generates a report using the selected report template to HTML.
Graphs <tab>
Displays the list of graphs that are included in the template. When the template is applied to a session, the graphs are displayed under Graphs in Session
Explorer. If there is no data in the session, the graphs are not created.
Filtering and Sorting Graph Data
Page 1215 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 39:
Filtering Graph Data Overview
You can filter graph data to show fewer transactions for a specific segment of the load test scenario. More specifically, you can display four transactions beginning from five minutes into the scenario and ending three minutes before the end of the scenario.
You can filter for a single graph, in all graphs in a load test scenario, or in the summary graph.
The available filter conditions differ for each type of graph. The filter conditions also depend on your scenario. For example, if you only had one group or one load generator machine in your scenario, the Group Name and Load Generator Name filter conditions do not apply.
Note: You can also filter merged graphs. The filter conditions for each graph are displayed on separate tabs.
Page 1216 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 39:
Page 1217 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 40:
Sorting Graph Data Overview
You can sort graph data to show the data in more relevant ways. For example, Transaction graphs can be grouped by the Transaction End Status, and Vuser graphs can be grouped by Scenario
Elapsed Time, Vuser End Status, Vuser Status, and Vuser ID.
You can sort by one or several groups—for example by Vuser ID and then Vuser status. The results are displayed in the order in which the groups are listed. You can change the grouping order by rearranging the list. The following graph shows the Transaction Summary grouped according to
Vusers.
Page 1218 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 40:
Page 1219 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 41:
Filter Conditions
Common Filter Condition Options
The following filter conditions are common to many graphs:
Filter
Condition Filters the graph according to...
Host Name
The name of the Host machine. Select one or more hosts from the drop down list.
Transaction
End Status
The end status of a transaction: pass, fail, stop.
Scenario
Elapsed
Time
Vuser ID
Script
Name
Group
Name
The time that elapsed from the beginning to the end of the load test scenario. For more information about setting the time range, see
Dialog Box" on page 1236
The name of the script.
.
The Vuser ID. For more information, see
The name of the group to filter by.
"Scenario Elapsed Time
"Vuser ID Dialog Box" on page 1240
Think Time
The Think Time option in the graph filter for complete mode is turned off by default. The transaction time displayed shows pure time.
.
Vuser Graphs
You can apply the following filter conditions to Vuser graphs:
Filter Condition
Vuser Status
Vuser End Status
Filters the graph according to...
The Vuser status: load, pause, quit, ready, run
The status of the Vuser at the end of the transaction: error, failed,
passed, stopped.
The number of Vusers that were released.
Number of Released
Vusers
Rendezvous Name
The name of the rendezvous point.
Error Graphs
You can apply the following filter conditions to Error graphs:
Filter Condition
Error Type
Filters the graph according to...
The type of error (per error number).
Page 1220 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 41:
Filter Condition
Parent Transaction
Line Number in Script
Filters the graph according to...
The parent transaction.
The line number in the script.
Transaction Graphs
You can apply the following filter conditions to Transaction graphs:
Filter Condition Filters the graph according to...
Transaction
Name
The name of the transaction.
Transaction
Response Time
The response time of the transaction.
Transaction
Hierarchical
Path
The hierarchical path of the transaction. For more information on setting this condition, see
"Hierarchical Path Dialog Box" on page 1234
.
Web Resource Graphs
You can apply the following filter conditions to Web Resources graphs:
Filter Condition
Web Resource Name
Web Resource Value
Web Server Resource Name
Web Server Resource Value
Filters the graph according to...
The name of the Web resource.
The value of the Web resource.
The name of the Web Server resource.
The value of the Web Server resource.
Web Page Diagnostics Graphs
You can apply the following filter conditions to Web Page Diagnostics graphs:
Filter Condition Filters the graph according to...
Component
Name
Component
Response Time
The name of the component.
The response time of the component.
Component
DNS Resolution
Time
The amount of time the component needs to resolve the DNS name to an IP address, using the closest DNS server.
Component
Connection
Time
The time taken for the component to establish an initial connection with the
Web server hosting the specified URL.
Page 1221 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 41:
Filter Condition Filters the graph according to...
Component
First Buffer
Time
Component
Receive Time
The time that passes from the component's initial HTTP request (usually
GET) until the first buffer is successfully received back from the Web server.
The time that passes until the component's last byte arrives from the server and the downloading is complete.
Component SSL
Handshaking
Time
The time take for the component to establish an SSL connection.
(Applicable to HTTPS communication only.)
Component FTP
Authentication
Time
The time taken for the component to authenticate the client. (Applicable to
FTP protocol communication only).
Component
Error Time
The average amount of time that passes from the moment a component's
HTTP request is sent until the moment an error message (HTTP errors only) is returned.
Component Size
(KB)
The size of the component (in kilobytes).
The type of component: Application; Image; Page; Text
Component
Type
Component
Hierarchical
Path
The hierarchical path of the component. For more information on setting this condition, see
"Hierarchical Path Dialog Box" on page 1234 .
Component
Network Time
Component
Server Time
Component
Client Time
The amount of time from the component's first HTTP request, until receipt of
ACK.
The amount of time from when the component receives of ACK, until the first buffer is successfully received back from the Web server.
The average amount of time that passes while a component request is delayed on the client machine due to browser think time or other clientrelated delays.
User Defined Data Point Graphs
You can apply the following filter conditions to User-Defined Data Point graphs:
Filter Condition
Datapoint Name
Datapoint Value
Filters the graph according to...
The name of the data point.
The value of the data point.
System Resources Graphs
You can apply the following filter conditions to System Resource graphs:
Page 1222 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 41:
Filter Condition
System Resource
Name
System Resource
Value
Filters the graph according to...
The name of the system resource.
The value of the system resource. See
"Set Dimension Information Dialog
Box " on page 1238 .
Network Monitor Graphs
You can apply the following filter conditions to Network Monitor graphs:
Filter Condition
Network Path Name
Network Path Delay
Network Path Father
Network SubPath Name
Network SubPath Delay
Network Full Path
Network Segment Name
Network Segment Delay
Network Segment Full Path
Filters the graph according to...
The name of the network path.
The delay of the network path.
The father of the network path.
The name of the network subpath.
The delay of the network subpath.
The full network path.
The name of the network segment.
The delay of the network segment.
The full network segment path.
Firewall Graphs
You can apply the following filter conditions to Firewall graphs:
Filter Condition
Firewall Resource
Name
Firewall Resource
Value
Filters the graph according to...
The name of the Firewall resource.
The value of the firewall resource. See
"Set Dimension Information Dialog
Box " on page 1238 .
Web Server Resource Graphs
You can apply the following filter conditions to Web Server Resource graphs:
Filter Condition
Measurement
Name
Measurement
Value
Filters the graph according to...
The name of the measurement.
The measurement value. See
"Set Dimension Information Dialog Box " on page 1238
.
Page 1223 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 41:
Web Application Server Resource Graphs
You can apply the following filter conditions to Web Application Server Resource graphs:
Filter
Condition
Resource
Name
Resource
Value
Filters the graph according to...
The name of the resource.
The value of the resource. See
"Set Dimension Information Dialog Box " on page 1238
.
Database Server Resource Graphs
You can apply the following filter conditions to Database Server Resource graphs:
Filter Condition Filters the graph according to...
Database Resource
Name
The name of the database resource.
Database Resource
Value
The value of the database resource. See
"Set Dimension Information
Dialog Box " on page 1238
.
Streaming Media Graphs
You can apply the following filter conditions to Streaming Media graphs:
Filter Condition
Streaming Media
Name
Streaming Media
Value
Filters the graph according to...
The name of the streaming media.
The value of the streaming media. See
"Set Dimension Information Dialog
Box " on page 1238
.
ERP/CRM Server Resource Graphs
You can apply the following filter conditions to ERP/CRM Server Resource graphs:
Filter Condition
ERP/CRM Server
Resource Name
Filters the graph according to...
The name of the ERP/CRM server resource.
ERP/CRM Server
Resource Value
The value of the ERP/CRM Server resource. See
"Set Dimension
Information Dialog Box " on page 1238 .
ERP Server Resource
Name
The name of the ERP server resource.
ERP Server Resource
Value
The value of the ERP server resource. See
"Set Dimension
Information Dialog Box " on page 1238 .
Page 1224 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 41:
Siebel Diagnostics Graphs
You can apply the following filter conditions to Siebel Diagnostics graphs:
Filter Condition
Siebel Transaction Name
Siebel Request Name
Siebel Layer Name
Siebel Area Name
Siebel Sub-Area Name
Siebel Server Name
Siebel Script Name
Response Time
Siebel Chain of Calls
Filters the graph according to...
The name of the Siebel transaction.
The name of the Siebel request.
The name of the Siebel layer.
The name of the Siebel area.
The name of the Siebel sub-area.
The name of the Siebel server.
The name of the Siebel script.
The response time of the Siebel transaction.
The chain of calls for the Siebel transaction.
Siebel DB Diagnostics Graphs
You can apply the following filter conditions to Siebel DB Diagnostics graphs:
Filter Condition
Transaction Name - SIEBEL
SQL Chain of Calls
SQL Alias Name
SQL Response Time
Filters the graph according to...
The name of the Siebel DB transaction.
The SQL chain of calls for the Siebel DB transaction.
The SQL alias name for the Siebel DB transaction.
The SQL response time of the Siebel DB transaction.
Oracle 11i Diagnostics Graphs
You can apply the following filter conditions to Oracle 11i Diagnostics graphs:
Filter Condition
Transaction Name - ORACLE
SQL Chain of Calls
SQL Alias Name - Oracle
SQL Response Time
Oracle SQL Parse Time
Oracle SQL Execute Time
Filters the graph according to...
The name of the Oracle transaction.
The SQL chain of calls for the Oracle transaction.
The SQL alias name for the Oracle transaction.
The SQL response time of the Oracle transaction.
The SQL parse time of the Oracle transaction.
The SQL execute time of the Oracle transaction.
Page 1225 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 41:
Filter Condition
Oracle SQL Fetch Time
Oracle SQL Other Time
Filters the graph according to...
The SQL fetch time of the Oracle transaction.
Other SQL time for the Oracle transaction.
Java Performance Graphs
You can apply the following filter conditions to Java Performance graphs:
Filter Condition
Java Performance Resource Name
Java Performance Resource Value
Filters the graph according to...
The name of the Java performance resource.
The value of the Java performance resource.
J2EE & .NET Diagnostics Graphs
You can apply the following filter conditions to J2EE & .NET Diagnostics graphs:
Filter Condition Filters the graph according to...
Transaction
Name
The name of the Java transaction.
Method Chain of Calls
The chain of calls for the Java method.
Layer Name
Class Name
Method Name
The name of the layer.
The name of the class.
The name of the method.
SQL Logical
Name
The SQL logical name for the Java transaction.
Response Time
The response time of the Java transaction.
The name of the host for the J2EE & .NET transaction.
Host Name -
J2EE/.NET
Application
Host Name -
(VM)
The name of the application host for the VM.
Transaction
Request
Transaction
Hierarchical
Path
The request for the transaction.
The hierarchical path of the transaction. For more information on setting this condition, see
"Hierarchical Path Dialog Box" on page 1234
.
Application Component Graphs
You can apply the following filter conditions to Application Component graphs:
Page 1226 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 41:
Filter Condition
Component
Resource Name
Filters the graph according to...
The resource name of the component.
Component
Resource Value
COM+ Interface
COM+ Response
Time
COM+ Call Count
The value of the component resource. See
"Set Dimension Information
Dialog Box " on page 1238
.
The interface of the COM+ component.
The response time of the COM+ component.
COM+ Method
.Net Resource
Name
.Net Value
The call count of the COM+ component.
The method of the COM+ component.
The resource name of the .NET component.
The .NET resource value. See
"Set Dimension Information Dialog Box " on page 1238 .
The class of the .NET component.
.Net Class
.Net Response Time
The response time of the .NET component.
.Net Call Count
The call count of the .NET component.
.Net Method
The method of the .NET component.
Application Deployment Graphs
You can apply the following filter conditions to Application Deployment graphs:
Filter Condition
Citrix Resource
Name
Citrix Resource
Value
Filters the graph according to...
The name of the Citrix resource.
The value of the Citrix resource. See
"Set Dimension Information Dialog
Box " on page 1238
.
Middleware Performance Graphs
You can apply the following filter conditions to Middleware Performance graphs:
Filter Condition
Message Queue
Resource Name
Message Queue
Resource Value
Filters the graph according to...
The name of the message queue resource.
The value of the Message Queue resource. See
"Set Dimension
Information Dialog Box " on page 1238 .
Page 1227 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 41:
Infrastructure Resource Graphs
You can apply the following filter conditions to Infrastructure Resource graphs:
Filter Condition Filters the graph according to...
Network Client
The name of the network client.
Network Client
Value
The value of the network client. See
"Set Dimension Information Dialog Box
" on page 1238
.
External Monitor Graphs
You can apply the following filter conditions to External Monitor graphs:
Filter Condition
External Monitor
Resource Name
External Monitor
Resource Value
Filters the graph according to...
The name of the external monitor resource.
The value of the external monitor resource. See
"Set Dimension
Information Dialog Box " on page 1238
.
Page 1228 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 41:
Page 1229 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 42:
Custom Filter Dialog Box
This dialog box enables you to customize your filter criteria.
Note
If you are specifying the start and end time for a transaction (in minutes:seconds format), the time is relative to the beginning of the load test scenario.
User interface elements are described below:
UI Element
Minimum
Maximum
Description
Specify a minimum value for the measurement.
Specify a maximum value for the measurement.
Page 1230 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 42:
Page 1231 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 43:
Filter Dialog Boxes
The filter dialog boxes (Graph Settings, Global Filter, and Analysis Summary Filter) enable you to filter the data that is displayed in the graph or report.
When adding a graph, the filter and sort button is displayed which enables you to filter and sort data before the graph is displayed.
To access Use one of the following:
l
View > Set Filter/Group By or click l
File > Set Global Filter or click
Note
l
View > Summary Filter or click
Some of the following fields are not displayed in all of the filter boxes.
User interface elements are described below:
UI Element Description
Filter Condition
Select criteria and values for each filter condition that you want to employ.
The applicable filter conditions are displayed for each graph. For details on each graphs filter conditions, see the chapter on the relevant graph.
Criteria
Select "=" (equals) or "<>" (does not equal).
Values
The filter conditions are grouped into three value types (discrete, continuous, and time-based).
A discrete value is a distinct integer (whole number) or string value such as
Transaction Name or Vuser ID. Select the check box(es) of the value(s) that you want to include in your filter. You can also customize your filter by entering wild cards to depict any single character or any series of characters.
Page 1232 of 1812 l
A continuous value is a variable dimension that can take any value within the minimum and maximum range limits, such as Transaction Response
Time. You set the dimension information for each measurement in the
"Set Dimension Information Dialog Box " on page 1238
.
HP LoadRunner (11.50)
User Guide
Chapter 43:
UI Element Description
l
A time-based value is a value that is based on time relative to the start of the load test scenario. Scenario Elapsed Time is the only condition that uses time-based values. You specify time-based values in the
"Scenario
Elapsed Time Dialog Box" on page 1236 .
For some filter conditions, one of the following dialog boxes opens to enable you to specify additional filtering details: l
"Set Dimension Information Dialog Box " on page 1238
l
"Vuser ID Dialog Box" on page 1240
l
"Scenario Elapsed Time Dialog Box" on page 1236
l
"Hierarchical Path Dialog Box" on page 1234 : Enables you to display the
hierarchial path of a transaction or component, or a method chain of calls.
Transaction
Percentile
The Summary Report contains a percentile column showing the response time of 90% of transactions (90% of transactions that fall within this amount of time). To change the value of the default 90 percentile, enter a new figure in the Transaction Percentile box.
Displays the default criteria and values for each filter condition.
Set Default
Clear All
Group By settings
Deletes all of the information you entered in the dialog box.
Use these settings to sort the graph display by grouping the data. You can group the data by: l
Available groups. Select the group by which you want to the sort the results, and click the right arrow.
l
Selected groups. Displays a list of all the selected groups by which the results will be sorted. To remove a value, select it and click the left arrow.
Reset all graphs to their defaults prior to applying the
Global Filter
All graphs filter settings are reverted to their default.
Page 1233 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 44:
Hierarchical Path Dialog Box
This dialog box enables you to display the hierarchical path of a transaction or component, or a method chain of calls.
To access
View menu > Set Filter/Group by > Filter condition pane > Transaction,
Component Hierarchical Path or a method chain of calls
User interface elements are described below:
UI Element
Transaction, Component
Hierarchical Path or a method chain of calls
Description
Select the box for the path where you want to start to see results. Only the selected path and its immediate sub-nodes will be displayed.
Page 1234 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 44:
Page 1235 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 45:
Scenario Elapsed Time Dialog Box
This dialog box enables you to specify the start and end time range for the graph's x-axis.
To access
Note
View menu > Set Filter/Group by > Filter condition pane > Scenario Elapsed
Time
The time is relative to the start of the scenario.
User interface elements are described below:
UI Element
From
To
Description
Specify a start value for the desired range.
Specify an end value for the desired range.
Page 1236 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 45:
Page 1237 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 46:
Set Dimension Information Dialog Box
This dialog box enables you to set the dimension information for each measurement (transaction, number of released Vusers, resource) in the result set. You specify the minimum and maximum values for each measurement you want in the analysis. By default, the full range of values for each measurement is displayed.
To access
You can open this dialog box from the following locations: l
Transaction graphs > View menu > Set Filter/Group by > Filter condition pane
> Transaction Response Time l
Vusers graph > Rendezvous graph > View menu > Set Filter/Group by > Filter
condition pane > Number of Released Vusers l
All graphs that measure resources (Web Server, Database Server, and so on) >
View menu > Set Filter/Group by > Filter condition pane > Resource Value
Note
If you are specifying the start and end time for a transaction (in minutes:seconds format), the time is relative to the beginning of the load test scenario.
User interface elements are described below:
UI Element
Minimum
Maximum
Description
Specify a minimum value for the measurement.
Specify a maximum value for the measurement.
Page 1238 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 46:
Page 1239 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 47:
Vuser ID Dialog Box
This dialog box opens to enable the entering of additional filter information for the Vuser ID filter condition.
To access View menu > Set Filter/Group by > Filter condition pane > Vuser ID
User interface elements are described below:
Description UI
Element
Value
Range
Vusers
Enter the Vuser IDs of the Vusers you want the graph(s) to display, separated by commas.
Specify the beginning and end of the desired range of Vusers you want the graph(s) to display.
Displays the existing Vuser IDs from which you can choose.
Working with Analysis Graph Data
Page 1240 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 47:
Page 1241 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 48:
Determining a Point's Coordinates
You can determine the coordinates and values at any point in a graph. Place the cursor over the point you want to evaluate and Analysis displays the axis values and other grouping information.
Page 1242 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 48:
Page 1243 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 49:
Drilling Down in a Graph
Drill down enables you to focus on a specific measurement within your graph and display it according to a desired grouping. The available groupings depend on the graph. For example, the
Average Transaction Response Time graph shows one line per transaction. To determine the response time for each Vuser, you drill down on one transaction and sort it according to Vuser ID.
The graph displays a separate line for each Vuser's transaction response time.
Note: The drill down feature is not available for the Web Page Diagnostics graph.
The following graph shows a line for each of five transactions.
When you drill down on the MainPage transaction, grouped by Vuser ID, the graph displays the response time only for the MainPage transaction, one line per Vuser.
Page 1244 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 49:
You can see from the graph that the response time was longer for some Vusers than for others.
To determine the response time for each host, you drill down on one transaction and sort it according to host. The graph displays a separate line for the transaction response time on each host. For more information on drilling down in a graph, see
"How to Manage Graph Data" on page
1254 .
Page 1245 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 50:
Changing the Granularity of the Data
You can make the graphs easier to read and analyze by changing the granularity (scale) of the x-
axis. The maximum granularity is half of the graph's time range. To ensure readability and clarity,
Analysis automatically adjusts the minimum granularity of graphs with ranges of 500 seconds or more.
In the following example, the Hits per Second graph is displayed using different granularities. The yaxis represents the number of hits per second within the granularity interval. For a granularity of 1, the y-axis shows the number of hits per second for each one second period of the load test scenario.
For a granularity of 5, the y-axis shows the number of hits per second for every five-second period of the scenario.
Page 1246 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 50:
In the above graphs, the same load test scenario results are displayed in a granularity of 1, 5, and
10. The lower the granularity, the more detailed the results. For example, using a low granularity as in the upper graph, you see the intervals in which no hits occurred. It is useful to use a higher granularity to study the overall Vuser behavior throughout the scenario.
By viewing the same graph with a higher granularity, you can see that overall, there was an average of approximately 1 hit per second.
Page 1247 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 51:
Viewing Measurement Trends
You can view the pattern of a line graph more effectively by standardizing the graph's y-axis values.
Standardizing a graph causes the graph's y-axis values to converge around zero. This cancels the measurements' actual values and allows you to focus on the behavior pattern of the graph during the course of the load test scenario.
Analysis standardizes the y-axis values in a graph according to the following formula:
New Y value = (Previous Y Value - Average of previous values) / STD of previous values
Page 1248 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 51:
Page 1249 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 52:
Auto Correlating Measurements
You can detect similar trends among measurements by correlating a measurement in one graph with measurements in other graphs. Correlation cancels the measurements' actual values and allows you to focus on the behavior pattern of the measurements during a specified time range of the load test scenario.
In the following example, the t106Zoek:245.lrr measurement in the Average Transaction Response
Time graph is correlated with the measurements in the Windows Resources, Microsoft IIS, and
SQL Server graphs. The five measurements most closely correlated with t106Zoek:245.lrr are displayed in the graph below.
Note: This feature can be applied to all line graphs except the Web Page Diagnostics graph.
Page 1250 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 52:
Page 1251 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 53:
Viewing Raw Data
You can view the actual raw data collected during test execution for the active graph. The Raw
Data view is not available for all graphs.
Viewing the raw data can be especially useful in the following cases: l
To determine specific details about a peak—for example, which Vuser was running the transaction that caused the peak value(s).
l
To perform a complete export of unprocessed data for your own spreadsheet application.
For user interface details, click
"Graph Data View Table" on page 1262
.
Page 1252 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 53:
Page 1253 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 54:
How to Manage Graph Data
The following list includes the utilities you can use in Analysis to enable you to manage graph data to most effectively view the displayed data.
Determine a point's coordinates
To determine the coordinates and values at any point in a graph, place the cursor over the point you want to evaluate. Analysis displays the axis values and other grouping information.
Drill down in a graph
Drill down enables you to focus on a specific measurement within your graph and display it according to the desired grouping.
1. Right-click on a line, bar, or segment within the graph, and select Drill Down. The Drill Down
Options dialog box opens, listing all of the measurements in the graph.
2. Select a measurement for drill down.
3. From the Group By box, select a group by which to sort.
4. Click OK. Analysis drills down and displays the new graph.
To undo the last drill down settings, choose Undo Set Filter/Group By from the right-click menu.
n
To perform additional drill-downs, repeat steps 1 to 4.
n
To clear all filter and drill down settings, choose Clear Filter/Group By from the right-click menu.
Change the granularity of the data
The task describes how to change the granularity of a graph.
1. Click inside a graph.
2. Select View > SetGranularity, or click Set Granularity. The Granularity dialog box opens.
3. Enter the granularity of the x-axis and select a time measurement. The maximum granularity is half of the graph's time range.
4. To ensure readability and clarity, LoadRunner automatically adjusts the minimum granularity of graphs with ranges of 500 seconds or more.
5. Click OK.
View measurement trends
This task describes how to activate the View Measurements Trends option from a line graph.
1. Select View > View Measurement Trends, or right-click the graph and choose View
Measurement Trends. Alternatively, you can select View > Configure Measurements and check the View measurement trends for all measurements box.
Page 1254 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 54:
Note: The standardization feature can be applied to all line graphs except the Web Page
Diagnostics graph.
2. View the standardized values for the line graph you selected. The values in the Minimum,
Average, Maximum, and Std. Deviation legend columns are real values.
To undo the standardization of a graph, repeat step 1.
Note: If you standardize two line graphs, the two y-axes merge into one y-axis.
Auto correlate measurements
You can detect similar trends among measurements by correlating a measurement in one graph with measurements in other graphs. Correlation cancels the measurements' actual values and allows you to focus on the behavior pattern of the measurements during a specified time range of the load test scenario.
1. From a graph or legend, right-click the measurement you want to correlate and choose Auto
Correlate. The Auto Correlate dialog box opens with the selected measurement displayed in the graph.
2. Select a suggested time range method and time range.
3. If you applied a time filter to your graph, you can correlate values for the complete scenario time range by clicking the Display button in the upper right-hand corner of the dialog box.
4. To specify the graphs you want to correlate with a selected measurement and the type of graph output to be displayed, perform the following: n
Select the Correlation Options tab.
n
Select the graphs to correlate, the data interval, and output options, as described in
"Drill
Down Options Dialog Box" on page 1256 .
n
On the Time Range tab, click OK. Analysis generates the correlated graph you specified.
Note the two new columns—Correlation Match and Correlation—that appear in the
Legend window below the graph.
To specify another measurement to correlate, select the measurement from the Measurement to Correlate box at the top of the Auto Correlate dialog box.
The minimum time range should be more than 5% of the total time range of the measurement.
Trends which are smaller than 5% of the whole measurement will be contained in other larger segments.
Sometimes, very strong changes in a measurement can hide smaller changes. In cases like these, only the strong change is suggested, and the Next button will be disabled.
Note: This feature can be applied to all line graphs except the Web Page Diagnostics graph.
Page 1255 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 55:
Drill Down Options Dialog Box
This dialog box lists all the measurements in the graph.
To access
See also
<Right-click> graph line/bar/segment > Drill Down
"Drilling Down in a Graph " on page 1244
User interface elements are described below:
UI Element
Drill Down on
Group By
Description
Filter graph by selected transaction.
The selected transaction is sorted by selected criteria.
Page 1256 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 55:
Page 1257 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 56:
Auto Correlate Dialog Box
This dialog box enables you to configure settings used to correlate measurements from the selected graph with measurements in other graphs.
To access
Use one of the following;
Right click on graph > Auto Correlate
Right click on graph > Auto Correlate > Time Range tab
Right click on graph > Auto Correlate > Correlation Options tab
Important information
You can also use the green and red vertical drag bars to specify the start and end values for the scenario time range.
Note
See also
The granularity of the correlated measurements graph may differ from that of the original graph, depending on the scenario time range defined.
"Auto Correlating Measurements " on page 1250
Page 1258 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 56:
Time Range Tab
The Time Range tab of the Auto Correlate dialog box enables you to specify a load test scenario time range for the correlated measurement graph.
User interface elements are described below:
UI Element
Measurement to
Correlate.
Display values for complete time range.
Description
Select the measurement you want to correlate.
Suggest Time Range
By
Best
Next
Previous
Automatically suggest for new measurement
From
Click Display to correlate values for the complete scenario time range. This option is available only if you applied a time filter to your graph.
Analysis automatically demarcates the most significant time period for the measurement in the scenario.
l
Trend. Demarcated an extended time segment which contains the most significant changes.
l
Feature. Demarcates a smaller dimension segment which forms the trend.
Choose the time segment most dissimilar to its adjacent segments.
Suggest the next time segment for auto correlation. Each suggestion is successively less dissimilar.
Return to the previous suggestion of a time segment.
Generates new suggestions each time that the Measurement to
Correlate item changes.
To
Specify a start value (in hh:mm:ss format) for the desired scenario time range.
Specify an end value (in hh:mm:ss format) for the desired scenario time range.
Correlation Options tab
You use the Correlation Options tab of the Auto Correlate dialog box to set the graphs to correlate, the data interval, and the output options.
User interface elements are described below:
UI Element Description
Select
Graphs for
Correlation
Select the graphs whose measurements you want to correlate with your selected measurement.
Page 1259 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 56:
UI Element Description
Data
Interval
Output
Calculate the interval between correlation measurement polls.
l
Automatic. Uses an automatic value, determined by the time range.
l
Correlate data based on X second intervals. Enter a fixed value.
Choose the level of output displayed.
l
Show the X most closely correlated measurements. Displays only the specified number of measurements most closely related to the selected measurement. The default setting is 5.
l
Show measurements with an influence factor of at least X%. Displays only those measurements that converge to the specified percent with the selected measurement. The default setting is 50%.
Page 1260 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 56:
Page 1261 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 57:
Graph Data View Table
You can view graph data in spreadsheet view or raw data view. The data is instantly displayed on request.
To access
Use one of the following:
Windows > Graph Data
Windows > Raw Data
Raw Data is not available for all graphs.
Note
User interface elements are described below:
UI Element Description
Copies the data that you have selected.
Copies the spreadsheet to the clipboard. You can paste to a spreadsheet.
Saves the spreadsheet data to an Excel file. Once you have the data in Excel, you can generate your own customized graphs.
Page 1262 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 57:
UI Element
Relative Time
Description
Use the buttons on the toolbar to navigate through the table, and mark any records for future reference.
The first column in the Graph Data window. displays the elapsed scenario time (the x-axis values). The following columns displays the relative y-axis values for each measurement represented on the graph.
Raw Data dialog box
In Set Range, set a time range.
Page 1263 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 58:
Graph Properties Window
This window displays the details of the graph or report selected in the Session Explorer. Fields that appear in black are editable. When you select an editable field, an edit button is displayed next to the selected field value.
To access Windows > Properties
User interface elements are described below:
UI Element Description
Enables you to edit the value for the selected field.
Graph fields
l
Filter. Shows configured filter.
l
Granularity. Shows configured granularity.
l
Group By. Shows the filter for selected group.
l
Measurement Breakdown. Shows the measurements of the graph.
l
Title. Shows the name of the graph in the graph display window.
Page 1264 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 58:
UI Element Description
Summary
Report fields
l
Description. A short summary of what is included in the summary report.
l
Filter. Shows configured filter for the summary report.
l
Percentile. The Summary Report contains a percentile column showing the response time of 90% of transactions (90% of transactions that fall within this amount of time). To change the value of the default 90 percentile, enter a new figure in the Transaction Percentile box.
l
Title. The name of the summary report.
Transaction
Analysis
Report fields
When clicking the edit button for some of the fields, the Analyze Transaction
Settings dialog box opens, enabling you to edit some of the Analyze Transaction settings.
Page 1265 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 59:
Viewing Load Test Scenario Information
Page 1266 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 59:
Page 1267 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 60:
Viewing Load Test Scenario Information
In Analysis, you can view information about the load test scenario which you are analyzing. You can view the scenario run time settings and output messages that were generated by the Controller during the scenario.
You can view information about the Vuser groups and scripts that were run in each scenario, as well as the run time settings for each script in a scenario, in the Scenario Run Time Settings dialog box.
Note: The run time settings allow you to customize the way a Vuser script is executed. You configure the run time settings from the Controller or Virtual User Generator (VuGen) before running a scenario. For information on configuring the run time settings, refer to the HP Virtual
User Generator User Guide.
Choose File > View Scenario Run Time Settings, or click View Run Time Settings on the toolbar.
The Scenario Run Time Settings dialog box opens, displaying the Vuser groups, scripts, and scheduling information for each scenario. For each script in a scenario, you can view the run time settings that were configured in the Controller or VuGen before scenario execution.
Page 1268 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 60:
Page 1269 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 61:
How to Configure Controller Output Messages Settings
This task describes how to configure settings for output messages.
1. Choose Tools > Options and select the Result Collection tab.
2. In the Copy Controller Output Messages to Analysis Session area, choose one of the following options: n
Copy if data set is smaller than X MB. Copies the Controller output data to the Analysis session if the data set is smaller than the amount you specify.
n
Always Copy. Always copies the Controller output data to the Analysis session.
n
Never Copy. Never copies the Controller output data to the Analysis session.
3. Apply your settings.
n
To apply these settings to the current session, click Apply now to active session.
n
To apply these settings after the current session is saved, click OK.
Page 1270 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 61:
Page 1271 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 62:
Controller Output Messages Window
This window displays error, notification, warning, debug, and batch messages that are sent to the
Controller by the Vusers and load generators during a scenario run.
To access Window > Controller Output Messages
Important information
l
The Summary tab is displayed by default when you open this window.
l
Analysis searches for the output data in the current Analysis session. If the data is not found, it searches in the scenario results folder. If Analysis cannot locate the results folder, no messages are displayed.
User interface elements are described below:
UI Element
Summary Tab
Filtered Tab
Description
See
"Summary Tab" on page 1274
See
"Filtered Tab" on page 1276
Page 1272 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 62:
Page 1273 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 63:
Summary Tab
This tab displays summary information about the messages sent during a scenario run.
To access
Important Information
Parent topic
See also
Controller Output Messages window > Summary tab
You can drill down further on any information displayed in blue.
"Controller Output Messages Window" on page 1272
"Filtered Tab" on page 1276
User interface elements are described below:
UI Element Description
Displays the full text of the selected output message in the Detailed Message
Text area at the bottom of the Output window.
Remove all messages. Clears all log information from the Output window.
Export the view. Saves the output to a specified file.
l
Freeze. Stops updating the Output window with messages.
l
Resume. Resumes updating the Output window with messages. The newly updated log information is displayed in a red frame.
Displays the full text of the selected output message when you click the Details button.
Detailed
Message
Text
Generators
Help
Message
Code
Sample
Message
Text
Scripts
Displays the number of load generators that generated messages with the specified message code.
Displays an icon if there is a link to troubleshooting for the message.
Displays the code assigned to all similar messages. The number in parentheses indicates the number of different codes displayed in the Output window.
Displays an example of the text of a message with the specified code.
Displays the number of scripts whose execution generated messages with the specified code.
Displays the total number of sent messages with the specified code.
Total
Messages
Type
The type of message being displayed. The following icons indicate the various message types. For more information about each type, see Type of Message below:
Page 1274 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 63:
UI Element Description
Type of
Message
Vusers
l l
Batch
Debug l l
Errors
Notifications l
Warnings l
Alerts
Filters the output messages to display only certain message types. Select one of the following filters: l
All messages. Displays all message types.
l
Batch. Sent instead of message boxes appearing in the Controller, if you are using automation.
l
Debug. Sent only if the debugging feature is enabled in the Controller.
(Expert mode: Tools > Options > Debug Information). For more information, see "Options > Debug Information Tab" on page 242.
l
Errors. Usually indicate that the script failed.
l
Notifications. Provides run-time information, such as message sent using
lr_output_message.
l
Warnings. Indicates that the Vuser encountered a problem, but the scenario continued to run.
l
Alerts. Indicates a warning.
Displays the number of Vusers that generated messages with the specified code.
Page 1275 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 64:
Filtered Tab
This tab displays a drilled down view by message, Vuser, script, or load generator. For example, if you drill down on the Vuser column, the Filtered tab displays all the messages with the code you selected, grouped by the Vusers that sent the messages.
To access
Controller Output Messages window > Summary tab. Click the blue link on the column that you wish to view more information about.
The tab appears when you click on a blue link in the Summary tab.
Important information
See also
"Summary Tab" on page 1274
User interface elements are described below (unlabeled elements are shown in angle brackets):
UI Element Description
Previous/Next View. Enables you to move between the various drill down levels.
Displays the full text of the selected output message in the Detailed Message
Text area at the bottom of the Output window.
Export the view. Saves the output to a specified file.
<Message icon>
Refreshes the Filtered tab with new log information that arrived in the Output window updated in the Summary tab.
Displays an icon indicating the type of message by which the current Output view is filtered.
Active Filter
Displays the category or categories by which the current Output view is filtered.
Viewed By
Displays the name of the column on which you selected to drill down. The following icons indicate the various message types: l l l l l l
Batch
Debug
Errors
Notifications
Warnings
Alerts
Page 1276 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 64:
UI Element Description
Detailed
Message
Text
Displays the full text of the selected output message when the Details button is selected.
Message
Displays all instances of the sample message text.
Script
Action
Line #
The script on which the message was generated. If you click the blue link,
VuGen opens displaying the script.
The action in the script where the message was generated. If you click the blue link, VuGen opens the script to the relevant action.
The line in the script where the message was generated. If you click the blue link, VuGen opens the script and highlights the relevant line.
The total number of lines in the script where the Vuser failed.
# Lines
Time
Iteration
Vuser
The time the message was generated.
The iteration during which the message was generated.
The Vuser that generated the message.
Generator
The load generator on which the message was generated. If you click the blue link, the Load Generator dialog box opens.
# Messages
The number of messages generated by a specific Vuser.
Page 1277 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 65:
Scenario Run Time Settings Dialog Box
This dialog box enables you to view information about executed load test scenarios, as well as the run time settings for each script in a scenario.
To access
See also
Toolbar >
"Viewing Load Test Scenario Information" on page 1268
User interface elements are described below
UI
Element
Result
Name
Description
The name of the result file.
Scenario
Scripts
Group
Name
Displays the result set for each executed scenario, as well as the Vuser groups and scripts that were run in the scenario.
Displays the name of the group to which the selected script belongs.
Full Path
Displays the script's full directory path.
Script
Name
Displays the name of the selected script.
Scenario
Schedule
Displays goal-oriented or manual scenario scheduling information for the selected scenario.
View
Script
Opens the Virtual User Generator, so that you can edit the script. For more information on editing scripts, refer to the HP Virtual User Generator User Guide.
Page 1278 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 65:
Page 1279 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 66:
Cross Result and Merged Graphs
Page 1280 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 66:
Page 1281 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 67:
Cross Result and Merged Graphs Overview
Comparing results is essential for determining bottlenecks and problems. You use Cross Result graphs to compare the results of multiple load test scenario runs. You create Merged graphs to compare results from different graphs within the same scenario run.
Page 1282 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 67:
Page 1283 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 68:
Cross Result Graphs Overview
Cross Result graphs are useful for: l
Benchmarking hardware l
Testing software versions l
Determining system capacity
If you want to benchmark two hardware configurations, you run the same load test scenario with both configurations and compare the transaction response times using a single Cross Result graph.
Suppose that your vendor claims that a new software version is optimized to run quicker than a previous version. You can verify this claim by running the same scenario on both versions of the software, and comparing the scenario results.
You can also use Cross Result graphs to determine your system's capacity. You run scenarios using different numbers of Vusers running the same script. By analyzing Cross Result graphs, you can determine the number of users that cause unacceptable response times.
In the following example, two scenario runs are compared by crossing their results, res12, and
res15. The same script was executed twice—first with 100 Vusers and then with 50 Vusers.
In the first run, the average transaction time was approximately 59 seconds. In the second run, the average time was 4.7 seconds. It is apparent that the system works much slower with a greater load.
The Cross Result graphs have an additional filter and group by category: Result Name. The above graph is filtered to the OrderRide transaction for results res12, and res15, grouped by Result
Name.
Page 1284 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 68:
Page 1285 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 69:
Merging Types Overview
Analysis provides three types of merging:
Overlay
Superimpose the contents of two graphs that share a common x- axis. The left y-axis on the merged graph shows the current graph's values. The right y-axis shows the values of the graph that was merged. There is no limit to the number of graphs that you can overlay. When you overlay two graphs, the y-axis for each graph is displayed separately to the right and left of the graph. When you overlay more than two graphs, Analysis displays a single y-axis, scaling the different measurements accordingly.
In the following example, the Throughput and Hits per Second graph are overlaid with one another.
Tile
View contents of two graphs that share a common x-axis in a tiled layout, one above the other. In the following example the Throughput and Hits per Second graph are tiled one above the other.
Page 1286 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 69:
Correlate
Plot the y-axis of two graphs against each other. The active graph's y-axis becomes the x-axis of the merged graph. The y-axis of the graph that was merged, becomes the merged graph's y-axis.
In the following example, the Throughput and Hits per Second graph are correlated with one another. The x-axis displays the bytes per second (the Throughput measurement) and the y-axis shows the average hits per second.
Page 1287 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 70:
How to Generate Cross Results Graphs
This task describes how to create a Cross Result graph for two or more result sets. The Cross
Result dialog box enables you to compare the results of multiple load test scenario runs.
1. Choose File > Cross With Result. The Cross Results dialog box opens.
2. Click Add to add an additional result set to the Result List. The Select Result Files for Cross
Results dialog box opens.
3. Locate a results folder and select its result file (.lrr). Click OK. The scenario is added to the
Result List.
4. Repeat steps 2 and 3 until all the results you want to compare are in the Result List.
5. When you generate a Cross Result graph, by default it is saved as a new Analysis session. To save it in an existing session, clear the Create New Analysis Session for Cross Result box.
6. Click OK. Analysis processes the result data and asks for a confirmation to open the default graphs.
Note: When generating a Cross Results Session, verify that the transaction names do not contain a <_> or <@> symbol. This will cause errors to occur when attempting to open the
Cross Results graphs.
After you generate a Cross Result graph, you can filter it to display specific scenarios and transactions. You can also manipulate the graph by changing the granularity, zoom, and scale.
You can view a summary report for the Cross Result graph.
Page 1288 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 70:
Page 1289 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 71:
How to Generate Merged Graphs
This task describes how to merge the results of two graphs from the same load test scenario into a single graph. The merging allows you to compare several different measurements at once. For example, you can make a merged graph to display the network delay and number of running
Vusers, as a function of the elapsed time.
You can merge all graphs with a common x-axis.
1. Select a graph in the Session Explorer or select its tab to make it active.
2. Choose View > Merge Graphs or click Merge Graphs. The Merge Graphs dialog box opens and displays the name of the active graph.
3. Select a graph with which you want to merge your active graph. Only the graphs with a common x-axis to the active graph are available.
4. Select the merge type and a title for the merged graph. By default, Analysis combines the titles of the two graphs being merged. For more information, see
"Merge Graphs Dialog Box" on page
1292 .
5. Click OK.
6. Filter the graph just as you would filter any ordinary graph.
Page 1290 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 71:
Page 1291 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 72:
Merge Graphs Dialog Box
This dialog box enables you to merge two graphs into a single graph.
To access View > Merge Graphs
Important information
In order to merge graphs, the graphs' x-axes must be the same measurement. For example, you can merge Web Throughput and Hits per Second graphs, because their x-axes are Scenario Elapsed Time.
See also
"Merging Types Overview" on page 1286
User interface elements are described below:
UI
Element
Description
Select
Graph to merge with
The drop-down list shows all of the open graphs that share a common x-axis measurement with the current graph. Select one of the graphs in the list.
Select type of merge
l
Overlay. View contents of two graphs that share a common x-axis. The left yaxis on the merged graph shows the current graph's values. The right y-axis shows the values of the graph that was merged with the current graph.
l
Tile. View contents of two graphs that share a common x-axis in a tiled layout, one above the other.
l
Correlate. Plot the y-axes of two graphs against each other. The active graph's yaxis becomes the x-axis of the merged graph. The y-axis of the graph that was merged, becomes the merged graph's y-axis.
Title of
Merged
Graph
Enter a title for the merged graph. This title will appear in the Session Explorer
(Windows > Session Explorer).
Page 1292 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 72:
Page 1293 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 73:
Defining Service Level Agreements
Page 1294 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 73:
Page 1295 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 74:
Service Level Agreements Overview
Service level agreements (SLAs) are specific goals that you define for your load test scenario.
After a scenario run, HP LoadRunner Analysis compares these goals against performance related data that was gathered and stored during the course of the run, and determines whether the SLA passed or failed.
Depending on the measurements that you are evaluating for your goal, LoadRunner determines the
SLA status in one of the following ways:
SLA Type Description
SLA status determined at time intervals over a timeline
Analysis displays SLA statuses at set time intervals over a timeline within the run. At each time interval in the timeline—for example, every 10 seconds—
Analysis checks to see if the measurement's performance deviated from the threshold defined in the SLA.
Measurements that can be evaluated in this way: l
Transaction Response Time (Average) per time interval
l
Errors per Second per time interval
SLA status determined over the whole run
Analysis displays a single SLA status for the whole scenario run.
Measurements that can be evaluated in this way: l
Transaction Response Time (Percentile) per run
l
Total Hits per run
l
Average Hits (hits/second) per run
l
Total Throughput (bytes) per run
l
Average Throughput (bytes/second) per run
You can define and edit SLAs in the Controller or in Analysis.
Page 1296 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 74:
Page 1297 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 75:
Tracking Period
When you define service level agreements (SLAs)an SLA for measurements that are evaluated over a timeline, Analysis determines SLA statuses at specified time intervals within that timeline.
The frequency of the time intervals is called the tracking period.
An internally-calculated tracking period is defined by default. You can change the tracking period by entering a value in the Advanced Options dialog box which Analysis plugs into a built-in algorithm to calculate the tracking period. For details, see
"Advanced Options Dialog Box (Service Level
Agreement Pane)" on page 1308
.
Page 1298 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 75:
Page 1299 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 76:
How to Define Service Level Agreements
This task describes how to define service level agreements (SLAs).
You can define service level agreements (SLAs) which measure scenario goals over time intervals, or over a whole scenario run. For details, see
"Service Level Agreements Overview " on page 1296 .
Tip: For a use-case scenario related to this task, see
"How to Define Service Level
Agreements - Use-Case Scenario " on page 1302
.
1.
Prerequisites
If you are defining an SLA for Average Transaction Response Time, your scenario must include a script that contains at least one transaction.
2.
Run through the SLA wizard
In the Service Level Agreement pane, click New to open the Service Level Agreement wizard.
For user interface details, see
"Service Level Agreement Wizard " on page 1312 .
a. Select a measurement for the SLA.
b. If you are defining an SLA for Average Transaction Response Time or Transaction
Response Time (Percentile), select the transactions to include in your goal.
c. (Optional) When evaluating SLA statuses over a timeline, select load criteria to take into account and define appropriate load value ranges for the load criteria. For an example, see
"How to Define Service Level Agreements - Use-Case Scenario " on page 1302
.
d. Set thresholds for the measurements.
o
If the Average Transaction Response Time or Errors per Second exceed the defined thresholds, Analysis will produce a Failed SLA status.
o
If Transaction Response Time(Percentile), Total Hits per run, Average Hits
(hits/second) per run, Total Throughput (bytes) per run, or Average Throughput
(bytes/second) per run are lower than the defined threshold, Analysis will produce a
Failed SLA status.
3.
Define a tracking period - optional
For measurements whose SLA statuses are determined over time intervals, you need to define the frequency of the time intervals, that is, the tracking period. For details, see
"Tracking
Period " on page 1298 .
For user interface details, see
"Advanced Options Dialog Box (Service Level Agreement
Pane)" on page 1308
.
4.
Results
When analyzing your scenario run, HP LoadRunner Analysis compares the data collected from the scenario run against the SLA settings, and determines SLA statuses which are included in the default Summary Report.
Page 1300 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 76:
Page 1301 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 77:
How to Define Service Level Agreements - Use-Case
Scenario
This use-case scenario describes how to define a service level agreement (SLA) for Average
Transaction Response Time.
1.
Background
The administrator of HP Web Tours would like to know when the average transaction response time for booking a flight and searching for a flight exceeds a certain value. Assume that your scenario includes a script that includes the following transactions: book_flight and search_
flight.
2.
Start the SLA wizard
In the Service Level Agreement pane, click New to open the Service Level Agreement wizard.
3.
Select the measurement for the SLA
On the Select a Measurement page, under Select a Measurement for Your Goal, in the
Transaction Response Time box, select Average.
4.
Select the transactions to evaluate in your goal
On the Select a Transaction page, select the transactions to be evaluated: book_flight and
search_flight.
5.
Select a load criterion and define appropriate ranges of load - optional
On the Select Load Criteria page, select the load criterion to take into account when evaluating the average transaction response time.
In this case, to see the effect that various quantities of Vusers running on the system has on the average transaction response time of each transaction, in the Load Criteria box, select
Running Vusers.
Then set the value ranges for the running Vusers:
Page 1302 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 77:
Consider less than 20 Vusers to be a light load, 20 – 50 Vusers an average load, and 50 Vusers or more a heavy load. Enter these values in the Load Values boxes.
Note:
n
You can set up to three in-between ranges.
n
Valid load value ranges are consecutive—there are no gaps in the range—and span all values from zero to infinity.
6.
Set thresholds
On the Set Threshold Values page, you define the acceptable average transaction response times for the transactions, taking into account the defined load criteria.
In this case, define the same threshold values for both transactions as follows: for a light load, a reasonable average response time can be up to 5 seconds, for an average load, up to 10 seconds, and for a heavy load, up to 15 seconds.
Tip: To define the same thresholds for all the transactions, you can type the values in the table nearer the bottom of the Set Threshold Values page, and click Apply to all
transactions.
7.
Define a tracking period - optional
When SLA statuses for a measurement are determined at time intervals over a timeline, the frequency of the time intervals is determined by the tracking period.
This step is optional because an internally-calculated tracking period of at least 5 seconds is defined by default. You can change the tracking period in the Advanced Options dialog box: a. In the Service Level Agreement pane, click the Advanced button.
b. Select Tracking period of at least X seconds, and select a tracking period. The time
Page 1303 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 77: intervals are calculated by Analysis according to a built-in algorithm and as a function of the value you enter here.
Example:
If you select a tracking period of 10, and the aggregation granularity for the scenario
(defined in Analysis) is 6, then the tracking period is set to the nearest multiple of 6 that is greater than or equal to 10, that is, Tracking Period = 12.
For details, see
"Tracking Period " on page 1298 .
For user interface details, see
"Advanced Options Dialog Box (Service Level Agreement
Pane)" on page 1308 .
8.
Results
When analyzing your scenario run, Analysis applies your SLA settings to the default Summary
Report and the report is updated to include all the relevant SLA information.
For example, it displays the worst performing transactions in terms of defined SLAs, how specific transactions performed over set time intervals, and overall SLA statuses.
Page 1304 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 77:
Page 1305 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 78:
Service Level Agreement Pane
This pane lists all the service level agreements (SLAs) defined for the scenario.
To access
Relevant
Tasks
Tools menu > Configure SLA Rules > Service Level Agreement pane l
"How to Design a Goal-Oriented Scenario " on page 866
l
"How to Design a Manual Scenario " on page 868
l
"How to Define Service Level Agreements " on page 1300
l
"How to Define Service Level Agreements - Use-Case Scenario " on page
1302
"Service Level Agreements Overview " on page 1296
See also
User interface elements are described below:
UI Element Description
Starts the Service Level Agreement wizard where you can define new goals for the load test scenario.
Opens the Goal Details dialog box which displays a summary of the details of the selected SLA.
Opens the Service Level Agreement wizard where you can modify the goals defined in the SLA.
Deletes the selected SLA.
Service Level
Agreement list
Opens the Advanced Options dialog box where you can adjust the tracking period for measurements that are evaluated per time interval over a timeline.
For more information, see
"Tracking Period " on page 1298 .
For user interface details, see
"Advanced Options Dialog Box (Service Level
Agreement Pane)" on page 1308 .
Lists the SLAs defined for the scenario.
Page 1306 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 78:
Page 1307 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 79:
Advanced Options Dialog Box (Service Level Agreement
Pane)
This dialog box enables you to define a tracking period for load test scenario.
To access
Tools menu > Configure SLA Rules > Service Level Agreement pane >
Important information
Relevant tasks
The tracking period is calculated by Analysis according to a built-in algorithm and as a function of the value entered here.
l
"How to Define Service Level Agreements " on page 1300
l
"How to Define Service Level Agreements - Use-Case Scenario " on page
1302
"Service Level Agreements Overview " on page 1296
See also
User interface elements are described below:
UI Element Description
Internally calculated tracking period
Analysis sets the tracking period to the minimum value possible, taking into account the aggregation granularity defined for the scenario. This value is at least
5 seconds. It uses the following formula:
Tracking Period = Max (5 seconds, aggregation granularity)
Tracking period of at least X seconds
Determines the minimum amount of time for the tracking period. This value can never be less than 5 seconds.
Analysis sets the tracking period to the nearest multiple of the scenario's aggregation granularity that is greater than or equal to the value (X) that you selected.
For this option, Analysis uses the following formula:
Tracking Period =
Max(5 seconds, m(Aggregation Granularity)) where m is a multiple of the scenario's aggregation granularity such that
m(Aggregation Granularity) is greater than or equal to X.
Example: If you select a tracking period of X=10, and the aggregation granularity for the scenario is 6, then the tracking period is set to the nearest multiple of 6 that is greater than or equal to 10, that is, Tracking Period = 12.
Page 1308 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 79:
Page 1309 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 80:
Goal Details Dialog Box (Service Level Agreement Pane)
This dialog box displays the thresholds that were set for the selected SLA.
To access
Tools menu > Configure SLA Rules > Service Level Agreement pane >
Important information
See also
If you defined load criteria as part of your SLA, the threshold values are displayed per the defined load value ranges.
"Service Level Agreements Overview " on page 1296
Page 1310 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 80:
Page 1311 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 81:
Service Level Agreement Wizard
This wizard enables you to define goals or service level agreements (SLAs) for your load test scenario.
To access
Tools menu > Configure SLA Rules > Service Level Agreement pane >
Important information
Relevant tasks
Wizard map -
Goal measured per time interval
Wizard map -
Goal measured over whole scenario run
See also
There are two modes for the Service Level Agreement wizard. The pages included in the wizard depend on the measurement that is selected. See the wizard maps below.
l
"How to Design a Goal-Oriented Scenario" on page 74 l
"How to Design a Manual Scenario" on page 76 l
"How to Define Service Level Agreements " on page 1300
l
"How to Define Service Level Agreements - Use-Case Scenario " on page 1302
The
"Service Level Agreement Wizard " above
contains:
Welcome >
"Select a Measurement Page " on page 1314
> ( "Select
Transactions Page " on page 1316 ) >
"Set Load Criteria Page " on page
1318
>
"Set Threshold Values Page (Goal Per Time Interval)" on page 1322
The
"Service Level Agreement Wizard " above
contains:
Welcome >
"Select a Measurement Page " on page 1314
> ( "Select
Transactions Page " on page 1316 ) >
"Set Threshold Values Page (Goal
Per Whole Run)" on page 1324
"Service Level Agreements Overview " on page 1296
Page 1312 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 81:
Page 1313 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 82:
Select a Measurement Page
This wizard page enables you to select a measurement for your goal.
Important information
Wizard map -
Goal measured per time interval
Wizard map -
Goal measured over whole scenario run
See also
l
General information about this wizard is available here:
"Service Level
Agreement Wizard " on page 1312
.
l
There are two modes for the Service Level Agreement wizard. The wizard pages that follow depend on the measurement that you select on this page. See the wizard maps below.
The
"Service Level Agreement Wizard " on page 1312
contains:
Welcome >
"Select a Measurement Page " above
> ( "Select Transactions
Page " on page 1316
) >
"Set Load Criteria Page " on page 1318
>
"Set
Threshold Values Page (Goal Per Time Interval)" on page 1322
The
"Service Level Agreement Wizard " on page 1312
contains:
Welcome >
"Select a Measurement Page " above
> ( "Select Transactions
Page " on page 1316
) >
"Set Threshold Values Page (Goal Per Whole
Run)" on page 1324
"Service Level Agreements Overview " on page 1296
User interface elements are described below:
UI Element
SLA status determined over the whole run
SLA status determined per time intervals over a timeline
Description
Evaluates a single SLA status for the whole scenario run. Select one of the following measurements: l
Transaction Response Time (Percentile)
l
Total Hits per run
l
Average Hits (hits/second) per run
l
Total Throughput (bytes) per run
l
Average Throughput (bytes/second) per run
Evaluates SLA statuses at set time intervals within the run. Select one of the following measurements: l
Average Transaction Response Time
l
Errors per Second
The time intervals at which the SLA statuses are evaluated are known as the tracking period. For details, see
"Tracking Period " on page 1298 .
Page 1314 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 82:
Page 1315 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 83:
Select Transactions Page
This wizard page enables you to select transactions to evaluate as part of your goal.
Important information
Wizard map -
Goal measured per time interval
See also
l
General information about this wizard is available here:
"Service Level
Agreement Wizard " on page 1312
.
l
This page is displayed when creating an SLA for Transaction Response
Time by Average or by Percentile.
l
In order to define an SLA for Transaction Response Time by Average or by Percentile, at least one of the Vuser scripts participating in the scenario must include a transaction.
l
You can select multiple transactions using the C
TRL key.
The
"Service Level Agreement Wizard " on page 1312
contains:
Welcome >
"Select a Measurement Page " on page 1314
> ( "Select
Transactions Page " above
) >
"Set Load Criteria Page " on page 1318
>
"Set
Threshold Values Page (Goal Per Time Interval)" on page 1322
"Service Level Agreements Overview " on page 1296
User interface elements are described below:
UI Element
Available
Transactions
Selected
Transactions
Description
Lists the transactions in the Vuser scripts participating in the scenario.
To move a script to the Selected Transaction list, select it and click Add.
Lists the transactions in the Vuser scripts participating in the scenario that have been selected for the SLA.
To remove a script from this list, select it and click Remove.
Page 1316 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 83:
Page 1317 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 84:
Set Load Criteria Page
This wizard page enables you to select load criteria to take into account when testing your goal.
Important information
Wizard map -
Goal measured per time interval
See also
l
General information about this wizard is available here:
"Service Level
Agreement Wizard " on page 1312
.
l
This page is displayed only when defining an SLA that determines SLA statuses per time interval over a timeline. l
In the next wizard step (Set Threshold Values page), you will set different thresholds per each of the load ranges that you select here.
The
"Service Level Agreement Wizard " on page 1312
contains:
Welcome >
"Select a Measurement Page " on page 1314
> ( "Select
Transactions Page " on page 1316
) >
"Set Load Criteria Page " above
>
"Set
Threshold Values Page (Goal Per Time Interval)" on page 1322
"Service Level Agreements Overview " on page 1296
User interface elements are described below:
UI Element Description
Load Criteria
The relevant load criteria that you want to use
Example: If you want to see the impact of running Vusers on the measurement, select Running Vusers.
To define an SLA without load criteria, select None.
Load Values
Valid load value ranges are consecutive—there are no gaps in the range—and span all values from zero to infinity.
l
Less than. Enter the upper value for the lower range of values for the load criteria.
The lower range is between 0 and the value you entered. It does not include the upper value.
Example: If you enter 5, the lower range of values for the load criteria is between 0 and 5, but does not include 5.
l
Between. The in-between range of values for the load criteria. Enter lower and upper values for this range. The lower range is included in this range; it does not include the upper value.
Example: If you enter 5 and 10, the in-between range of values for the load criteria is from 5 and up to, but not including, 10.
Note: You can set up to three in-between ranges.
Page 1318 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 84:
UI Element Description
l
Greater than. Enter the lower value for the upper range of values for the load criteria.
The upper range includes values from the value you entered and on.
Example: If you enter 10, the upper range of values for the load criteria is from
10 and on.
Selected
Measurement
The measurement selected for the goal.
Page 1319 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 85:
Set Percentile Threshold Values Page
This wizard page enables you to select load criteria to take into account when testing your goal.
Important information
Wizard map - Goal measured over whole scenario run
See also
l
General information about this wizard is available here:
"Service
Level Agreement Wizard " on page 1312 .
l
The Percentile SLA enables you to measure whether the percentage of transaction samples meets the defined threshold criteria.
l
You can enter a threshold value to 3 decimal places.
The
"Service Level Agreement Wizard " on page 1312
contains:
Welcome >
"Select a Measurement Page " on page 1314
> ( "Select
Transactions Page " on page 1316
) >
"Set Percentile Threshold
Values Page" above
"Service Level Agreements Overview " on page 1296
User interface elements are described below:
UI Element
Selected
Measurement
Percentile
Provide threshold value for all transactions
Transaction name
Threshold
Description
The measurement selected for the goal.
Percentage of transactions to measure against the configured threshold.
To apply one set of threshold values to all transactions selected for the goal, enter the threshold value and click Apply to all. These values are applied to all the transactions in the Thresholds table at the bottom of the page.
The transaction from the scenario run.
The threshold value for the selected transaction.
Page 1320 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 85:
Page 1321 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 86:
Set Threshold Values Page (Goal Per Time Interval)
This wizard page enables you to set thresholds for the measurements you are evaluating in your goal.
Important information
l
General information about this wizard is available here:
"Service Level
Agreement Wizard " on page 1312
.
l
If you defined load criteria in the
"Set Load Criteria Page " on page 1318 , you
must set thresholds per each of the defined load ranges. If you did not define load criteria, you set one threshold value. For Average Transaction response time, you set threshold values for each transaction.
l
You can enter a threshold value to 3 decimal places.
Wizard map
- Goal measured per time interval
The
"Service Level Agreement Wizard " on page 1312
contains:
Welcome >
"Select a Measurement Page " on page 1314
> ( "Select
Transactions Page " on page 1316
) >
"Set Load Criteria Page " on page 1318
>
"Set Threshold Values Page (Goal Per Time Interval)" above
See also
"Service Level Agreements Overview " on page 1296
User interface elements are described below (unlabeled elements are shown in angle brackets):
UI Element
<Thresholds table>
Description
The thresholds for your goal. If you defined load criteria, enter thresholds for each range of values.
Note: If the maximum threshold value is exceeded during a particular time interval during the run, Analysis displays an SLA status of Failed for that time interval.
Apply to all
(Average
Transaction
Response
Time goal only)
To apply one set of threshold values to all transactions selected for the goal, enter the threshold values in this table and click Apply to all transactions.
These values are applied to all the transactions in the Thresholds table at the top of the page.
Note: Threshold values for selected transactions do not have to be the same.
You can assign different values for each transaction.
Selected
Measurement
The measurement selected for the goal.
Page 1322 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 86:
Page 1323 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 87:
Set Threshold Values Page (Goal Per Whole Run)
This wizard page enables you to set minimum thresholds for the measurements you are evaluating in your goal.
Important information
Wizard map - Goal measured over whole scenario run
General information about this wizard is available here:
"Service Level Agreement Wizard " on page 1312 .
The
"Service Level Agreement Wizard " on page 1312
contains:
Welcome >
"Select a Measurement Page " on page 1314
>
"Set Threshold Values Page (Goal Per Whole Run)" above
"Service Level Agreements Overview " on page 1296
See also
User interface elements are described below:
UI Element Description
Selected measurement
The measurement selected for the goal.
Threshold
The minimum threshold value for the selected measurement.
Note: If the value of the measurement is lower than this threshold during the run, Analysis displays an SLA status of Failed for the entire run.
Page 1324 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 87:
Page 1325 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 88:
Working with Application Lifecycle Management
Page 1326 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 88:
Page 1327 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 89:
Managing Results Using ALM Overview
Analysis works together with HP Application Lifecycle Management (ALM). ALM provides an efficient method for storing and retrieving scenario and analysis results. You can store results in an
ALM project and organize them into unique groups.
In order for the Analysis to access an ALM project, you must connect it to the Web server on which
ALM is installed. You can connect to either a local or remote Web server.
When working against an ALM server with Performance Center, the ALM integration has several additional capabilities, such as the ability to save the Analysis session to a new location, and upload a report from the file system to ALM. For details, see
"How to Work with Results in ALM -
With Performance Center" on page 1334 .
For more information on working with ALM, see the Application Lifecycle Management User Guide.
Page 1328 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 89:
Page 1329 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 90:
How to Connect to ALM
To store and retrieve results from ALM, you need to connect to an ALM project. You can connect or disconnect from an ALM project at any time during the testing process.
You can connect to one version of HP ALM from Analysis and a different version from your browser. For more information, see the Important Information section in
"HP ALM Connection
Dialog Box" on page 1340
.
Connect to ALM
1. Select Tools > HP ALM Connection. The HP ALM Connection dialog box opens.
2. Enter the required information in the HP ALM Connection dialog box, as described in
"HP ALM
Connection Dialog Box" on page 1340
.
3. To disconnect from ALM, click Disconnect.
Page 1330 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 90:
Page 1331 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 91:
How to Work with Results in ALM - Without Performance
Center
The following steps describe the workflow for working with results saved in an ALM project, whose server does not have a Performance Center installation.
When working against an ALM server with HP Performance Center, there are several differences.
For more information, see
"How to Work with Results in ALM - With Performance Center" on page
1334 .
Connect to ALM
Open a connection to the ALM server and project that contains the LoadRunner result or Analysis session files. For task details, see
"How to Connect to ALM" on page 1330
.
Open an existing Analysis session file - optional
1. Select File > Open.
2. In the left pane select a script.
3. In the right pane, select the results for which the Analysis session file was created.
4. Click OK.
Create a new Analysis session file from the raw data - optional
This procedure describes how to create a new Analysis session file on the ALM server, from the raw results file. If an Analysis session file already exists for the raw data, you can choose to overwrite the existing file.
1. Select File > New.
2. In the left pane select a script.
Page 1332 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 91:
3. In the right pane, select the results you want to analyze.
4. Click OK.
Save the LoadRunner results file
When you are finished analyzing your results and creating reports or graphs, save the changes.
Select File > Save. The Analysis session file is in the ALM project.
Note: When working with ALM without Performance Center, Save As is not supported—you cannot save the Analysis session file to another location.
Page 1333 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 92:
How to Work with Results in ALM - With Performance
Center
ALM servers with Performance Center, allow you to perform the following operations:
Open an existing Analysis Session file
1. Select Tools > HP ALM Connection and make sure your connection to ALM is open.
2. Select File > Open.
3. Drill down to the Run level within the Test Plan module, and select an individual run.
4. Select a zip file containing the Analysis session file.
5. Click Open.
Open raw data and create a new Analysis session
1. Select Tools > HP ALM Connection and make sure your connection to ALM is open.
2. To create a new Analysis session file from the raw data, select File > New.
3. Drill down to the Run level within the Test Plan module, and select an individual run.
4. Select a zip file containing the run's raw data.
Page 1334 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 92:
5. Click Open.
Save the changes to the Analysis session file
1. Complete your changes to the Analysis results.
2. Select Tools > HP ALM Connection and make sure your connection to ALM is open.
3. Select File > Save.
4. To save an Analysis session that was opened from the file system, click the Test Lab module button.
5. Drill down to the Run level within the Test Plan module, and specify a name for the zip file.
6. Provide a comment about the Analysis session (optional).
7. Click Save.
Save the Analysis session file to a new ALM location
1. Select Tools > HP ALM Connection and make sure your connection to ALM is open.
Page 1335 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 92:
2. Open an Analysis session file from the file system, or from ALM as described above.
3. Select File > Save as.
4. Drill down to the Run level within the Test Plan module, and select an individual run.
5. Specify a name for the Analysis session zip file. The name Results is reserved.
6. Provide a comment about the Analysis session (optional).
7. Click Save.
Page 1336 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 92:
Page 1337 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 93:
How to Upload a Report to ALM
The following steps describe how to upload a report from the file system to an ALM's Test Lab module. This capability is only available for ALM installation with Performance Center.
When working against an ALM server with HP Performance Center, there are several differences.
For more information, see
"How to Work with Results in ALM - With Performance Center" on page
1334 .
Connect to ALM
Open a connection to the ALM server and project that contains the LoadRunner result or Analysis session files. For task details, see
"How to Connect to ALM" on page 1330
.
Open the Upload dialog box
Select Tools > Upload Report to Test Lab.
Select a report
Click Browse in the Step 1 section. The Select the Report file dialog box opens. Select an
HTML or XML file from the file system. Click Open.
Select a location on ALM
Click Browse in the Step 2 section. The Select Location for the Report dialog box opens.
Navigate to a Run level in the Test Lab module. Specify a name for the report and include any relevant comments. Click OK.
Begin the upload
Click Upload. If it succeeds, the Analysis issues a message.
Page 1338 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 93:
Page 1339 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 94:
HP ALM Connection Dialog Box
This dialog box enables you to connect to an ALM project from within the Analysis.
To access
Important information
Relevant tasks
Tools > HP ALM Connection ...
You can connect to one version of HP ALM from Analysis and a different version of HP ALM from your browser.
You can only connect to different versions of HP ALM if one of the versions is HP
ALM 11.00 or higher.
If you are connecting from Analysis to a different HP ALM version than the one in your browser, you must first download the client files.
1. From the browser, navigate to the HP ALM server that you will be connecting to from Analysis.
2. Once the login screen is displayed, the client files have been downloaded.
There is no need to log in.
"How to Connect to ALM" on page 1330
User interface elements are described below:
Page 1340 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 94:
UI Element Description
Step 1:
Connect to
Server
l
Server URL. The URL of the server that contains ALM in the following form
http://<server_name:port>/qcbin.
l
Reconnect to server on startup. Automatically reconnect to the server every time you start the application.
l
/ . Connects to the server specified in the
Server URL box. Only one button is visible at a time, depending on your connection status.
Step 2:
Authenticate
User
Information
l
User Name. Your ALM project user name.
l
Password. Your ALM project password.
l
Authenticate on startup. Authenticates your user information automatically, the next time you open the application. This option is only available if you selected Reconnect to server on startup above.
Step 3:
Login to
Project
l
. Authenticates your user information against the ALM server.
After your user information has been authenticated, the fields in the
Authenticate user information area are displayed in read-only format. The
Authenticate button changes to .
You can log in to the same ALM server using a different user name by clicking
Change User, entering a new user name and password, and then clicking
Authenticate again.
l
Domain. The domain that contains the ALM project. Only those domains containing projects to which you have permission to connect to are displayed.
(If you are working with a project in versions of TestDirector earlier than version 7.5, the Domain box is not relevant.) l
Project. Enter the ALM project name or select a project from the list. Only those projects that you have permission to connect to are displayed.
l
Login to project on startup. This option is only enabled when the
Authenticate on startup check box is selected.
l
/ .Logs into and out of the ALM project.
Page 1341 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 95:
Upload Report to Test Lab Dialog Box
This dialog box enables you to upload an Analysis report to an ALM project's Test Lab module.
To access Reports > Upload Report to Test Lab
User interface elements are described below:
UI Element
Step 1: Select the report file
Step 2: Browse the test lab
Upload
Description
Allows you to select an Analysis report from the file system. You can select an HTML report, or Rich report in XML format.
Allows you to select an location within the Test Lab module, for the report.
Note: You must drill down to the level of a Run within the Test Lab module.
Begins the uploading of the report. If the uploading succeeds, the Analysis issues a message.
Page 1342 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 95:
Page 1343 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 96:
Importing External Data
Page 1344 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 96:
Page 1345 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 97:
Import Data Tool Overview
The LoadRunner Analysis Import Datatool enables you to import and integrate non-HP data into a
LoadRunner Analysis session. After the import procedure, you can view the data files as graphs within the session, using all the capabilities of the Analysis tool.
Suppose an NT Performance Monitor runs on a server and measures its behavior. Following a
LoadRunner scenario on the server, you can retrieve the results of the Performance Monitor, and integrate the data into LoadRunner's results. This enables you to correlate trends and relationships between the two sets of data: LoadRunner's and the Performance Monitor's.
In this case, the results of the NT Performance Monitor are saved as a .csv file. You launch the
Import Data tool, direct it to the .csv file, and specify its format. LoadRunner reads the file and integrates the results into its own Analysis session.
For a list of data formats that are supported, see
"Supported File Types" on page 1352 . To define
your own custom data files, see
"How to Define Custom File Formats" on page 1350 .
Page 1346 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 97:
Page 1347 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 98:
How to Use the Import Data Tool
This task describes how to import data files to integrate into your analysis session.
1. Choose Tools > External Monitors > Import Data. The Import Data dialog box opens.
2. Select the format of the external data file from the File format list box.
3. Click Add File. In the Select File to Import dialog box that opens, the Files of type list box shows the type chosen in step 2.
4. Set other file format options, as described in
"Import Data Dialog Box" on page 1358 . You must
enter a machine name.
5. To specify character separators and symbols, click Advanced. For more information, see
"Advanced Settings Dialog Box (Import Data Dialog Box)" on page 1354
.
6. Click Next. The Import Data dialog box opens.
7. Select the type of monitor that generated the external data file. If your monitor type does not exist, you can add it, as described in How to Customize Monitor Types for Import .
When opening a new graph, you will see your monitor added to the list of available graphs under this particular category. (See
"Open a New Graphs Dialog Box" on page 1166
.)
8. Click Finish. LoadRunner Analysis imports the data file or files, and refreshes all graphs currently displayed in the session.
Page 1348 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 98:
Note: When importing data into a scenario with two or more cross results, the imported data will be integrated into the last set of results listed in the File > Cross with Result dialog box. For more information, see
"How to Generate Merged Graphs" on page 1290
.
Page 1349 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 99:
How to Define Custom File Formats
This task describes how to define a custom format, if the file format of your import file is not supported.
If the file format of your import file is not supported, you can define a custom format.
1. Choose Tools > External Monitors > Import Data. The Import Data dialog box opens.
2. From the File Format list, select <Custom File Format>. The Enter New Format Name dialog box opens.
3. Enter a name for the new format (in this case, my_monitor_format).
4. Click OK. The Define External Format dialog box opens.
5. Specify the mandatory and optional data, as described in
"Define External Format Dialog Box " on page 1356 .
6. Click Save.
Page 1350 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 99:
Page 1351 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 100:
Supported File Types
The following file types are supported:
NT Performance Monitor (.csv)
Default file type of NT Performance monitor, in comma separated value (CSV) format.
For example:
Windows 2000 Performance Monitor (.csv)
Default file type of Windows 2000 Performance monitor, but incompatible with NT Performance monitor. In comma separated value (CSV) format.
For example:
Standard Comma Separated File (.csv)
This file type has the following format:
Date,Time,Measurement_1,Measurement_2, ...
where fields are comma separated and first row contains column titles.
The following example from a standard CSV file shows 3 measurements: an interrupt rate, a file IO rate and a CPU usage. The first row shows an interrupt rate of 1122.19 and an IO rate of 4.18:
Master-Detail Comma Separated File (.csv)
This file type is identical to Standard Comma Separated Files except for an additional Master column which specifies that row's particular breakdown of a more general measurement. For example, a Standard CSV file may contain data points of a machine's total CPU usage at a given moment:
Page 1352 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 100:
Date,Time,CPU_Usage
However, if the total CPU usage can be further broken up into CPU time per-process, then a
Master-Detail CSV file can be created with an extra column ProcessName, containing the name of a process.
Each row contains the measurement of a specific process's CPU usage only. The format will be the following:
Date,Time,ProcessName,CPU_Usage as in the following example:
Microsoft Excel File (.xls)
Created by the Microsoft Excel application. The first row contains column titles.
Master-Detail Microsoft Excel file (.xls)
Created by Microsoft's Excel application. The first row contains column titles. It contains an extra
Master column. For an explanation of this column, see
"Supported File Types" on previous page
.
Page 1353 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 101:
Advanced Settings Dialog Box (Import Data Dialog Box)
This dialog box enables you to define the data format of the imported file to settings other than of the regional configuration.
To access Tools > External Monitors > Import Data > Advanced
User interface elements are described below:
UI Element
Use local settings
Use custom settings
Description
Keep default settings of the regional configuration. Disables the Custom
Settings area of the dialog box.
Define your own settings. Enables the
Custom Settings area of the dialog box.
l
Date Separator. Enter a custom symbol, for example, the slash (`/') character in
11/10/02 l
Time Separator. Enter a custom symbol, for example, the colon `:' character in
9:54:19 l
Decimal symbol. Enter a custom symbol, for example, the `.' character in the number 2.5
l
AM symbol. Enter a custom symbol for the hours between midnight and noon.
l
PM symbol. Enter a custom symbol for the hours between noon and midnight.
Page 1354 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 101:
Page 1355 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 102:
Define External Format Dialog Box
This dialog box enables you to define a new file format for external data files not supported by
Analysis.
The Define External Format dialog box is divided into mandatory and optional information.
To access
Relevant tasks
Tools > External Monitors > Import data > File
Format > <Custom File Format>
"How to Define Custom File Formats" on page 1350
Mandatory tab
User interface elements are described below:
UI Element
Date Column Number
Time Column Number
Use Master Column
File Extension
Field Separator
Description
Enter the column that contains the date. If there is a master column (see
"Supported File Types" on page
1352
), specify its number.
Enter the column that contains the time.
Select this if the data file contains a master column. A master column specifies the row's particular breakdown of a more general measurement.
Enter the file suffix.
Enter the character that separates a field in a row from its neighbor. To select a field separator character, click Browse and select a character from the define Field Separator dialog box.
Optional tab
User interface elements are described below:
UI Element
Date Format
Time Zone
Machine Name
Description
Specify the format of the date in the imported data file. For example, for European dates with a 4 digit year, choose DD/MM/YYYY.
Select the time zone where the external data file was recorded. LoadRunner Analysis aligns the times in the file with local time zone settings to match
LoadRunner results. (LoadRunner does not alter the file itself).
Specify the machine name the monitor runs on. This
Page 1356 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 102:
UI Element
Exclude Columns
Convert file from UNIX to DOS format
Skip the first [] lines
Description
associates the machine name with the measurement.
Indicate which columns are to be excluded from the data import, such as columns containing descriptive comments. When there is more than one column to be excluded, specify the columns in a commaseparated list. For example, 1,3,8.
Monitors often run on UNIX machines. Check this option to convert data files to Windows format. A carriage return (Ascii character 13) is appended to all line feed characters (Ascii character 10) in the UNIX file.
Specify the number of lines at the start of the file to ignore before reading in data. Typically, the first few lines in a file contain headings and sub-headings.
Page 1357 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 103:
Import Data Dialog Box
This dialog box enables you to import and integrate non-HP data files into Analysis session.
To access Tools > External Monitors > Import Data
User interface elements are described below (unlabeled elements are shown in angle brackets):
UI Element
Import data from the following files
Add file
Description
Displays the files that you selected for import.
Remove file
Open File
File Format
Select an external data file to import. A dialog box opens to enable you to select files.
Delete an external data file from the list.
Open an external data file using the associated application.
Set the file format options.
l
File Format. Choose the format of the external data file. For an explanation of available formats, see
"Supported File Types" on page 1352 .
Page 1358 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 103:
UI Element
Time Zone
<Synchronize with scenario start time>
Time Zone also contains the option <Synchronize with
scenario start time>. Choose this to align the earliest measurement found in the data file to the start time of the
LoadRunner scenario.
Machine Name
Specify the machine name the monitor runs on. This associates the machine name with the measurement. For example, a file IO rate on the machine fender will be named File IO Rate:fender. This enables you to apply Graph settings by the machine name. For more information, see
"Filtering and Sorting Graph Data" on page 1215
.
Advanced
Truncate imported data to 150% of scenario run time
Description
l
Date Format. Specify the format of the date in the imported data file. For example, for European dates with a 4 digit year, choose DD/MM/YYYY.
Select the time zone where the external data file was recorded. LoadRunner Analysis compensates for the various international time zones and aligns the times in the file with local time zone settings in order to match
LoadRunner results. If the times in the imported file are erroneous by a constant offset, you can synchronize the time.
For more information, see
"Advanced Settings Dialog Box
(Import Data Dialog Box)" on page 1354
.
In certain cases, the external monitor may have collected data over a time period that was larger than the actual load test. This option deletes data that was collected while the load test was not running, limiting the data collection period to 150% of the load testing period.
Analysis Graphs
Page 1359 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 104:
Transaction Graphs
Page 1360 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 104:
Page 1361 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 105:
Transaction Graphs Overview
During load test scenario execution, Vusers generate data as they perform transactions. Analysis enables you to generate graphs that show the transaction performance and status throughout script execution.
You can use additional Analysis tools such as merging and crossing results to understand your transaction performance graphs. You can also sort the graph information by transactions. For more information about working with Analysis, see section
"Working with Analysis" on page 1148
.
Page 1362 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 105:
Page 1363 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 106:
Average Transaction Response Time Graph
This graph displays the average time taken to perform transactions during each second of the load test scenario run.
Purpose
If you have defined acceptable minimum and maximum transaction performance times, you can use this graph to determine whether the performance of the server is within the acceptable range.
X-axis
Y-axis
Breakdown options
Elapsed time since the start of the run.
Average response time (in seconds) of each transaction
Transaction Breakdown
You can view a breakdown of a transaction by right-clicking the transaction in the graph and selecting Show Transaction Breakdown Tree. In the Transaction
Breakdown Tree, right-click the transaction you want to break down, and select
Break Down <transaction name>. The Average Transaction Response Time graph displays data for the sub-transactions. For more details, see
"Transaction
Breakdown Tree" on page 1368 .
Web Page Breakdown
To view a breakdown of the Web page(s) included in a transaction or subtransaction, right-click it and select Web Page Diagnostics for <transaction
name>. For more information on the Web Page Diagnostics graphs, see
"Web
Page Diagnostics Graphs" on page 1462
"
Tips
Granularity
This graph is displayed differently for each granularity. The lower the granularity, the more detailed the results. However, it may be useful to view the results with a higher granularity to study the overall Vuser behavior throughout the scenario.
For example, using a low granularity, you may see intervals when no transactions were performed. However, by viewing the same graph with a higher granularity, you will see the graph for the overall transaction response time. For more information on setting the granularity, see
"How to Manage Graph Data" on page 1254 .
Compare with Running Vusers
You can compare the Average Transaction Response Time graph to the Running
Vusers graph to see how the number of running Vusers affects the transaction performance time. For example, if the Average Transaction Response Time graph shows that performance time gradually improved, you can compare it to the Running Vusers graph to see whether the performance time improved due to a decrease in the Vuser load.
By default, only transactions that passed are displayed.
Note
See also
"Transaction Graphs Overview " on page 1362
Page 1364 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 106:
Example
Page 1365 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 107:
Total Transactions per Second Graph
This graph displays the total number of transactions that passed, the total number of transactions that failed, and the total number of transactions that were stopped, during each second of a load test scenario run.
Purpose
X-axis
Y-axis
See also
Helps you determine the actual transaction load on your system at any given moment.
Elapsed time since the start of the run.
Total number of transactions performed during the scenario run.
"Transaction Graphs Overview " on page 1362
Example
Page 1366 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 107:
Page 1367 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 108:
Transaction Breakdown Tree
The Transaction Breakdown Tree displays a tree view of the transactions and sub-transactions in the current session. From the tree, you can breakdown transactions and view the results of the breakdown in either the Average Transaction Response Time or Transaction Performance
Summary graph.
To access
In either the Average Transaction Response Time or Transaction Performance
Summary graph, right-click in the graph and select Show Transaction
Breakdown Tree.
Important information
After you breakdown a transaction, you can return to the original transaction graph by reapplying the global filter (File > Set Global Filter) or by undoing your breakdown actions using Edit > Undo Last Action.
User interface elements are described below (unlabeled elements are shown in angle brackets):
UI
Element
Description
<Rightclick menu>
l
Break Down From Highest Level. Displays data for the highest level hierarchical path of a transaction.
l
Break Down <transaction name>. Displays data for the sub-transactions in the
Average Transaction Response Time or Transaction Performance Summary graph.
l
Show Only <transaction name>. Displays data only for the selected transaction/sub-transaction.
l
Web Page Diagnostics for <page name>. Displays a breakdown of the Web page(s) included in a transaction or sub-transaction in the Web Page Diagnostics graphs. For details, see
"Web Page Diagnostics Graphs" on page 1462
.
Page 1368 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 108:
Page 1369 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 109:
Transactions per Second Graph
This graph displays, for each transaction, the number of times it passed, failed, and stopped during each second of a load test scenario run.
Purpose
Helps you determine the actual transaction load on your system at any given moment.
X-axis
Elapsed time since the start of the run.
Number of transactions performed during the scenario run.
Y-axis
Tips Compare with Average Transaction Response Time Graph
You can compare this graph to the Average Transaction Response Time graph in order to analyze the effect of the number of transactions on the performance time.
See also
"Transaction Graphs Overview " on page 1362
Example
Page 1370 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 109:
Page 1371 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 110:
Transaction Performance Summary Graph
This graph displays the minimum, maximum and average performance time for all the transactions in the load test scenario.
X-axis
Y-axis
Name of the transaction.
Response time—rounded off to the nearest second—of each transaction.
Breakdown options
See also
Transaction Breakdown
You can view breakdown of a transaction in the Transaction Performance
Summary graph by right-clicking the transaction in the graph and selecting Show
Transaction Breakdown Tree. In the Transaction Breakdown Tree, right-click the transaction you want to break down, and select Break Down <transaction
name>. The Transaction Performance Summary graph displays data for the subtransactions. For more details, see
"Transaction Breakdown Tree" on page 1368
.
Web Page Breakdown
To view a breakdown of the Web page(s) included in a transaction or subtransaction, right-click it and select Web Page Diagnostics for <transaction
name>. For more, see
"Web Page Diagnostics Graphs" on page 1462 .
"Transaction Graphs Overview " on page 1362
Example
Page 1372 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 110:
Page 1373 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 111:
Transaction Response Time (Distribution) Graph
This graph displays the distribution of the time taken to perform transactions in a load test scenario.
Purpose
If you have defined acceptable minimum and maximum transaction performance times, you can use this graph to determine whether the performance of the server is within the acceptable range.
X-axis
Transaction response time (rounded down to the nearest second).
Number of transactions executed during the scenario.
Y-axis
Tips Compare with Transaction Performance Summary Graph
If you compare it with the Transaction Performance Summary graph, you can see how the average performance was calculated.
Note
See also
This graph can only be displayed as a bar graph.
"Transaction Graphs Overview " on page 1362
Example
In the following example, most of the transactions had a response time of less than 20 seconds.
Page 1374 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 111:
Page 1375 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 112:
Transaction Response Time (Percentile) Graph
This graph analyzes the percentage of transactions that were performed within a given time range.
Purpose
Helps you determine the percentage of transactions that met the performance criteria defined for your system. In many instances, you need to determine the percent of transactions with an acceptable response time. The maximum response time may be exceptionally long, but if most transactions have acceptable response times, the overall system is suitable for your needs.
X-axis
Y-axis
Percentage of the total number of transactions measured during the load test scenario run.
Maximum transaction response time (in seconds).
Note: Analysis approximates the transaction response time for each available percentage of transactions. The y-axis values, therefore, may not be exact.
Tips Compare with Average Response Time Graph
It is recommended to compare the Percentile graph with a graph indicating average response time such as the Average Transaction Response Time graph. A high response time for several transactions may raise the overall average. However, if the transactions with a high response time occurred less than five percent of the time, that factor may be insignificant.
See also
"Transaction Graphs Overview " on page 1362
Example
In the following example, fewer than 20 percent of the tr_matrix_movie transactions had a response time less than 70 seconds.
Page 1376 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 112:
Page 1377 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 113:
Transaction Response Time (Under Load) Graph
This graph is a combination of the Running Vusers and Average Transaction Response Time graphs and indicates transaction times relative to the number of Vusers running at any given point during the load test scenario.
Purpose
Helps you view the general impact of Vuser load on performance time and is most useful when analyzing a scenario with a gradual load.
X-axis
Y-axis
See also
Number of running Vusers
Average response time (in seconds) of each transaction.
"Transaction Graphs Overview " on page 1362
Example
Page 1378 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 113:
Page 1379 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 114:
Transaction Summary Graph
This graph summarizes the number of transactions in the load test scenario that failed, passed, stopped, and ended in error.
X-axis
Y-axis
See also
Name of the transaction
Number of transactions performed during the scenario run.
"Transaction Graphs Overview " on page 1362
Example
Page 1380 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 114:
Page 1381 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 115:
Flex Graphs
Flex graphs provide you with information about the performance of your Flex server. You use the
Flex graphs to analyze the following data:
Page 1382 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 115:
Page 1383 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 116:
Flex RTMP Throughput Graph
This graph shows the amount of throughput (in bytes) on the RTMP/T server during each second of the load test scenario run. The throughput represents the amount of data that the Vusers received from the server or sent to the server at any given second.
Purpose
Helps you evaluate the amount of load that Vusers generate, in terms of server throughput.
X-axis
Y-axis
Note
Elapsed time since the start of the scenario run.
Throughput of the server in bytes
You cannot change the granularity of the x-axis to a value that is less than the Web granularity you defined in the General tab of the Options dialog box.
Example
In the following example, the highest throughput is over 600,000 bytes during the thirty-fifth second of the scenario.
Page 1384 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 116:
Page 1385 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 117:
Flex RTMP Other Statistics Graph
This graph shows various statistics about Flex RTMP Vusers.
Purpose
X-axis
Y-axis
The graph shows the duration taken to perform various RTMP tasks.
Elapsed time since the start of the scenario run.
Task duration (in milliseconds).
Example
In the following example,the RTMP Handshake has a duration of seventy five milliseconds at the forty eighth second of the scenario.
Page 1386 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 117:
Page 1387 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 118:
Flex RTMP Connections Graph
This graph shows the number of open RTMP connections at any time during the load test scenario run. The throughput represents the amount of data that the Vusers received from the server or sent to the server at any given second.
Purpose
This graph is useful in indicating when additional connections are needed. For example, if the number of connections reaches a plateau, and the transaction response time increases sharply, adding connections would probably cause a dramatic improvement in performance (reduction in the transaction response time).
X-axis
Y-axis
Elapsed time since the start of the scenario run.
Number of connections.
Example
In the following example,between the forty-eighth second and the fifty-sixth second of the scenario there are eighty open connections.
Page 1388 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 118:
Page 1389 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 119:
Service Virtualization
Page 1390 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 119:
Page 1391 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 120:
Service Virtualization Monitoring Overview
For details, see
"Service Virtualization Monitoring Overview" on page 1125
Page 1392 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 120:
Page 1393 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 121:
Vuser Graphs
Page 1394 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 121:
Page 1395 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 122:
Vuser Graphs Overview
During load test scenario execution, Vusers generate data as they perform transactions. The Vuser graphs let you determine the overall behavior of Vusers during the scenario. They display the Vuser states, the number of Vusers that completed the script, and rendezvous statistics. Use these graphs in conjunction with Transaction graphs to determine the effect of the number of Vusers on transaction response time. For more information about Transaction graphs, see
"Transaction
Graphs" on page 1360 .
Page 1396 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 122:
Page 1397 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 123:
Rendezvous Graph (Vuser Graphs)
During a scenario run, you can instruct multiple Vusers to perform tasks simultaneously by using
rendezvous points. A rendezvous point creates intense user load on the server and enables
LoadRunner to measure server performance under load. For more information about using rendezvous points, see the HP Virtual User Generator User Guide.
This graph indicates when Vusers were released from rendezvous points, and how many Vusers were released at each point.
Purpose
Helps you understand transaction performance times.
X-axis
Elapsed time since the start of the run.
Y-axis
Tips
Number of Vusers that were released from the rendezvous.
See also
Compare to Average Transaction Response Time graph
If you compare the Rendezvous graph to the Average Transaction Response Time graph, you can see how the load peak created by a rendezvous influences transaction times.
"Vuser Graphs Overview" on page 1396
Example
Page 1398 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 123:
Page 1399 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 124:
Running Vusers Graph
This graph displays the number of Vusers that executed Vuser scripts and their status during each second of the test.
Purpose
Helps you determine the Vuser load on your server at any given moment.
X-axis
Elapsed time since the start of the run.
Number of Vusers in the scenario.
Y-axis
Note
See also
By default, this graph only shows the Vusers with a Run status. To view another
Vuser status, set the filter conditions to the desired status. For more information, see
"Filtering and Sorting Graph Data" on page 1215
.
"Vuser Graphs Overview" on page 1396
Example
Page 1400 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 124:
Page 1401 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 125:
Vuser Summary Graph
This graph displays a summary of Vuser performance.
Purpose
Lets you view the number of Vusers that successfully completed the load test scenario run relative to those that did not.
Note
This graph may only be viewed as a pie.
See also
"Vuser Graphs Overview" on page 1396
Example
Page 1402 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 125:
Page 1403 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 126:
Error Graphs
Page 1404 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 126:
Page 1405 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 127:
Error Graphs Overview
During load test scenario execution, Vusers may not complete all transactions successfully. The
Error graphs let you view information about the transactions that failed, stopped, or ended in errors.
Using the Error graphs, you can view a summary of errors that occurred during the scenario and the average number of errors that occurred per second.
Page 1406 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 127:
Page 1407 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 128:
Errors per Second (by Description) Graph
This graph displays the average number of errors that occurred during each second of the load test scenario run, grouped by error description. The error description is displayed in the legend.
X-axis
Y-axis
See also
Elapsed time since the start of the run.
Number of errors.
"Error Graphs Overview" on page 1406
Example
Page 1408 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 128:
Page 1409 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 129:
Errors per Second Graph
This graph displays the average number of errors that occurred during each second of the load test scenario run, grouped by error code.
X-axis
Y-axis
See also
Elapsed time since the start of the run.
Number of errors.
"Error Graphs Overview" on page 1406
Example
Page 1410 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 129:
Page 1411 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 130:
Error Statistics (by Description) Graph
This graph displays the number of errors that accrued during load test scenario execution, grouped by error description. The error description is displayed in the legend.
Note
See also
This graph may only be viewed as a pie.
"Error Graphs Overview" on page 1406
Example
Page 1412 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 130:
Page 1413 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 131:
Error Statistics Graph
This graph displays the number of errors that accrued during load test scenario execution, grouped by error code.
Note
See also
This graph may only be viewed as a pie.
"Error Graphs Overview" on page 1406
Example
In the following example, out of a total of 178 errors that occurred during the scenario run, the second error code displayed in the legend occurred twelve times, comprising 6.74% of the errors.
Page 1414 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 131:
Page 1415 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 132:
Total Errors per Second Graph
This graph displays the average number of errors that occurred during each second of the load test scenario run. (complete: add sentence about being sum of all errors)
X-axis
Y-axis
See also
Elapsed time since the start of the run.
Number of errors.
"Error Graphs Overview" on page 1406
Example
Page 1416 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 132:
Page 1417 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 133:
Web Resources Graphs
Page 1418 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 133:
Page 1419 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 134:
Web Resources Graphs Overview
Web Resource graphs provide you with information about the performance of your Web server. You use the Web Resource graphs to analyze the following data: l
Throughput on the Web server l
The number of hits per second l
The number of HTTP responses per second l
The HTTP status codes returned from the Web server l
The number of downloaded pages per second l
The number of server retries per second l
A summary of the server retries during the load test scenario l
The number of open TCP/IP connections l
The number of new TCP/IP connections opened l
The number of connections that are shut down l
The number of new and reused SSL connections opened
Note: Due to the asynchronous nature of the Ajax TruClient protocol, data collected and displayed in Web Resources graphs may not represent actual performance.
Page 1420 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 134:
Page 1421 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 135:
HTTP Status Codes
The following table displays a list of HTTP status codes:
300
301
302
303
304
305
307
400
Code
200
201
202
203
204
205
206
401
402
403
404
405
406
407
408
409
410
Description
OK
Created
Accepted
Non-Authoritative Information
No Content
Reset Content
Partial Content
Multiple Choices
Moved Permanently
Found
See Other
Not Modified
Use Proxy
Temporary Redirect
Bad Request
Unauthorized
Payment Required
Forbidden
Not Found
Method Not Allowed
Not Acceptable
Proxy Authentication Required
Request Timeout
Conflict
Gone
Page 1422 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 135:
416
417
500
501
502
503
504
505
Code
411
412
413
414
415
Description
Length Required
Precondition Failed
Request Entity Too Large
Request - URI Too Large
Unsupported Media Type
Requested range not satisfiable
Expectation Failed
Internal Server Error
Not Implemented
Bad Gateway
Service Unavailable
Gateway Timeout
HTTP Version not supported
For more information on the above status codes and their descriptions, see http://www.w3.org
Page 1423 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 136:
Connections Graph
Thisgraph shows the number of open TCP/IP connections (y-axis) at each point in time of the load test scenario (x-axis). One HTML page may cause the browser to open several connections, when links on the page go to different Web addresses. Two connections are opened for each Web server.
Purpose
This graph is useful in indicating when additional connections are needed. For example, if the number of connections reaches a plateau, and the transaction response time increases sharply, adding connections would probably cause a dramatic improvement in performance (reduction in the transaction response time).
X-axis
Y-axis
See also
Elapsed time since the start of the run.
Open TCP/IP connections.
"Web Resources Graphs Overview" on page 1420
Page 1424 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 136:
Page 1425 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 137:
Connections per Second Graph
This graph shows the number of new TCP/IP connections (y-axis) opened and the number of connections that are shut down for each second of the load test scenario (x-axis).
X-axis
Y-axis
Tips
See also
Elapsed time since the start of the run.
TCP/IP connections per second.
New connections versus hits per second:
The number of new connections should be a small fraction of the number of hits per second, because new TCP/IP connections are very expensive in terms of server, router and network resource consumption. Ideally, many HTTP requests should use the same connection, instead of opening a new connection for each request.
"Web Resources Graphs Overview" on page 1420
Page 1426 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 137:
Page 1427 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 138:
Hits per Second Graph
This graph shows the number of HTTP requests made by Vusers to the Web server during each second of the load test scenario run.
Purpose
Helps you evaluate the amount of load Vusers generate, in terms of the number of hits.
X-axis
Elapsed time since the start of the run.
Number of hits on the server.
Y-axis
Tips Compare to Average Transaction Response Time graph:
You can compare this graph to the Average Transaction Response Time graph to see how the number of hits affects transaction performance.
Note
See also
You cannot change the granularity of the x-axis to a value that is less than the Web granularity you defined in the General tab of the Options dialog box.
"Web Resources Graphs Overview" on page 1420
Example
In the following example, the most hits per second took place during the fifty-fifth second of the scenario.
Page 1428 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 138:
Page 1429 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 139:
HTTP Responses per Second Graph
This graph shows the number of HTTP status codes returned from the Web server during each second of the load test scenario run, grouped by status code. HTTP status codes indicate the status of HTTP requests, for example, "the request was successful", "the page was not found".
Xaxis
Elapsed time since the start of the run.
Yaxis
Number of HTTP responses per second.
Tips
Locate scripts which generated error codes:
You can group the results shown in this graph by script (using the "Group By" function) to locate scripts which generated error codes. For more information on the "Group By" function, see
"Filtering and Sorting Graph Data" on page 1215 .
See also
l
"Web Resources Graphs Overview" on page 1420
l
"HTTP Status Codes" on page 1422
Example
In the following example, the greatest number of 200 status codes, 60, was generated in the fiftyfifth second of the scenario run. The greatest number of 302 codes, 8.5, was generated in the fiftieth second of the scenario run.
Page 1430 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 139:
Page 1431 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 140:
HTTP Status Code Summary Graph
This graph shows the number of HTTP status codes returned from the Web server during the load test scenario run, grouped by status code. HTTP status codes indicate the status of HTTP requests, for example, "the request was successful","the page was not found".
Tips
Note
See also
Locate scripts which generated error codes:
Use this graph together with the HTTP Responses per
Second graph to locate those scripts which generated error codes.
This graph can only be viewed as a pie.
l
"Web Resources Graphs Overview" on page 1420
l
"HTTP Status Codes" on page 1422
Example
In the following example, the graph shows that only the HTTP status codes 200 and 302 were generated. Status code 200 was generated 1,100 times, and status code 302 was generated 125 times.
Page 1432 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 140:
Page 1433 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 141:
Pages Downloaded per Second Graph
This graph shows the number of Web pages downloaded from the server during each second of the load test scenario run.
Like the Throughput graph, the Pages Downloaded per Second graph represents the amount of data that the Vusers received from the server at any given second. However, the Throughput graph takes into account each resource and its size (for example, the size of each .gif file, the size of each Web page). The Pages Downloaded per Second graph takes into account only the number of pages.
Purpose
Helps you evaluate the amount of load Vusers generate, in terms of the number of pages downloaded.
X-axis
Elapsed time since the start of the run.
Number of Web pages downloaded from the server.
Y-axis
Note
See also
To view the Pages Downloaded per Second graph, you must select Pages per
second (HTML Mode only) from the run time settings Preferences tab before running your scenario.
"Web Resources Graphs Overview" on page 1420
Example1
In the following example, the greatest number of pages downloaded per second, about 7, occurred in the fiftieth second of the scenario run.
Page 1434 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 141:
Example 2
In the following example, the Throughput graph is merged with the Pages Downloaded per Second graph. It is apparent from the graph that throughput is not completely proportional to the number of pages downloaded per second. For example, between 10 and 25 seconds into the scenario run, the number of pages downloaded per second increased while the throughput decreased.
Page 1435 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 142:
Retries per Second Graph
This graph displays the number of attempted server connections during each second of the load test scenario run. A server connection is retried when: l the initial connection was unauthorized l proxy authentication is required l the initial connection was closed by the server l the initial connection to the server could not be made l when the server was initially unable to resolve the load generator's IP address
X-axis
Elapsed time since the start of the run.
Y-axis
Number of server retries per second.
See also
"Web Resources Graphs Overview" on page 1420
Example
In the following example, the graph shows that during the first second of the scenario, the number of retries was 0.4, whereas in the fifth second of the scenario, the number of retries per second rose to
0.8.
Page 1436 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 142:
Page 1437 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 143:
Retries Summary Graph
This graph shows the number of attempted server connections during the load test scenario run, grouped by the cause of the retry.
Tips Determine when server retries were attempted:
Use this graph together with the Retries per Second graph to determine at what point during the scenario the server retries were attempted.
Note
This graph may only be viewed as a pie.
See also
"Web Resources Graphs Overview" on page 1420
Example
In the following example, the graph shows that the server's inability to resolve the load generator's
IP address was the leading cause of server retries during the scenario run.
Page 1438 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 143:
Page 1439 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 144:
SSLs per Second Graph
This graph shows the number of new and reused SSL Connections (y-axis) opened in each second of the load test scenario (x-axis). An SSL connection is opened by the browser after a TCP/IP connection has been opened to a secure server.
Xaxis
Elapsed time since the start of the run.
Yaxis
Number of SSL Connections
Tips
Reduce SSL connections:
Creating a new SSL connection entails heavy resource consumption. Therefore, you should try to open as few new SSL connections as possible. Once you've established an
SSL connection, you should reuse it. There should be no more than one new SSL connection per Vuser.
In cases where you reset TCP connections between iterations (VuGen Run-Time
Settings > Browser Emulation node > Simulate a new user on each iteration), you should have no more than one new SSL connection per iteration.
See also
"Web Resources Graphs Overview" on page 1420
Page 1440 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 144:
Example
Page 1441 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 145:
Throughput Graph
This graph shows the amount of throughput on the server during each second of the load test scenario run. Throughput is measured in bytes or megabytes and represents the amount of data that the Vusers received from the server at any given second. To view throughput in megabytes, use the Throughput (MB) graph.
Purpose
Helps you evaluate the amount of load that Vusers generate, in terms of server throughput.
X-axis
Y-axis
Tips
Elapsed time since the start of the scenario run.
Throughput of the server, in bytes or megabytes.
Compare to Average Transaction Response Time graph:
You can compare this graph to the Average Transaction Response Time graph to see how the throughput affects transaction performance.
Note
See also
You cannot change the granularity of the x-axis to a value that is less than the Web granularity you defined in the General tab of the Options dialog box.
"Web Resources Graphs Overview" on page 1420
Example
In the following example, the highest throughput is 193,242 bytes during the fifty-fifth second of the scenario.
Page 1442 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 145:
Page 1443 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 146:
User-Defined Data Point Graphs
Page 1444 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 146:
Page 1445 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 147:
User-Defined Data Point Graphs Overview
The User-Defined Data Point graphs display the values of user-defined data points. You define a data point in your Vuser script by inserting an lr_user_data_point function at the appropriate place
(user_data_point for GUI Vusers and lr.user_data_point for Java Vusers).
Action1()
{
lr_think_time(1);
lr_user_data_point ("data_point_1",1);
lr_user_data_point ("data_point_2",2);
return 0;
}
For Vuser protocols that support the graphical script representations such as Web and Oracle NCA, you insert a data point as a User Defined step. Data point information is gathered each time the script executes the function or step. For more information about data points, refer to the Function
Reference.
Data points, like other Analysis data, are aggregated every few seconds, resulting in less data points shown on the graph than actually recorded. For more information, see
"Changing the
Granularity of the Data " on page 1246
.
Page 1446 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 147:
Page 1447 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 148:
Data Points (Average) Graph
This graph shows the average values that were recorded for user-defined data points during the load test scenario run.
Purpose
This graph is typically used in cases where the actual value of the measurement is required. Suppose that each Vuser monitors CPU utilization on its machine and records it as a data point. In this case, the actual recorded value of CPU utilization is required. The Average graph displays the average value recorded throughout the scenario.
X-axis
Y-axis
See also
Elapsed time since the start of the run.
The average values of the recorded data point statements.
"User-Defined Data Point Graphs Overview" on page 1446
Example
In the following example, the CPU utilization is recorded as the data point user_data_point_val_1.
It is shown as a function of the elapsed scenario time.
Page 1448 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 148:
Page 1449 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 149:
Data Points (Sum) Graph
This graph shows the sum of the values for user-defined data points throughout the load test scenario run.
This graph typically indicates the total amount of measurements which all Vusers are able to generate. For example, suppose only a certain set of circumstances allow a Vuser to call a server.
Each time it does, a data point is recorded. In this case, the Sum graph displays the total number of times that Vusers call the function.
X-axis
Y-axis
See also
Elapsed time since the start of the run.
The sum of the recorded data point values.
"User-Defined Data Point Graphs Overview" on page 1446
Example
In the following example, the call to the server is recorded as the data point user_data_point_val_1.
It is shown as a function of the elapsed scenario time.
Page 1450 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 149:
Page 1451 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 150:
Network Monitor Graphs
Page 1452 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 150:
Page 1453 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 151:
Network Monitor Graphs Overview
Network configuration is a primary factor in the performance of applications and Web systems. A poorly designed network can slow client activity to unacceptable levels. In an application, there are many network segments. A single network segment with poor performance can affect the entire application.
The following diagram shows a typical network. To go from the server machine to the Vuser machine, data must travel over several segments.
To measure network performance, the Network monitor sends packets of data across the network.
When a packet returns, the monitor calculates the time it takes for the packet to go to the requested node and return.
The Network Sub-Path Time graph displays the delay from the source machine to each node along the path. The Network Segment Delay graph displays the delay for each segment of the path. The
Network Delay Time graph displays the delay for the complete path between the source and destination machines.
Using the Network Monitor graphs, you can determine whether the network is causing a bottleneck.
If the problem is network-related, you can locate the problematic segment so that it can be fixed.
In order for Analysis to generate Network monitor graphs, you must activate the Network monitor before executing the load test scenario. In the Network monitor settings, you specify the path you want to monitor. For information about setting up the Network monitor, refer to the HP LoadRunner
Controller User Guide.
Page 1454 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 151:
Page 1455 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 152:
Network Delay Time Graph
This graph shows the delays for the complete path between the source and destination machines
(for example, the database server and Vuser load generator). The graph maps the delay as a function of the elapsed load test scenario time.
Each path defined in the Controller is represented by a separate line with a different color in the graph.
Xaxis
Elapsed time since the start of the run.
Yaxis
Network delay time.
Tips Merge graphs to determine network bottleneck
You can merge various graphs to determine if the network is a bottleneck. For example, using the Network Delay Time and Running Vusers graphs, you can determine how the number of Vusers affects the network delay.
See also
"Network Monitor Graphs Overview" on page 1454
Example
In the following example of a merged graph, the network delays are compared to the running
Vusers. The graph shows that when all 10 Vusers were running, a network delay of 22 milliseconds occurred, implying that the network may be overloaded.
Page 1456 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 152:
Page 1457 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 153:
Network Segment Delay Graph
This graph shows the delay for each segment of the path according to the elapsed load test scenario time. Each segment is displayed as a separate line with a different color.
X-axis
Y-axis
Note
See also
Elapsed time since the start of the run.
Network delay time.
The segment delays are measured approximately, and do not add up to the network path delay which is measured exactly. The delay for each segment of the path is estimated by calculating the delay from the source machine to one node and subtracting the delay from the source machine to another node. For example, the delay for segment B to C is calculated by measuring the delay from the source machine to point C, and subtracting the delay from the source machine to point B.
"Network Monitor Graphs Overview" on page 1454
Example
In the following example, four segments are shown. The graph indicates that one segment caused a delay of 70 seconds in the sixth minute.
Page 1458 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 153:
Page 1459 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 154:
Network Sub-Path Time Graph
This graph displays the delay from the source machine to each node along the path according to the elapsed load test scenario time. Each segment is displayed as a separate line with a different color.
X-axis
Y-axis
Note
See also
Elapsed time since the start of the run.
Network delay time.
The delays from the source machine to each of the nodes are measured concurrently, yet independently. It is therefore possible that the delay from the source machine to one of the nodes could be greater than the delay for the complete path between the source and destination machines.
"Network Monitor Graphs Overview" on page 1454
Example
In the following example, four segments are shown. The graph indicates that one segment caused a delay of 70 milliseconds in the sixth minute.
Page 1460 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 154:
Page 1461 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 155:
Web Page Diagnostics Graphs
Page 1462 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 155:
Page 1463 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 156:
Web Page Diagnostics Tree View Overview
The Web Page Diagnostics tree view displays a tree view of the transactions, sub-transactions, and Web pages for which you can view Web Page Diagnostics graphs. For more information about
Web Page Diagnostics graphs, see
"Web Page Diagnostics Graphs Overview" on page 1466
.
The Web Page Diagnostics graphs enable you to assess whether transaction response times were affected by page content. Using the Web Page Diagnostics graphs, you can analyze problematic elements—for example, images that download slowly, or broken links—of a Web site.
Page 1464 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 156:
Page 1465 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 157:
Web Page Diagnostics Graphs Overview
Web Page Diagnostics graphs provide you with performance information for each monitored Web page in your script. You can view the download time of each page in the script and its components, and identify at what point during download time problems occurred. In addition, you can view the relative download time and size of each page and its components. Analysis displays both average download time and download time over time data.
You correlate the data in the Web Page Diagnostics graphs with data in the Transaction
Performance Summary and Average Transaction Response Time graphs in order to analyze why and where problems are occurring, and whether the problems are network- or server-related.
The following diagram illustrates the sequence of events from the time an HTTP request is sent:
Note: Because server time is being measured from the client, network time may influence this measurement if there is a change in network performance from the time the initial HTTP request is sent until the time the first buffer is sent. The server time displayed, therefore, is estimated server time and may be slightly inaccurate.
You begin analyzing the Transaction Performance Summary and Average Transaction Response
Time graphs with the Web Page Diagnostics graph, which displays the average download time (in seconds) for each monitored Web page during each second of the load test scenario run. The x-axis represents the elapsed time from the beginning of the scenario run. The y-axis represents the average download time (in seconds) for each Web page.
In order for Analysis to generate Web Page Diagnostics graphs, you must enable the Web Page
Diagnostics feature in the Controller before running your scenario.
Page 1466 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 157:
1. From the Controller menu, choose Diagnostics > Configuration and select the Enable the
following diagnostics check box.
2. Under Offline Diagnostics, click Enable to the right of Web Page Diagnostics (Max. Vuser
Sampling: 10%).
Note: It is recommended that, in VuGen, you select HTML-based script in the Recording tab of the Recording Options dialog box.
For more information on recording Web Vuser scripts, refer to the HP Virtual User Generator User
Guide.
Page 1467 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 158:
How to View the Breakdown of a Transaction
The Web Page Diagnostics graphs are most commonly used to analyze a problem detected in the
Transaction Performance Summary or Average Transaction Response Time graphs. For example, the Average Transaction Response Time graph below demonstrates that the average transaction response time for the trans1 transaction was high.
Using the Web Page Diagnostics graphs, you can pinpoint the cause of the delay in response time for the trans1 transaction.
This task describes how to breakdown a transaction.
1. Right-click trans1 and select Web Page Diagnostics for trans1. The Web Page Diagnostics graph opens and the Web Page Diagnostics tree appear. An icon appears next to the page name indicating the page content. See
"Web Page Diagnostics Content Icons" on page 1470
.
2. In the Web Page Diagnostics tree, right-click the problematic page you want to break down, and select Break Down <component name>. Alternatively, select a page in the Select Page
to Break Down box that appears under the Web Page Diagnostics graph. The Web Page
Diagnostics graph for that page appears.
Note: You can open a browser displaying the problematic page by right-clicking the page in the Web Page Diagnostics tree and selecting View page in browser.
3. Select one of the following available breakdown options: n
Download Time. Displays a table with a breakdown of the selected page's download time.
The size of each page component (including the component's header) is displayed. See the
"Page Download Time Breakdown Graph " on page 1478
for more information about this display.
n
Component (Over Time). Displays the
"Page Component Breakdown (Over Time) Graph "
Page 1468 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 158:
on page 1476
for the selected Web page.
n
Download Time (Over Time). Displays the Page Download Time Breakdown (Over Time)
Graph for the selected Web page.
n
Time to First Buffer (Over Time). Displays the
"Time to First Buffer Breakdown (Over
Time) Graph " on page 1484
for the selected Web page.
To display the graphs in full view, click the button. You can also access these graphs, as well as additional Web Page Diagnostics graphs, from the Open a New Graph dialog box.
Page 1469 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 159:
Web Page Diagnostics Content Icons
The following icons appear in the Web Page Diagnostics tree. They indicate the HTTP content of the page.
Name Description
Transaction. Specifies that the ensuing content is part of the transaction.
Page Content. Specifies that the ensuing content, which may include text, images, and so on, is all part of one logical page.
Text content. Textual information. Plain text is intended to be displayed as-is. Includes
HTML text and style sheets.
Multipart content. Data consisting of multiple entities of independent data types.
Message content. An encapsulated message. Common subtypes are news, or external-body which specifies large bodies by reference to an external data source.
Application content. Some other kind of data, typically either uninterpreted binary data or information to be processed by an application. An example subtype is Postscript data.
Image content. Image data. Two common subtypes are the jpeg and gif format.
Resource content. Other resources not listed above. Also, content that is defined as
"not available" is likewise included.
Page 1470 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 159:
Page 1471 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 160:
Downloaded Component Size Graph
This graph displays the size of each Web page component.
Note
See also
l
The Web page size is a sum of the sizes of each of its components.
l
The Downloaded Component Size graph can only be viewed as a pie graph.
"Web Page Diagnostics Graphs Overview" on page 1466
Example
In the following example the www.cnn.com/WEATHER component is 39.05% of the total size, whereas the main cnn.com component is 34.56% of the total size.
Example
In the following example the cnn.com component's size (20.83% of the total size) may have contributed to the delay in its downloading. To reduce download time, it may help to reduce the size of this component.
Page 1472 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 160:
Page 1473 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 161:
Page Component Breakdown Graph
This graph displays the average download time (in seconds) for each Web page and its components.
Breakdown options
To ascertain which components caused the delay in download time, you can break down the problematic URL by double-clicking it in the Web Page Diagnostics tree.
Tips
Note
To isolate problematic components, it may be helpful to sort the legend according to the average number of seconds taken to download a component. To sort the legend by average, click the Graph's Average column.
The graph can only be viewed as a pie.
See also
"Web Page Diagnostics Graphs Overview" on page 1466
Example
The following graph demonstrates that the main cnn.com URL took 28.64% of the total download time, compared to 35.67% for the www.cnn.com/WEATHER component.
Example
The graph shows that the main cnn.com/WEATHER component took the longest time to download
(8.98% of the total download time).
Page 1474 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 161:
Page 1475 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 162:
Page Component Breakdown (Over Time) Graph
This graph displays the average response time (in seconds) for each Web page and its components during each second of the load test scenario run.
X-axis
Y-axis
Tips
See also
The elapsed time from the beginning of the scenario run.
The average response time (in seconds) for each component.
l
To isolate the most problematic components, it may be helpful to sort the legend window according to the average number of seconds taken to download a component. To sort the legend by average, double-click the Average column heading.
l
To identify a component in the graph, you can select it. The corresponding line in the legend window is selected.
"Web Page Diagnostics Graphs Overview" on page 1466
Example
The following graph demonstrates that the response time for Satellite_Action1_963 was significantly greater, throughout the scenario, than the response time for main_js_Action1_938.
Example
Using the graph, you can track which components of the main component were most problematic, and at which point(s) during the scenario the problem(s) occurred.
Page 1476 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 162:
Page 1477 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 163:
Page Download Time Breakdown Graph
This graph displays a breakdown of each page component's download time.
Purpose
Enables you to determine whether slow response times are being caused by network or server errors during Web page download.
Breakdown options
For breakdown options, see
"Page Download Time Breakdown Graph Breakdown
Options" on page 1480
.
Note: Each measurement displayed on the page level is the sum of that measurement recorded for each page component. For example, the Connection
Time for www.cnn.com is the sum of the Connection Time for each of the page's components.
See also
"Web Page Diagnostics Graphs Overview" on page 1466
Example
The Page Download Time Breakdown graph demonstrates that receive time, connection time, and first buffer time accounted for a large portion of the time taken to download the main cnn.com URL.
Page 1478 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 163:
Example
If you break the cnn.com URL down further, you can isolate the components with the longest download time, and analyze the network or server problems that contributed to the delay in response time.
Breaking down the cnn.com URL demonstrates that for the component with the longest download time (the www.cnn.com component), the receive time accounted for a large portion of the download time.
Page 1479 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 164:
Page Download Time Breakdown Graph Breakdown
Options
The Page Download Time Breakdown graph breaks down each component by DNS resolution time, connection time, time to first buffer, SSL handshaking time, receive time, FTP authentication time, client time, and error time.
These breakdowns are described below:
Name
DNS
Resolution
Connection
First Buffer
SSL
Handshaking
Description
Displays the amount of time needed to resolve the DNS name to an IP address, using the closest DNS server. The DNS Lookup measurement is a good indicator of problems in DNS resolution, or problems with the DNS server.
Displays the amount of time needed to establish an initial connection with the
Web server hosting the specified URL. The connection measurement is a good indicator of problems along the network. It also indicates whether the server is responsive to requests.
Displays the amount of time that passes from the initial HTTP request (usually
GET) until the first buffer is successfully received back from the Web server.
The first buffer measurement is a good indicator of Web server delay as well as network latency.
Note: Since the buffer size may be up to 8K, the first buffer might also be the time it takes to completely download the element.
Displays the amount of time taken to establish an SSL connection (includes the client hello, server hello, client public key transfer, server certificate transfer, and other—partially optional—stages). After this point, all the communication between the client and server is encrypted.
The SSL Handshaking measurement is only applicable for HTTPS communications.
Receive
FTP
Authentication
Displays the time taken to authenticate the client. With FTP, a server must authenticate a client before it starts processing the client's commands.
The FTP Authentication measurement is only applicable for FTP protocol communications.
Client Time
Displays the amount of time that passes until the last byte arrives from the server and the downloading is complete.
The Receive measurement is a good indicator of network quality (look at the time/size ratio to calculate receive rate).
Error Time
Displays the average amount of time that passes while a request is delayed on the client machine due to browser think time or other client-related delays.
Displays the average amount of time that passes from the moment an HTTP request is sent until the moment an error message (HTTP errors only) is returned.
Page 1480 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 164:
Page 1481 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 165:
Time to First Buffer Breakdown Graph
This graph displays each Web page component's relative server/network time (in seconds) for the period of time until the first buffer is successfully received back from the Web server.
Purpose
If the download time for a component is high, you can use this graph to determine whether the problem is server- or network-related.
Specifies the name of the component.
X-axis
Y-axis
Shows the average network/server time (in seconds) for each component.
Measurements
l
Network time is defined as the average amount of time that passes from the moment the first HTTP request is sent until receipt of ACK.
l
Server time is defined as the average amount of time that passes from the receipt of ACK of the initial HTTP request (usually GET) until the first buffer is successfully received back from the Web server.
Note
l
Each measurement displayed on the page level is the sum of that measurement recorded for each page component. For example, the network time for www.cnn.com is the sum of the network time for each of the page's components.
l
Because server time is being measured from the client, network time may influence this measurement if there is a change in network performance from the time the initial HTTP request is sent until the time the first buffer is sent. The server time displayed, therefore, is estimated server time and may be slightly inaccurate.
l
The graph can only be viewed as a bar graph.
See also
"Web Page Diagnostics Graphs Overview" on page 1466
Example
In the following example it is apparent that network time is greater than server time.
Page 1482 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 165:
Example
In the following example shows that you can break the main cnn.com URL down further to view the time to first buffer breakdown for each of its components. It is apparent that for the main cnn.com
component (the first component on the right), the time to first buffer breakdown is almost all network time.
Page 1483 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 166:
Time to First Buffer Breakdown (Over Time) Graph
This graph displays each Web page component's server and network time (in seconds) during each second of the load test scenario run, for the period of time until the first buffer is successfully received back from the Web server.
Purpose
X-axis
Y-axis
You can use this graph to determine when during the scenario run a server- or network-related problem occurred.
Elapsed time from the beginning of the scenario run.
Average network or server time (in seconds) for each component.
Measurements
l
Network time is defined as the average amount of time that passes from the moment the first HTTP request is sent until receipt of ACK.
l
Server time is defined as the average amount of time that passes from the receipt of ACK of the initial HTTP request (usually GET) until the first buffer is successfully received back from the Web server.
Note: Because server time is being measured from the client, network time may influence this measurement if there is a change in network performance from the time the initial HTTP request is sent until the time the first buffer is sent. The server time displayed, therefore, is estimated server time and may be slightly inaccurate.
Note
See also
l
Each measurement displayed on the page level is the sum of that measurement recorded for each page component. For example, the network time for www.cnn.com is the sum of the network time for each of the page's components.
l
When the Time to First Buffer Breakdown (Over Time) graph is selected from the Web Page Diagnostics graph, it appears as an area graph.
"Web Page Diagnostics Graphs Overview" on page 1466
Page 1484 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 166:
Example
In the following example you can break the main cnn.com URL down further to view the time to first buffer breakdown for each of its components.
Page 1485 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 166:
Page 1486 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 166:
Page 1487 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 167:
System Resource Graphs
Page 1488 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 167:
Page 1489 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 168:
System Resource Graphs Overview
System Resource graphs display the system resource usage measured by the online monitors during the load test scenario run. Thesegraphs require that you specify the resources you want to measure before running the scenario. For more information, refer to the section on online monitors in the HP LoadRunner Controller User Guide.
Page 1490 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 168:
Page 1491 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 169:
Server Resources Performance Counters
The following table describes the available counters:
Monitor
CPU
Monitor
Memory
Monitor
Measurements
Utilization
Disk Space
Monitor
Disk space
MB free
Pages/sec
Percent used
Description
Measures CPU utilization.
Measures the amount (in MB) free disk space and the percentage of disk space used.
Measures the amount of free memory (in MB).
Measures the number of virtual memory pages that are moved between main memory and disk storage.
Measures the percentage of memory and paging file space used.
Services
Monitor
Monitors processes locally or on remote systems. Can be used to verify that specific processes are running.
Page 1492 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 169:
Page 1493 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 170:
Linux Resources Default Measurements
The following default measurements are available for Linux machines:
Measurement
Average load
Description
Average number of processes simultaneously in `Ready' state during the last minute.
Collision rate
Context switches rate
CPU utilization
Collisions per second detected on the Ethernet.
Number of switches between processes or threads, per second.
Percent of time that the CPU is utilized.
Disk rate
Rate of disk transfers.
Incoming packets error rate
Errors per second while receiving Ethernet packets.
Incoming packets rate
Incoming Ethernet packets per second.
Interrupt rate
Outgoing packets errors rate
Number of device interrupts per second.
Errors per second while sending Ethernet packets.
Outgoing packets rate
Outgoing Ethernet packets per second.
Page-in rate
Page-out rate
Paging rate
Number of pages read to physical memory, per second.
Number of pages written to pagefile(s) and removed from physical memory, per second.
Number of pages read to physical memory or written to pagefile(s), per second.
Swap-in rate
Swap-out rate
System mode CPU utilization
User mode CPU utilization
Number of processes being swapped.
Number of processes being swapped.
Percent of time that the CPU is utilized in system mode.
Percent of time that the CPU is utilized in user mode.
Page 1494 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 170:
Page 1495 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 171:
Windows Resources Default Measurements
The following default measurements are available for Windows Resources:
Object
System
Processor
System
System
Memory
Measurement Description
% Total
Processor
Time
The average percentage of time that all the processors on the system are busy executing non-idle threads. On a multiprocessor system, if all processors are always busy, this is
100%, if all processors are 50% busy this is 50% and if 1/4 of the processors are 100% busy this is 25%. It can be viewed as the fraction of the time spent doing useful work. Each processor is assigned an Idle thread in the Idle process which consumes those unproductive processor cycles not used by any other threads.
% Processor
Time
File Data
Operations/sec
The rate at which the computer issues read and write operations to file system devices. This does not include File
Control Operations.
Processor
Queue Length
The percentage of time that the processor is executing a nonidle thread. This counter was designed as a primary indicator of processor activity. It is calculated by measuring the time that the processor spends executing the thread of the idle process in each sample interval, and subtracting that value from 100%. (Each processor has an idle thread which consumes cycles when no other threads are ready to run.) It can be viewed as the percentage of the sample interval spent doing useful work. This counter displays the average percentage of busy time observed during the sample interval.
It is calculated by monitoring the time the service was inactive, and then subtracting that value from 100%.
Page
Faults/sec
The instantaneous length of the processor queue in units of threads. This counter is always 0 unless you are also monitoring a thread counter. All processors use a single queue in which threads wait for processor cycles. This length does not include the threads that are currently executing. A sustained processor queue length greater than two generally indicates processor congestion. This is an instantaneous count, not an average over the time interval.
This is a count of the page faults in the processor. A page fault occurs when a process refers to a virtual memory page that is not in its Working Set in the main memory. A page fault will not cause the page to be fetched from disk if that page is on the standby list (and hence already in main memory), or if it is in use by another process with which the page is shared.
Page 1496 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 171:
Object Measurement Description
PhysicalDisk % Disk Time
The percentage of elapsed time that the selected disk drive is busy servicing read or write requests.
Memory
Memory
Pool
Nonpaged
Bytes
Pages/sec
The number of bytes in the nonpaged pool, a system memory area where space is acquired by operating system components as they accomplish their appointed tasks.
Nonpaged pool pages cannot be paged out to the paging file.
They remain in main memory as long as they are allocated.
The number of pages read from the disk or written to the disk to resolve memory references to pages that were not in memory at the time of the reference. This is the sum of Pages
Input/sec and Pages Output/sec. This counter includes paging traffic on behalf of the system cache to access file data for applications. This value also includes the pages to/from non-cached mapped memory files. This is the primary counter to observe if you are concerned about excessive memory pressure (that is, thrashing), and the excessive paging that may result.
System
Objects
Process
Total
Interrupts/sec
Threads
The rate at which the computer is receiving and servicing hardware interrupts. The devices that can generate interrupts are the system timer, the mouse, data communication lines, network interface cards, and other peripheral devices. This counter provides an indication of how busy these devices are on a computer-wide basis. See also
Processor:Interrupts/sec.
The number of threads in the computer at the time of data collection. Notice that this is an instantaneous count, not an average over the time interval. A thread is the basic executable entity that can execute instructions in a processor.
Private Bytes
The current number of bytes that the process has allocated that cannot be shared with other processes.
Page 1497 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 172:
Server Resources Graph
This graph shows the resources (CPU, disk space, memory, or services) used on remote Linux servers measured during the load test scenario.
Purpose
X-axis
Y-axis
See also
This graph helps you determine the impact of Vuser load on the various system resources.
Elapsed time since the start of the run.
The usage of resources on the Linux server.
"System Resource Graphs Overview" on page 1490
"Server Resources Performance Counters" on page 1492
Example
In the following example, Windows resource utilization is measured during the load test scenario. It is shown as a function of the elapsed scenario time.
Page 1498 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 172:
Page 1499 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 173:
SiteScope Graph
This graph displays statistics about the resource usage on the SiteScope machine during the load test scenario run.
X-axis
Y-axis
See also
Elapsed time since the start of the run.
The resource usage on the Sitescope machine.
"System Resource Graphs Overview" on page 1490
Example
In the following example, the percentage of memory resources used, the number of pages read per second, and the CPU utilization.
Page 1500 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 173:
Page 1501 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 174:
SNMP Resources Graph
This graph shows statistics for machines running an SNMP agent, using the Simple Network
Management Protocol (SNMP).
X-axis
Y-axis
Note
See also
Elapsed time since the start of the run.
The usage of resources on a machine running the SNMP agent.
To obtain data for this graph, you need to enable the SNMP monitor
(from the Controller) and select the default measurements you want to display, before running the scenario.
"System Resource Graphs Overview" on page 1490
Example
In the following example SNMP measurements are displayed for a machine called bonaporte.
Page 1502 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 174:
Page 1503 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 175:
Linux Resources Graph
This graph shows the Linux resources measured during the load test scenario. The Linux measurements include those available by the rstatd daemon: average load, collision rate, context switch rate, CPU utilization, incoming packets error rate, incoming packets rate, interrupt rate, outgoing packets error rate, outgoing packets rate, page-in rate, page-out rate, paging rate, swap-in rate, swap-out rate, system mode CPU utilization, and user mode CPU utilization.
Purpose
This graph helps you determine the impact of Vuser load on the various system resources.
X-axis
Y-axis
Note
Elapsed time since the start of the run.
The usage of resources on the Linux machine.
See also
To obtain data for this graph, you need to select the desired measurements for the online monitor (from the Controller) before running the scenario.
"Linux Resources Default Measurements" on page 1494
Example
In the following example Linux resources are measured during the load test scenario.
Page 1504 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 175:
Page 1505 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 176:
Windows Resources Graph
This graph shows the Windows resources measured during the load test scenario. The Windows measurements correspond to the built-in counters available from the Windows Performance
Monitor.
Purpose
This graph helps you determine the impact of Vuser load on the various system resources.
X-axis
Y-axis
Note
Elapsed time since the start of the run.
The usage of resources on the Windows machine running the load test scenario.
See also
To obtain data for this graph, you need to select the desired measurements for the online monitor (from the Controller) before running the scenario.
"System Resource Graphs Overview" on page 1490
"Windows Resources Default Measurements" on page 1496
Example
In the following example Windows resources are measured on the server running the load test scenario.
Page 1506 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 176:
Page 1507 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 177:
Firewall Server Monitor Graphs
Page 1508 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 177:
Page 1509 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 178:
Firewall Server Monitor Graphs Overview
Firewall server monitor graphs provide you with performance information for firewall servers. In order to obtain data for this graph, you need to activate the Firewall server online monitor before running the load test scenario. When you set up the online monitor for the Firewall server, you indicate which statistics and measurements to monitor. For more information on activating and configuring Firewall server monitors, refer to the HP LoadRunner Controller User Guide.
Page 1510 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 178:
Page 1511 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 179:
Check Point FireWall-1 Server Measurements
The following measurements are available for the Check Point Firewall-1 server:
Measurement fwRejected fwDropped fwLogged
Description
The number of rejected packets.
The number of dropped packets.
The number of logged packets.
Page 1512 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 179:
Page 1513 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 180:
Check Point FireWall-1 Server Graph
This graph shows statistics on Check Point's Firewall server as a function of the elapsed load test scenario time.
Xaxis
Elapsed time since the start of the run.
Yaxis
The resource usage on the Check Point Firewall-1 server.
Note
To obtain data for this graph, you need to enable the Check Point FireWall-1 monitor (from the Controller) and select the default measurements you want to display, before running the scenario.
See also
"Firewall Server Monitor Graphs Overview" on page 1510
"Check Point FireWall-1 Server Measurements" on page 1512
Example
In the following example the graph displays the fwDropped, fwLogged, and fwRejected measurements during the first minute and twenty seconds of the scenario. There are differences in the scale factor for the measurements: the scale factor for fwDropped is 1, the scale factor for
fwLogged is 10, and the scale factor for fwRejected is 0.0001.
Page 1514 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 180:
Page 1515 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 181:
Web Server Resource Graphs
Page 1516 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 181:
Page 1517 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 182:
Web Server Resource Graphs Overview
Web Server Resource graphs provide you with information about the resource usage of the Apache,
Microsoft IIS, iPlanet/Netscape, and iPlanet (SNMP) Web servers. In order to obtain data for these graphs, you need to activate the online monitor for the server and specify which resources you want to measure before running the load test scenario. For information on activating and configuring the
Web Server Resource monitors, refer to the HP LoadRunner Controller User Guide.
In order to display all the measurements on a single graph, Analysis may scale them. The Legend window indicates the scale factor for each resource. To obtain the true value, multiply the scale factor by the displayed value.
Page 1518 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 182:
Page 1519 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 183:
Apache Server Measurements
The following default measurements are available for the Apache server:
Measurement
# Busy Servers
# Idle Servers
Apache CPU Usage
Hits/sec
KBytes Sent/sec
Description
The number of servers in the Busy state
The number of servers in the Idle state
The percentage of time the CPU is utilized by the Apache server
The HTTP request rate
The rate at which data bytes are sent from the Web server
Page 1520 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 183:
Page 1521 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 184:
IIS Server Measurements
The following default measurements are available for the IIS server:
Object
Web
Service
Measurement Description
Bytes Sent/sec
The rate at which the data bytes are sent by the Web service.
The rate at which the data bytes are received by the Web service.
Web
Service
Bytes
Received/sec
Web
Service
Get
Requests/sec
Web
Service
Web
Service
Web
Service
Post
Requests/sec
Maximum
Connections
Current
Connections
The rate at which HTTP requests using the GET method are made. Get requests are generally used for basic file retrievals or image maps, though they can be used with forms.
The rate at which HTTP requests using the POST method are made. Post requests are generally used for forms or gateway requests.
The maximum number of simultaneous connections established with the Web service.
The current number of connections established with the Web service.
Web
Service
Current
NonAnonymous
Users
The number of users that currently have a non-anonymous connection using the Web service.
Web
Service
Not Found
Errors/sec
Process Private Bytes
The rate of errors due to requests that could not be satisfied by the server because the requested document could not be found.
These are generally reported to the client as an HTTP 404 error code.
The current number of bytes that the process has allocated that cannot be shared with other processes.
Page 1522 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 184:
Page 1523 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 185:
Apache Server Graph
This graph shows server statistics as a function of the elapsed load test scenario time.
Xaxis
Elapsed time since the start of the run.
Yaxis
The resource usage on the Apache server during the scenario run.
Note
To obtain data for this graph, you need to enable the Apache online monitor (from the
Controller) and select the default measurements you want to display, before running the scenario.
See also
"Web Server Resource Graphs Overview" on page 1518
"Apache Server Measurements" on page 1520
Example
In the following example, the CPU usage remained steady throughout the scenario. At the end of the scenario, the number of idle servers increased. The number of busy servers remained steady at
1 throughout the scenario, implying that the Vuser only accessed one Apache server.
The scale factor for the Busy Servers measurement is 1/10 and the scale factor for CPU usage is
10.
Page 1524 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 185:
Page 1525 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 186:
Microsoft Information Internet Server (IIS) Graph
This graph shows server statistics as a function of the elapsed load test scenario time.
Xaxis
Elapsed time since the start of the run.
Yaxis
The resource usage on the MS IIS.
Note
To obtain data for this graph, you need to enable the MS IIS online monitor (from the
Controller) and select the default measurements you want to display, before running the scenario.
See also
"Web Server Resource Graphs Overview" on page 1518
"IIS Server Measurements" on page 1522
Example
In the following example the Bytes Received/sec and Get Requests/sec measurements remained fairly steady throughout the scenario, while the % Total Processor Time, Bytes Sent/sec, and
Post Requests/sec measurements fluctuated considerably.
The scale factor for the Bytes Sent/sec and Bytes Received/sec measurements is 1/100, and the scale factor for the Post Requests/sec measurement is 10.
Page 1526 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 186:
Page 1527 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 187:
Web Application Server Resource Graphs
Page 1528 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 187:
Page 1529 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 188:
Web Application Server Resource Graphs Overview
Web Application Server Resource graphs provide you with resource usage information about the
Ariba, ATG Dynamo, BroadVision, ColdFusion, Fujitsu INTERSTAGE, iPlanet (NAS), Microsoft
ASP, Oracle9iAS HTTP, SilverStream, WebLogic (SNMP), WebLogic (JMX), and WebSphere application servers.
In order to obtain data for these graphs, you need to activate the online monitor for the application server and specify which resources you want to measure before running the load test scenario. For information on activating and configuring the Web Application Server Resource monitors, refer to the HP LoadRunner Controller User Guide.
When you open a Web Application Server Resource graph, you can filter it to show only the relevant application. When you need to analyze other applications, you can change the filter conditions and display the desired resources.
In order to display all the measurements on a single graph, Analysis may scale them. The Legend window indicates the scale factor for each resource. To obtain the true value, multiply the scale factor by the displayed value. For more information on scaled measurements, see the example in
"Web Server Resource Graphs Overview" on page 1518 .
Page 1530 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 188:
Page 1531 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 189:
Web Application Server Resource Graphs Measurements
Microsoft Active Server Pages (ASP) Measurements
The following default measurements are available for Microsoft Active Server Pages:
>Measurement
Errors per Second
Description
The number of errors per second.
Requests Wait Time
The number of milliseconds the most recent request was waiting in the queue.
Requests Executing
The number of requests currently executing.
Requests Queued
The number of requests waiting in the queue for service.
Requests Rejected
The total number of requests not executed because there were insufficient resources to process them.
Requests Not Found
The number of requests for files that were not found.
Requests/sec
The number of requests executed per second.
Memory Allocated
Errors During Script
Run-Time
The total amount of memory (in bytes) currently allocated by Active
Server Pages.
The number of failed requests due to run time errors.
Sessions Current
Transactions/sec
The current number of sessions being serviced.
The number of transactions started per second.
Oracle9iAS HTTP Server Modules
The following table describes some of the modules that are available for the Oracle9iAS HTTP server:
Measurement
Description mod_mime.c
Determines document types using file extensions.
mod_mime_ magic.c
Determines document types using "magic numbers".
mod_auth_ anon.c
Provides anonymous user access to authenticated areas.
Provides user authentication using DBM files.
mod_auth_ dbm.c
mod_auth_
Provides MD5 authentication.
Page 1532 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 189:
Measurement
Description digest.c
Supports HTTP header metafiles.
mod_cern_ meta.c
mod_ digest.c
Provides MD5 authentication (deprecated by mod_auth_digest).
mod_ expires.c
mod_ headers.c
Applies Expires: headers to resources.
Adds arbitrary HTTP headers to resources.
mod_proxy.c
Provides caching proxy abilities.
Provides powerful URI-to-filename mapping using regular expressions.
mod_ rewrite.c
mod_ speling.c
mod_info.c
Automatically corrects minor typos in URLs.
Provides server configuration information.
mod_ status.c
Displays server status.
mod_ usertrack.c
Provides user tracking using cookies.
mod_dms.c
Provides access to DMS Apache statistics.
mod_perl.c
Allows execution of Perl scripts.
Supports CGI access to long-lived programs.
mod_ fastcgi.c
mod_ssl.c
Provides SSL support.
mod_plsql.c
Handles requests for Oracle stored procedures.
mod_isapi.c
Provides Windows ISAPI extension support.
mod_ setenvif.c
Sets environment variables based on client information.
mod_ actions.c
Executes CGI scripts based on media type or request method.
mod_imap.c
Handles imagemap files.
Page 1533 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 189:
Measurement
Description mod_asis.c
Sends files that contain their own HTTP headers.
mod_log_ config.c
Provides user-configurable logging replacement for mod_log_common.
mod_env.c
mod_ userdir.c
Passes environments to CGI scripts.
mod_alias.c
Maps different parts of the host file system in the document tree, and redirects
URLs.
Handles user home directories.
mod_cgi.c
mod_dir.c
mod_ autoindex.c
mod_ include.c
Invokes CGI scripts.
Handles the basic directory.
Provides automatic directory listings.
Provides server-parsed documents.
mod_ negotiation.c
Handles content negotiation.
mod_auth.c
Provides user authentication using text files.
mod_ access.c
Provides access control based on the client host name or IP address.
mod_so.c
mod_ oprocmgr.c
Supports loading modules (.so on UNIX, .dll on Win32) at run time.
Monitors JServ processes and restarts them if they fail.
mod_jserv.c
Routes HTTP requests to JServ server processes. Balances load across multiple JServs by distributing new requests in round-robin order.
mod_ose.c
http_core.c
Routes requests to the JVM embedded in Oracle's database server.
Handles requests for static Web pages.
Oracle9iAS HTTP Server Counters
The following table describes the counters that are available for the Oracle9iAS HTTP server:
Measurement handle.minTime
Description
The minimum time spent in the module handler.
Page 1534 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 189:
Measurement handle.avg
handle.active
handle.time
handle.completed
request.maxTime
request.minTime
request.avg
Description
The average time spent in the module handler.
The number of threads currently in the handle processing phase.
The total amount of time spent in the module handler.
The number of times the handle processing phase was completed.
The maximum amount of time required to service an HTTP request.
The minimum amount of time required to service an HTTP request.
The average amount of time required to service an HTTP request.
request.active
request.time
request.completed
The number of threads currently in the request processing phase.
The total amount of time required to service an HTTP request.
The number of times the request processing phase was completed.
connection.maxTime
The maximum amount of time spent servicing any HTTP connection.
connection.minTime
The minimum amount of time spent servicing any HTTP connection.
connection.avg
connection.active
connection.time
The average amount of time spent servicing HTTP connections.
The number of connections with currently open threads.
The total amount of time spent servicing HTTP connections.
connection.completed
The number of times the connection processing phase was completed.
numMods.value
The number of loaded modules.
childFinish.count
The number of times the Apache parent server started a child server, for any reason.
childStart.count
The number of times "children"finished "gracefully."There are some ungraceful error/crash cases that are not counted in childFinish.count.
The number of times each module declined HTTP requests.
Decline.count
internalRedirect.count
The number of times that any module passed control to another module using an "internal redirect".
cpuTime.value
The total CPU time utilized by all processes on the Apache server
(measured in CPU milliseconds).
heapSize.value
pid.value
upTime.value
The total heap memory utilized by all processes on the Apache server
(measured in kilobytes).
The process identifier of the parent Apache process.
The amount of time the server has been running (measured in milliseconds).
Page 1535 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 189:
WebLogic (SNMP) Server Table Measurements
The Server Table lists all WebLogic (SNMP) servers that are being monitored by the agent. A server must be contacted or be reported as a member of a cluster at least once before it will appear in this table. Servers are only reported as a member of a cluster when they are actively participating in the cluster, or shortly thereafter.
Measurement
ServerState
ServerLoginEnable
ServerMaxHeapSpace
ServerHeapUsedPct
ServerQueueLength
ServerQueueThroughput
Description
The state of the WebLogic server, as inferred by the SNMP agent. Upimplies that the agent can contact the server.
Down implies that the agent cannot contact the server.
True if client logins are enabled on the server.
The maximum heap size for this server (in KB).
The percentage of heap space currently in use on the server.
The current length of the server execute queue.
The current throughput of execute queue, expressed as the number of requests processed per second.
ServerNumEJBDeployment
The total number of EJB deployment units known to the server.
ServerNumEJBBeansDeployed
The total number of EJB beans actively deployed on the server.
WebLogic (SNMP) Listen Table Measurements
The Listen Table is the set of protocol, IP address, and port combinations on which servers are listening. There will be multiple entries for each server: one for each (protocol, ipAddr, port) combination. If clustering is used, the clustering-related MIB objects will assume a higher priority.
Measurement
ListenPort
Description
Port number.
ListenAdminOK
True if admin requests are allowed on this (protocol, ipAddr, port) combination; otherwise false.
ListenState
Listening if the (protocol, ipAddr, port) combination is enabled on the server;
Not Listening if it is not. The server may be listening but not accepting new clients if its server Login Enable state is false. In this case, existing clients will continue to function, but new ones will not.
WebLogic (SNMP) ClassPath Table Measurements
The ClassPath Table is the table of classpath elements for Java, WebLogic (SNMP) server, and servlets. There are multiple entries in this table for each server. There may also be multiple entries for each path on a server. If clustering is used, the clustering-related MIB objects will assume a higher priority.
Page 1536 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 189:
Measurement
Description
CPType
The type of CP element: Java, WebLogic, servlet. A Java CPType means the
CP element is one of the elements in the normal Java classpath. A WebLogic
CPType means the CP element is one of the elements in weblogic.class.path. A servlet CPType means the CP element is one of the elements in the dynamic servlet classpath.
CPIndex
The position of an element within its path. The index starts at 1.
Websphere Application Server Monitor Run-Time Resource
Measurements
Contains resources related to the Java Virtual Machine run time, as well as the ORB.
Measurement
MemoryFree
MemoryTotal
MemoryUse
Description
The amount of free memory remaining in the Java Virtual Machine.
The total memory allocated for the Java Virtual Machine.
The total memory in use on the Java Virtual Machine.
Websphere Application Server Monitor BeanData Measurements
Every home on the server provides performance data, depending on the type of bean deployed in the home. The top level bean data holds an aggregate of all the containers.
Measurement
BeanDestroys
Description
The number of times an individual bean object was destroyed. This applies to any bean, regardless of its type.
StatelessBeanDestroys
The number of times a stateless session bean object was destroyed.
StatefulBeanDestroys
The number of times a stateful session bean object was destroyed.
Websphere Application Server Monitor BeanObjectPool Measurements
The server holds a cache of bean objects. Each home has a cache and there is therefore one
BeanObjectPoolContainer per container. The top level, BeanObjectPool, holds an aggregate of all the containers data.
Measurement
NumGetFound
Description
The number of calls to the pool that resulted in finding an available bean.
NumPutsDiscarded
The number of times releasing a bean to the pool resulted in the bean being discarded because the pool was full.
Websphere Application Server Monitor OrbThreadPool Measurements
These are resources related to the ORB thread pool that is on the server.
Page 1537 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 189:
Measurement
ActiveThreads
Description
The average number of active threads in the pool.
TotalThreads
The average number of threads in the pool.
PercentTimeMaxed
The average percent of the time that the number of threads in the pool reached or exceeded the desired maximum number.
Websphere Application Server Monitor DBConnectionMgr Measurements
These are resources related to the database connection manager. The manager consists of a series of data sources, as well as a top-level aggregate of each of the performance metrics.
Measurement
ConnectionWaitTime
ConnectionTime
ConnectionPercentUsed
Description
The average time (in seconds) of a connection grant.
The average time (in seconds) that a connection is in use.
The average percentage of the pool that is in use.
Websphere Application Server Monitor TransactionData Measurements
These are resources that pertain to transactions.
Measurement
NumTransactions
ActiveTransactions
TransactionRT
Description
The number of transactions processed.
The average number of active transactions.
The average duration of each transaction.
RolledBack
Timeouts
The number of transactions rolled back.
The number of transactions that timed out due to inactivity timeouts.
TransactionSuspended
The average number of times that a transaction was suspended.
Websphere Application Server Monitor ServletEngine Measurements
These are resources that are related to servlets and JSPs.
Measurement
ServletErrors
Description
The number of requests that resulted in an error or an exception.
Websphere Application Server Monitor Session Measurements
These are general metrics regarding the HTTP session pool.
Measurement Description
SessionsInvalidated
The number of invalidated sessions. May not be valid when using sessions in the database mode.
Page 1538 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 189:
Page 1539 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 190:
Microsoft Active Server Pages (ASP) Graph
This graph displays statistics about the resource usage on the ASP server during the load test scenario run.
Xaxis
Elapsed time since the start of the run.
Yaxis
The resource usage on the ASP server.
Note
To obtain data for this graph, you need to enable the Microsoft ASP online monitor (from the Controller) and select the default measurements you want to display, before running the scenario.
See also
"Web Application Server Resource Graphs Overview" on page 1530
"Web Application Server Resource Graphs Measurements" on page 1532
Page 1540 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 190:
Page 1541 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 191:
Oracle9iAS HTTP Server Graph
This graph displays statistics about the resource usage on the Oracle9iAS HTTP server during the load test scenario run.
Xaxis
Elapsed time since the start of the run.
Yaxis
The resource usage on the Oracle9iAS HTTP server.
Note
To obtain data for this graph, you need to enable the Oracle9iAS HTTP online monitor
(from the Controller), and select the default measurements you want to display, before running the scenario.
See also
"Web Application Server Resource Graphs Overview" on page 1530
"Web Application Server Resource Graphs Measurements" on page 1532
Page 1542 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 191:
Page 1543 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 192:
WebLogic (SNMP) Graph
This graph displays statistics about the resource usage on the WebLogic (SNMP) server (version
6.0 and earlier) during the load test scenario run.
Xaxis
The elapsed time since the start of the run.
Yaxis
The resource usage on the WebLogic (SNMP) server.
Note
To obtain data for this graph, you need to enable the WebLogic (SNMP) online monitor
(from the Controller) and select the default measurements you want to display, before running the scenario.
See also
"Web Application Server Resource Graphs Overview" on page 1530
"Web Application Server Resource Graphs Measurements" on page 1532
Page 1544 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 192:
Page 1545 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 193:
WebSphere Application Server Graph
This graph displays statistics about the resource usage on the WebSphere application server during the load test scenario run.
Xaxis
Elapsed time since the start of the run.
Yaxis
The resource usage on the WebSphere Application server.
Note
To obtain data for this graph, you need to configure the WebSphere Application Server online monitor (from the Controller) and select the default measurements you want to display, before running the scenario.
See also
"Web Application Server Resource Graphs Overview" on page 1530
"Web Application Server Resource Graphs Measurements" on page 1532
Page 1546 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 193:
Page 1547 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 194:
Database Server Resource Graphs
Page 1548 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 194:
Page 1549 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 195:
Database Server Resource Graphs Overview
The Database Server Resource graphs show statistics for several database servers. Currently
DB2, Oracle, SQL server, and Sybase databases are supported. Thesegraphs require that you specify the resources you want to measure before running the load test scenario. For more information, refer to the section on online monitors in the HP LoadRunner Controller User Guide.
Page 1550 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 195:
Page 1551 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 196:
DB2 Database Manager Counters
Measurement Description rem_cons_in
The current number of connections initiated from remote clients to the instance of the database manager that is being monitored.
rem_cons_ in_exec local_cons local_cons_ in_exec
The number of remote applications that are currently connected to a database and are currently processing a unit of work within the database manager instance being monitored.
The number of local applications that are currently connected to a database within the database manager instance being monitored.
The number of local applications that are currently connected to a database within the database manager instance being monitored and are currently processing a unit of work.
The number of local databases that have applications connected.
con_local_ dbases agents_ registered
The number of agents registered in the database manager instance that is being monitored (coordinator agents and subagents).
agents_ waiting_on_ token
The number of agents waiting for a token so they can execute a transaction in the database manager.
idle_agents
The number of agents in the agent pool that are currently unassigned to an application and are therefore "idle".
agents_ from_pool
The number of agents assigned from the agent pool.
The number of agents created because the agent pool was empty.
agents_ created_ empty_pool agents_ stolen
The number of times that agents are stolen from an application. Agents are stolen when an idle agent associated with an application is reassigned to work on a different application.
comm_ private_mem
The amount of private memory that the instance of the database manager has currently committed at the time of the snapshot.
inactive_gw_ agents
The number of DRDA agents in the DRDA connections pool that are primed with a connection to a DRDA database, but are inactive.
num_gw_ conn_ switches
The number of times that an agent from the agents pool was primed with a connection and was stolen for use with a different DRDA database.
sort_heap_
The total number of allocated pages of sort heap space for all sorts at the level
Page 1552 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 196:
Measurement Description allocated
chosen and at the time the snapshot was taken.
post_ threshold_ sorts
The number of sorts that have requested heaps after the sort heap threshold has been reached.
piped_sorts_ requested
The number of piped sorts that have been requested.
piped_sorts_ accepted
The number of piped sorts that have been accepted.
Page 1553 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 197:
DB2 Database Counters
Measurement
Description appls_cur_ cons appls_in_ db2
Indicates the number of applications that are currently connected to the database.
Indicates the number of applications that are currently connected to the database, and for which the database manager is currently processing a request.
total_sec_ cons num_assoc_ agents sort_heap_ allocated
The number of connections made by a sub-agent to the database at the node.
At the application level, this is the number of sub-agents associated with an application. At the database level, it is the number of sub-agents for all applications.
The total number of allocated pages of sort heap space for all sorts at the level chosen and at the time the snapshot was taken.
total_sorts total_sort_ time sort_ overflows
The total number of sorts that have been executed.
The total elapsed time (in milliseconds) for all sorts that have been executed.
The total number of sorts that ran out of sort heap and may have required disk space for temporary storage.
active_sorts
The number of sorts in the database that currently have a sort heap allocated.
The total number of hash joins executed.
total_hash_ joins total_hash_ loops hash_join_ overflows
The total number of times that a single partition of a hash join was larger than the available sort heap space.
The number of times that hash join data exceeded the available sort heap space.
hash_join_ small_ overflows
The number of times that hash join data exceeded the available sort heap space by less than 10%.
pool_data_l_ reads
The number of logical read requests for data pages that have gone through the buffer pool.
pool_data_ p_reads
The number of read requests that required I/O to get data pages into the buffer pool.
Page 1554 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 197:
Measurement
Description pool_data_ writes pool_index_ l_reads
Indicates the number of times a buffer pool data page was physically written to disk.
The number of logical read requests for index pages that have gone through the buffer pool.
pool_index_ p_reads pool_index_ writes
The number of physical read requests to get index pages into the buffer pool.
The number of times a buffer pool index page was physically written to disk.
pool_read_ time pool_write_ time
The total amount of elapsed time spent processing read requests that caused data or index pages to be physically read from disk to buffer pool.
The total amount of time spent physically writing data or index pages from the buffer pool to disk.
files_closed
The total number of database files closed.
pool_async_ data_reads
The number of pages read asynchronously into the buffer pool.
pool_async_ data_writes
The number of times a buffer pool data page was physically written to disk by either an asynchronous page cleaner, or a pre-fetcher. A pre-fetcher may have written dirty pages to disk to make space for the pages being pre-fetched.
pool_async_ index_writes
The number of times a buffer pool index page was physically written to disk by either an asynchronous page cleaner, or a pre-fetcher. A pre-fetcher may have written dirty pages to disk to make space for the pages being pre-fetched.
pool_async_ index_reads
The number of index pages read asynchronously into the buffer pool by a prefetcher.
pool_async_ read_time
The total elapsed time spent reading by database manager pre-fetchers.
pool_async_ write_time
The total elapsed time spent writing data or index pages from the buffer pool to disk by database manager page cleaners.
The number of asynchronous read requests.
pool_async_ data_read_ reqs pool_lsn_ gap_clns
The number of times a page cleaner was invoked because the logging space used had reached a pre-defined criterion for the database.
pool_drty_ pg_steal_ clns pool_drty_
The number of times a page cleaner was invoked because a synchronous write was needed during the victim buffer replacement for the database.
The number of times a page cleaner was invoked because a buffer pool had
Page 1555 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 197:
Measurement
Description
reached the dirty page threshold criterion for the database.
pg_thrsh_ clns prefetch_ wait_time
The time an application spent waiting for an I/O server (pre-fetcher) to finish loading pages into the buffer pool.
The number of buffer pool data pages copied to extended storage.
pool_data_ to_estore pool_index_ to_estore
The number of buffer pool index pages copied to extended storage.
pool_data_ from_estore pool_index_ from_estore
The number of buffer pool data pages copied from extended storage.
The number of buffer pool index pages copied from extended storage.
direct_reads
The number of read operations that do not use the buffer pool.
direct_writes
The number of write operations that do not use the buffer pool.
direct_read_ reqs
The number of requests to perform a direct read of one or more sectors of data.
direct_write_ reqs
The number of requests to perform a direct write of one or more sectors of data.
direct_read_ time
The elapsed time (in milliseconds) required to perform the direct reads.
direct_write_ time
The elapsed time (in milliseconds) required to perform the direct writes.
cat_cache_ lookups
The number of times that the catalog cache was referenced to obtain table descriptor information.
cat_cache_ inserts cat_cache_ overflows cat_cache_ heap_full pkg_cache_ lookups pkg_cache_ inserts
The number of times that the system tried to insert table descriptor information into the catalog cache.
The number of times that an insert into the catalog cache failed due the catalog cache being full.
The number of times that an insert into the catalog cache failed due to a heap-full condition in the database heap.
The number of times that an application looked for a section or package in the package cache. At a database level, it indicates the overall number of references since the database was started, or monitor data was reset.
The total number of times that a requested section was not available for use and had to be loaded into the package cache. This count includes any implicit prepares performed by the system.
Page 1556 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 197:
Measurement
Description pkg_cache_ num_ overflows appl_ section_ lookups appl_ section_ inserts sec_logs_ allocated
The number of times that the package cache overflowed the bounds of its allocated memory.
Lookups of SQL sections by an application from its SQL work area.
Inserts of SQL sections by an application from its SQL work area.
log_reads log_writes total_log_ used
The total number of secondary log files that are currently being used for the database.
The number of log pages read from disk by the logger.
The number of log pages written to disk by the logger.
The total amount of active log space currently used (in bytes) in the database.
locks_held lock_list_in_ use
The number of locks currently held.
The total amount of lock list memory (in bytes) that is in use.
deadlocks
The total number of deadlocks that have occurred.
lock_escals
The number of times that locks have been escalated from several row locks to a table lock.
x_lock_ escals
The number of times that locks have been escalated from several row locks to one exclusive table lock, or the number of times an exclusive lock on a row caused the table lock to become an exclusive lock.
lock_ timeouts
The number of times that a request to lock an object timed-out instead of being granted.
The total number of times that applications or connections waited for locks.
The total elapsed time waited for a lock.
lock_waits lock_wait_ time locks_ waiting rows_ deleted
The number of agents waiting on a lock.
The number of row deletions attempted.
Page 1557 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 197:
Measurement
Description
The number of row insertions attempted.
rows_ inserted rows_ updated
The number of row updates attempted.
The number of rows that have been selected and returned to the application.
rows_ selected int_rows_ deleted int_rows_ updated int_rows_ inserted
The number of rows deleted from the database as a result of internal activity.
The number of rows updated from the database as a result of internal activity.
The number of rows inserted into the database as a result of internal activity caused by triggers.
The number of static SQL statements that were attempted.
static_sql_ stmts dynamic_ sql_stmts
The number of dynamic SQL statements that were attempted.
failed_sql_ stmts
The number of SQL statements that were attempted, but failed.
commit_sql_ stmts
The total number of SQL COMMIT statements that have been attempted.
The total number of SQL ROLLBACK statements that have been attempted.
rollback_ sql_stmts select_sql_ stmts
The number of SQL SELECT statements that were executed.
uid_sql_ stmts ddl_sql_ stmts
The number of SQL UPDATE, INSERT, and DELETE statements that were executed.
The number of SQL Data Definition Language (DDL) statements that were executed.
int_auto_ rebinds
The number of automatic rebinds (or recompiles) that have been attempted.
int_commits
The total number of commits initiated internally by the database manager.
int_rollbacks
The total number of rollbacks initiated internally by the database manager.
Page 1558 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 197:
Measurement
Description int_ deadlock_ rollbacks binds_ precompiles
The total number of forced rollbacks initiated by the database manager due to a deadlock. A rollback is performed on the current unit of work in an application selected by the database manager to resolve the deadlock.
The number of binds and pre-compiles attempted.
Page 1559 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 198:
DB2 Application Counters
Measurement
Description agents_ stolen
The number of times that agents are stolen from an application. Agents are stolen when an idle agent associated with an application is reassigned to work on a different application.
num_assoc_ agents
At the application level, this is the number of sub-agents associated with an application. At the database level, it is the number of sub-agents for all applications.
total_sorts total_sort_ time
The total number of sorts that have been executed.
The total elapsed time (in milliseconds) for all sorts that have been executed.
sort_ overflows total_hash_ joins total_hash_ loops hash_join_ overflows
The total number of sorts that ran out of sort heap and may have required disk space for temporary storage.
The total number of hash joins executed.
The total number of times that a single partition of a hash join was larger than the available sort heap space.
The number of times that hash join data exceeded the available sort heap space
hash_join_ small_ overflows
The number of times that hash join data exceeded the available sort heap space by less than 10%.
pool_data_l_ reads
The number of logical read requests for data pages that have gone through the buffer pool.
pool_data_ p_reads pool_data_ writes pool_index_ l_reads pool_index_ p_reads
The number of read requests that required I/O to get data pages into the buffer pool.
The number of times a buffer pool data page was physically written to disk.
The number of logical read requests for index pages that have gone through the buffer pool.
The number of physical read requests to get index pages into the buffer pool.
pool_index_ writes pool_read_ time
The number of times a buffer pool index page was physically written to disk.
The total amount of elapsed time spent processing read requests that caused data or index pages to be physically read from disk to buffer pool.
Page 1560 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 198:
Measurement
Description prefetch_ wait_time pool_data_ to_estore pool_index_ to_estore pool_data_ from_estore pool_index_ from_estore pkg_cache_ inserts
The time an application spent waiting for an I/O server (pre-fetcher) to finish loading pages into the buffer pool.
The number of buffer pool data pages copied to extended storage.
The number of buffer pool index pages copied to extended storage.
The number of buffer pool data pages copied from extended storage.
The number of buffer pool index pages copied from extended storage.
direct_reads
The number of read operations that do not use the buffer pool.
direct_writes
The number of write operations that do not use the buffer pool.
direct_read_ reqs
The number of requests to perform a direct read of one or more sectors of data.
direct_write_ reqs
The number of requests to perform a direct write of one or more sectors of data.
direct_read_ time
The elapsed time (in milliseconds) required to perform the direct reads.
direct_write_ time
The elapsed time (in milliseconds) required to perform the direct writes.
cat_cache_ lookups
The number of times that the catalog cache was referenced to obtain table descriptor information.
cat_cache_ inserts cat_cache_ overflows cat_cache_ heap_full pkg_cache_ lookups
The number of times that the system tried to insert table descriptor information into the catalog cache.
The number of times that an insert into the catalog cache failed due to the catalog cache being full.
The number of times that an insert into the catalog cache failed due to a heap-full condition in the database heap.
The number of times that an application looked for a section or package in the package cache. At a database level, it indicates the overall number of references since the database was started, or monitor data was reset.
The total number of times that a requested section was not available for use and had to be loaded into the package cache. This count includes any implicit prepares performed by the system.
Page 1561 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 198:
lock_waits lock_wait_ time locks_ waiting uow_lock_ wait_time rows_ deleted rows_ inserted
Measurement
Description
Lookups of SQL sections by an application from its SQL work area.
appl_ section_ lookups appl_ section_ inserts uow_log_ space_used locks_held
Inserts of SQL sections by an application from its SQL work area.
The amount of log space (in bytes) used in the current unit of work of the monitored application.
The number of locks currently held.
deadlocks
The total number of deadlocks that have occurred.
lock_escals
The number of times that locks have been escalated from several row locks to a table lock.
x_lock_ escals lock_ timeouts
The number of times that locks have been escalated from several row locks to one exclusive table lock, or the number of times an exclusive lock on a row caused the table lock to become an exclusive lock.
The number of times that a request to lock an object timed-out instead of being granted.
The total number of times that applications or connections waited for locks.
The total elapsed time waited for a lock.
The number of agents waiting on a lock.
The total amount of elapsed time this unit of work has spent waiting for locks.
The number of row deletions attempted.
The number of row insertions attempted.
rows_ updated rows_ selected
The number of row updates attempted.
The number of rows that have been selected and returned to the application.
rows_written
The number of rows changed (inserted, deleted or updated) in the table.
rows_read
The number of rows read from the table.
Page 1562 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 198:
Measurement
Description
The number of rows deleted from the database as a result of internal activity.
int_rows_ deleted int_rows_ updated
The number of rows updated from the database as a result of internal activity.
int_rows_ inserted open_rem_ curs
The number of rows inserted into the database as a result of internal activity caused by triggers.
The number of remote cursors currently open for this application, including those cursors counted by `open_rem_curs_blk'.
open_rem_ curs_blk
The number of remote blocking cursors currently open for this application.
rej_curs_blk
The number of times that a request for an I/O block at server was rejected and the request was converted to non-blocked I/O.
acc_curs_blk
The number of times that a request for an I/O block was accepted.
open_loc_ curs open_loc_ curs_blk static_sql_ stmts dynamic_ sql_stmts
The number of local cursors currently open for this application, including those cursors counted by `open_loc_curs_blk'.
The number of local blocking cursors currently open for this application.
The number of static SQL statements that were attempted.
The number of dynamic SQL statements that were attempted.
failed_sql_ stmts
The number of SQL statements that were attempted, but failed.
commit_sql_ stmts
The total number of SQL COMMIT statements that have been attempted.
rollback_ sql_stmts
The total number of SQL ROLLBACK statements that have been attempted.
The number of SQL SELECT statements that were executed.
select_sql_ stmts uid_sql_ stmts ddl_sql_ stmts
The number of SQL UPDATE, INSERT, and DELETE statements that were executed.
This element indicates the number of SQL Data Definition Language (DDL) statements that were executed.
Page 1563 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 198:
Measurement
Description int_auto_ rebinds
The number of automatic rebinds (or recompiles) that have been attempted.
int_commits
The total number of commits initiated internally by the database manager.
int_rollbacks
The total number of rollbacks initiated internally by the database manager.
int_ deadlock_ rollbacks binds_ precompiles
The total number of forced rollbacks initiated by the database manager due to a deadlock. A rollback is performed on the current unit of work in an application selected by the database manager to resolve the deadlock.
The number of binds and pre-compiles attempted.
Page 1564 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 198:
Page 1565 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 199:
Oracle Server Monitoring Measurements
The following measurements are most commonly used when monitoring the Oracle server (from the
V$SYSSTAT table):
Measurement Description
CPU used by this session
The amount of CPU time (in tens of milliseconds) used by a session between the time a user call started and ended. Some user calls can be completed within
10 milliseconds and, as a result, the start- and end-user call time can be the same. In this case, 0 milliseconds are added to the statistic. A similar problem can exist in the operating system reporting, especially on systems that suffer from many context switches.
Bytes received via
SQL*Net from client
The total number of bytes received from the client over Net8.
Logons current
Opens of replaced files
User calls
The total number of current logons.
The total number of files that needed to be reopened because they were no longer in the process file cache.
Oracle allocates resources (Call State Objects) to keep track of relevant user call data structures every time you log in, parse, or execute. When determining activity, the ratio of user calls to RPI calls gives you an indication of how much internal work is generated as a result of the type of requests the user is sending to Oracle.
The total number of Net8 messages sent to, and received from, the client.
SQL*Net roundtrips to/from client
Bytes sent via SQL*Net to client
Opened cursors current
DB block changes
The total number of bytes sent to the client from the foreground process(es).
The total number of current open cursors.
Closely related to consistent changes, this statistic counts the total number of changes that were made to all blocks in the SGA that were part of an update or delete operation. These are changes that generate redo log entries and hence cause permanent changes to the database if the transaction is committed. This statistic is a rough indication of total database work and indicates (possibly on a per-transaction level) the rate at which buffers are being dirtied.
Page 1566 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 199:
Measurement Description
Total file opens
The total number of file opens being performed by the instance. Each process needs a number of files (control file, log file, database file) in order to work against the database.
Page 1567 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 200:
SQL Server Default Counters
Measurement
I/O - Batch
Writes/sec
Description
% Total
Processor Time
The average percentage of time that all the processors on the system are busy executing non-idle threads. On a multi-processor system, if all processors are always busy, this is 100%, if all processors are 50% busy this is 50% and if 1/4 of the processors are 100% busy this is 25%. It can be viewed as the fraction of the time spent doing useful work. Each processor is assigned an Idle thread in the Idle process which consumes those unproductive processor cycles not used by any other threads.
Cache Hit Ratio
The percentage of time that a requested data page was found in the data cache (instead of being read from disk).
The number of pages written to disk per second, using Batch I/O. The checkpoint thread is the primary user of Batch I/O.
The number of pages flushed to disk per second by the Lazy Writer.
I/O - Lazy
Writes/sec
I/O -
Outstanding
Reads
I/O -
Outstanding
Writes
I/O - Page
Reads/sec
The number of physical reads pending.
The number of physical writes pending.
The number of physical page reads per second.
I/O -
Transactions/sec
The number of Transact-SQL command batches executed per second.
The number of open user connections.
User
Connections
% Processor
Time
The percentage of time that the processor is executing a non-idle thread.
This counter was designed as a primary indicator of processor activity. It is calculated by measuring the time that the processor spends executing the thread of the idle process in each sample interval, and subtracting that value from 100%. (Each processor has an idle thread which consumes cycles when no other threads are ready to run). It can be viewed as the percentage of the sample interval spent doing useful work. This counter displays the average percentage of busy time observed during the sample interval. It is calculated by monitoring the time the service was inactive, and then subtracting that value from 100%.
Page 1568 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 200:
Page 1569 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 201:
Sybase Server Monitoring Measurements
The following tables describe the measurements that can be monitored on a Sybase server:
Object
Network
Memory
Disk
Measurement
Average packet size (Read)
Average packet size (Send)
Network bytes
(Read)
Network bytes
(Read)/sec
Network bytes
(Send)
Network bytes
(Send)/sec
Description
Reports the number of network packets received.
Reports the number of network packets sent.
Reports the number of bytes received, over the sampling interval.
Reports the number of bytes received, per second.
Reports the number of bytes sent, over the sampling interval.
Reports the number of bytes sent, per second.
Network packets
(Read)
Reports the number of network packets received, over the sampling interval.
Network packets
(Read)/sec
Reports the number of network packets received, per second.
Network packets
(Send)
Reports the number of network packets sent, over the sampling interval.
Network packets
(Send)/sec
Reports the number of network packets sent, per second.
Memory
Reports the amount of memory (in bytes) allocated for the page cache.
Reports the number of reads made from a database device.
Reads
Writes
Reports the number of writes made to a database device.
Waits
Grants
Reports the number of times that access to a device had to wait.
Reports the number of times access to a device was granted.
Page 1570 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 201:
Object
Engine
Measurement
Server is busy
(%)
CPU time
Logical pages
(Read)
Description
Reports the percentage of time during which the Adaptive
Server is in a "busy" state.
Reports how much "busy" time was used by the engine.
Reports the number of data page reads, whether satisfied from cache or from a database device.
Pages from disk
(Read)
Pages stored
Reports the number of data page reads that could not be satisfied from the data cache.
Reports the number of data pages written to a database device.
Stored
Procedures
Executed
(sampling period)
Reports the number of times a stored procedure was executed, over the sampling interval.
Locks
Executed
(session)
Average duration
(sampling period)
Average duration
(session)
% Requests
Locks count
Granted immediately
Reports the number of times a stored procedure was executed, during the session.
Reports the time (in seconds) spent executing a stored procedure, over the sampling interval.
Reports the time (in seconds) spent executing a stored procedure, during the session.
Reports the percentage of successful requests for locks.
Reports the number of locks. This is an accumulated value.
Reports the number of locks that were granted immediately, without having to wait for another lock to be released.
Granted after wait
Not granted
Reports the number of locks that were granted after waiting for another lock to be released.
Reports the number of locks that were requested but not granted.
Wait time (avg.)
Reports the average wait time for a lock.
Page 1571 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 201:
Object
SqlSrvr
Cache
Measurement
Locks/sec
% Processor time (server)
Transactions
Deadlocks
% Hits
Description
Reports the number of locks. This is an accumulated value.
Reports the percentage of time that the Adaptive Server is in a "busy" state.
Reports the number of committed Transact-SQL statement blocks (transactions).
Reports the number of deadlocks.
Reports the percentage of times that a data page read could be satisfied from cache without requiring a physical page read.
Cache
Process
Transaction
Pages (Read)
Pages
(Read)/sec
Reports the number of data page reads, whether satisfied from cache or from a database device.
Reports the number of data page reads, whether satisfied from cache or from a database device, per second.
Pages from disk
(Read)
Reports the number of data page reads that could not be satisfied from the data cache.
Pages from disk
(Read)/sec
Reports the number of data page reads, per second, that could not be satisfied from the data cache.
Pages (Write)
Pages
(Write)/sec
% Processor time (process)
Reports the number of data pages written to a database device.
Reports the number of data pages written to a database device, per second.
Locks/sec
% Cache hit
Reports the percentage of time that a process running a given application was in the "Running" state (out of the time that all processes were in the "Running" state).
Reports the number of locks, by process. This is an accumulated value.
Reports the percentage of times that a data page read could be satisfied from cache without requiring a physical page read, by process.
Pages (Write)
Transactions
Reports the number of data pages written to a database device, by process.
Reports the number of committed Transact-SQL statement blocks (transactions), during the session.
Page 1572 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 201:
Object Measurement Description
Transaction Rows (Deleted)
Reports the number of rows deleted from database tables during the session.
Inserts
Reports the number of insertions into a database table during the session.
Updates
Reports the updates to database tables during the session.
Updates in place
Reports the sum of expensive, in-place and not-in-place updates (everything except updates deferred) during the session.
Transactions/sec
Reports the number of committed Transact-SQL statement blocks (transactions) per second.
Rows
(Deleted)/sec
Reports the number of rows deleted from database tables, per second.
Inserts/sec
Updates/sec
Updates in place/sec
Reports the number of insertions into a database table, per second.
Reports the updates to database tables, per second.
Reports the sum of expensive, in-place and not-in-place updates (everything except updates deferred), per second.
Page 1573 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 202:
DB2 Graph
This graph shows the resource usage on the DB2 database server machine as a function of the elapsed load test scenario time.
Xaxis
Elapsed time since the start of the run.
Yaxis
The resource usage on the DB2 database server.
Note
In order to monitor the DB2 database server machine, you must first set up the DB2 monitor environment. You then enable the DB2 monitor (from the Controller) by selecting the counters you want the monitor to measure.
See also
"Database Server Resource Graphs Overview" on page 1550
"DB2 Database Manager Counters" on page 1552
"DB2 Database Counters" on page 1554
"DB2 Application Counters" on page 1560
Page 1574 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 202:
Page 1575 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 203:
Oracle Graph
This graph displays information from Oracle V$ tables: Session statistics, V$SESSTAT, system statistics, V$SYSSTAT, and other table counters defined by the user in the custom query.
Xaxis
Elapsed time since the start of the run.
Yaxis
The resource usage on the Oracle server.
Note
To obtain data for this graph, you need to enable the Oracle online monitor (from the
Controller) and select the default measurements you want to display, before running the scenario.
See also
"Database Server Resource Graphs Overview" on page 1550
"Oracle Server Monitoring Measurements" on page 1566
Example
In the following example, the V$SYSSTAT resource values are shown as a function of the elapsed load test scenario time:
Page 1576 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 203:
Page 1577 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 204:
SQL Server Graph
This graph shows the standard Windows resources on the SQL server machine.
Xaxis
Elapsed time since the start of the load test scenario run.
Yaxis
Resource usage
Note
To obtain data for this graph, you need to enable the SQL Server online monitor (from the
Controller) and select the default measurements you want to display, before running the scenario.
See also
"Database Server Resource Graphs Overview" on page 1550
"SQL Server Default Counters" on page 1568
Example
Page 1578 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 204:
Page 1579 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 205:
Sybase Graph
This graph shows the resource usage on the Sybase database server machine as a function of the elapsed load test scenario time.
Xaxis
Elapsed time since the start of the run.
Yaxis
The resource usage on the Sybase database server.
Note
In order to monitor the Sybase database server machine, you must first set up the Sybase monitor environment. You then enable the Sybase monitor (from the Controller) by selecting the counters you want the monitor to measure.
See also
"Database Server Resource Graphs Overview" on page 1550
"SQL Server Default Counters" on page 1568
Page 1580 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 205:
Page 1581 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 206:
Streaming Media Graphs
Page 1582 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 206:
Page 1583 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 207:
Streaming Media Graphs Overview
Streaming Media Resource graphs provide you with performance information for the RealPlayer
Client, RealPlayer Server, Windows Media Server, and Media Player Client machines.
In order to obtain data for Streaming Media Resource graphs, you need to install the RealPlayer
Client and activate the online monitor for the RealPlayer Server or Windows Media Server before running the load test scenario.
When you set up the online monitor for the RealPlayer Server or Windows Media Server, you indicate which statistics and measurements to monitor. For more information on installing and configuring the Streaming Media Resource monitors, refer to the HP LoadRunner Controller User
Guide.
In order to display all the measurements on a single graph, Analysis may scale them. The Legend window indicates the scale factor for each resource. To obtain the true value, multiply the scale factor by the displayed value.
Page 1584 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 207:
Page 1585 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 208:
Media Player Client Monitoring Measurements
The following table describes the Media Player Client measurements that are monitored:
Measurement Description
Average
Buffering
Events
The number of times Media Player Client had to buffer incoming media data due to insufficient media content.
The time spent by Media Player Client waiting for sufficient amount of media data in order to continue playing media clip.
Average
Buffering
Time (sec)
Current bandwidth
(Kbits/sec)
Number of
Packets
The number of kbits per second received.
The number of packets sent by server for a particular media clip.
Stream
Interruptions
The number of interruptions encountered by Media Player Client while playing a media clip. This measurement includes the number of times Media Player Client had to buffer incoming media data, and any errors that occurred during playback.
The percentage ratio of packets received to total packets.
Stream
Quality
(Packetlevel)
Stream
Quality
(Samplinglevel)
The percentage of stream samples received on time (no delays in reception).
Total number of recovered packets
Total number of lost packets
The number of lost packets that were recovered. This value is only relevant during network playback.
The number of lost packets that were not recovered. This value is only relevant during network playback.
Page 1586 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 208:
Page 1587 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 209:
RealPlayer Client Monitoring Measurements
The following table describes the RealPlayer Client measurements that are monitored:
Measurement
Current Bandwidth
(Kbits/sec)
Description
The number of kilobytes in the last second.
Buffering Event Time (sec)
Network Performance
The average time spent on buffering.
The ratio (percentage) between the current bandwidth and the actual bandwidth of the clip.
The percentage of error packets that were recovered.
Percentage of Recovered
Packets
Percentage of Lost Packets
The percentage of packets that were lost.
Percentage of Late Packets
The percentage of late packets.
Time to First Frame
Appearance (sec)
The time for first frame appearance (measured from the start of the replay).
Number of Buffering Events
The average number of all buffering events.
Number of Buffering Seek
Events
Buffering Seek Time
Number of Buffering
Congestion Events
The average number of buffering events resulting from a seek operation.
The average time spent on buffering events resulting from a seek operation.
The average number of buffering events resulting from network congestion.
Buffering Congestion Time
The average time spent on buffering events resulting from network congestion.
Number of Buffering Live
Pause Events
Buffering Live Pause Time
The average number of buffering events resulting from live pause.
The average time spent on buffering events resulting from live pause.
Page 1588 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 209:
Page 1589 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 210:
RealPlayer Server Monitoring Measurements
The following table describes the RealPlayer Client measurements that are monitored:
Measurement
Current Bandwidth
(Kbits/sec)
Description
The number of kilobytes in the last second.
Buffering Event Time (sec)
Network Performance
The average time spent on buffering.
The ratio (percentage) between the current bandwidth and the actual bandwidth of the clip.
The percentage of error packets that were recovered.
Percentage of Recovered
Packets
Percentage of Lost Packets
The percentage of packets that were lost.
Percentage of Late Packets
The percentage of late packets.
Time to First Frame
Appearance (sec)
The time for first frame appearance (measured from the start of the replay).
Number of Buffering Events
The average number of all buffering events.
Number of Buffering Seek
Events
Buffering Seek Time
Number of Buffering
Congestion Events
The average number of buffering events resulting from a seek operation.
The average time spent on buffering events resulting from a seek operation.
The average number of buffering events resulting from network congestion.
Buffering Congestion Time
The average time spent on buffering events resulting from network congestion.
Number of Buffering Live
Pause Events
Buffering Live Pause Time
The average number of buffering events resulting from live pause.
The average time spent on buffering events resulting from live pause.
Page 1590 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 210:
Page 1591 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 211:
Windows Media Server Default Measurements
Measurement Description
The number of live unicast streams that are being streamed.
Active Live
Unicast
Streams
(Windows)
The number of streams that are being streamed.
Active
Streams
Active TCP
Streams
Active UDP
Streams
The number of TCP streams that are being streamed.
The number of UDP streams that are being streamed.
The total, aggregate rate (bytes/sec) of file reads.
Aggregate
Read Rate
Aggregate
Send Rate
Connected
Clients
Connection
Rate
The total, aggregate rate (bytes/sec) of stream transmission.
The number of clients connected to the server.
The rate at which clients are connecting to the server.
Controllers
The number of controllers currently connected to the server.
The number of HTTP streams being streamed.
HTTP
Streams
Late Reads
The number of late read completions per second.
Pending
Connections
The number of clients that are attempting to connect to the server, but are not yet connected. This number may be high if the server is running near maximum capacity and cannot process a large number of connection requests in a timely manner.
Stations
The number of station objects that currently exist on the server.
Streams
Stream
Errors
The number of stream objects that currently exist on the server.
The cumulative number of errors occurring per second.
Page 1592 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 211:
Page 1593 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 212:
Media Player Client Graph
This graph shows statistics on the Windows Media Player client machine as a function of the elapsed load test scenario time.
X-axis
Y-axis
See also
Elapsed time since the start of the run.
The resource usage on the Windows Media Player client machine.
"Streaming Media Graphs Overview" on page 1584
"Media Player Client Monitoring Measurements" on page
1586
Example
In the following example the Total number of recovered packets remained steady during the first two and a half minutes of the scenario. The Number of Packets and Stream Interruptions fluctuated significantly. The Average Buffering Time increased moderately, and the Player
Bandwidth increased and then decreased moderately.The scale factor for the Stream
Interruptions and Average Buffering Events measurements is 10, and the scale factor for
Player Bandwidth is 1/10.
Page 1594 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 212:
Page 1595 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 213:
Real Client Graph
This graph shows statistics on the RealPlayer client machine as a function of the elapsed load test scenario time.
X-axis
Y-axis
See also
Elapsed time since the start of the run.
The resource usage on the RealPlayer client machine.
"Streaming Media Graphs Overview" on page 1584
"RealPlayer Client Monitoring Measurements" on page 1588
Example
In the following example this graph displays the Total Number of Packets, Number of
Recovered Packets, Current Bandwidth, and First Frame Time measurements during the first four and a half minutes of the scenario. The scale factor is the same for all of the measurements.
Page 1596 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 213:
Page 1597 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 214:
Real Server Graph
This graph shows RealPlayer server statistics as a function of the elapsed load test scenario time.
Xaxis
Elapsed time since the start of the run.
Yaxis
The resource usage of the RealPlayer server machine.
Note
To obtain data for this graph, you need to enable the RealPlayer Server online monitor
(from the Controller) and select the default measurements you want to display, before running the scenario.
See also
"Streaming Media Graphs Overview" on page 1584
"RealPlayer Server Monitoring Measurements" on page 1590
Example
In the following example this graph displays the Total Number of Packets, Number of
Recovered Packets, Current Bandwidth, and First Frame Time measurements during the first four and a half minutes of the scenario. The scale factor is the same for all of the measurements.
Page 1598 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 214:
Page 1599 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 215:
Windows Media Server Graph
This graph shows the Windows Media server statistics as a function of the elapsed load test scenario time.
Xaxis
Elapsed time since the start of the run.
Yaxis
Resource usage.
Note
To obtain data for this graph, you need to enable the Windows Media Server online monitor (from the Controller) and select the default measurements you want to display, before running the scenario.
See also
"Streaming Media Graphs Overview" on page 1584
"Windows Media Server Default Measurements" on page 1592
Page 1600 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 215:
Page 1601 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 216:
ERP/CRM Server Resource Graphs
Page 1602 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 216:
Page 1603 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 217:
ERP/CRM Server Resource Graphs Overview
ERP/CRM server resource monitor graphs provide you with performance information for ERP/CRM servers. To obtain data for these graphs, you must activate the ERP/CRM server resource online monitor before running the scenario. When you set up the online monitor for ERP/CRM server resources, you indicate which statistics and measurements to monitor. For more information on activating and configuring ERP/CRM server resource monitors, refer to the HP LoadRunner
Controller User Guide.
Page 1604 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 217:
Page 1605 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 218:
ERP/CRM Server Resources Graphs Measurements
PeopleSoft(Tuxedo) Graph Counters
The following table describes the default counters that can be measured. It is recommended to pay particular attention to the following measurements: % Busy Clients, Active Clients, Busy Clients,
Idle Clients, and all the queue counters for the APPQ/PSAPPSRV queue.
Monitor
Machine
Queue
Measurements
% Busy Clients. The percentage of active clients currently logged in to the
Tuxedo application server that are waiting for a response from the application server.
Active Clients. The total number of active clients currently logged in to the
Tuxedo application server.
Busy Clients. The total number of active clients currently logged in to the
Tuxedo application server that are waiting for a response from the application server.
Current Accessers. The number of clients and servers currently accessing the application either directly on this machine or through a workstation handler on this machine.
Current Transactions. The number of in use transaction table entries on this machine.
Idle Clients. The total number of active clients currently logged in to the Tuxedo application server that are not waiting for a response from the application server.
Workload Completed/second. The total workload on all the servers for the machine that was completed, per unit time.
Workload Initiated/second. The total workload on all the servers for the machine that was initiated, per unit time.
% Busy Servers. The percentage of active servers currently handling Tuxedo requests.
Active Servers. The total number of active servers either handling or waiting to handle Tuxedo requests.
Busy Servers. The total number of active servers currently busy handling
Tuxedo requests.
Idle Servers. The total number of active servers currently waiting to handle
Tuxedo requests.
Number Queued. The total number of messages which have been placed on the queue.
Page 1606 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 218:
Monitor
Server
Measurements
Requests/second. The number of server requests handled per second
Workload/second. The workload is a weighted measure of the server requests.
Some requests could have a different weight than others. By default, the workload is always 50 times the number of requests.
Workstation
Handler
(WSH)
Bytes Received/sec. The total number of bytes received by the workstation handler, per second.
Bytes Sent/sec. The total number of bytes sent back to the clients by the workstation handler, per second.
Messages Received/sec. The number of messages received by the workstation handler, per second.
Messages Sent/sec. The number of messages sent back to the clients by the workstation handler, per second.
Number of Queue Blocks/sec. The number of times the queue for the workstation handler blocked, per second. This gives an idea of how often the workstation handler was overloaded.
SAP Server Graph Counters
The following are the most commonly monitored counters for a SAP server:
Measurement
Description
Average
CPU time
Average response time
The average CPU time used in the work process.
The average response time, measured from the time a dialog sends a request to the dispatcher work process, through the processing of the dialog, until the dialog is completed and the data is passed to the presentation layer. The response time between the SAP GUI and the dispatcher is not included in this value.
Average wait time
The average amount of time that an unprocessed dialog step waits in the dispatcher queue for a free work process. Under normal conditions, the dispatcher work process should pass a dialog step to the application process immediately after receiving the request from the dialog step. Under these conditions, the average wait time would be a few milliseconds. A heavy load on the application server or on the entire system causes queues at the dispatcher queue.
Average load time
The time needed to load and generate objects, such as ABAP source code and screen information, from the database.
Page 1607 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 218:
Measurement
Description
The number of parsed requests sent to the database.
Database calls
Database requests
The number of logical ABAP requests for data in the database. These requests are passed through the R/3 database interface and parsed into individual database calls. The proportion of database calls to database requests is important. If access to information in a table is buffered in the SAP buffers, database calls to the database server are not required. Therefore, the ratio of calls/requests gives an overall indication of the efficiency of table buffering. A good ratio would be 1:10.
Roll ins
Roll outs
Roll in time
The processing time for roll ins.
Roll out time
The processing time for roll outs.
Roll wait time
The number of rolled-in user contexts.
The number of rolled-out user contexts.
Average time per logical DB call
The queue time in the roll area. When synchronous RFCs are called, the work process executes a roll out and may have to wait for the end of the RFC in the roll area, even if the dialog step is not yet completed. In the roll area, RFC server programs can also wait for other RFCs sent to them.
The average response time for all commands sent to the database system (in milliseconds). The time depends on the CPU capacity of the database server, the network, the buffering, and on the input/output capabilities of the database server. Access times for buffered tables are many magnitudes faster and are not considered in the measurement.
SAPGUI Graph Counters
The following are the most commonly monitored counters:
Measurement
Description
Average
CPU time
Average response time
The average CPU time used in the work process.
The average response time, measured from the time a dialog sends a request to the dispatcher work process, through the processing of the dialog, until the dialog is completed and the data is passed to the presentation layer. The response time between the SAPGUI and the dispatcher is not included in this value.
Average wait time
The average amount of time that an unprocessed dialog step waits in the dispatcher queue for a free work process. Under normal conditions, the dispatcher work process should pass a dialog step to the application process
Page 1608 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 218:
Measurement
Description
immediately after receiving the request from the dialog step. Under these conditions, the average wait time would be a few milliseconds. A heavy load on the application server or on the entire system causes queues at the dispatcher queue.
Average load time
Database calls
The time needed to load and generate objects, such as ABAP source code and screen information, from the database.
The number of parsed requests sent to the database.
Database requests
The number of logical ABAP requests for data in the database. These requests are passed through the R/3 database interface and parsed into individual database calls. The proportion of database calls to database requests is important. If access to information in a table is buffered in the SAP buffers, database calls to the database server are not required. Therefore, the ratio of calls/requests gives an overall indication of the efficiency of table buffering. A good ratio would be 1:10.
The number of rolled-in user contexts.
Roll ins
Roll outs
The number of rolled-out user contexts.
Roll in time
The processing time for roll ins.
Roll out time
The processing time for roll outs.
Roll wait time
Average time per logical DB call
The queue time in the roll area. When synchronous RFCs are called, the work process executes a roll out and may have to wait for the end of the RFC in the roll area, even if the dialog step is not yet completed. In the roll area, RFC server programs can also wait for other RFCs sent to them.
The average response time for all commands sent to the database system (in milliseconds). The time depends on the CPU capacity of the database server, the network, the buffering, and on the input/output capabilities of the database server. Access times for buffered tables are many magnitudes faster and are not considered in the measurement.
SAP Portal Graph Counters
The following are the monitored counters for a SAP Portal system server:
Measurement
Accumulated Amount of Outbound
Data (bytes)
Time for all Requests (ms)
Description
The accumulated amount of outbound data, measured in bytes.
The total time (in milliseconds) taken for processing all requests.
Page 1609 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 218:
Measurement
Average Amount of Outbound Data per
Request (bytes)
Average Number of Component Calls per Request (bytes)
Average Time of a Request (ms)
Description
The average amount of outbound data per request, measured in bytes.
The average number of component calls per request, measured in bytes.
The average amount of time (in milliseconds) taken to process a request.
Number of Calls with Outbound Data
The total number of calls with outbound data.
Number of Component Calls for all
Requests
The total number of component calls for all requests.
Number of Requests since First
Request
Requests per Second
Time Stamp of First Request
The total number of requests since the first request was made.
The number of requests made per second.
The time stamp of the first request.
Siebel Server Manager Graph Counters
The following are the monitored counters for a Siebel Server Manager server.
Measurement
Average Connect Time
Average Reply Size
Average Request Size
Average Requests Per
Session
Average Response Time
Description
The average connection time.
The average size of a user reply.
The average size of a user request.
The average number of user requests per session.
Average Think Time
Avg SQL Execute Time
Avg SQL Fetch Time
Avg SQL Parse Time
CPU Time
Elapsed Time
Num of DBConn Retries
The average amount of time that it takes the server to respond to a request.
The average amount of think time taken to respond to a request.
The average SQL execute time.
The average SQL fetch time.
The average SQL parse time.
The CPU time used in the work process.
The total amount of elapsed time.
The number of database connection retries.
Page 1610 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 218:
Measurement
Num of DLRbk Retries
Description
The number of DLRbk retries.
Num of Exhausted Retries
The total number of retries that expired.
Number of SQL Executes
Number of SQL Fetches
Number of SQL Parses
Number of Sleeps
Object Manager Errors
The total number of SQL executes.
The total number of SQL fetches.
The total number of SQL parses.
The number of sleeps.
The total number of object manager errors.
Reply Messages
Request Messages
SQL Execute Time
SQL Fetch Time
SQL Parse Time
Sleep Time
Tests Attempted
Tests Failed
The total number of reply messages.
The total number of request messages.
The total SQL execute time.
The total SQL fetch time.
The total SQL parse time.
The total sleep time.
The number of tests attempted.
The number of tests that failed.
Tests Successful
Total Reply Size
Total Request Size
Total Response Time
Total Tasks
Total Think Time
The number of tests that were successful.
The total reply size, measured in bytes.
The total request size, measured in bytes.
The total response time.
The total number of tasks.
The total think time.
Siebel Web Server Graph Counters
The following are the monitored counters for a Siebel Web Server:
Measurement
Anonymous sessions requested from the pool
Open Session Time
Description
The number of anonymous sessions requested from the pool.
The time taken for users to log on to the system.
Page 1611 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 218:
Measurement
Anon Session Removed
Anon Session Available
Anonymous sessions returns to the pool
Response Time
Close Session Time
Request Time
Description
The number of anonymous sessions removed from the pool.
The number of anonymous sessions available in the pool.
The number of anonymous sessions returned to the pool.
The time taken to respond to a user request.
The time taken for users to log off the system.
The time taken to process the user request.
Page 1612 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 218:
Page 1613 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 219:
PeopleSoft (Tuxedo) Graph
This graph shows the resource usage of your Tuxedo server as a function of the elapsed load test scenario time
X-axis
Y-axis
Note
See also
Elapsed time from the start of the run.
The resource usage on the Tuxedo server.
To obtain data for this graph, you need to enable the
PeopleSoft (Tuxedo) monitor (from the Controller) and select the default measurements you want to display, before running the scenario.
"ERP/CRM Server Resource Graphs Overview" on page
1604
"ERP/CRM Server Resources Graphs Measurements" on page 1606
Example
Page 1614 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 219:
Page 1615 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 220:
SAP Graph
This graph shows the resource usage of a SAP server as a function of the elapsed load test scenario time.
Xaxis
Elapsed time since the start of the run
Yaxis
The resource usage on the SAP server.
Note
To obtain data for this graph, you need to enable the SAP online monitor (from the
Controller) and select the default measurements you want to display, before running the scenario. (There are differences in the scale factor for some of the measurements).
See also
"ERP/CRM Server Resource Graphs Overview" on page 1604
"ERP/CRM Server Resources Graphs Measurements" on page 1606
Page 1616 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 220:
Page 1617 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 221:
SAPGUI Graph
This graph shows the resource usage of a SAP server as a function of the elapsed load test scenario time.
Xaxis
Elapsed time since the start of the run.
Yaxis
The resource usage on the SAP server.
Note
To obtain data for this graph, you need to enable the SAP online monitor (from the
Controller) and select the default measurements you want to display, before running the scenario. (There are differences in the scale factor for some of the measurements).
See also
"ERP/CRM Server Resource Graphs Overview" on page 1604
"ERP/CRM Server Resources Graphs Measurements" on page 1606
Page 1618 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 221:
Page 1619 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 222:
SAP CCMS Graph
The SAP CCMS (Computer Center Management System) graph shows statistics about the resource usage of all the servers in a SAP R/3 landscape server during the load test scenario run.
The x-axis represents the time that has elapsed since the start of the scenario run. The y-axis represents the resource usage.
Xaxis
Elapsed time since the start of the run.
Yaxis
The resource usage on all servers in a SAP R/3 landscape server.
Note
To obtain data for this graph, you need to enable the SAP CCMS monitor (from the
Controller) and select the default measurements you want to display, before running the scenario.
See also
"ERP/CRM Server Resource Graphs Overview" on page 1604
Page 1620 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 222:
Page 1621 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 223:
SAP Portal Graph
This graph shows the resource usage of your SAP Portal server as a function of the elapsed load test scenario time.
Xaxis
Elapsed time since the start of the run.
Yaxis
The resource usage on the SAP Portal server.
Note
To obtain data for this graph, you need to enable the SAP Portal monitor (from the
Controller) and select the default measurements you want to display, before running the scenario.
See also
"ERP/CRM Server Resource Graphs Overview" on page 1604
"ERP/CRM Server Resources Graphs Measurements" on page 1606
Page 1622 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 223:
Page 1623 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 224:
Siebel Server Manager Graph
This graph shows the resource usage of your Siebel Server Manager server as a function of the elapsed load test scenario time.
Xaxis
Elapsed time since the start of the run.
Yaxis
The resource usage on the Siebel Server Manager server.
Note
To obtain data for this graph, you need to enable the Siebel Server Manager monitor (from the Controller) and select the default measurements you want to display, before running the scenario.
See also
"ERP/CRM Server Resource Graphs Overview" on page 1604
"ERP/CRM Server Resources Graphs Measurements" on page 1606
Page 1624 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 224:
Page 1625 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 225:
Siebel Web Server Graph
This graph shows the resource usage of your Siebel Web Server as a function of the elapsed load test scenario time.
Xaxis
Elapsed time since the start of the run.
Yaxis
The resource usage on the Siebel Web Server.
Note
To obtain data for this graph, you need to enable the Siebel Web Server monitor (from the
Controller) and select the default measurements you want to display, before running the scenario.
See also
"ERP/CRM Server Resource Graphs Overview" on page 1604
"ERP/CRM Server Resources Graphs Measurements" on page 1606
Page 1626 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 225:
Page 1627 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 226:
Application Component Graphs
Page 1628 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 226:
Page 1629 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 227:
Microsoft COM+ Performance Graphs Overview
Microsoft COM+ performance graphs provide you with performance information for COM+ interfaces and methods.
In order to obtain data for these graphs, you need to activate the various Microsoft COM+ performance monitors before running the load test scenario.
When you set up the Microsoft COM+ performance online monitors, you indicate which statistics and measurements to monitor. For more information on activating and configuring the Microsoft
COM+ performance monitors, refer to the HP LoadRunner Controller User Guide.
Page 1630 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 227:
Page 1631 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 228:
Microsoft .NET CLR Performance Graphs Overview
The .NET CLR performance graphs provide you with performance information for .NET classes and methods. To obtain data for these graphs, you must activate the .NET CLR performance monitor before running the load test scenario run.
Displayed measurements are specified using the .NET monitor. For more information on activating and configuring the .NET CLR performance monitor, refer to the HP LoadRunner Controller User
Guide.
Page 1632 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 228:
Page 1633 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 229:
COM+ Average Response Time Graph
This graph specifies the average time COM+ interfaces or methods take to perform during the load test scenario.
X-axis
Y-axis
Elapsed time from the beginning of the scenario run.
Average response time of a COM+ interface or method.
Breakdown options
Each interface or method is represented by a different colored line on the graph. The legend frame
(which is found below the graph) identifies the interfaces by color:
Tips
See also
This legend shows that the blue colored line belongs to the COM+ interface _ConstTime. Looking at the graph above, we see that this interface has higher response times than all other COM+ interfaces. At 2:10 minutes into the scenario, it records an average response time of 0.87 seconds.
Note: The 0.87 second data point is an average, taken from all data points recorded within a 10 second interval (the default granularity). You can change the length of this sample interval.
Viewing CON+ Methods
The table initially displays COM+ interfaces, but you can also view the list of COM+ methods by using drill-down or filtering techniques. For more information, see
"Filtering and Sorting Graph Data" on page 1215
and
"Drilling Down in a Graph " on page 1244 .
To highlight a specific interface line in the graph, select the interface row in the legend.
"Microsoft COM+ Performance Graphs Overview" on page 1630
Page 1634 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 229:
Page 1635 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 230:
COM+ Breakdown Graph
This graph summarizes fundamental result data about COM+ interfaces or methods and presents it in table format.
Purpose
Breakdown options
Using the COM+ Breakdown table, you can identify the COM+ interfaces or methods which consume the most time during the test. The table can be sorted by column, and the data can be viewed either by COM+ interface or COM+ method.
Average Response Time
The Average Response Time column shows how long, on average, an interface or method takes to perform. The graphical representation of this column is the
"COM+ Average Response Time Graph" on page 1634
.
Call Count
The next column, Call Count, specifies the number of times the interface or method was invoked. The graphical representation of this column is the
"COM+
Average Response Time Graph" on page 1634
.
Total Response Time
The final column, Total Response Time, specifies how much time was spent overall on the interface or method. It is calculated by multiplying the first two data columns together. The graphical representation of this column is the
"COM+
Average Response Time Graph" on page 1634
.
The graphical representations of each of these columns are the
"COM+ Average
Response Time Graph" on page 1634 , the
"COM+ Call Count Distribution
Graph" on page 1638
and the
"COM+ Total Operation Time Distribution Graph" on page 1644
Interfaces are listed in the COM+ Interface column in the form Interface:Host.
In the table above, the _ConstTime interface took an average of .5 seconds to execute and was called 70 times. Overall, this interface took 34.966 seconds to execute.
Tips
See also
Sorting List
To sort the list by a column, click on the column heading. The list above is sorted by Average Response Time which contains the triangle icon specifying a sort in descending order.
Viewing COM+ Methods
The table initially displays COM+ interfaces, but you can also view the list of
COM+ methods.
To view the methods of a selected interface, select the COM+ Methods option.
You can also double-click on the interface row to view the methods. The methods of the specified interface are listed in the COM+ Method column.
"Microsoft COM+ Performance Graphs Overview" on page 1630
Page 1636 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 230:
Page 1637 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 231:
COM+ Call Count Distribution Graph
This graph shows the percentage of calls made to each COM+ interface compared to all COM+ interfaces. It can also show the percentage of calls made to a specific COM+ method compared to other methods within the interface
Breakdown options
The number of calls made to the interface or method is listed in the Call Count column of the
"COM+ Breakdown Graph" on page 1636
table.
Each interface or method is represented by a different colored area on the pie graph. The legend frame (which is found below the graph) identifies the interfaces by color:
Tips
See also
This legend shows that the green colored area belongs to the COM+ interface
IDispatch. Looking at the graph above, we see that 38.89% of calls are made to this interface. The actual figures can be seen in the Call Count column of the
"COM+ Breakdown Graph" on page 1636
table: there are 13 calls to this interface out of a total of 49 calls.
Viewing COM+ Methods
The table initially displays COM+ interfaces, but you can also view the list of
COM+ methods by using drill-down or filtering techniques. For more information, see
"Filtering and Sorting Graph Data" on page 1215
and
"Drilling Down in a Graph
" on page 1244 .
To highlight a specific interface line in the graph, select the interface row in the legend.
"Microsoft COM+ Performance Graphs Overview" on page 1630
Page 1638 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 231:
Page 1639 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 232:
COM+ Call Count Graph
This graph displays the number of times COM+ interfaces and methods are invoked during the test.
X-axis
Y-axis
Elapsed time from the beginning of the scenario run.
How many calls were made to a COM+ interface or method.
Breakdown options
Each interface or method is represented by a different colored line on the graph. The legend frame
(which is found below the graph) identifies the interfaces by color:
Note
Tips
See also
This legend shows that the yellow colored line belongs to the COM+ interface _RandomTime.
Looking at the graph above, we see that calls to this interface begin at the beginning of the scenario run. There are 20 calls at the 2:20 minute point.
Viewing COM+ Methods
The table initially displays COM+ interfaces, but you can also view the list of COM+ methods by using drill-down or filtering techniques. For more information, see
"Filtering and Sorting Graph Data" on page 1215
and
"Drilling Down in a Graph " on page 1244 .
The call count is computed by multiplying the call frequency by a time interval. As a result, the reported measurement may be rounded.
To highlight a specific interface line in the graph, select the interface row in the legend.
"Microsoft COM+ Performance Graphs Overview" on page 1630
Page 1640 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 232:
Page 1641 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 233:
COM+ Call Count Per Second Graph
This graph shows the number of times per second a COM+ interface or method is invoked.
Breakdown options
This graph is similar to the
"COM+ Call Count Graph" on page 1640
except that the y-axis indicates how many invocations were made to a COM+ interface or method per second.
Each interface or method is represented by a different colored line on the graph.
The legend frame (which is found below the graph) identifies the interfaces by color:
Tips
See also
This legend shows that the green colored line belongs to the COM+ interface
IDispatch. Looking at the graph above, we see that calls to this interface begins
1:55 minutes into the scenario run. There is an average of 2.5 calls per second at the 2:10 minute mark.
Viewing COM+ Methods
To view the average response time of the individual methods within a COM+ interface, see
"Filtering and Sorting Graph Data" on page 1215
and
"Drilling Down in a Graph " on page 1244
.
To highlight a specific interface line in the graph, select the interface row in the legend.
"Microsoft COM+ Performance Graphs Overview" on page 1630
Page 1642 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 233:
Page 1643 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 234:
COM+ Total Operation Time Distribution Graph
This graph shows the percentage of time a specific COM+ interface takes to execute in relation to all COM+ interfaces. It can also show the percentage of time a COM+ method takes to execute in relation to all COM+ methods within the interface.
Purpose
Use it to identify those interfaces or methods which take up an excessive amount of time.
Breakdown options
Each interface or method is represented by a different colored area on the pie graph.
The legend frame (which is found below the graph) identifies the interfaces by color:
Tips
See also
This legend shows that the green colored line belongs to the COM+ interface
IDispatch. Looking at the graph above, we see that this interface takes up 40.84% of the COM+ operational time.
Viewing COM+ Methods
To view the average response time of the individual methods within a COM+ interface, see
"Filtering and Sorting Graph Data" on page 1215
and
"Drilling Down in a Graph " on page 1244 .
To highlight a specific interface line in the graph, select the interface row in the legend.
"Microsoft COM+ Performance Graphs Overview" on page 1630
Page 1644 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 234:
Page 1645 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 235:
COM+ Total Operation Time Graph
This graph displays the amount of time each COM+ interface or method takes to execute during the test.
Purpose
X-axis
Use it to identify those interfaces or methods which take up an excessive amount of time.
Elapsed time from the beginning of the scenario run.
Y-axis
Total time a COM+ interface or method is in operation.
Breakdown options
Each interface or method is represented by a different colored line on the graph. The legend frame
(which is found below the graph) identifies the interfaces by color:
Tips
See also
This legend shows that the blue colored line belongs to the COM+ interface _ConstTime. Looking at the graph above, we see that throughout the scenario, this interface consumes more time than any other, especially at 2 minutes and 15 seconds into the scenario run, where the calls to this interface take an average of 21 seconds.
Viewing COM+ Methods
The table initially displays COM+ interfaces, but you can also view the list of COM+ methods by using drill-down or filtering techniques. For more information, see
"Filtering and Sorting Graph Data" on page 1215
and
"Drilling Down in a Graph " on page 1244 .
To highlight a specific interface line in the graph, select the interface row in the legend.
"Microsoft COM+ Performance Graphs Overview" on page 1630
Page 1646 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 235:
Page 1647 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 236:
Microsoft COM+ Graph
This graph shows the resource usage of COM+ objects as a function of the elapsed load test scenario time.
X-axis
Y-axis
Elapsed time since the start of the run.
The resource usage of COM+ objects.
Breakdown
Options
Each COM+ object is represented by a different colored line on the graph. The legend frame (which is found below the graph) identifies the objects by color:
See also
"Microsoft COM+ Performance Graphs Overview" on page 1630
Authentication Metrics
Measurement Description
Authenticate
Frequency of successful method call level authentication. When you set an authentication level for an application, you determine what degree of authentication is performed when clients call into the application.
Authenticate
Failed
Frequency of failed method call level authentication.
Application Event
Measurement
Activation
Shutdown
Description
Frequency of application activation or startup.
Frequency of application shutdown or termination.
Page 1648 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 236:
Thread Event
Measurement
Description
Thread Start
Rate at which single-threaded apartment (STA) thread for application have been started.
Thread
Terminate
Rate at which single-threaded apartment (STA) thread for application have been terminated.
Work Enque
Event sent if a work is queued in single thread apartment object (STA). Note:
These events are not signaled/sent in Windows Server 2003 and later.
Work Reject
Event sent if a work is rejected from single thread apartment object (STA). Note:
These events are not signaled/sent in Windows Server 2003 and later.
Transaction Events
Measurement
Transaction
Duration
Description
Duration of COM+ transactions for selected application.
Transaction Start
Rate at which transactions have started.
Transaction
Prepared
Transaction
Aborted
Transaction
Commit
Rate at which transactions have completed the prepare phase of the twophase protocol.
Rate at which transactions have been aborted.
Rate at which transactions have completed the commit protocol.
Object Events
Measurement
Description
Object Life
Time
Duration of object existence (from instantiation to destruction).
Rate at which new instances of this object are created.
Object
Create
Object
Destroy
Rate at which instances of the object are destroyed.
Object
Activate
Rate of retrieving instances of a new JIT-activated object.
Page 1649 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 236:
Measurement
Description
Rate of freeing JIT-activated object via SetComplete or SetAbort.
Object
Deactivation
Disable
Commit
Rate of client calls to DisableCommit on a context. DisableCommit declares that the object's transactional updates are inconsistent and can't be committed in their present state.
Enable
Commit
Set
Complete
Rate of client calls to EnableCommit on a context. EnableCommit declares that the current object's work is not necessarily finished, but that its transactional updates are consistent and could be committed in their present form.
Rate of client calls to SetComplete on a context. SetComplete declares that the transaction in which the object is executing can be committed, and that the object should be deactivated on returning from the currently executing method call.
Set Abort
Rate of client calls to SetAbort on a context. SetAbort declares that the transaction in which the object is executing must be aborted, and that the object should be deactivated on returning from the currently executing method call.
Method Events
Measurement Description
Method Duration
Average duration of method.
Frequency of method invocation.
Method
Frequency
Method Failed
Method
Exceptions
Frequency of failed methods (i.e. methods that return error HRESULT codes).
Frequency of exceptions thrown by selected method.
Page 1650 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 236:
Page 1651 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 237:
.NET Average Response Time Graph
This graph specifies the average time that .NET classes or methods took to perform during the load test scenario run.
X-axis
Y-axis
Elapsed time from the beginning of the scenario run.
Average response time of a .NET class or method.
Breakdown options
The graph initially displays .NET classes, but you can also view the individual methods within a .NET class by using drill-down or filtering techniques. For more information, see
"Filtering and Sorting Graph Data" on page 1215
and
"Drilling
Down in a Graph " on page 1244
.
Tips
See also
You can change the length of the sample interval. For more information, refer to the HP LoadRunner Controller User Guide.
Hint: To highlight a specific class line in the graph, select the class row in the legend (displayed below the graph).
"Microsoft COM+ Performance Graphs Overview" on page 1630
Page 1652 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 237:
Page 1653 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 238:
.NET Breakdown Graph
This graph summarizes fundamental result data about .NET classes or methods and presents it in table format.
Purpose
Using the .NET Breakdown table, you can identify the .NET classes or methods which consume the most time during the test. The table can be sorted by column, and the data can be viewed either by .NET class or .NET method.
Breakdown options
The Average Response Time column shows how long, on average, a class or method took to perform. The next column, Call Count, specifies the number of times the class or method was invoked. The final column, Total Response Time, specifies how much time was spent overall on the class or method. It is calculated by multiplying the results from the first two columns together.
Classes are listed in the .NET Class column in the form Class:Host. In the table above, the AtmMachineSample.AtmTeller class took an average of 783 seconds to execute and was called 50,912 times. Overall, this class took 39,316 seconds to execute.
To sort the list by a column, click the column heading.
Each column in the .NET Breakdown graph is graphically represented by another graph. For details, see
".NET Breakdown Graph" above :
The table initially displays .NET classes, but you can also view the list of .NET
methods. To view .NET methods, select the .NET Methods option, or doubleclick the class row. The methods of the specified class are listed in the .NET
Method column.
See also
"Microsoft COM+ Performance Graphs Overview" on page 1630
Page 1654 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 238:
.NET Breakdown graph
.NET Breakdown Column
Average Response Time
Call Count
Total Response Time
Graphical Representation
.NET Average Response Time Graph.
.NET Call Count Graph.
.NET Total Operation Time Distribution Graph.
Page 1655 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 239:
.NET Call Count Distribution Graph
This graph shows the percentage of calls made to each .NET class compared to all .NET classes.
It can also show the percentage of calls made to a specific .NET method compared to other methods within the class
Breakdown options
The number of calls made to the class or method is listed in the Call Count column of the .NET Breakdown graph table.
The graph initially displays .NET classes, but you can also view the individual methods within a .NET class by using drill-down or filtering techniques. For more information, see
"Filtering and Sorting Graph Data" on page 1215
and
"Drilling
Down in a Graph " on page 1244
.
Tips
To highlight a specific class line in the graph, select the class row in the legend
(displayed below the graph).
See also
"Microsoft COM+ Performance Graphs Overview" on page 1630
Page 1656 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 239:
Page 1657 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 240:
.NET Call Count Graph
This graph displays the number of times that .NET classes and methods are invoked during the test.
X-axis
Y-axis
Breakdown options
The graph initially displays .NET classes, but you can also view the individual methods within a .NET class by using drill-down or filtering techniques. For more information, see
"Filtering and Sorting Graph Data" on page 1215
and
"Drilling
Down in a Graph " on page 1244
.
Tips
To highlight a specific class line in the graph, select the class row in the legend
(displayed below the graph).
Note
See also
Elapsed time from the beginning of the scenario run.
Indicates how many calls were made to a .NET class or method.
The call count is computed by multiplying the call frequency by a time interval. As a result, the reported measurement may be rounded.
"Microsoft COM+ Performance Graphs Overview" on page 1630
Page 1658 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 240:
Page 1659 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 241:
.NET Call Count per Second Graph
This graph shows the number of times per second that a .NET class or method is invoked.
Breakdown options
This graph is similar to the .NET Call Count graph except that the y-axis indicates how many invocations were made to a .NET class or method per second.
The graph initially displays .NET classes, but you can also view the individual methods within a .NET class by using drill-down or filtering techniques. For more information, see
"Filtering and Sorting Graph Data" on page 1215
and
"Drilling
Down in a Graph " on page 1244
.
Tips
See also
To highlight a specific class line in the graph, select the class row in the legend
(displayed below the graph).
"Microsoft COM+ Performance Graphs Overview" on page 1630
Page 1660 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 241:
Page 1661 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 242:
.NET Resources Graph
This graph shows the resource usage of .NET methods as a function of the elapsed load test scenario time.
Breakdown options
Each .NET method is represented by a different colored line on the graph. The legend frame
(located below the graph) identifies the methods by color:
See also
You can monitor .NET counters at the application, assembly, class, and method levels.
Measurements that take place before the application is fully loaded (such as Assembly Load Time, that measures the time it takes to load an assembly) will not be measured.
The following tables describe the counters that can be measured at each level. All durations are reported in seconds, and all frequencies are reported per five-second polling periods. For example, if
20 events occur in a 5 second polling period, the reported frequency is 4.
l
".NET Resources Graph" above
l
".NET Resources Graph" above
l
".NET Resources Graph" above
l
".NET Resources Graph" above
"Microsoft COM+ Performance Graphs Overview" on page 1630
Page 1662 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 242:
Application Level
Measurement
Application Lifetime
Exception Frequency
JIT (Just In Time) Duration
Thread Creation Frequency
Thread Lifetime
Domain Creation Frequency
Domain Load Time
Domain Unload Time
Domain Lifetime
Module Creation Frequency
Module Load Time
Module Unload Time
Description
Monitors the duration of the application in seconds.
Monitors the number of exceptions per second, in the five second polling period.
Monitors the time (in seconds) it takes for the JIT to compile code.
Monitors the number of threads that are created in a polling period.
Monitors the duration of threads.
Monitors the number of domain creations in a polling period. (Domains protect areas of code. All applications run in a domain which keeps them encapsulated, so that they cannot interfere with other applications outside the domain.)
Monitors the time it takes to load a domain.
(Domains protect areas of code. All applications run in a domain which keeps them encapsulated, so that they cannot interfere with other applications outside the domain).
Monitors the time it takes to unload a domain.
(Domains protect areas of code. All applications run in a domain which keeps them encapsulated, so that they cannot interfere with other applications outside the domain).
Monitors the duration of a domain. (Domains protect areas of code. All applications run in a domain which keeps them encapsulated, so that they cannot interfere with other applications outside the domain).
Monitors the number of modules that get created in a polling period. (Modules are groups of assemblies that make up a DLL or EXE).
Monitors the time it takes to load a module.
(Modules are groups of assemblies that make up a dll or exe).
Monitors the time it takes to unload a module.
(Modules are groups of assemblies that make up a dll or exe).
Page 1663 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 242:
Measurement
Module Lifetime
Garbage Collection Duration
Garbage Collection Frequency
Unmanaged Code Duration
Unmanaged Code Frequency
Description
Monitors the duration of a module. (Modules are groups of assemblies that make up a dll or exe).
Monitors the duration between the start and stop of
Garbage Collection.
Monitors the number of breaks for Garbage
Collections in a polling period.
Monitors the duration of the calls to unmanaged code.
Monitors the number of calls to unengaged code in a polling period.
Assembly Level
Measurement
Assembly Creation Frequency
Assembly Load Time
Assembly Unload Time
Assembly Lifetime
Description
Monitors the number of assembly creations in a polling period. (Assemblies hold the .NET byte code and metadata).
Monitors the time it takes to load an assembly.
(Assemblies hold the .NET byte code and metadata).
Monitors the time it takes to unload an assembly.
(Assemblies hold the .NET byte code and metadata).
Monitors the duration of an assembly. (Assemblies hold the .NET byte code and metadata).
Class Level
Measurement
Class Lifetime
Class Load Time
Class Unload Time
Description
Monitors the duration of a class.
Monitors the time it takes to load a class.
Monitors the time it takes to unload a class.
Method Level
At the method level, the measured time is per method, exclusive of other methods, calls to unmanaged code, and garbage collection time.
Page 1664 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 242:
Measurement
Method Duration
Method Frequency
Description
Monitors the duration of a method.
Monitors the number of methods called in a polling period.
Page 1665 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 243:
.NET Total Operation Time Distribution Graph
This graph shows the percentage of time that a specific .NET class took to execute in relation to all the .NET classes. It can also show the percentage of time that a .NET method took to execute in relation to all the .NET methods within the class.
Purpose
Breakdown options
The graph initially displays .NET classes, but you can also view the individual methods within a .NET class by using drill-down or filtering techniques. For more information, see
"Filtering and Sorting Graph Data" on page 1215
and
"Drilling
Down in a Graph " on page 1244
.
Tips
Use this graph to identify those classes or methods that take an excessive amount of time.
See also
To highlight a specific class line in the graph, select the class row in the legend
(displayed below the graph).
"Microsoft COM+ Performance Graphs Overview" on page 1630
Page 1666 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 243:
Page 1667 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 244:
.NET Total Operation Time Graph
This graph displays the amount of time that each .NET class or method took to execute during the test.
Purpose
Use this graph to identify those classes or methods that take an excessive amount of time.
Elapsed time from the beginning of the scenario run.
X-axis
Y-axis
Total time a .NET class or method is in operation.
Breakdown options
The graph initially displays .NET classes, but you can also view the individual methods within a .NET class by using drill-down or filtering techniques. For more information, see
"Filtering and Sorting Graph Data" on page 1215
and
"Drilling
Down in a Graph " on page 1244
.
Tips
See also
To highlight a specific class line in the graph, select the class row in the legend
(displayed below the graph).
"Microsoft COM+ Performance Graphs Overview" on page 1630
Page 1668 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 244:
Page 1669 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 245:
Application Deployment Solutions Graphs
Page 1670 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 245:
Page 1671 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 246:
Application Deployment Solutions Graph Overview
LoadRunner's Citrix MetaFrame XP monitor provides you with information about the application deployment usage of the Citrix MetaFrame XP server during a load test scenario execution. In order to obtain performance data, before you execute the scenario you need to activate the online monitor for the server and specify which resources you want to measure.
For more information on activating and configuring the Application Deployment Solutions monitor, refer to the HP LoadRunner Controller User Guide.
Page 1672 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 246:
Page 1673 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 247:
Citrix Measurements
Non-Virtual Counters
Measurement
% Disk Time
% Processor Time
File data Operations/sec
Interrupts/sec
Page 1674 of 1812
Description
The percentage of elapsed time that the selected disk drive services read or write requests.
The percentage of time that the processor executes a non-Idle thread. This counter is a primary indicator of processor activity. It is calculated by measuring the time that the processor spends executing the thread of the
Idle process in each sample interval, and subtracting that value from 100%. (Each processor has an Idle thread which consumes cycles when no other threads are ready to run.) It can be viewed as the percentage of the sample interval spent doing useful work. This counter displays the average percentage of busy time observed during the sample interval. It is calculated by monitoring the time the service was inactive, and then subtracting that value from 100%.
The rate that the computer issues Read and
Write operations to file system devices. It does not include File Control Operations.
The average number of hardware interrupts the processor receives and services per second. It does not include DPCs, which are counted separately. This value is an indirect indicator of the activity of devices that generate interrupts, such as the system clock, the mouse, disk drivers, data communication lines, network interface cards and other peripheral devices. These devices normally interrupt the processor when they have completed a task or require attention.
Normal thread execution is suspended during interrupts. Most system clocks interrupt the processor every 10 milliseconds, creating a background of interrupt activity. This counter displays the difference between the values observed in the last two samples, divided by the duration of the sample interval.
HP LoadRunner (11.50)
User Guide
Chapter 247:
Measurement
Output Session Line Speed
Input Session Line Speed
Page Faults/sec
Pages/sec
Pool Nonpaged Bytes
Private Bytes
Processor Queue Length
Page 1675 of 1812
Description
This value represents the line speed from server to client for a session in bps.
This value represents the line speed from client to server for a session in bps.
A count of the Page Faults in the processor.
A page fault occurs when a process refers to a virtual memory page that is not in its
Working Set in main memory. A Page Fault will not cause the page to be fetched from disk if that page is on the standby list, and hence already in main memory, or if it is in use by another process with whom the page is shared.
The number of pages read from the disk or written to the disk to resolve memory references to pages that were not in memory at the time of the reference. This is the sum of
Pages Input/sec and Pages Output/sec. This counter includes paging traffic on behalf of the system Cache to access file data for applications. This value also includes the pages to/from non-cached mapped memory files. This is the primary counter to observe if you are concerned about excessive memory pressure (that is, thrashing), and the excessive paging that may result.
The number of bytes in the Nonpaged Pool, a system memory area where space is acquired by operating system components as they accomplish their appointed tasks.
Nonpaged Pool pages cannot be paged out to the paging file, but instead remain in main memory as long as they are allocated.
The current number of bytes this process has allocated that cannot be shared with other processes.
The instantaneous length of the processor queue in units of threads. This counter is always 0 unless you are also monitoring a thread counter. All processors use a single queue in which threads wait for processor cycles. This length does not include the threads that are currently executing. A
HP LoadRunner (11.50)
User Guide
Chapter 247:
Measurement
Threads
Latency – Session Average
Latency – Last Recorded
Latency – Session Deviation
Input Session Bandwidth
Input Session Compression
Output Session Bandwidth
Output Session Compression
Output Session Linespeed
Description
sustained processor queue length greater than two generally indicates processor congestion. This is an instantaneous count, not an average over the time interval.
The number of threads in the computer at the time of data collection. Notice that this is an instantaneous count, not an average over the time interval. A thread is the basic executable entity that can execute instructions in a processor.
The average client latency over the life of a session.
The last recorded latency measurement for this session.
The difference between the minimum and maximum measured values for a session.
The bandwidth (in bps) from client to server traffic for a session in bps.
The compression ratio for client to server traffic for a session.
The bandwidth (in bps) from server to client traffic for a session.
The compression ratio for server to client traffic for a session.
The line speed (in bps) from server to client for a session.
Virtual Channel Counters
All the counters in the following table are measured in bytes per second (bps):
Measurement
Input Audio Bandwidth
Input Clipboard Bandwidth
Input COM1 Bandwidth
Description
The bandwidth from client to server traffic on the audio mapping channel.
The bandwidth from client to server traffic on the clipboard mapping channel.
The bandwidth from client to server traffic on the COM1 channel.
Page 1676 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 247:
Measurement
Input COM2 Bandwidth
Input COM Bandwidth
Input Control Channel Bandwidth
Input Drive Bandwidth
Input Font Data Bandwidth
Input Licensing Bandwidth
Input LPT1 Bandwidth
Input LPT2 Bandwidth
Input Management Bandwidth
Input PN Bandwidth
Input Printer Bandwidth
Input Seamless Bandwidth
Input Text Echo Bandwidth
Input Thinwire Bandwidth
Input VideoFrame Bandwidth
Output Audio Bandwidth
Output Clipboard Bandwidth
Description
The bandwidth from client to server traffic on the COM2 channel.
The bandwidth from client to server traffic on the COM channel.
The bandwidth from client to server traffic on the ICA control channel.
The bandwidth from client to server traffic on the client drive mapping channel.
The bandwidth from client to server traffic on the local text echo font and keyboard layout channel.
The bandwidth from server to client traffic on the licensing channel.
The bandwidth from client to server traffic on the LPT1 channel.
The bandwidth from client to server traffic on the LPT2 channel.
The bandwidth from client to server traffic on the client management channel.
The bandwidth from client to server traffic on the Program Neighborhood channel.
The bandwidth from client to server traffic on the printer spooler channel.
The bandwidth from client to server traffic on the Seamless channel.
The bandwidth from client to server traffic on the local text echo data channel.
The bandwidth from client to server traffic on the Thinwire (graphics) channel.
The bandwidth from client to server traffic on the VideoFrame channel.
The bandwidth from server to client traffic on the audio mapping channel.
The bandwidth from server to client traffic on the clipboard mapping channel.
Page 1677 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 247:
Measurement
Output COM1 Bandwidth
Output COM2 Bandwidth
Output COM Bandwidth
Output Control Channel Bandwidth
Output Drive Bandwidth
Output Font Data Bandwidth
Output Licensing Bandwidth
Output LPT1 Bandwidth
Output LPT2 Bandwidth
Output Management Bandwidth
Output PN Bandwidth
Output Printer Bandwidth
Output Seamless Bandwidth
Output Text Echo Bandwidth
Output Thinwire Bandwidth
Output VideoFrame Bandwidth
Description
The bandwidth from server to client traffic on the COM1 channel.
The bandwidth from server to client traffic on the COM2 channel.
The bandwidth from server to client traffic on the COM channel.
The bandwidth from server to client traffic on the ICA control channel.
The bandwidth from server to client traffic on the client drive channel.
The bandwidth from server to client traffic on the local text echo font and keyboard layout channel.
The bandwidth from server to client traffic on the licensing channel.
The bandwidth from server to client traffic on the LPT1 channel.
The bandwidth from server to client traffic on the LPT2 channel.
The bandwidth from server to client traffic on the client management channel.
The bandwidth from server to client traffic on the Program Neighborhood channel.
The bandwidth from server to client traffic on the printer spooler channel.
The bandwidth from server to client traffic on the Seamless channel.
The bandwidth from server to client traffic on the local text echo data channel.
The bandwidth from server to client traffic on the Thinwire (graphics) channel.
The bandwidth from server to client traffic on the VideoFrame channel.
Page 1678 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 247:
Page 1679 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 248:
Citrix MetaFrame XP Graph
This graph is an Application Deployment solution which delivers applications across networks. The
Citrix MetaFrame Resource Monitor is an Application Deployment Solution monitor, which provides performance information for the Citrix MetaFrame server.
Xaxis
Elapsed time since the start of the run.
Yaxis
The resource usage on the Citrix MetaFrame server.
Note
To obtain data for this graph, you need to enable the Citrix MetaFrame XP monitor (from the Controller) and select the default measurements you want to display, before running the scenario.
See also
"Application Deployment Solutions Graph Overview " on page 1672
"Citrix Measurements " on page 1674
Page 1680 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 248:
Page 1681 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 249:
Middleware Performance Graphs
Page 1682 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 249:
Page 1683 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 250:
Middleware Performance Graphs Overview
A primary factor in a transaction's response time is the middleware performance usage.
LoadRunner's Middleware Performance monitors provide you with information about the middleware performance usage of the Tuxedo and IBM WebSphere MQ servers during a load test scenario execution. To obtain performance data, you need to activate the online monitor for the server and specify which resources you want to measure before executing the scenario.
For more information on activating and configuring the Middleware Performance monitors, refer to the HP LoadRunner Controller User Guide.
Page 1684 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 250:
Page 1685 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 251:
IBM WebSphere MQ Counters
Queue Performance Counters
Measurement
Event - Queue Depth High
(events per second)
Description
An event triggered when the queue depth reaches the configured maximum depth.
Event - Queue Depth Low
(events per second)
Event - Queue Full (events per second)
Event - Queue Service
Interval High (events per second)
Event - Queue Service
Interval OK (events per second)
Status - Current Depth
An event triggered when the queue depth reaches the configured minimum depth.
An event triggered when an attempt is made to put a message on a queue that is full.
An event triggered when no messages are put to or retrieved from a queue within the timeout threshold.
An event triggered when a message has been put to or retrieved from a queue within the timeout threshold.
The current count of messages on a local queue. This measurement applies only to local queues of the monitored queue manager.
Status - Open Input Count
The current count of open input handles. Input handles are opened so that an application may "put" messages to a queue.
Status - Open Output
Count
The current count of open output handles. Output handles are opened so that an application may "get" messages from a queue.
Channel Performance Counters
Measurement
Event -
Channel
Activated
(events per second)
Event -
Channel Not
Activated
(events per second)
Event -
Channel
Description
An event generated when a channel, waiting to become active but inhibited from doing so due to a shortage of queue manager channel slots, becomes active due to the sudden availability of a channel slot.
An event generated when a channel attempts to become active but is inhibited from doing so due to a shortage of queue manager channel slots.
An event generated when a channel is started.
Page 1686 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 251:
Measurement
Started (events per second)
Description
Event -
Channel
Stopped
(events per second)
Event -
Channel
Stopped by
User (events per second)
Status -
Channel State
An event generated when a channel is stopped, regardless of source of stoppage.
An event generated when a channel is stopped by a user.
Status -
Messages
Transferred
Status - Buffer
Received
Status - Buffer
Sent
Status - Bytes
Received
Status - Bytes
Sent
The current state of a channel. Channels pass through several states from stopped (inactive state) to running (fully active state). Channel states range from 0 (stopped) to 6 (running).
The count of messages that have been sent over the channel. If no traffic is occurring over the channel, this measurement will be zero. If the channel has not been started since the queue manager was started, no measurement will be available.
The count of buffers that have been received over the channel. If no traffic is occurring over the channel, this measurement will be zero. If the channel has not been started since the queue manager was started, no measurement will be available.
The count of buffers that have been sent over the channel. If no traffic is occurring over the channel, this measurement will be zero. If the channel has not been started since the queue manager was started, no measurement will be available.
The count of bytes that have been received over the channel. If no traffic is occurring over the channel, this measurement will appear as zero. If the channel has not been started since the queue manager was started, no measurement will be available.
The count of bytes that have been sent over the channel. If no traffic is occurring over the channel, this measurement will appear as zero. If the channel has not been started since the queue manager was started, no measurement will be available.
Page 1687 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 252:
Tuxedo Resources Graph Measurements
The following table describes the default counters that can be measured. It is recommended to pay particular attention to the following measurements: % Busy Clients, Active Clients, Busy Clients,
Idle Clients, and all the queue counters for relevant queues.
Monitor
Machine
Queue
Measurements
% Busy Clients. The percentage of active clients currently logged in to the
Tuxedo application server that are waiting for a response from the application server.
Active Clients. The total number of active clients currently logged in to the
Tuxedo application server.
Busy Clients. The total number of active clients currently logged in to the
Tuxedo application server that are waiting for a response from the application server.
Current Accessers. The number of clients and servers currently accessing the application either directly on this machine or through a workstation handler on this machine.
Current Transactions. The number of in use transaction table entries on this machine.
Idle Clients. The total number of active clients currently logged in to the Tuxedo application server that are not waiting for a response from the application server.
Workload Completed/second. The total workload on all the servers for the machine that was completed, per unit time.
Workload Initiated/second. The total workload on all the servers for the machine that was initiated, per unit time.
% Busy Servers. The percentage of active servers currently handling Tuxedo requests.
Active Servers. The total number of active servers either handling or waiting to handle Tuxedo requests.
Busy Servers. The total number of active servers currently busy handling
Tuxedo requests.
Idle Servers. The total number of active servers currently waiting to handle
Tuxedo requests.
Number Queued. The total number of messages which have been placed on the queue.
Page 1688 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 252:
Monitor
Server
Measurements
Requests/second. The number of server requests handled per second.
Workload/second. The workload is a weighted measure of the server requests.
Some requests could have a different weight than others. By default, the workload is always 50 times the number of requests.
Workstation
Handler
(WSH)
Bytes Received/sec. The total number of bytes received by the workstation handler, per second.
Bytes Sent/sec. The total number of bytes sent back to the clients by the workstation handler, per second.
Messages Received/sec. The number of messages received by the workstation handler, per second.
Messages Sent/sec. The number of messages sent back to the clients by the workstation handler, per second.
Number of Queue Blocks/sec. The number of times the queue for the workstation handler blocked, per second. This gives an idea of how often the workstation handler was overloaded.
Page 1689 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 253:
IBM WebSphere MQ Graph
This graph shows the resource usage of IBM WebSphere MQ Server channel and queue performance counters as a function of the elapsed load test scenario time.
Xaxis
Elapsed time since the start of the run.
Yaxis
The resource usage of the IBM WebSphere MQ Server channel and queue performance counters.
Note
To obtain data for this graph, you need to enable the IBM WebSphere MQ monitor (from the Controller) and select the default measurements you want to display, before running the scenario.
See also
"Middleware Performance Graphs Overview" on page 1684
"IBM WebSphere MQ Counters" on page 1686
Page 1690 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 253:
Page 1691 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 254:
Tuxedo Resources Graph
This graph provides information about the server, load generator machine, workstation handler, and queue in a Tuxedo system.
Xaxis
Elapsed time since the start of the run.
Yaxis
The resource usage on the Tuxedo system.
Note
To obtain data for this graph, you need to enable the TUXEDO monitor (from the
Controller) and select the default measurements you want to display, before running the scenario.
See also
"Middleware Performance Graphs Overview" on page 1684
"Tuxedo Resources Graph Measurements" on page 1688
Page 1692 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 254:
Page 1693 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 255:
Infrastructure Resources Graphs
Page 1694 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 255:
Page 1695 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 256:
Infrastructure Resources Graphs Overview
LoadRunner's Infrastructure Resources monitor provides you with information about the performance of FTP, POP3, SMTP, IMAP, and DNS Vusers on the network client during load test scenario execution.
Page 1696 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 256:
Page 1697 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 257:
Network Client Measurements
Measurement
Pings per sec
Data transfer bytes per sec
Data receive bytes per sec
Connections per sec
Accept connections per sec
SSL Connections per sec
SSL Data transfer bytes per sec
SSL Data receive bytes per sec
SSL Accept connections per sec
Description
Number of pings per second.
Number of data bytes transferred per second.
Number of data bytes received per second.
Number of connections per second.
Number of connections accepted per seconds.
Number of SSL connections per second.
Number of SSL data bytes transferred per second.
Number of SSL data bytes received per second.
Number of SSL connections accepted per seconds.
Page 1698 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 257:
Page 1699 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 258:
Network Client Graph
This graph displays network client data points for FTP, POP3, SMTP, IMAP, and DNS Vusers during a load test scenario run.
X-axis
Y-axis
See also
Elapsed time since the start of the run.
The resource value of the network client data points..
"Infrastructure Resources Graphs Overview" on page 1696
Page 1700 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 258:
Page 1701 of 1812 HP LoadRunner (11.50)
User Guide
Analysis Reports
Page 1702 of 1812 HP LoadRunner (11.50)
User Guide
Page 1703 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 260:
Understanding Analysis Reports
Page 1704 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 260:
Page 1705 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 261:
Analysis Reports Overview
After running a load test scenario, you can view reports that summarize your system's performance. Analysis provides the following reporting tools: l
"Summary Report" on page 1732
l
"SLA Reports" on page 1730
l
"Transaction Analysis Report" on page 1736
l
"HTML Report " on page 1716
The Summary report provides general information about the scenario run. You can access the
Summary report at any time from the Session Explorer.
The SLA report provides an overview of the defined SLAs (Service Level Agreements) with succeeded or failed status.
The Transaction Analysis report provides a detailed analysis of a specific transaction over a specific time period.
You can instruct Analysis to create an HTML report. The HTML report contains a page for each open graph, the Summary report, the SLA report, and the Transaction Analysis report.
Transaction reports provide performance information about the transactions defined within the
Vuser scripts. These reports give you a statistical breakdown of your results and allow you to print and export the data.
Note: SLA reports and Transaction Analysis reports are not available when generating Cross
Result graphs. For more information on Cross Result graphs, see
"Cross Result and Merged
Graphs" on page 1280
.
Page 1706 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 261:
Page 1707 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 262:
Report Templates Overview
You can use Report Templates to create and customize templates which are used when generating reports. Report templates can be used across similar scenario runs and saves time and effort on recreating reports each time.
Using the Report Templates dialog box, you can record document details, define the format of the report, and select the content items to include in the report and configure each content item accordingly.
A list of report templates is displayed in the Templates dialog box, under Rich Reports. Select this option if you want to generate the report in the load run session in word, excel, HTML or PDF format. For more information on templates, see
"Template Dialog Box" on page 1214 .
Page 1708 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 262:
Page 1709 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 263:
Analysis Reports Overview
The Summary report provides general information about load test scenario execution. This report is always available from the Session Explorer or as a tab in the Analysis window.
The Summary report lists statistics about the scenario run and provides links to the following graphs: Running Vusers, Throughput, Hits Per Second, HTTP Responses per Second, Transaction
Summary, and Average Transaction Response Time.
The appearance of the Summary report and the information displayed, will vary depending on whether an SLA (Service Level Agreement) was defined.
An SLA defines goals for the scenario. LoadRunner measures these goals during the scenario run and analyzes them in the Summary report. For more information on defining an SLA, see
"SLA
Reports" on page 1730
A Summary report is also provided for Cross Result graphs. For more information about Cross
Result graphs, see
"Cross Result Graphs Overview" on page 1284
.
Note: You can save the Summary reports to an Excel file by selecting View > Export
Summary to Excel or by clicking the Export Summary to Excel button on the toolbar.
Page 1710 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 263:
Page 1711 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 264:
Analyze Transaction Settings Dialog Box
This dialog box enables you to configure the Transaction Analysis Report to show correlations between the graph of the analyzed transaction and other graphs that you select.
To access
Use one of the following: l
Reports > Analyze Transaction > Settings
l
Tools > Options > Analyze Transaction Settings tab
"Analyze Transactions Dialog Box" on page 1714
See also
User interface elements are described below:
UI Element Description
Correlations
Defines which graphs you want Analysis to match to the graph of the transaction you selected. Graphs where data is available appear in blue.
Page 1712 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 264:
UI Element Description
Show correlations with at least x% match
The positive or negative percentage correlation between the graph of the analyzed transaction and the graphs selected above. You can change the percentage by entering a value in the box. The default is 20%.
Auto adjust time range to best fit
Analysis adjusts the selected time range to focus on the SLA violations within and around that time period. This option only applies when the Transaction
Analysis report is generated directly from the Summary report (from the X Worst
transactions or Scenario behavior over time sections).
Show correlations with insufficient data lines
Displays correlations where one of the measurements contains less than 15 units of granularity.
Errors
Displays errors in the Transaction Analysis Report if selected.
Page 1713 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 265:
Analyze Transactions Dialog Box
You use the Analyze Transaction dialog box to define the criteria that will be used to analyze the selected transaction in the Transaction Analysis Report. You can analyze a transaction even if you have not defined an SLA.
To access
Reports > Analyze Transaction
Summary Report > right-click menu > Add New Item > Analyze Transaction
Note
Toolbar >
Summary Report with no SLA > Statistics Summary section > Analyze
Transaction tool link
Analysis data (for example, transactions) that has been excluded by the Summary
Filter will not be available for analysis in the Transaction Analysis report.
"Filtering and Sorting Graph Data" on page 1215
See also
User interface elements are described below (unlabeled elements are shown in angle brackets):
Page 1714 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 265:
UI Element Description
Show time ranges based on box
Select one of the display options: l
Suggestions. Lists all transactions and time ranges from the scenario run.
l
SLA Violations. Lists only those transactions and time ranges where the transaction exceeded the SLA. This option does not appear if there were no transactions that exceeded the SLA.
Transaction
Select the transaction to analyze from the Transaction tree.
<Time
Range>
Select the time range to analyze in one of the following ways: l
Select the time range from the Transaction tree.
l
Enter the time range in the From and To boxes above the graph.
l
Select the time range by dragging the bars on the graph.
<Display options>
Settings
Generate report
Select one of the following: l
Running Vusers
l
Throughput
l
Hits per Second
The option you select is displayed on the graph and will appear on the snapshot of the graph that appears on the Transaction Analysis Report. Note that your choice only affects the display of the graph and not the calculation for correlations.
Click Settings to define the Analyze Transaction settings in the Analyze
Transaction Settings dialog box. For more information, see
"Analyze
Transaction Settings Dialog Box" on page 1712
.
Note: You can also define the Analyze Transaction settings in the Analyze
Transaction Settings tab of the Options dialog box (Tools > Options).
The Transaction Analysis Report opens. Once the report has been created, you can access it at any time from the Session Explorer.
Page 1715 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 266:
HTML Report
Analysis enables you to create HTML reports for your load test scenario run. It creates a separate page for each one of the open graphs and reports.
To access
Use one of the following: l
Reports > HTML Report
Relevant tasks
l
Toolbar >
l
Open all graphs that you want to include in the report.
l
Specify a path and file name for the HTML report and click Save. Analysis saves a Summary report which has the same name as the file in the selected folder. The rest of the graphs are saved in a folder with the same name as the Summary report's file name. When you create an HTML report, Analysis opens your default browser and displays the Summary report.
l
To copy the HTML reports to another location, be sure to copy the filename and the folder with the same name. For example, if you named your HTML report test1
, copy test1.htmland the folder test1 to the desired location
User interface elements are described below:
Page 1716 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 266:
UI Element
<Graphs> menu left frame
Description
Click the graph link to view an HTML report for that graph.
You can view an Excel file containing the graph data, by clicking the Graph
data in Excel format button on the relevant graph page.
Page 1717 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 267:
New Report Dialog Box
This dialog box enables you to create a report based on the report template selected. You can adjust the report template settings to generate a report that corresponds to the required report layout.
To access
See also
Reports > New Report
"Report <Templates> Window" on page 1720
"Report Templates General Tab" on page 1722
"Report Templates Format Tab" on page 1724
"Report Templates Content Tab" on page 1726
User interface elements are described below:
UI Element
Based on Template
General tab
Description
Select report template. After a template has been selected, the corresponding settings of the report template appear.
For user interface details, see
"Report Templates
General Tab" on page 1722 .
Page 1718 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 267:
UI Element
Format tab
Content tab
Description
For user interface details, see "Report Templates
Format Tab" on page 1724
.
For user interface details, see
"Report Templates
Content Tab" on page 1726 .
Page 1719 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 268:
Report <Templates> Window
This window enables you to add, modify, import, export, or duplicate a report template.
To access
See also
Reports > Report Templates
"Report Templates Overview " on page 1708
User interface elements are described below:
UI Element
New
Delete
Import
Export
Duplicate
Description
Add a new report template.
Delete the selected template.
Import report template from selected XML file.
Save the selected template as an XML file to a selected folder.
Create a copy of the selected template.
Page 1720 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 268:
Page 1721 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 269:
Report Templates General Tab
This tab enables you to record document details, such as title, author name and title and set global settings, such as Report Time Range and granularity.
Important Information
New Report window has the same components as Report Templates.
See also
"Report Templates Overview " on page 1708
User interface elements are described below:
UI Element
Title
First Name
Surname
Description
A description of the template.
The first name of the person to display on the report.
The last name of the person to display on the report.
Job title
The job title of the person to display on the report.
Organization
The name of the organization to display on the report.
Description
You can enter a description and include details of the report template.
Page 1722 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 269:
UI Element
Report Time
Range
Description
The default setting is Whole Scenario. Click to set the start and end time range of the scenario run time to display on the report.
Granularity
Precision
Include
Think Time
Define granularity settings (in seconds).
The number of digits to appear after the decimal point in none graph content items.
Analysis processes data to include think time. This data is then used to generate reports.
Page 1723 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 270:
Report Templates Format Tab
This tab enables you to define the format of report template.
To access
See also
Reports > Report Templates > Format tab
"Report Templates Overview " on page 1708
User interface elements are described below:
UI Element
General
Page Header and Footer
Description
The General option enables you to: l include a cover page l include table of contents l include company logo
You can customize the header and footer by using the following options: l
Font type, size and color
Page 1724 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 270:
UI Element
Normal Font
Heading 1/2
Table
Description
l
Bold, italicize, or underline l
Right, center or left align l
You can add tags, such as date, name or organization.
l
You can include required details such as page count, date, name, and so forth on the left, center or right column.
Select the type of font to use in the report template.
Create a style for your headings
Format the table using the following options: l
Font type, size and color l
Background color l
Bold, italicize, or underline l
Right, center or left align
Page 1725 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 271:
Report Templates Content Tab
This tab enables you to select the content items to the report and configure each content item accordingly.
To access
See also
Reports > Report Templates > Content tab
"Report Templates Overview " on page 1708
User interface elements are described below:
UI Element
General Details
Executive Summary
Workload
Characteristics
Business Process
Description
Select the session details to display in the report.
Enter a summary in the open text dialog box.
Select the workload details to display in the report. The workload is determined by the number of transactions, running Vusers load and throughput status on the server.
Select script details to display in the report. All the scripts from the scenario are included in the report.
Page 1726 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 271:
UI Element Description
Performance Overview
Select the performance characteristics over the configured elapsed time to display in the report.
Transaction Summary -
Transaction Summary
Configure the settings for load test scenario diagnostics data to display. You can set more than one value for the percentile column.
HTTP Responses
Summary
Analysis Graph
Analysis Graphs
Opened in Session
Define the time range by which to display HTTP status codes returned from the Web server.
Select a graph and configure graph settings to display in the report.
Select the graphs opened in the Analysis session to display in the report.
Define the number of URLs to display of which take the longest time to load. Based on data from the Web Page Diagnostics graph.
Worst Performing
URLs (Web Page
Diagnostics)
Most Resource
Consuming URLs
(Web Page
Diagnostics)
Largest URLs by
Average kbytes (Web
Page Diagnostics)
Worst Performing
Transactions
(J2EE/.NET
Diagnostics)
Worst Performing
Requests (J2EE/.NET
Diagnostics)
Define the number of URLs to display of which take up the most computer resources. Based on data from the Web Page Diagnostics graph.
Define the number of URLs to display of which are the largest in kbytes and take the most server time to load. Based on data from the
Web Page Diagnostics graph.
Define the number of transactions to display of which the response time takes the longest. Based on data from J2EE/.NET Diagnostics graph.
Worst Performing
Transactions (SLA)
Define the number of transactions to display of requests which take the longest to retrieve data. Based on data from J2EE/.NET
Diagnostics graph.
Note: The request does not have to come from the same transaction.
Define the number of worst transactions to display which are above the threshold. This data is based on transactions from Average
Transaction Response Time (SLA).
Status Per Time Range
(SLA)
Shows metrics of SLA status at every time interval. This is relevant to Errors per Second and Average Transaction Response Time
(SLA).
Loadrunner
Terminology
Placeholder Section
The terminology content item includes definitions for terms related to
LoadRunner objects and graph information.
Enter open text dialog.
Add a content item.
Page 1727 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 271:
UI Element
Parameters
Columns
Include workload scheme graph
Filter
Number of worst elements to show
Description
Delete the selected content item.
Move up selected content item.
Move down selected content item.
Enter a title, set granularity and percentile used for the selected content item.
Select the criteria to display in the report for the selected content item.
A workload scheme graph is included in the report.
Define filter conditions for selected content item to display in report.
Shows x of the worst elements on the report.
Page 1728 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 271:
Page 1729 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 272:
SLA Reports
An SLA (Service Level Agreement) defines goals for the load test scenario. LoadRunner measures these goals during the scenario run and analyzes them in the Summary report. The SLA Report shows the succeeded or failed status of all SLAs that were defined for the scenario run. For more information on defining an SLA, see
"SLA Reports" above .
Note: Analysis data (for example, transactions) that has been excluded by the Summary Filter will not be available for analysis in the SLA report.
To access
You create the SLA Report in one of the following ways:
Reports > Analyze SLA
Right-click the Summary pane > Add New Item > Analyze SLA
See also
Summary Report >
"Defining Service Level Agreements " on page 1294
User interface elements are described below:
UI Element
Display of SLA statuses
Description
SLA Status per goal definition
n
Where the SLA was defined over the whole run, the report displays a single SLA status for each goal definition.
SLA status for each transaction per time interval
n
Where the SLA was defined per time interval within the run, the report displays the status of the SLA for each transaction per time interval.
The green squares show time intervals where the transaction performed within the SLA boundary. Red squares where the transaction failed and grey squares show where no relevant SLA was defined.
SLA goal definitions
n
Where the SLA was defined per time interval within the run, a further section appears detailing the goal definitions for the SLA.
Page 1730 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 272:
Page 1731 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 273:
Summary Report
The Summary report provides general information about load test scenario execution. It lists statistics about the scenario run and provides links to the following graphs: Running Vusers,
Throughput, Hits Per Second, HTTP Responses per Second, Transaction Summary, and Average
Transaction Response Time.
To access Session Explorer > Reports > Summary Report
Important information
The Summary report for SAP Diagnostics, J2EE /.NET Diagnostics, and Siebel
Diagnostics provides a usage chart that links to and displays each individual transaction's Web, application, and database layers, and provides the total usage time for each transaction.
Relevant tasks
See also
You can save the Summary reports to an Excel file by selecting View > Export
Summary to Excel or by clicking on the toolbar.
The Summary reports for the various diagnostics environments are discussed in detail in the following sections:
"SAP Diagnostics Summary Report" on page 1780
J2EE & .NET Diagnostics Graphs Summary Report
"Siebel Diagnostics Graphs Summary Report" on page 1749
Summary Report with No SLA
User interface elements are described below:
UI Element Description
Shows the basic details of the load test scenario being analyzed.
Scenario
Details
Statistics
Summary
This section shows a breakdown of the transaction statistics and also provides links to the following: l
The SLA configuration wizard. For more information on defining an SLA, see
"SLA Reports" on page 1730
l
The Analyze Transaction tool. For more information on analyzing transactions, see
"Analyze Transactions Dialog Box" on page 1714
Scenario
Behavior
Over Time
This section displays the average errors per second received by the application under test per time interval. For example, 0 means that on average there were zero errors received per second for that time interval, 0+ means that on average there were slightly more than zero errors received, and so on. Add screen
Transaction
Summary
This section displays a table containing the load test scenario's diagnostics data.
Included in this data is a percentile column (x Percent). This column indicates the maximum response time for that percentage of transactions performed during the
Page 1732 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 273:
UI Element Description
run.
Note: You can change the value in the percentile column in one of the following ways: l
Open the Options dialog box (Tools > Options). Click the General tab and in the Summary Report section enter the desired percentile in the Transaction
Percentile box.
HTTP
Responses
Summary
l
Select View > Summary Filter or click on the toolbar. The Analysis
Summary Filter dialog box opens. In the Additional Settings area enter desired percentile.
This section shows the number of HTTP status codes returned from the Web server during the load test scenario, grouped by status code.
Note: There are additional Diagnostics sections that may appear at the end of the
Summary report, depending on the configuration of your system. For more information, see
"Summary Report" on previous page .
Summary Report with SLA
User interface elements are described below:
UI Element
Scenario details
Description
This section shows the basic details of the load test scenario being analyzed.
Statistics
Summary
This section shows a breakdown of the transaction statistics.
X Worst
Transactions
The X Worst Transactions table shows the worst transactions in terms of how often the transactions exceeded the SLA boundary during the run, and by how much. Click here to see an example of the 5 Worst transactions section of the summary report.
Note: You choose how many transactions are displayed in this table in the Summary
Report section on the General tab of the options dialog box. Open the dialog box
(Tools > Options) and enter the number of transactions to display. The default is 5.
You expand a transaction to get more information. When expanded, the following information appears for each transaction:
This section shows how each transaction performed in terms of the SLA over time intervals. The green squares show time intervals where the transaction performed within the SLA boundary. Red squares show time intervals where the transaction failed and grey squares show where no relevant
SLA was defined. Click here to see an example of the scenario behaviour over time section of the summary report.
Analysis allows you to analyze a specific transaction in more
Page 1733 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 273:
UI Element
Transaction
Summary
Description
Failure Ratio
n
The percentage of time intervals where the transaction exceeded the SLA. You can see this graphically in the Scenario
Behavior Over Time section below.
detail. You open the Analyze
Transaction tool from the
Scenario Behavior Over Time section in one of the following ways:
Failure Value
n
The average percentage by which the transaction exceeded the SLA over the whole run.
Avg exceeding ratio
n
The average percentage by which the transaction exceeded the SLA over a specific time interval. For example, in the first time interval in the screenshot above, the figure is 4.25%. This means that during that time interval, the transaction may have exceeded the
SLA boundary several times, each time by a different percentage margin, the average percentage being 4.25%.
l
Select the transaction to analyze from the list and enter the time interval in the From and To boxes. Then click
Analyze Transaction.
l
Drag the mouse over the desired transaction and time range to analyze. Then click
Analyze Transaction.
For more information on
Transaction Analysis Reports, see
"Analyze Transactions Dialog
Box" on page 1714
.
Max exceeding ratio
n
The highest percentage by which the transaction exceeded the SLA over a specific time interval. For example, using the same time interval as above, the transaction may have exceeded the
SLA several times, each time by a different percentage margin. The highest percentage being 7.39%
Note: The time intervals displayed in the Scenario
Behavior Over Time section may vary for each interval. The time interval set in the tracking period of the SLAis only the minimum time interval that will be displayed.
It is only the display that varies.
The SLA is still determined over the time interval you choose in the
Advanced Settings section.
Analysis allows you to analyze a specific transaction in more detail. You open the
Analyze Transaction tool from this section by clicking the Analyze Transaction button. For more information on
Transaction Analysis Reports, see
"Analyze Transactions Dialog Box" on page 1714 .
This section displays a table containing the load test scenario's diagnostics data.
Included in this data is a percentile column
(x Percent). This column indicates the
Page 1734 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 273:
UI Element
HTTP
Responses
Summary
Description
maximum response time for that percentage of transactions performed during the run. For example, in the table below, the value in the
88 Percent column for browse special
books is 8.072. This means that the response time for 88% of the browse
special bo. oks transactions was less that
8.072 seconds. Click here to see an example of a Transaction Summary.
Note: You can change the value in the percentile column in the Summary Report section of the General tab of the Options dialog box. Open the dialog box (Tools >
Options) and enter the desired percentage.
Alternatively, you can also change the value in the Summary Filter (View > Summary
Filter) .
This section shows the number of HTTP status codes returned from the Web server during the load test scenario, grouped by status code.
Note: There are additional Diagnostics sections that may appear at the end of the
Summary report, depending on the configuration of your system. For more information, see
"Summary Report" on page
1732
.
Summary reports for Cross Result Graphs
User interface elements are described below:
UI
Element
Description
<graphs>
Displays summary information for the scenarios that you are comparing. The information is displayed in a way that enables you to compare data from the different scenarios. Includes the same type of information as the regular Summary report except for the following: l
SLA information l
Diagnostics information l
Scenario behavior over time
Page 1735 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 274:
Transaction Analysis Report
This report enables you to individually examine each of the transactions from the load test scenario run.
To access Reports > Analyze Transaction > Generate report button
User interface elements are described below:
UI Element Description
Observations
This section shows both positive and negative correlations between the graph of the transaction being analyzed, and other graphs based on the settings you chose in the Analyze Transaction Dialog Box. When two graphs are correlated, it means that their behavior matches each other by a certain percentage.
To view the correlating graph, select one of the results and then click the
View Graph icon at the bottom of the section. The graph comparison opens.
Errors
Observation
Settings
Graph
You can return to the Transaction Analysis Report from the graph comparison at anytime by clicking the Back to <transaction name> icon on the toolbar.
Note: The correlations are automatically calculated according to a default ratio of 20%. You can adjust this ratio by clicking the arrows next to the percentage.
Then click Recalculate.
This section is divided into two sub-sections.
l
Application Under Test errors. Shows errors that occurred during the transaction that were direct results of Vuser activity.
l
All errors. Shows Application Under Test errors as well as errors that were not related to Vuser activity, and which affected your system and not the application under test.
This section displays a summary of the settings that were selected in the
Advanced Settings section of the Analyze Transaction dialog box.
The Graph section displays a snapshot of selected transaction and time range for analysis merged with the display option you selected (Running Vusers,
Throughput, or Hits per Second). Note that it is only a snapshot and can not be manipulated like normal graphs.
Page 1736 of 1812 HP LoadRunner (11.50)
User Guide
Chapter 274:
Page 1737 of 1812 HP LoadRunner (11.50)
User Guide
Working with Diagnostics
Siebel Diagnostics Graphs
Siebel Diagnostics Graphs Overview
Siebel Diagnostics graphs enable you to trace, time, and troubleshoot individual transactions through Web, application, and database servers.
To analyze where problems are occurring, you correlate the data in the Siebel Diagnostics graphs with data in the Transaction Response Time graphs.
You begin analyzing these graphs with the transaction graphs that display the average transaction response time during each second of the load test scenario run. For example, the following Average
Transaction Response Time graph demonstrates that the average transaction response time for the
Action_Transaction transaction was high.
Using the Siebel Diagnostics graphs, you can pinpoint the cause of the delay in response time for this transaction.
Alternatively, you can use the Summary Report to view individual transactions broken down into
Web, application, and database layers, and the total usage time for each transaction. For more information, see
"Siebel Diagnostics Graphs Summary Report" on page 1749 .
Page 1738 of 1812 HP LoadRunner (11.50)
User Guide
Note: A measurement that is broken down in the Average Transaction Response Time graph will be different from the same measurement broken down in the Siebel Diagnostics graph.
This is because the Average Transaction Response Time graph displays the average transaction response time, whereas the Siebel Diagnostics graph displays the average time per transaction event (sum of Siebel Area response time).
How to Enable Siebel Diagnostics
To generate Siebel diagnostics data, you must first install the ERP/CRM Mediator (Mediator). For information on installing the Mediator, refer to the HP LoadRunner Installation Guide.
The Mediator is used to gather and correlate offline diagnostics data from the Siebel server. The
Mediator processes the diagnostics data, and then passes it to the Controller.
Note: The Mediator must reside in the same LAN as the Siebel server.
To obtain diagnostics data for these graphs, you need to set up the Siebel Diagnostics module before running the scenario, and specify the sampling percentage of diagnostics data to include in the diagnostics graphs. For more information on configuring Siebel Diagnostics, refer to the HP
LoadRunner Controller User Guide.
l
The settings that you configure are per scenario. All scripts in the scenario will run under the same diagnostics configuration.
l
To ensure that valid diagnostics data is generated, manually define the transactions in the Vuser script rather than using automatic transactions. Make sure to disable the following options in the
Run-Time Settings' General : Miscellaneous node: Define each action as a transaction and
Define each step as a transaction.
Call Stack Statistics Window
This window enables you to view which components called the selected component.
Page 1739 of 1812 HP LoadRunner (11.50)
User Guide
To access
Analysis window > <Siebel> graph > right click sub-area and select
Siebel Diagnostics > Show Sub-Area Call Stack Statistics
"Siebel Diagnostics Graphs Overview" on page 1738
See also
User interface elements are described below:
UI Element
Measurement
% of Root Sub-Area
No. of Calls to Root
Avg Time Spent in Root
Description
Name of the sub-area, displayed as
AreaName:SubAreaName. In the case of a database call, query information is also displayed. The percent shown indicates the percentage of calls to this component from its child.
Displays the percentage of sub-area time in relation the total root sub-area time.
Displays the amount of times this transaction or sub-area was executed.
Time spent in root is the time that the sub-area spent in the root sub-area/area/transaction.
Average Time Spent in Root time is the total time spent in the root divided by the number of instances of the sub-area.
Page 1740 of 1812 HP LoadRunner (11.50)
User Guide
UI Element
STD Time Spent in Root
Min Time Spent in Root
Max Time Spent in Root
% of Called
Total Time Spent in Root
Save to XML File
Properties
SQL Query
Description
The standard deviation time spent in the root.
The minimum time spent in the root.
The maximum time spent in the root.
Displays the percentage of sub-area time in relation the child sub-area time.
Displays the total sub-area execution time, including the child execution time.
Expand All. Expands the entire tree.
Collapse All. Collapses the entire tree.
Expand Worst Path. Expands only the parts of the path on the critical path.
Saves the tree data to an XML file.
Properties Area. Displays the full properties of the selected sub-area.
SQL Query. Displays the SQL query for the selected subarea (For Database only).
Chain of Calls Window
This window enables you to view the components that the selected transaction or sub-area called.
The following figure shows all the calls in the critical path of the parent Action_Transaction serverside transaction are displayed.
Page 1741 of 1812 HP LoadRunner (11.50)
User Guide
To access
Use one of the following: l
To view transaction call chains - right click a component and select
Siebel Diagnostics > Show Chain of Calls
l
To view sub-area statistics - right click sub-area and select Show
Sub-Area Chain of Calls
Each red node signifies the most time consuming child to its parent.
Note
User interface elements are described below:
UI Element Description
Switch to Sub-Area Chain of Calls. When the sub-area call stack statistics data is displayed, this displays the sub-area chain of calls data (only if the root is a sub-area).
Switch to Sub-Area Call Stack Statistics. When the sub-area chain of calls data is displayed, this displays the sub-area call stack statistics data (only if the root is a sub-area).
Show Sub-Area Chain of Calls. Displays the Sub-Area Chain of Calls window.
Show Sub-Area Call Stack Statistics. Displays the Sub-Area Call Stack
Statistics window.
Properties. Hides or displays the properties area (lower pane).
Columns. Enables you to select the columns shown in the Calls window. To
Page 1742 of 1812 HP LoadRunner (11.50)
User Guide
UI Element Description
display additional fields, drag them to the desired location in the Calls window.
To remove fields, drag them from the Calls window back to the Columns chooser.
Measurement
Name of the sub-area, displayed as AreaName:SubAreaName. In the case of a database call, query information is also displayed. The percent shown indicates the percentage of calls to this component from its parent.
% of
Transaction/
Root Sub-
Area
Displays the percentage of sub-area time in relation the total transaction/root sub-area time.
No of Calls
Displays the amount of times this transaction or sub-area was executed.
Avg
Response
Time
STD
Response
Time
Response time is the time from the beginning of execution until the end.
Average response time is the total response time divided by the number of instances of the area/sub-area.
The standard deviation response time.
Min
Response
Time
Max
Response
Time
% of Caller
Total time
The minimum response time.
The maximum response time.
Displays the percentage of sub-area time in relation the parent sub-area time.
Displays the total sub-area execution time, including the child execution time.
Siebel Area Average Response Time Graph
This graph displays the average response time for the server side areas, computed as the total area response time divided by the number of area calls.
Purpose
X-axis
Y-axis
For example, if an area was executed twice by one instance of transaction A, and once by another instance of the same transaction, and it took three seconds for each execution, then the average response time is 9/3, or 3 seconds. The area time does not include calls made from the area to other areas.
Elapsed time since the start of the run.
Average response time (in seconds) per area.
Page 1743 of 1812 HP LoadRunner (11.50)
User Guide
Breakdown options
For breakdown options, see
"Siebel Breakdown Levels" on page 1746 .
Tips
See also
You can filter the Siebel graphs by the following fields: l
Transaction Name. Shows data for the specified transaction.
l
Scenario Elapsed Time. Shows data for transactions that ended during the specified time.
For more information on filtering, see
"Filtering and Sorting Graph Data" on page
1215 .
"Siebel Breakdown Levels" on page 1746
Example
Siebel Area Call Count Graph
This graph displays the number of times that each Siebel area is called.
X-axis
Y-axis
Breakdown options
Tips
Elapsed time since the start of the run.
The call count.
For breakdown options, see
"Siebel
Breakdown Levels" on page 1746 .
You can filter the Siebel graphs by the following fields:
Page 1744 of 1812 HP LoadRunner (11.50)
User Guide
See also
l
Transaction Name. Shows data for the specified transaction.
l
Scenario Elapsed Time. Shows data for transactions that ended during the specified time.
For more information on filtering, see
"Filtering and Sorting Graph Data" on page
1215
.
"Siebel Diagnostics Graphs Overview" on page 1738
Siebel Area Total Response Time Graph
This graph displays the total response time of each Siebel area.
X-axis
Y-axis
Breakdown options
Tips
Elapsed time since the start of the run.
Average response time (in seconds) per area.
For breakdown options, see
"Siebel Breakdown Levels" on next page
.
See also
You can filter the Siebel graphs by the following fields: l
Transaction Name. Shows data for the specified transaction.
l
Scenario Elapsed Time. Shows data for transactions that ended during the specified time.
For more information on filtering, see
"Filtering and Sorting Graph Data" on page 1215
.
"Siebel Diagnostics Graphs Overview" on page 1738
Page 1745 of 1812 HP LoadRunner (11.50)
User Guide
Example
Siebel Breakdown Levels
You can break down Siebel layers into areas, sub-areas, servers, and scripts to enable you to pinpoint the exact location where time is consumed.
To access
Important Information
See also
Use one of the followingto access breakdown options: l
<Siebel Diagnostics Graphs> > View > Siebel
Diagnostics
l
<Siebel Diagnostics Graphs> > select transaction > short-cut menu > Siebel Diagnostics l
See toolbar options for each breakdown level
The breakdown menu options and buttons are not displayed until an element (transaction, layer, area, sub-area) is selected.
"Siebel Diagnostics Graphs Overview" on page 1738
Siebel Breakdown Levels are described below:
Transaction
Level
The following figure displays the top level Average Transaction Response Time graph. The graph displays several transactions..
Page 1746 of 1812 HP LoadRunner (11.50)
User Guide
Layer Level
Siebel Layer Breakdown button shows the breakdown of the selected transaction.
Undo Siebel Layer Breakdown returns the graph to the transaction level.
In the following figure, the Action_Transaction transaction has been broken down to its layers
(Siebel Database, Application, and Web).
Area Level
Siebel Area Breakdown button breaks the data down to its Siebel areas.
Undo Siebel Area Breakdown button returns the graph to the layer level.
Page 1747 of 1812 HP LoadRunner (11.50)
User Guide
In the following figure, the Web layer of the Action_Transaction transaction has been broken down to its Siebel areas. .
Script
Level
Sub-Area
Level
Siebel Script Breakdown button breaks the data down to its Siebel scripts. You can only break down to the script level from the scripting engine area.
Undo Siebel Script Breakdown button returns the graph to the sub-area level.
You can break a transaction down further to its Siebel script level. You can only break down to the script level from the scripting engine area.
Siebel Sub-Area Breakdown button breaks the data down to its Siebel sub-areas. You can only break down to the sub-area level from the area level.
Undo Siebel Sub-Area Breakdown button returns the graph to the area level.
In the following figure, the area level of the Action_Transaction transaction has been broken down to its Siebel sub-area.
Server
Level
Siebel Server Breakdown button to group the data by Siebel server.
Page 1748 of 1812 HP LoadRunner (11.50)
User Guide
Undo Siebel Server Breakdown button ungroups data in the graph.
In the following figure, the Action_Transaction;WebServer:SWSE:Receive Request transaction has been broken down to its Siebel servers. Server level breakdown is usual for pin pointing overloaded servers and for load balancing.
See also
"Siebel Diagnostics Graphs Overview" on page 1738
Siebel Diagnostics Graphs Summary Report
The Siebel Usage section of the Summary Report provides a usage chart for the Siebel layer breakdown. This report is available from the Session Explorer or as a tab in the Analysis window.
Breakdown options
The Siebel Layer Usage section breaks the individual transactions into: l
Web Server l
Siebel Server l
Database Layers l
Total usage time for each transaction
Tips
Note
See also
To view server side diagnostics data from the Summary Report, click the Siebel layer on which you want to perform transaction breakdown. The Siebel
Transaction Response Time graph opens displaying the breakdown of the selected transaction.
If you do not see diagnostics data on the Summary Report, check if you are using a user-defined template. To view relevant data, choose a different template from the list of templates, or create and apply a new template. For more information about using templates, see
"Template Dialog Box" on page 1214
.
"Siebel Diagnostics Graphs Overview" on page 1738
Siebel Request Average Response Time Graph
This graph displays the response time per HTTP request.
Page 1749 of 1812 HP LoadRunner (11.50)
User Guide
Purpose
See also
The time is computed as the total request response time divided by the total number of instances of the specific request. For example, if a request was executed twice by one instance of transaction A, and once by a second instance of transaction A, and it took three seconds to execute each request, then the average response time is 9/3, or 3 seconds. The request time does not include the nested calls from within each request.
Elapsed time since the start of the run.
X-axis
Y-axis
Average response time (in seconds) per area.
Breakdown options
For breakdown options, see
"Siebel Breakdown Levels" on page 1746 .
Tips
You can filter the Siebel graphs by the following fields: l
Transaction Name. Shows data for the specified transaction.
l
Scenario Elapsed Time. Shows data for transactions that ended during the specified time.
For more information on filtering, see
"Filtering and Sorting Graph Data" on page
1215 .
"Siebel Diagnostics Graphs Overview" on page 1738
Example
Page 1750 of 1812 HP LoadRunner (11.50)
User Guide
Siebel Transaction Average Response Time Graph
This graph displays the server response time for the selected area (layer, area, or sub-area) within each transaction, computed as the total response time for that layer or area divided by the total number of relevant transactions.
X-axis
Y-axis
Breakdown options
Tips
See also
Elapsed time since the start of the run.
Average response time (in seconds) per area.
For breakdown options, see
"Siebel
Breakdown Levels" on page 1746
.
You can filter the Siebel graphs by the following fields: l
Transaction Name. Shows data for the specified transaction.
l
Scenario Elapsed Time. Shows data for transactions that ended during the specified time.
For more information on filtering, see
"Filtering and Sorting Graph Data" on page 1215 .
"Siebel Breakdown Levels" on page 1746
Example
Page 1751 of 1812 HP LoadRunner (11.50)
User Guide
Siebel DB Diagnostics Graphs
Siebel DB Diagnostics Graphs Overview
Siebel DB Diagnostics graphs provide you with performance information for SQLs generated by transactions on the Siebel system. You can view the SQLs for each transaction, identify the problematic SQL queries of each script, and identify at what point problems occurred.
To analyze where problems are occurring, you correlate the data in the Siebel DB Diagnostics graphs with data in the Transaction Response Time graphs.
You begin analyzing these graphs with the transaction graphs that display the average transaction response time during each second of the load test scenario run. For example, the following Average
Transaction Response Time graph demonstrates that the average transaction response time for the
query_for_contact transaction was high.
Using the Siebel DB Diagnostics graphs, you can pinpoint the cause of the delay in response time for this transaction.
Note: A measurement that is broken down in the Average Transaction Response Time graph will be different from the same measurement broken down in the Siebel DB Side Transactions graph. This is because the Average Transaction Response Time graph displays the average transaction time, whereas the Siebel DB Side Transactions graph displays the average time
Page 1752 of 1812 HP LoadRunner (11.50)
User Guide
per transaction event (sum of SQL component response times).
How to Enable Siebel DB Diagnostics
To generate Siebel DB diagnostics data, you must first install the ERP/CRM Mediator. For information on installing the Mediator, refer to the HP LoadRunner Installation Guide.
The Mediator is used to gather and correlate offline diagnostics data from the Siebel server. The
Mediator processes the diagnostics data, and then passes it to the Controller.
Note: The Mediator must reside in the same LAN as the Siebel server.
To obtain diagnostics data for these graphs, you need to set up the Siebel DB Diagnostics module before running the scenario, and specify the sampling percentage of diagnostics data to include in the diagnostics graphs. For more information on configuring Siebel DB Diagnostics, refer to the HP
LoadRunner Controller User Guide.
Note:
l
You should not use the Data Time Range feature (Tools > Options > Result Collection >
Data Time Range) when analyzing Siebel DB Diagnostics graphs since the data may be incomplete.
l
The settings that you configure are per scenario. All scripts in the scenario will run under the same diagnostics configuration.
l
To ensure that valid diagnostics data is generated, manually define the transactions in the
Vuser script rather than using automatic transactions. Make sure to disable the following options in the Run-Time Settings' General : Miscellaneous node: Define each action as
a transaction and Define each step as a transaction.
How to Synchronize Siebel Clock Settings
This task describes how to synchronize the Load Generator and Siebel application server clocks to ensure that the correlation of SQLs to transactions is correct.
1. Choose Tools > Siebel Database Diagnostics Options.
2. Select Apply Application Server time settings.
3. Click Add and enter the information as described in
"Siebel Database Diagnostics Options
Dialog Box " on page 1757
.
4. Click OK to save the data and close the dialog box.
Note: You must reopen the results file for time synchronization to take effect.
Page 1753 of 1812 HP LoadRunner (11.50)
User Guide
Measurement Description Dialog Box
You can view the full SQL statement for a selected SQL element by choosing Show measurement
description from the Legend window. The Measurement Description dialog box opens displaying the name of the selected measurement and the full SQL statement.
To access
See also
Legend window >
"Siebel Database Breakdown Levels" on next page
User interface elements are described below:
UI Element Description
Break the data down to a lower level.
Return to the previous level.
To keep the focus on the Measurement Description dialog box, click the
Stay on Top button. This enables you to view the full SQL statement of any measurement by selecting it in the Legend window. Click the button again to remove the focus.
Click the Breaking Measurement button to display the Transaction Name and SQL Alias Name of the selected measurement.
Page 1754 of 1812 HP LoadRunner (11.50)
User Guide
Siebel Database Breakdown Levels
You can break down Siebel layers into areas, sub-areas, servers, and scripts to enable you to pinpoint the exact location where time is consumed.
To access
Important information
Use one of the followingto access breakdown options: l
<Siebel DB Diagnostics Graphs> > View > Siebel DB
Diagnostics
l
<Siebel DB Diagnostics Graphs> > select transaction > short-cut menu > Siebel DB Diagnostics l
See toolbar options for each breakdown level
The breakdown menu options and buttons are not displayed until a transaction is selected.
"Siebel DB Diagnostics Graphs Overview" on page 1752
See also
Siebel Breakdown Levels are described below:
Transaction
Level
The following figure displays the top level Average Transaction Response Time graph. The graph displays several transactions. You can break this graph down to show the SQL statements and the SQL stages level.
SQL
Statements
Level
Siebel SQL Statements Breakdown button shows the breakdown of the selected transaction.
In the following figure, the Siebel DB Side Transactions graph displays the
Action_Transaction broken down to its SQL statements.
Page 1755 of 1812 HP LoadRunner (11.50)
User Guide
SQL Stages
Level
Measurement Breakdown button breaks the data down to a lower level.
Undo Breakdown Measurement button returns to the previous level.
In the following figure, the Siebel DB Side Transactions by SQL Stage graph displays Action_Transaction:SQL-33 broken down to its SQL stage: Prepare,
Execute, and Initial Fetch.
Show measurement description
You can view the full SQL statement for a selected SQL element by choosing
Show measurement description from the Legend window. The Measurement
Description dialog box opens displaying the name of the selected measurement and the full SQL statement.
Page 1756 of 1812 HP LoadRunner (11.50)
User Guide
See also
"Siebel DB Diagnostics Graphs Overview" on page 1752
Siebel Database Diagnostics Options Dialog Box
This dialog box enables you to synchronize the Load Generator and Siebel application server clocks.
To access
Note
See also
Tools > Siebel Database Diagnostics Options
You must reopen the results file for time synchronization to take effect.
"How to Synchronize Siebel Clock Settings " on page 1753
User interface elements are described below:
Page 1757 of 1812 HP LoadRunner (11.50)
User Guide
UI Element Description
Apply
Application
Server time settings
Enables the synchronized time settings option.
Application
Server
Name
Enter the name of the Siebel application server.
Time Zone
Enter the time zone of the Siebel application server (GMT or Local). GMT means the application server time is reported in GMT time, and local means the application server time is reported in local time.
Time
Difference
(sec.)
Enter the time difference (in seconds) between the load generator and the Siebel application server. Use the minus sign ("-") if the time on Siebel application server is ahead of the load generator. For example, if the application server time is two minutes ahead of the load generator time, enter -120 in the time difference field.
Add
Enables you to add an application server's time settings to the list.
Delete
Deletes the server breakdown time settings from the list.
Siebel DB Side Transactions Graph
This graph displays the average transaction execution time in the Siebel database.
X-axis
Y-axis
Elapsed time since the start of the run.
Average response time (in seconds) of each transaction.
Breakdown options
You can break down a transaction in the Siebel DB Side Transactions graph to view its SQL statements. In the following figure, the Action_Transaction transaction is broken down to its SQL statements.
Page 1758 of 1812 HP LoadRunner (11.50)
User Guide
See also
"Siebel DB Diagnostics Graphs Overview" on page 1752
Siebel DB Side Transactions by SQL Stage Graph
This graph displays the time taken by each SQL, grouped by SQL stage: Prepare, Execute, and
Initial Fetch.
X-axis
Y-axis
Breakdown options
See also
Elapsed time since the start of the run.
Average time (in seconds) taken to perform each SQL stage.
"Siebel Database Breakdown Levels" on page 1755
"Siebel DB Diagnostics Graphs Overview" on page 1752
Siebel SQL Average Execution Time Graph
This graph displays the average execution time of each SQL performed in the Siebel database.
Purpose
X-axis
This enables you to identify problematic SQLs regardless of the transaction that produced them. You can then choose Show measurement description from the
Legend window to view the full SQL statement. The SQL statements are listed by a numeric ID.
Elapsed time since the start of the run.
Y-axis
Average response time (in seconds) of each SQL.
Breakdown options
"Siebel Database Breakdown Levels" on page 1755
Page 1759 of 1812 HP LoadRunner (11.50)
User Guide
See also
"Siebel DB Diagnostics Graphs Overview" on page 1752
Oracle 11i Diagnostics Graphs
Oracle 11i Diagnostics Graphs Overview
Oracle 11i Diagnostics graphs provide you with performance information for SQLs generated by transactions on the Oracle NCA system. You can view the SQLs for each transaction, identify the problematic SQL queries of each script, and identify at what point problems occurred.
To analyze where problems are occurring, you correlate the data in the Oracle 11i Diagnostics graphs with data in the Transaction Response Time graphs.
You begin analyzing these graphs with the transaction graphs that display the average transaction response time during each second of the load test scenario run. For example, the following Average
Transaction Response Time graph demonstrates that the average transaction response time for the
enter transaction was high.
Using the Oracle 11i Diagnostics graphs, you can pinpoint the cause of the delay in response time for this transaction.
Note:
Page 1760 of 1812 HP LoadRunner (11.50)
User Guide
l
A measurement that is broken down in the Average Transaction Response Time graph will be different from the same measurement broken down in the Oracle 11i(DB) Side
Transactions graph. This is because the Average Transaction Response Time graph displays the average transaction time, whereas the Oracle 11iDB Side Transactions graph displays the average time per transaction event (sum of SQL component response times).
l
vuser_init and vuser_end actions in Oracle cannot be broken down. For more information, refer to the HP Virtual User Generator User Guide.
How to Enable Oracle 11i Diagnostics
To generate Oracle 11i Diagnostics data, you must first install the ERP/CRM Mediator. For information on installing the Mediator, refer to the HP LoadRunner Installation Guide.
The Mediator is used to gather and correlate offline diagnostics data from the Oracle server. The
Mediator processes the diagnostics data, and then passes it to the Controller.
Note: The Mediator must reside in the same LAN as the Oracle server.
To obtain diagnostics data for these graphs, you need to set up the Oracle 11i Diagnostics module before running the scenario, and specify the sampling percentage of diagnostics data to include in the diagnostics graphs. For more information on configuring Oracle 11i Diagnostics, refer to the HP
LoadRunner Controller User Guide.
Note:
l
The settings that you configure are per scenario. All scripts in the scenario will run under the same diagnostics configuration.
l
To ensure that valid diagnostics data is generated, manually define the transactions in the
Vuser script rather than using automatic transactions. Make sure to disable the following options in the Run-Time Settings' General : Miscellaneous node: Define each action as
a transaction and Define each step as a transaction.
l
If the Oracle 11i trace cannot be enabled automatically using the built-in mechanism, you can enable it manually in the Vuser script using the nca_set_custom_dbtrace and nca_
set_dbtrace_file_index functions. This may occur if you are using a custom application that does not have a standard UI.
l
You should not use the Data Time Range feature (Tools > Options > Result Collection >
Data Time Range) when analyzing Oracle 11i Diagnostics graphs since the data may be incomplete.
Measurement Description Dialog Box
This dialog box enables you to view the full SQL statement for a selected SQL element.
Page 1761 of 1812 HP LoadRunner (11.50)
User Guide
To access
See also
Legend window > l
"Oracle 11i Diagnostics Graphs Overview " on page 1760
l
"Oracle Breakdown Levels " below
User interface elements are described below:
UI Element Description
To keep the focus on the Measurement Description dialog box, click the
Stay on Top button. This enables you to view the full SQL statement of any measurement by selecting it in the Legend window. Click the button again to remove the focus.
Click the Breaking Measurement button to display the Transaction Name and SQL Alias Name of the selected measurement.
Oracle Breakdown Levels
After you have enabled Oracle 11i Diagnostics on the Controller machine and run the load test scenario, you can view the diagnostics data.
To access
Important Information
See also
Use one of the following to access breakdown options: l
<Oracle Diagnostics Graphs> > View > Oracle
Diagnostics
l
<Oracle Diagnostics Graphs> > select transaction > shortcut menu > Oracle Diagnostics l
See toolbar options for each breakdown level
The breakdown menu options and buttons are not displayed until a transaction is selected.
"Oracle 11i Diagnostics Graphs Overview " on page 1760
Page 1762 of 1812 HP LoadRunner (11.50)
User Guide
Oracle Breakdown Levels are described below:
Transaction
Level
The following figure illustrates the top level Average Transaction Response Time graph. The graph displays several transactions.
SQL
Statements
Level
Oracle SQL Statement Breakdown button shows the breakdown of the selected transaction.
In the following figure, the Oracle 11iDB Side Transactions graph displays the
Action_Transaction transaction broken down to its SQL statements.
SQL Stages
Level
In the following figure, the Oracle 11iDB Side Transactions by SQL Stage graph
Page 1763 of 1812 HP LoadRunner (11.50)
User Guide
displays Action_Transaction:SQL-37 broken down to its SQL stages: Parse
Time, Execute Time, Fetch Time, and Other Time. Other Time includes other database time such as bind time.
You can break the data down to a lower level.
Enables you to return to a previous level.
Oracle 11iDB Side Transactions Graph
This graph displays the average transaction execution time in the Oracle database.
X-axis
Y-axis
Elapsed time of the scenario run.
Response time (in seconds) of each transaction.
Breakdown options
You can break down a transaction in the Oracle 11iDB Side Transactions graph to view its SQL statements. In the following figure, the Action_Transaction transaction is broken down to its SQL statements.
Page 1764 of 1812 HP LoadRunner (11.50)
User Guide
See also
To break the displayed elements down further, see
"Oracle Breakdown Levels " on page 1762 .
"Oracle 11i Diagnostics Graphs Overview " on page 1760
Oracle 11iDB Side Transactions by SQL Stage Graph
This graph displays the time taken by each SQL, divided by the SQL stages: Parse Time, Execute
Time, Fetch Time, and Other Time. Other Time includes other database time such as bind time.
X-axis
Y-axis
Breakdown options
See also
Elapsed time since the scenario run.
Average response time (in seconds) of each SQL stage.
"Oracle Breakdown Levels " on page 1762
"Oracle 11i Diagnostics Graphs Overview " on page 1760
Oracle 11i SQL Average Execution Time Graph
This graph displays the average execution time of each SQL performed in the Oracle database.
Purpose
X-axis
Y-axis
The graph enables you to identify problematic SQLs regardless of the transaction that produced them.
Elapsed time since the scenario run.
Average response time (in seconds) of each SQL.
Page 1765 of 1812 HP LoadRunner (11.50)
User Guide
Breakdown options
Tips
"Oracle Breakdown Levels " on page 1762
Note
See also
You can select Show measurement description from the Legend window to view the full SQL statement.
The SQL statements are shortened to a numeric indicator.
"Oracle 11i Diagnostics Graphs Overview " on page 1760
SAP Diagnostics Graphs
How to Enable SAP Diagnostics
To generate SAP diagnostics data, you must first install the ERP/CRM Mediator. For information on installing the Mediator, refer to the HP LoadRunner Installation Guide.
The Mediator component is used to gather and correlate offline diagnostics data from the SAP server. The Mediator processes the diagnostics data, and then passes it to the Controller.
To obtain diagnostics data for these graphs, you need to set up the SAP Diagnostics module before running the load test scenario, and specify the sampling percentage of diagnostics data to include in the diagnostics graphs. For more information on configuring SAP Diagnostics, refer to the HP
LoadRunner Controller User's Guide.
Important Notes l
In order for SAP Diagnostics to perform effectively, it relies on sound and consistent performance of the SAP software. Malformation or inappropriate configuration of the SAP software could cause inaccuracies in SAP Diagnostics data collection.
l
To ensure that valid diagnostics data is generated, manually define the transactions in the Vuser script rather than using automatic transactions. Make sure to disable the following options in the
Run-Time Settings' General: Miscellaneous node: Define each action as a transaction and
Define each step as a transaction.
l
The ERP/CRM Mediator requires an installation of SAPGUI 6.20 or 6.40.
l
If no connection can be established between the ERP/CRM Mediator and one of the SAP application servers, no work process or OS monitor data is collected for that server. However, as long as there is a connection to one of the servers, statistical records for response time breakdown are still available.
l
The settings that you configure are per scenario. All scripts in the scenario will run under the same diagnostics configuration.
How to Configure SAP Alerts
SAP Diagnostics comes with a set of alert rules with pre-defined threshold values.
When you open a LoadRunner results file (.lrr) in Analysis, these alert rules are applied to the load test scenario results, and if a threshold value is exceeded, Analysis generates an alert that there is a problem.
Page 1766 of 1812 HP LoadRunner (11.50)
User Guide
Before opening a LoadRunner results file, you can define new threshold values for the alert rules using the Alerts Configuration dialog box. Then, when you open the results file, the customized alert rules are applied.
Note: When an Analysis session is open, the Alerts Configuration dialog box is not editable.
To edit thresholds in the Alerts Configuration dialog box, close all open sessions.
This task describes how to define threshold values for alert rules when analyzing load test scenario results.
1. Close all open Analysis sessions.
2. From the Tools menu, select SAP Diagnostics Alerts Configuration.
3. The Generate alert if column lists the rules. Set the threshold for each rule in the Threshold column.
4. By default, all pre-defined alert rules are enabled. To disable an alert rule, clear the check box next to that rule.
5. Click OK to apply your changes and close the Alerts Configuration dialog box.
Note: Modifying the alert rules does not affect the results of a saved Analysis session. You need to re-analyze the results in order for new settings to take effect.
SAP Diagnostics - Guided Flow Tab
You open the SAP Diagnostics graphs from the Analysis Summary Report or from Session
Explorer > Graphs > SAP Diagnostics - Guided Flow.
This tab remains open throughout the Analysis application flow, and its content varies according to the breakdown flow.
Page 1767 of 1812 HP LoadRunner (11.50)
User Guide
User interface elements are described below:
Description UI
Element
Primary
Graph
Pane
The upper pane of the SAP Diagnostics - Guided Flow tab is referred to as the
primary graph pane. This pane displays graphs of the transactions and their broken down dialog steps or components, and other associated resources.
You break down the graphs displayed in this pane using the breakdown options provided in the right pane of the guided flow (see
"SAP Breakdown Task Pane" on page 1775
).
You can open the displayed graph in full view by clicking the Enlarge Graph button in the top right corner of this pane. An enlarged version of the graph opens in a new tab.
Page 1768 of 1812 HP LoadRunner (11.50)
User Guide
UI
Element
Description
Secondary
Graph
Pane
The lower pane of the SAP Diagnostics - Guided Flow tab is referred to as the
secondary graph pane and displays graphs showing secondary information supporting the graph displayed in the primary graph pane.
To see the legend for the graph displayed in this pane, click the Graph Legend button in the top right corner. To see all the data in the Legend, scroll along the horizontal scroll bar.
You can open the displayed graph in full view by clicking the Enlarge Graph button in the top right corner of this pane. An enlarged version of the graph opens in a new tab.
Task Pane
The pane on the right side of the SAP Diagnostics - Guided Flow tab is referred to as the task pane. You use the task pane to choose the level of breakdown you want to view, to filter and group transaction and server information, and to navigate backwards and forwards through the broken down graphs.
For more information, see
"SAP Breakdown Task Pane" on page 1775 .
Application Flow
The following diagram depicts the general flow of SAP Diagnostics:
The main view of SAP Diagnostics displays all of the transactions in a scenario run for which there is SAP diagnostics data. Each transaction can be broken down into server-time components, or
Page 1769 of 1812 HP LoadRunner (11.50)
User Guide
first into the dialog steps that comprise a transaction, and then into server-time components. The server components can further be broken down into sub-components or other related data.
There are three independent/parallel views: Dialog Steps per Second, OS Monitor, and Work
Processes. These do not generally participate in the breakdown flow, and you may choose to display or hide them.
Dialog Steps per Second Graph
This graph represents the number of dialog steps that ran on all the servers during each second of the load test scenario run.
X-axis
Y-axis
See also
Elapsed scenario time (in hh:mm:ss).
Number of dialog steps per second.
"SAP Breakdown Task Pane" on page 1775
"Vuser Graphs" on page 1394
"Work Processes Graph " on page 1782
"OS Monitor Graph " below
Example
OS Monitor Graph
This graph represents the operating system resources that were measured throughout the load test scenario run.
X-axis
Y-axis
Note
See also
Elapsed scenario time (in hh:mm:ss).
Resource value.
This graph is available only when a single server filter is applied.
"SAP Breakdown Task Pane" on page 1775
"Dialog Steps per Second Graph " above
"Work Processes Graph " on page 1782
Page 1770 of 1812 HP LoadRunner (11.50)
User Guide
Example
SAP Alerts Configuration Dialog box
This dialog box enables you to define threshold values for alert rules used when opening the results file (.lrr) in Analysis.
Important information
Modifying the alert rules does not affect the results of a saved
Analysis session. You need to re-analyze the results in order for new settings to take effect.
"SAP Diagnostics Graphs Overview" on page 1
See also
User interface elements are described below:
UI Element
Enabled
Generate alert if
Threshold
Description
By default, all pre-defined alert rules are enabled. To disable an alert rule, clear the check box next to that rule.
The Generate alert if column lists the rules.
Set the threshold for each rule in the Threshold column.
Page 1771 of 1812 HP LoadRunner (11.50)
User Guide
SAP Alerts Window
This Window displays a list of alerts related to the data displayed in the current graph(s) shown in the Analysis window.
To access
See also
Windows > SAP Alerts
"SAP Alerts Window" above
"How to Configure SAP Alerts " on page 1766
User interface elements are described below:
UI Element
Type
Description
Displays one of the following icons indicating the type of alert:
Standard Alert. This alert is generated in the context of a transaction and/or server if the conditions of a pre-defined alert rule are met.
Major Alert. There are two types of alerts: l
General Application Problem Alert. If a standard alert was generated in the context of a transaction, and the same alert was generated in the context of all other transactions running in the same time frame, then a major alert of this type is generated, indicating that there is a general application problem.
Note: If a Dialog Step filter is applied (for a single dialog step), then this alert is not generated.
l
Server-Specific Problem Alert. This alert is generated for a specific server if a certain measurement on that server exceeds its threshold, while the overall server performance for that measurement is satisfactory. This type of alert indicates that there is a server related problem.
Note: Server-Specific Problem alerts are generated only when the current server context is "All Servers".
The time interval during which the problem occurred.
Time interval
Transaction/Server
The name of the transaction and server where problem occurred.
Description
Recommended
Step
Action
A description of the alert.
Recommends what to do in order to understand the problem on a deeper level.
A link to a graph representing the data described in the alert, allowing for a more graphic display of the alert. Double-click the link to open the graph.
Page 1772 of 1812 HP LoadRunner (11.50)
User Guide
SAP Application Processing Time Breakdown Graph
This graph displays the behavior of resources associated with application processing time, namely
ABAP time and CPU time.
X-axis
Y-axis
See also
Elapsed load test scenario time (in hh:mm:ss).
Average time per dialog step (in seconds).
"SAP Breakdown Task Pane" on page 1775
"SAP Secondary Graphs" on page 1782
Example
SAP Primary Graphs
You view the SAP Diagnostics graphs in the primary graph pane.
You can open the graph in full view by clicking
An enlarged version of the graph opens in a new tab.
in the top right corner of the primary graph pane.
To filter or group data displayed in these graphs, see
"SAP Breakdown Task Pane" on page 1775 .
SAP Average Dialog Step Response Time Breakdown
Graph
This graph represents a breakdown of the average dialog step response time of a specific transaction. The graph displays the Network Time, Server Response Time, (including the GUI time), and Other Time (the time taken for the client to process the dialog step) of a single transaction.
X-axis
Elapsed time since the start of the run (in hh:mm:ss).
Page 1773 of 1812 HP LoadRunner (11.50)
User Guide
Y-axis
Breakdown options
See also
The average response time divided by the number of dialog steps (in seconds).
Components
This option opens the
"SAP Server Time Breakdown Graph " on page 1778
Dialog Steps
This option opens the
"SAP Server Time Breakdown (Dialog Steps) Graphs
" on page 1777
"SAP Breakdown Task Pane" on next page
"SAP Secondary Graphs" on page 1782
"SAP Breakdown Task Pane" on next page
Example
SAP Average Transaction Response Time Graph
This graph displays all the SAP-related transactions in the load test scenario.
X-axis
Y-axis
Breakdown graph
Tips
Elapsed time since the start of the run.
Average response time (in seconds) of each transaction
"SAP Average Dialog Step Response Time Breakdown Graph " on previous page
Select a transaction in one of the following ways: l
Select the transaction from the Breakdown transaction: list in the task pane.
l
Highlight the transaction by selecting the line representing it in the graph.
l
Select the transaction from the graph legend. This highlights the line in the graph.
Page 1774 of 1812 HP LoadRunner (11.50)
User Guide
See also
"SAP Breakdown Task Pane" below
"SAP Secondary Graphs" on page 1782
"SAP Breakdown Task Pane" below
SAP Breakdown Task Pane
The task pane enables you to choose the level of breakdown you want to view, to filter and group transaction and server information, and to navigate backwards and forwards through the broken down graphs.
To access
Session Explorer > Graphs > SAP Diagnostics > SAP Diagnostics - Guided
Flow
See also
"SAP Breakdown Task Pane" above
SAP Breakdown Toolbar
User interface elements are described below:
UI Element Description
Back. Click to view previous breakdown graph, or to ungroup grouped data.
Next. Click to view next breakdown graph.
Home. Click to return to the initial SAP Average Transaction Response
Time graph.
Help. Click to get help on the breakdown options.
Breakdown Options
To break down SAP diagnostics data, choose the breakdown and filter options from the task pane.
User interface elements are described below:
UI Element
Break down transaction
Description
Select a transaction from this list to display the average dialog step response time breakdown.
Page 1775 of 1812 HP LoadRunner (11.50)
User Guide
UI Element
Break down server time into
Description
Displays the breakdown options for the Average Dialog Step Response
Time Breakdown graph.
l
Select Components to view a breakdown of the transaction's server components, namely database time, interface time, application processing time, and system time.
l
Select Dialog Steps to view a breakdown of the transaction's dialog steps.
Break down a dialog step into its server-time components, namely database time, interface time, application processing time, and system time.
Break down dialog step
<dialog step>
View data associated with
<component>
No available breakdown
Apply
Break down a server-time component (database time; interface time; application processing time; system time) to view data associated with it.
There are no further breakdown options.
Click to apply the selected breakdown option.
Current filter settings
This section displays the filter/grouping settings of the graph currently displayed in the primary graph pane.
User interface elements are described below:
UI Element
From/To
Description
Enter values (in hh:mm:ss) to filter the graph over a specified time interval.
Transaction
Displays the name of the transaction represented in the graph.
Dialog Step
Displays the name of the dialog step represented in the graph.
Server
Displays the name of the server represented in the graph.
Edit filter settings
Click this button to modify filter or grouping settings. When you click Edit Filter Settings the filter/grouping options become editable.
User interface elements are described below:
UI
Element
Description
Filter
Use this option to filter the current graph by time interval, transaction, dialog step,
Page 1776 of 1812 HP LoadRunner (11.50)
User Guide
UI
Element
Description
and/or server.
l
From/To. Enter values (in hh:mm:ss) to filter the graph over a specified time interval.
l
By Transaction. Filter the graph to display information about a specific transaction by selecting the transaction from the list.
l
By Dialog Step. Filter the graph to display information about a specific dialog step by selecting the dialog step from the list.
l
By Server. Filter the graph to display information about a server by selecting the server name from the list.
Note: Only servers associated with the data displayed in the current graph are listed in the By Server list
Group
Use this option to group the data represented in the graph by transaction or by server.
Select a transaction, component or subcomponent from the list.
l
By Transaction. Select this check box to group by transaction.
l
By Server. Select this check box to group by server.
Note: After applying grouping to a graph, you need to ungroup the data in order to apply further breakdown options. To ungroup grouped data, click the Back button on the toolbar.
Important: When you open a saved session, the Back is disabled. If you have grouped data, you need to click the Home button, or open a new SAP Diagnostics -
Guided Flow tab to restart SAP breakdown.
OK
Click OK to apply the chosen filter/grouping settings. The Current filter settings area displays the chosen settings in non-editable mode.
Notes: l
Global filtering is enabled when viewing SAP Diagnostics graphs (special SAP view) but cannot be applied on these graphs.
l
Local filtering is disabled in the SAP Diagnostics - Guided Flow tab. To apply local filters to a SAP Diagnostics graph displayed in the Guided Flow tab, open the graph in a new tab by clicking the Enlarge Graph button.
SAP Server Time Breakdown (Dialog Steps) Graphs
This graph displays the dialog steps of a particular transaction.
X-axis
Elapsed time since the start of the run (in hh:mm:ss).
Page 1777 of 1812 HP LoadRunner (11.50)
User Guide
Y-axis
Breakdown graph
See also
The average response time per dialog step (in seconds).
"SAP Server Time Breakdown Graph " below
"SAP Breakdown Task Pane" on page 1775
"SAP Secondary Graphs" on page 1782
"SAP Breakdown Task Pane" on page 1775
Example
SAP Server Time Breakdown Graph
This graph represents the server-time components of a single transaction, namely database time, application processing time, interface time, and system time.
X-axis
Y-axis
Breakdown graphs
Tips
See also
Elapsed time since the start of the run (in hh:mm:ss).
Represents the average response time per dialog step (in seconds).
l
"SAP Database Time Breakdown Graph " on next page
l
"SAP Application Processing Time Breakdown Graph " on page 1773
l
"SAP System Time Breakdown Graph " on page 1781
l
"SAP Interface Time Breakdown Graph " on page 1781
In the task pane, select a component from the View data associated with box.
"SAP Breakdown Task Pane" on page 1775
"SAP Secondary Graphs" on page 1782
"SAP Breakdown Task Pane" on page 1775
Page 1778 of 1812 HP LoadRunner (11.50)
User Guide
Example
SAP Database Time Breakdown Graph
This graph displays the behavior of resources associated with database time, namely time taken to access a record, database time, and the number of records accessed per dialog step.
Xaxis
Elapsed time since the start of the run (in hh:mm:ss).
Yaxis
Represents the resource value per dialog step (in msec).
Tips
You can open the graph in full view by clicking in the top right corner of the primary graph pane. An enlarged version of the graph opens in a new tab.
See also
"SAP Breakdown Task Pane" on page 1775
"SAP Secondary Graphs" on page 1782
Example
Page 1779 of 1812 HP LoadRunner (11.50)
User Guide
SAP Diagnostics Summary Report
This report displays a list of major alerts generated when opening the Analysis session, and a summary of the SAP diagnostics data.
To access
Use one of the following: l
Session Explorer > Reports > Summary Report > Major Alerts
l
Session Explorer > Reports > Summary Report > SAP Diagnostics
Summary
Note
See also
If you do not see diagnostics data on the Summary Report, check if you are using a user-defined template. To view relevant data, choose a different template from the list of templates, or create and apply a new template. For more information about using templates, see
"Template Dialog Box" on page 1214 .
"SAP Diagnostics Graphs Overview" on page 1
SAP Diagnostics Summary
User interface elements are described below:
UI Element
Transaction
Description
Individual transactions. You can click a transaction name to display the server time breakdown for that transaction.
Relative server-time breakdown in layers. Click a layer to display data associated with the component.
SAP
Diagnostics
Layers
Total time
Total usage time for each transaction.
Major Alerts
User interface elements are described below:
Page 1780 of 1812 HP LoadRunner (11.50)
User Guide
UI Element
Time Interval
Transaction/Server
Description
Action
Description
The time during which the problem occurred.
Which transaction and server were involved.
A description of the alert.
This column provides a link to a graphic depiction of the problem.
SAP Interface Time Breakdown Graph
This graph displays the behavior of resources associated with interface time, namely GUI time,
RFC time, and roll-wait time.
X-axis
Y-axis
See also
Elapsed load test scenario time (in hh:mm:ss)
Average response time per dialog step (in seconds).
"SAP Breakdown Task Pane" on page 1775
"SAP Secondary Graphs" on next page
Example
SAP System Time Breakdown Graph
This graph displays the behavior of the sub-components of the system time component, namely the dispatcher wait time, the load and generation time, and the roll-in and roll-out times.
X-axis
Y-axis
See also
Elapsed load test scenario time (in hh:mm:ss)
Average response time per dialog step (in seconds)
"SAP Breakdown Task Pane" on page 1775
"Secondary Graph Pane" on page 1769
Page 1781 of 1812 HP LoadRunner (11.50)
User Guide
Example
SAP Secondary Graphs
The secondary graph pane of the SAP Diagnostics - Guided Flow tab displays graphs that support the graph displayed in the primary graph pane. You can correlate over time only one graph displayed in the secondary graph pane.
To see the legend for the graph displayed in this pane, click the Graph Legend button top right corner. To see all the data in the Legend, scroll along the horizontal scroll bar.
in the
You can open the displayed graph in full view by clicking the Enlarge Graph button right corner of this pane. An enlarged version of the graph opens in a new tab.
You view the following graphs in the secondary graph pane: l
"Vuser Graphs" on page 1394
l
"Dialog Steps per Second Graph " on page 1770
l
"Work Processes Graph " below
l
"OS Monitor Graph " on page 1770
in the top
Work Processes Graph
This graph represents the number and distribution of work processes that ran throughout the load test scenario.
X-axis
Y-axis
Note
See also
Elapsed scenario time (in hh:mm:ss).
Number of work processes.
This graph is available only when a single server filter is applied.
"SAP Breakdown Task Pane" on page 1775
"Vuser Graphs" on page 1394
Page 1782 of 1812 HP LoadRunner (11.50)
User Guide
Example
"Dialog Steps per Second Graph " on page 1770
"OS Monitor Graph " on page 1770
J2EE & .NET Diagnostics Graphs
J2EE & .NET Diagnostics Graphs Overview
The J2EE & .NET Diagnostics graphs in LoadRunner Analysis enable you to trace, time, and troubleshoot individual transactions and server requests through J2EE & .NET Web, application, and database servers. You can also pinpoint problem servlets and JDBC calls to maximize business process performance, scalability, and efficiency.
The J2EE & .NET Diagnostics graphs are comprised of two groups: l
J2EE & .NET Diagnostics Graphs. These graphs show you the performance of requests and methods generated by virtual user transactions. They show you the transaction that generated each request.
l
J2EE & .NET Server Diagnostics Graphs. These graphs show you the performance of all the requests and methods in the application you are monitoring. These include requests generated by virtual user transactions and by real users.
How to Enable Diagnostics for J2EE & .NET
To generate Diagnostics for J2EE & .NET data, you must first install HP Diagnostics.
Before you can use HP Diagnostics with LoadRunner, you need to ensure that you have specified the Diagnostics Server details in LoadRunner. Before you can view Diagnostics for J2EE & .NET
data in a particular load test scenario, you need to configure the Diagnostics parameters for that scenario. For more information about Configuring HP Diagnostics to work with LoadRunner, refer to the HP LoadRunner Controller User Guide.
Note: To ensure that valid J2EE/.NET diagnostics data is generated during the scenario run, you must manually mark the beginning and end of each transaction in the Vuser script, rather
Page 1783 of 1812 HP LoadRunner (11.50)
User Guide
than using automatic transactions.
Viewing J2EE to SAP R3 Remote Calls
The Remote Function Call (RFC) protocol in SAP allows communication to take place between
SAP J2EE and SAP R3 environments. When remote calls take place between SAP J2EE and SAP
R3 environments, Analysis displays information about the RFC functions, including the name of each function.
You view information about RFC functions by breaking down the SAP R3 layer. You can view the
RFC function information in a graph display or in the Chain Of Calls window.
1. Go to the J2EE/.Net Diagnostics Usage section of the Summary Report. Next to the relevant transaction, click the color representing the SAP.R3 layer.
The J2EE/.NET - Transaction Time Spent in Element graph opens, representing the SAP.R3
layer.
2. Right click the graph and choose J2EE/.NET Diagnostics > Break down the class to
methods.
3. Break down the graph further by right clicking the graph and choosing J2EE/.NET Diagnostics
> Break down the method to SQLs.
The graph is broken down into the different RFC functions.
4. To view the name of each RFC function, right click an RFC measurement in the Measurement column in the graph legend and choose Show measurement description.
The Measurement Description dialog box opens. The name of the RFC function is displayed in the SQL box.
Page 1784 of 1812 HP LoadRunner (11.50)
User Guide
View RFC function information in the Chain Of Calls window
1. Go to the J2EE/.Net Diagnostics Usage section of the Summary Report. Next to the relevant transaction, click the color representing the SAP.R3 layer.
The J2EE/.NET - Transaction Time Spent in Element graph opens, representing the SAP.R3
layer.
2. Right click the graph and choose J2EE/.NET Diagnostics > Show chain of calls.
The Transaction chain of calls window opens. When you click any of the RFC functions, in the
Measurement column, the name of the function is displayed in the lower pane in the RFC
Name tab.
J2EE & .NET Diagnostics Data
The J2EE & .NET Diagnostics graphs provide an overview of the entire chain of activity on the server side of the system. At the same time, you can break down J2EE/.NET layers into classes and methods to enable you to pinpoint the exact location where time is consumed. In addition, you can view custom classes or packages that you set the J2EE/.NET probe to monitor. You can also view the transaction chain of calls and call stack statistics to track the percentage of time spent on each part of the transaction.
You can correlate the end user response time with the Web server activity (Servlets and JSPs data), application server activity (JNDIs), and back-end activity of database requests (JDBC methods and SQL queries).
Example Transaction Breakdown
The following graphs illustrate the breakdown of a transaction to its layers, classes, and methods.
Page 1785 of 1812 HP LoadRunner (11.50)
User Guide
Transaction Level
The following figure shows the top level Average Transaction Response Time graph. The graph displays several transactions: Birds, Bulldog, Checkout, Start, and so on.
Layer Level
In the following figure, the Start transaction has been broken down to its layers (DB, EJB, JNDI, and Web). In J2EE/.NET transactions, the Web layer is generally the largest.
Page 1786 of 1812 HP LoadRunner (11.50)
User Guide
Class Level
In the following figure, the Web layer of the Start transaction has been broken down to its classes.
Page 1787 of 1812 HP LoadRunner (11.50)
User Guide
Method/Query Level
In the following figure, the weblogic.servlet.FileServlet component of the Web layer of the Start transaction has been broken down to its methods.
Page 1788 of 1812 HP LoadRunner (11.50)
User Guide
Note: Some JDBC methods can invoke SQLs which can be broken down further. In this case there is another level of breakdown, that is SQL Statements. For the methods that can not be further broken down into SQL statements when reaching this level of breakdown, you see
NoSql.
Cross VM Analysis
When a server request makes a remote method invocation, the J2EE & .NET Diagnostics graphs display certain measurements relating to the classes and methods involved in these requests.
These measurements are displayed at a layer, class and method level. The VM making the call is referred to as the caller VM, and the VM that executes the remote call is the callee VM.
The measurements are described below:
Measurements Description
Cross VM
Layer
A measurement that represents a dummy layer that integrates the data from the remote classes and methods in server requests that take place across two or more virtual machines.
Page 1789 of 1812 HP LoadRunner (11.50)
User Guide
Measurements Description
Remote-Class
A measurement that represents a dummy class that integrates the data from the remote methods in server requests that take place across two or more virtual machines.
Remote-
Class:
Remote
Method
A measurement that represents a dummy method. Remote-Class: Remote
Method measures the total time, call count, exclusive latency, minimum and maximum values, standard deviation, and so on of the methods that are executed remotely, relative to the caller virtual machine.
Note: Since this data is measured on the caller virtual machine the exclusive latency will include all of the time required for making the remote method invocation such as network latency.
Using the J2EE & .NET Breakdown Options
J2EE & .NET breakdown options are described.
To access
Use one of the followingto access breakdown options: l
<J2EE & .NET Graphs> > View > J2EE & .NET Diagnostics
l
<J2EE & .NET Diagnostics Graphs> > select transaction > short-cut menu >
J2EE & .NET Diagnostics
l
See toolbar options for each breakdown level
Notes
l
The breakdown menu options and buttons are not displayed until an element
(transaction, server request, layer) is selected.
l
If there is no URI in the SQL, URI-None appears in front of the full measurement description in the Measurement Description dialog box.
See also
"J2EE & .NET Diagnostics Graphs Overview" on page 1783
User interface elements are described below :
UI Element Description
<Rightclick> transaction in Average
Response
TIme
Graph
Choose J2EE/.NET Diagnostics > Show Server Requests. A new graph opens showing the breakdown of the selected transaction. The name of the transaction is displayed in the Breaking Measurement box.
Page 1790 of 1812 HP LoadRunner (11.50)
User Guide
UI Element Description
Page 1791 of 1812
You can view the full SQL statement for a selected SQL element by choosing
Show measurement description from the Legend window right-click menu. The
Measurement Description dialog box opens displaying the name of the selected measurement and the full SQL statement.
To view transaction properties for the breakdown measurement, click the
Breaking Measurement button. To disable this feature, choose View > Display
Options, and clear the Show Breaking Measurement check box.
Select View > J2EE/.NET Diagnostics > Break down the server request to
layers, or click the measurement breakdown button in the toolbar above the graph.
Note: The option in the J2EE/.NET Diagnostics menu, and the tool tip of the measurement breakdown button, vary according to the element that you want to break down. For example, when you select a server request, the menu option and tool tip are Break down server request to layers.
Select View > J2EE/.NET Diagnostics > Show VM, or click the Show VM button in the toolbar above the graph. This breaks the data down to the application host name (VM).
Select View > J2EE/.NET Diagnostics > Undo Break down the server
request to layers, or click the Undo <Measurement Breakdown> button in the toolbar above the graph.
HP LoadRunner (11.50)
User Guide
UI Element Description
Note: The option in the J2EE/.NET Diagnostics menu, and the tool tip of the measurement breakdown button, vary according to the element whose breakdown you want to undo. For example, when you select a layer, the menu option and tool tip are Undo break down server request to layers.
Select View > J2EE/.NET Diagnostics > Hide VM, or click the Hide VM button in the toolbar above the graph.
Display the chain of call or call stack statistics in the measurements tree window:
Drag the orange time line on to the graph to the time specifying the end of the period for which you want to view data, and select
View > J2EE/.NET Diagnostics > Show Chain of Calls, or click the
Show Chain of Calls button in the toolbar above the graph.
Note: A measurement that is broken down in the Average Method Response Time in Transactions graph will be different from the same measurement broken down in the J2EE/.NET - Transaction Time Spent in Element graph. This is because the
J2EE/.NET - Average Method Response Time in Transactions graph displays the average transaction time, whereas the J2EE/.NET - Transaction Time Spent in
Element graph displays the average time per transaction event (sum of method execution time).
Viewing Chain of Calls and Call Stack Statistics
You can view the chain of calls for transactions and methods. The chain of calls answers the question "Whom did I call?"
You can also view the call stack statistics for methods. Call stack statistics answer the question
"Who called me?"
Chain of call and call stack statistics data are shown in the measurements tree window. The title of the window changes depending on which kind of data you are viewing.
l
To set the point to which the measurements tree window relates, you must drag the orange time line to the desired spot.
l
To view transaction call chains, right-click a component and choose
J2EE/.NET Diagnostics > Show Chain of Calls. The Chain of Calls window opens displaying the chain of calls from the parent transaction downwards.
l
To view method statistics, in the Chain of Calls window right-click a method and choose Show
Method Chain of Calls or Show Method Call Stack Statistics.
The Chain of Calls Windows
You use the Chain of Calls window to view the components that the selected transaction or method called. In the following figure, all the calls in the critical path of the Start server-side transaction are displayed.
Page 1792 of 1812 HP LoadRunner (11.50)
User Guide
Note: Each red node signifies the most time consuming child of its parent.
You use the Call Stack Statistics window to view which components called the selected component. In the following figure, the FileServlet.service was called by Start (Server), which was called by Start (Client), and so on, down to the transaction at the bottom of the chain.
Understanding the Chain of Calls Window
User interface elements are described below:
Page 1793 of 1812 HP LoadRunner (11.50)
User Guide
UI
Element
Description
Switch to Method Chain of Calls. When the call stack statistics data is displayed, displays the method chain of calls data (only if the root is a method).
Switch to Method Call Stack Statistics. When the method chain of calls data is displayed, displays the method call stack statistics data (only if the root is a method).
Show Method Chain of Calls. Displays the Chain of Calls window.
Show Method Call Stack Statistics. Displays the Call Stack Statistics window.
Properties. Hides or displays the properties area (lower pane).
Columns. Enables you to select the columns shown in the Calls window. To display additional fields, drag them to the desired location in the Calls window. To remove fields, drag them from the Calls window back to the Columns chooser.
Expand All. Expands the entire tree.
Collapse All. Collapses the entire tree.
Expand Worst Path. Expands only the parts of the path on the critical path.
Save to
XML File
Saves the tree data to an XML file.
Method
Properties
Area. Displays the full properties of the selected method.
SQL
Query
Displays the SQL query for the selected method. (For Database only.)The following columns are available in the Chain of Calls window:
The following columns are available in the Chain of Calls window:
Column Description
Measurement
Name of the method, displayed as ComponentName:MethodName. In the case of a database call, query information is also displayed. The percent shown indicates the percentage of calls to this component from its parent.
% of Root
Method
Percentage of the total time of the method from the total time of the root tree item.
No of Calls
Avg
Response
Time
STD
Displays the amount of times this transaction or method was executed.
Response time is the time from the beginning of execution until the end.
Average response time is the total response time divided by the number of divided by the number of instances of the method.
The standard deviation response time.
Page 1794 of 1812 HP LoadRunner (11.50)
User Guide
Column
Response
Time
Min
Response
Time
Max
Response
Time
% of Caller
Total time
Description
The minimum response time.
The maximum response time.
Displays the percentage of method time in relation the parent method time.
Displays the total method execution time, including the child execution time.
The following columns are available in the Call Stack Statistics window:
Column Description
Measurement
Name of the method, displayed as ComponentName.MethodName. In the case of a database call, query information is also displayed. The percent shown indicates the percentage of calls to this component from its child.
% of Root
Method
No. of Calls to Root
Avg Time
Spent in
Root
Percentage of the total time of the transaction (or method) from the total time of the root tree item.
Displays the amount of times this transaction or method was executed.
Time spent in root is the time that the sub-area spent in the root subarea/area/transaction.
Average Time Spent in Root time is the total time spent in the root divided by the number of instances of the method.
The standard deviation time spent in the root.
STD Time
Spent in
Root
Min Time
Spent in
Root
The minimum time spent in the root.
The maximum time spent in the root.
Max Time
Spent in
Root
% of Called
Total Time
Spent in
Root
Displays the percentage of method time in relation the child method time.
Displays the total method execution time, including the child execution time.
Page 1795 of 1812 HP LoadRunner (11.50)
User Guide
Graph Filter Properties
You can filter the J2EE & .NET Diagnostics graphs so that the displayed data is more suitable to your needs. You can filter using the following methods: l
Before opening a graph, enter filter criteria in the Graph Properties box of the Open Graph dialog box. For more information, see
"Open a New Graphs Dialog Box" on page 1166 .
l
From an open graph, enter filter criteria in the Filter condition fields in a filter dialog box. For more information, see
"Filter Dialog Boxes" on page 1232
and
"Drilling Down in a Graph " on page 1244 .
User interface elements are described below:
UI Element Description
Shows data for specified classes.
Class
Name
Layer
Name
Shows data for specified layers.
Scenario
Elapsed
Time
Shows data for transactions that ended during the specified time.
SQL
Logical
Name
Shows data for specified SQL logical names. Due to the length of some SQL names, after you choose an SQL statement it is assigned a "logical name." This logical name is used in the filter dialog, legend, grouping, and other places in place of the full SQL statement. You can view the full SQL statement in the
Measurement Description dialog box (View > Show Measurement
Description).
Transaction
Name -
J2EE/.NET
Shows data for a specified transaction.
Some JDBC methods have the ability to invoke SQL's (each method can invoke several different
SQL's) so there is another level of breakdown which is the SQL statements.
Note: For the methods that do not have SQL statement when reaching this level of breakdown you see NoSql.
J2EE/.NET - Average Method Response Time in
Transactions Graph
This graph displays the average response time for the server side methods, computed as Total
Method Response Time/Number of Method calls. For example, if a method was executed twice by an instance of transaction A and once by another instance of the same transaction, and it took three
Page 1796 of 1812 HP LoadRunner (11.50)
User Guide
seconds for each execution, the average response time is 9/3, or 3 seconds. The method time does not include calls made from the method to other methods.
X-axis
Y-axis
Breakdown options
See also
Elapsed time.
Average response time (in seconds) per method
"Using the J2EE & .NET Breakdown Options " on page 1790
"J2EE & .NET Diagnostics Graphs Overview" on page 1783
Example
J2EE/.NET - Average Number of Exceptions in
Transactions Graph
This graph displays the average number of code exceptions per method, transaction, or request that were monitored during the selected time range.
X-axis
Y-axis
Breakdown options
See also
Elapsed time.
Represents the number of events.
To break the displayed elements down further, see
"Using the J2EE & .NET
Breakdown Options " on page 1790 .
"J2EE & .NET Diagnostics Graphs Overview" on page 1783
Page 1797 of 1812 HP LoadRunner (11.50)
User Guide
Example
J2EE/.NET - Average Number of Exceptions on Server
Graph
This graph displays the average number of code exceptions per method that were monitored during the selected time range.
X-axis
Y-axis
Breakdown options
See also
Elapsed time of the scenario run.
Number of events.
"Using the J2EE & .NET Breakdown Options " on page 1790
"J2EE & .NET Diagnostics Graphs Overview" on page 1783
Page 1798 of 1812 HP LoadRunner (11.50)
User Guide
Example
J2EE/.NET - Average Number of Timeouts in
Transactions Graph
This graph displays the average number of timeouts per method, transaction, or request that were monitored during the selected time range.
X-axis
Y-axis
Breakdown options
See also
Elapsed time since the scenario run.
Represents number of events.
"Using the J2EE & .NET Breakdown Options " on page 1790
"J2EE & .NET Diagnostics Graphs Overview" on page 1783
Page 1799 of 1812 HP LoadRunner (11.50)
User Guide
Example
J2EE/.NET - Average Number of Timeouts on Server
Graph
This graph displays the average number of timeouts per method that were monitored during the selected time range.
X-axis
Y-axis
Breakdown options
See also
Elapsed time since the scenario run.
Number of events.
"Using the J2EE & .NET Breakdown Options " on page 1790
"J2EE & .NET Diagnostics Graphs Overview" on page 1783
Example
Page 1800 of 1812 HP LoadRunner (11.50)
User Guide
J2EE/.NET - Average Server Method Response Time
Graph
This graph displays the average response time for the server side methods, computed as Total
Method Response Time/Number of Method calls.
X-axis
Y-axis
Breakdown options
Note
Elapsed time since the scenario run.
Average response time (in seconds) per method.
"Using the J2EE & .NET Breakdown Options " on page 1790
See also
The method time does not include calls made from the method to other methods.
"J2EE & .NET Diagnostics Graphs Overview" on page 1783
Example
J2EE/.NET - Method Calls per Second in Transactions
Graph
This graph displays the number of completed sampled transactions during each second of a load test scenario run.
Page 1801 of 1812 HP LoadRunner (11.50)
User Guide
The number of transactions included in the sample is determined by the sampling percentage set in the Diagnostics Distribution dialog box in the Controller (Diagnostics > Configuration). For more information, refer to the HP LoadRunner Controller User Guide.
X-axis
Y-axis
Breakdown options
See also
Elapsed time.
Represents the number of completed sampled transactions per second.
To break the displayed elements down further, see
"Using the J2EE & .NET
Breakdown Options " on page 1790 .
"J2EE & .NET Diagnostics Graphs Overview" on page 1783
Example
J2EE/.NET - Probes Metrics Graph
This graph displays performance metrics collected by HP Diagnostics probes. Metrics include JVM related data such as Heap usage and Garbage Collection, application server specific metrics,
JDBC (Java Database Connectivity) metrics, and more.
X-axis
Y-axis
Elapsed time since the scenario run.
Resource usage. The following probe metric data is provided for offline analysis: l
HeapUsed
l
GC Collections/sec
l
GC time Spent in Collections
To include additional Probe metric data in offline Analysis, you use the
Page 1802 of 1812 HP LoadRunner (11.50)
User Guide
Data
Grouping
Diagnostics configuration file, etc./offline.xml. For more information, see the HP
Diagnostics Installation and Configuration Guide.
By default, the data in the graph is grouped by Category Name (the Diagnostics metric category name) and Probe Name. As a result, the default format for the measurement name is the graph is:
<Name of metric from Diagnostics (unit of metric)>:<Diagnostics metric category name>:<Probe name>
If the measurement unit is a count, no unit name is displayed in parentheses.
Important
Information
By default, the following probe metric data is provided for offline analysis:
HeapUsed, GC Collections/sec, and GC time Spent in Collections. To include additional Probe metric data in offline Analysis, you use the Diagnostics configuration file, etc/offline.xml. For more information, see the HP Diagnostics
Installation and Configuration Guide.
For example, for the following measurement name: l the name of the metric is GC Time Spent in Collections.
l the value is measured as a percentage.
l the metric category name is GC.
l the Probe name is MyJBossDev.
In addition to the regular Analysis filter criteria, you can also filter and group by the
Diagnostics metrics collector name and the host name
Note
See also
You need to synchronize the operating system time settings on the Controller machine and the Diagnostics Servers to ensure accurate display of the elapsed scenario time in the Probe Metrics graph.
"J2EE & .NET Diagnostics Graphs Overview" on page 1783
Example
Page 1803 of 1812 HP LoadRunner (11.50)
User Guide
J2EE/.NET - Server Methods Calls per Second Graph
This graph displays the number of completed sampled methods during each second of a load test scenario run.
X-axis
Y-axis
Elapsed time of the scenario run.
Number of completed sampled methods per second.
Breakdown options
"Using the J2EE & .NET Breakdown Options " on page 1790
Note
See also
The number of methods included in the sample is determined by the sampling percentage set in the Diagnostics Distribution dialog box in the Controller
(Diagnostics > Configuration). For more information, refer to the HP
LoadRunner Controller User Guide.
"J2EE & .NET Diagnostics Graphs Overview" on page 1783
Example
J2EE/.NET - Server Requests per Second Graph
This graph displays the number of completed sampled requests during each second of a load test scenario run.
Page 1804 of 1812 HP LoadRunner (11.50)
User Guide
X-axis
Y-axis
Elapsed time of the scenario run.
Number of completed sampled requests per second.
Breakdown options
"Using the J2EE & .NET Breakdown Options " on page 1790
Note
See also
The number of requests included in the sample is determined by the sampling percentage set in the Diagnostics Distribution dialog box in the Controller
(Diagnostics > Configuration). For more information, refer to the HP
LoadRunner Controller User Guide.
"J2EE & .NET Diagnostics Graphs Overview" on page 1783
Example
J2EE/.NET - Server Request Response Time Graph
This graph displays the server response time of requests that include steps that cause activity on the J2EE/.NET backend.
X-axis
Elapsed time of the scenario time.
Y-axis
Average time (in seconds) taken to perform each request.
Breakdown options
"Using the J2EE & .NET Breakdown Options " on page 1790
Page 1805 of 1812 HP LoadRunner (11.50)
User Guide
Note
See also
The reported times, measured from the point when the request reached the Web server to the point it left the Web server, include only the time that was spent in the
J2EE/.NET backend.
"J2EE & .NET Diagnostics Graphs Overview" on page 1783
Example
J2EE/.NET - Server Request Time Spent in Element
Graph
This graph displays the server response time for the selected element (layer, class, or method) within each server request.
Purpose
X-axis
The time is computed as Total Response Time/Total Number of Server Requests.
For example, if a method was executed twice by an instance of server request A and once by another instance of the same server request, and it took three seconds for each execution, the average response time is 9/2, or 4.5 seconds.
The server request time does not include the nested calls from within each server request.
Elapsed time of the scenario run.
Page 1806 of 1812 HP LoadRunner (11.50)
User Guide
Y-axis
Average response time (in seconds) per element within the server request.
Breakdown options
"Using the J2EE & .NET Breakdown Options " on page 1790
Filtering properties
The display of the graph is determined by the Graph Properties selected when the graph is opened, as described:
None
n
Time spent in each server request
Server request
n
Filtered by server request. Grouped by layer.
Server request and layer
n
Filtered by server request and layer. Grouped by class.
Server request, layer, and class
n
Filtered by server request, layer, and class. Grouped by method.
Tips
See also
To obtain data for this graph, you must first install HP Diagnostics. Before you can view Diagnostics for J2EE & .NET data in a particular load test scenario, you need to configure the Diagnostics parameters for that scenario, as described in the HP
LoadRunner Controller User Guide.
"J2EE & .NET Diagnostics Graphs Overview" on page 1783
Example
Page 1807 of 1812 HP LoadRunner (11.50)
User Guide
J2EE/.NET - Transactions per Second Graph
This graph displays the number of completed sampled transactions during each second of a load test scenario run.
The number of transactions included in the sample is determined by the sampling percentage set in the Diagnostics Distribution dialog box in the Controller (Diagnostics > Configuration). For more information, refer to the HP LoadRunner Controller User Guide.
X-axis
Y-axis
Breakdown options
See also
Elapsed time.
Number of completed sampled transactions per second
To break the displayed elements down further, see
"Using the J2EE & .NET
Breakdown Options " on page 1790 .
"J2EE & .NET Diagnostics Graphs Overview" on page 1783
Example
J2EE/.NET - Transaction Response Time Server Side
Graph
This graph displays the transaction server response time of transactions that include steps that cause activity on the J2EE/.NET backend. The reported times, measured from the point when the transaction reached the Web server to the point it left the Web server, include only the time that was spent in the J2EE/.NET backend.
X-axis
Elapsed time.
Page 1808 of 1812 HP LoadRunner (11.50)
User Guide
Y-axis
Breakdown options
See also
Average response time (in seconds) of each transaction.
"Using the J2EE & .NET Breakdown Options " on page 1790
"J2EE & .NET Diagnostics Graphs Overview" on page 1783
Example
J2EE/.NET - Transaction Time Spent in Element Graph
This graph displays the server response time for the selected element (layer, class, or method) within each transaction.
X-axis
Y-axis
Elapsed time.
Average response time (in seconds) per element within the transaction.
Breakdown options
The display of graph data is determined by the graph properties selected when the graph was opened, as described in the following table: For information on filtering on graph data, see
"J2EE/.NET - Transaction Time Spent in Element Graph" above
You can break down the displayed elements. For more information, see
"Using the
J2EE & .NET Breakdown Options " on page 1790
.
Tips
To obtain data for this graph, you must enable the J2EE & .NET Diagnostics module (from the Controller) before running the load test scenario.
Note
The time is computed as Total Response Time/Total Number of Transactions. For example, if a method was executed twice by an instance of transaction A and once by another instance of the same transaction, and it took three seconds for each execution, the average response time is 9/2, or 4.5 seconds. The transaction time does not include the nested calls from within each transaction.
Page 1809 of 1812 HP LoadRunner (11.50)
User Guide
See also
"J2EE & .NET Diagnostics Graphs Overview" on page 1783
"Filtering and Sorting Graph Data" on page 1215
Example
Graph Data Display
If you filter by these properties...
None
Transaction
Transaction and layer
Transaction, layer, and class
The graph data is displayed like this
Time spent in each transaction.
Filtered by transaction. Grouped by layer.
Filtered by transaction and layer. Grouped by class.
Filtered by transaction, layer, and class. Grouped by method.
Page 1810 of 1812 HP LoadRunner (11.50)
User Guide
Page 1811 of 1812 HP LoadRunner (11.50)