HP QuickTest Professional for Business Process Testing User

HP QuickTest Professional for
Business Process Testing
Software Version: 11.00
User Guide
Document Release Date: October 2010
Software Release Date: October 2010
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 Notices
© 1992 - 2010 Hewlett-Packard Development Company, L.P.
Trademark Notices
Adobe® and Acrobat® are trademarks of Adobe Systems Incorporated.
Intel®, Pentium®, and Intel® Xeon™ are trademarks of Intel Corporation in the U.S. and
other countries.
Java™ is a US trademark of Sun Microsystems, Inc.
Microsoft®, Windows®, Windows NT®, and Windows® XP are U.S registered trademarks of
Microsoft Corporation.
Oracle® is a registered US trademark of Oracle Corporation, Redwood City, California.
Unix® is a registered trademark of The Open Group.
SlickEdit® is a registered trademark of SlickEdit Inc.
2
Documentation Updates
The title page of this document contains the following identifying information:
•
Software Version number, which indicates the software version.
•
Document Release Date, which changes each time the document is updated.
•
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.
3
Support
Visit the HP Software Support 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:
•
Search for knowledge documents of interest
•
Submit and track support cases and enhancement requests
•
Download software patches
•
Manage support contracts
•
Look up HP support contacts
•
Review information about available services
•
Enter into discussions with other software customers
•
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
4
Table of Contents
Welcome to the HP QuickTest Professional for
Business Process Testing User Guide..............................................25
HP QuickTest Professional for Business Process Testing User Guide
Overview .........................................................................................25
How Do I Find the Information That I Need? ....................................26
Documentation Library Contents.......................................................28
Additional Online Resources...............................................................32
P A R T I : I N T R O D U C IN G B U S IN E SS P RO C E SS T E ST I N G
Chapter 1: QuickTest Professional for Business Process Testing
Introduction ....................................................................................35
Concepts
QuickTest Professional for Business Process Testing Overview ..........36
Business Process Testing Overview......................................................37
QuickTest Program Management........................................................48
Reference
HP ALM / Quality Center Business Components Module
User Interface ..................................................................................52
Chapter 2: QuickTest at a Glance........................................................57
Concepts
QuickTest Main Window Overview ....................................................58
QuickTest Panes...................................................................................63
Tasks
How to Start QuickTest .......................................................................71
5
Table of Contents
Reference
QuickTest Main Window - User Interface...........................................72
QuickTest Commands .........................................................................76
QuickTest Professional Program Folder Structure...............................99
Start Page ...........................................................................................104
Add-in Manager Dialog Box ..............................................................106
About QuickTest Professional Dialog Box.........................................110
Product Information Window ..........................................................112
Troubleshooting and Limitations QuickTest Program Management .................................................114
P A R T I I : W O R K I N G W IT H T E S T O B J E C T S A N D O B J E C T R E PO S I TO R IE S
Chapter 3: The Test Object Model....................................................119
Concepts
Test Object Model - Overview ..........................................................120
How QuickTest Applies the Test Object Model Concept..................124
Object Repository Types - Overview .................................................130
Deciding Whether to Use Local or Shared Object Repositories........132
Tasks
How to Use the Object Spy to View Object Properties and
Operations or Add an Object to a Repository ..............................136
Reference
Comparison of Object Repository Window and
Object Repository Manager ..........................................................138
Object Identification Process Workflow ...........................................140
Object Spy Dialog Box.......................................................................142
Object Selection Dialog Box..............................................................147
Tips for Using the Pointing Hand .....................................................148
Troubleshooting and Limitations - Object Spy.................................149
Chapter 4: Managing Test Objects in Object Repositories ..............151
Concepts
Adding and Deleting Test Objects in an Object Repository .............152
Guidelines for Copying, Pasting, and Moving Objects ....................155
Locating Objects................................................................................156
Maintaining Identification Properties - Overview ............................158
Visual Relation Identifiers .................................................................165
6
Table of Contents
Tasks
How to Add a Test Object to an Object Repository ..........................167
How to Copy, Paste, Move, or Delete Objects in the
Object Repository..........................................................................170
How to Locate an Object in an Object Repository ...........................173
How to Maintain Test Objects in Object Repositories ......................174
How to Define a Visual Relation Identifier for a
Specific Test Object - Use-Case Scenario.......................................180
Reference
Add Properties Dialog Box.................................................................186
Define New Test Object Dialog Box ..................................................189
Define Object Filter Dialog Box ........................................................191
Find and Replace Dialog Box ............................................................195
Ordinal Identifier Dialog Box............................................................197
Visual Relation Identifier Dialog Box................................................198
Troubleshooting and Limitations - Managing Test Objects .............205
Chapter 5: Working with Your Component's
Object Repositories .......................................................................207
Concepts
Object Repository Window - Overview.............................................208
Exporting Local Objects to a Shared Object Repository ...................209
Local Copies of Objects from Shared Object Repositories ...............210
Repository Parameter Value Mappings .............................................211
Working with Test Objects During a Run Session ............................212
Tasks
How to Export Local Objects to a Shared Object Repository............213
How to Copy an Object to the Local Object Repository ..................214
How to Modify Identification Properties During a Run Session ......214
Reference
Map Repository Parameters Dialog Box ............................................215
Object Properties Dialog Box ............................................................218
Object Repository Window ...............................................................221
Troubleshooting and Limitations - Object Repositories ...................230
7
Table of Contents
Chapter 6: Shared Object Repositories.............................................231
Concepts
Shared Object Repositories Overview ...............................................232
Considerations for Working with Shared Object Repositories .........237
Tasks
How to Manage Shared Object Repositories .....................................240
How to Manage Objects in Shared Object Repositories....................245
Reference
Object Repository Manager Main Window ......................................247
Manage Repository Parameters Dialog Box ......................................258
Chapter 7: Configuring Object Identification ..................................263
Concepts
Object Identification Configuration - Overview...............................264
Smart Identification ..........................................................................272
Test Object Mapping for Unidentified or Custom Classes ...............278
Tasks
How to Configure Object Identification for a Test Object Class ......279
How to Manage Identification Properties of a Test Object Class .....281
How to Map an Unidentified or Custom Class to a
Standard Windows Class ..............................................................282
Reference
Object Identification Dialog Box ......................................................283
Object Mapping Dialog Box ..............................................................289
Smart Identification Properties Dialog Box ......................................291
Chapter 8: Object Repository Comparison Tool...............................293
Concepts
Object Repository Comparison Tool Overview ................................294
Tasks
How to Compare Two Object Repositories .......................................296
Reference
Object Repository Comparison Tool Main Window ........................298
New Comparison Dialog Box ............................................................312
8
Table of Contents
Chapter 9: Object Repository Merge Tool........................................315
Concepts
Object Repository Merge Tool Overview ..........................................316
Object Conflicts.................................................................................318
Tasks
How to Merge Two Shared Object Repositories ................................322
How to Update a Shared Object Repository From a
Local Object Repository ................................................................325
Reference
New Merge Dialog Box ......................................................................328
Object Repository Merge Tool Main Window ..................................330
Settings Dialog Box (Object Repository Merge Tool)........................346
Object Repository Merge Tool - Multiple Merge Window................351
Update from Local Repository Dialog Box........................................354
PART III: DEFINING FUNCTIONS AND OTHER PROGRAMMING TASKS
Chapter 10: Working in Function Library Windows .........................359
Concepts
The Function Library Window Overview ........................................360
Generating Statements in a Function Library...................................361
Bookmarks in a Function Library .....................................................369
Programmatic Descriptions ...............................................................370
Opening and Closing Applications Programmatically .....................382
Comments, Control-Flow, and Other VBScript Statements .............383
Retrieving and Setting Identification Property Values .....................384
Native Properties and Operations .....................................................385
Running DOS Commands.................................................................387
Choosing Which Steps to Report During the Run Session ...............387
Windows API .....................................................................................387
Tasks
How to Navigate in Function Libraries .............................................388
How to Enhance Your Function Libraries Using the
Windows API.................................................................................389
9
Table of Contents
Reference
Basic VBScript Syntax ........................................................................392
Report Modes.....................................................................................405
Function Library Window User Interface .........................................406
Chapter 11: Customizing Function Library Windows ......................417
Concepts
Function Library Window Customization Options..........................418
Reference
General Tab (Editor Options Dialog Box) .........................................419
Fonts and Colors Tab (Editor Options Dialog Box) ..........................422
Key Binding Tab (Editor Options Dialog Box) ..................................424
Chapter 12: User-Defined Functions and Function Libraries ...........427
Concepts
Function Library Overview ...............................................................428
Associated Function Libraries............................................................430
User-Defined Functions.....................................................................431
User-Defined Function Storage and Access.......................................433
User-Defined Function Registration..................................................434
Tasks
How to Manage Function Libraries...................................................440
How to Edit a Function Library.........................................................446
How to Manage Function Library Associations ................................448
How to Work with a User-Defined Function ....................................450
How to Create and Register a User-Defined Function
Using the Function Definition Generator ....................................453
Reference
Function Definition Generator Dialog Box ......................................460
Troubleshooting and Limitations - Function Libraries.....................469
10
Table of Contents
PART IV: WORKING WITH COMPONENTS AND APPLICATION AREAS
Chapter 13: Business Components ...................................................473
Concepts
Business Components Overview .......................................................474
Tasks
How to Manage Business Components.............................................479
Reference
New Business Component Dialog Box..............................................487
Open Business Component Dialog Box ............................................489
Save Business Component Dialog Box..............................................492
Change Application Area Dialog Box ...............................................494
Troubleshooting and Limitations - Business Components ..............495
Chapter 14: Application Areas ..........................................................497
Concepts
Application Areas - Overview ............................................................498
Tasks
How to Create and Maintain an Application Area ...........................500
Reference
Application Area Window .................................................................505
Open Application Area Dialog Box ...................................................508
Save Application Area Dialog Box .....................................................510
Open <Resource> Dialog Box for Application Area Resources .........512
Save <Resource> Dialog Box for Application Area Resources ...........516
Troubleshooting and Limitations - Application Areas......................520
11
Table of Contents
Chapter 15: Scripted Components ...................................................521
Concepts
Scripted Components Overview .......................................................522
Tasks
How to Create a Scripted Component ..............................................525
How to Convert a Business Component to a
Scripted Component.....................................................................527
Reference
Scripted Component User Interface..................................................528
Troubleshooting and Limitations - Scripted Components ...............530
Chapter 16: Keyword View ...............................................................533
Concepts
Keyword View Overview ...................................................................534
Comments in the Keyword View ......................................................535
Output Value for Your Step - Output Column .................................536
Tasks
How to Add a Step to Your Component ...........................................537
How to Move a Component Step......................................................544
How to Delete a Step .........................................................................545
How to Navigate in the Keyword View and Other Tips ...................546
How to Insert and Remove Breakpoints in the
Keyword View ...............................................................................549
Reference
Keyboard Shortcuts in the Keyword View ........................................550
Keyword View User Interface ............................................................551
Columns Tab (Keyword View Options Dialog Box) .........................556
Fonts and Colors Tab (Keyword View Options Dialog Box).............558
Select Test Object Dialog Box............................................................560
Password Encoder Tool......................................................................565
Troubleshooting and Limitations - Keyword View...........................566
12
Table of Contents
Chapter 17: Checkpoints Overview ..................................................567
Concepts
Checkpoints Overview ......................................................................568
Checkpoint Types..............................................................................569
Tasks
How to Insert a Checkpoint Step in a Component ..........................570
Troubleshooting and Limitations - Creating Checkpoints...............572
Chapter 18: Standard Checkpoints...................................................573
Concepts
Standard Checkpoints Overview.......................................................573
Tasks
How to Create or Modify a Standard Checkpoint Step ....................574
Reference
Checkpoint Properties Dialog Box ....................................................576
Chapter 19: Bitmap Checkpoints ......................................................585
Concepts
Bitmap Checkpoints Overview .........................................................586
Fine-Tuning the Bitmap Comparison ...............................................587
Tasks
How to Create or Modify a Bitmap Checkpoint Step .......................590
Reference
Bitmap Checkpoint Properties Dialog Box .......................................592
Chapter 20: Output Values................................................................603
Concepts
Output Values Overview ...................................................................604
Tasks
How to Create or Modify a Standard Output Value Step .................606
Reference
Output Value Properties Dialog Box .................................................609
13
Table of Contents
Chapter 21: Text Recognition for Windows-Based Objects .............619
Concepts
Text Recognition for Windows-Based Objects Overview .................620
Checking Text in an Image - Use-Case Scenario...............................620
Tasks
How to Configure Text Recognition Settings ...................................624
Reference
Guidelines for Text Recognition .......................................................626
Text Recognition and Development Environments .........................628
Chapter 22: Parameterization and Regular Expressions ..................631
Concepts
Working with Local and Component Parameters ............................632
Regular Expressions Overview...........................................................633
Tasks
How to Configure Constant and Parameter Values..........................636
How to Parameterize Input Values....................................................637
Reference
Configure Value Area .......................................................................639
Value Configuration Options Dialog Box.........................................641
Regular Expression Characters and Usage Options ..........................643
PART V: CONFIGURING SETTINGS
Chapter 23: Global Testing Options .................................................653
Concepts
Global Testing Options Overview .....................................................654
Reference
Options Dialog Box ...........................................................................654
General Pane (Options Dialog Box) ..................................................656
Folders Pane (Options Dialog Box) ...................................................663
Run Pane (Options Dialog Box) ........................................................665
14
Table of Contents
Chapter 24: Business Component and Application Area
Settings .........................................................................................673
Concepts
Business Component and Application Area Settings Overview .......675
Add-in Associations in Your Component .........................................677
Associated Function Libraries............................................................678
Understanding Component Statuses ................................................678
Local System Monitor........................................................................679
Log Tracking ......................................................................................680
Tasks
How to Manually Configure Log Tracking Settings..........................682
Reference
General Pane (Application Area Window) ........................................686
Function Libraries Pane (Application Area Window) .......................689
Object Repositories Pane (Application Area Window) .....................693
Keywords Pane (Application Area Window) .....................................695
Properties Pane (Business Component Settings Dialog Box)............699
Snapshot Pane (Business Component Settings) ...............................704
Applications Pane (Business Component and
Application Area Settings) ...........................................................705
Resources Pane (Business Component Settings Dialog Box) ............710
Parameters Pane (Business Component Settings Dialog Box) ..........712
Recovery Pane (Business Component and
Application Area Settings Dialog Box)..........................................718
Local System Monitor Pane (Application Area Settings
Dialog Box)....................................................................................722
Log Tracking Pane (Business Component and
Application Area Settings Dialog Box)..........................................725
15
Table of Contents
P A R T V I : R U N N I N G A N D A N A L Y ZI N G C O M P O N E N T S
Chapter 25: QuickTest Run Sessions .................................................735
Concepts
Run Sessions - Overview....................................................................736
Tasks
How to Run Your Component ..........................................................737
Reference
Run Dialog Box: Results Location Tab .............................................740
Run Dialog Box: Input Parameters Tab .............................................742
Troubleshooting and Limitations - Run Sessions .............................743
Chapter 26: Run Results Viewer........................................................745
Concepts
Run Results Viewer Overview............................................................746
Run Results File Location ..................................................................751
Tasks
How to Install the Run Results Viewer as a
Standalone Application ................................................................752
How to Open Run Results .................................................................752
How to Navigate the Run Results Tree..............................................754
How to Customize the Run Results Viewer ......................................755
How to Manually Submit Defects to Quality Center........................756
How to Export Run Results ...............................................................758
How to Play a Screen Recorder Movie in the HP Micro Player.........760
Reference
Run Results Viewer User Interface ....................................................761
Run Results Viewer Commands ........................................................764
Run Results Viewer Panes..................................................................768
Run Results Viewer Dialog Boxes ......................................................788
Troubleshooting and Limitations - Viewing Run Results .................806
Chapter 27: Run Results - Understanding Step Results....................807
Concepts
Smart Identification in the Run Results............................................808
Checkpoint and Output Value Results .............................................811
Parameterized Values in the Run Results ..........................................815
16
Table of Contents
P A R T V I I : M A IN T A I N I N G A N D D E B U G G I N G C O M P O N E N T S
Chapter 28: Debugging Components and Function Libraries .........819
Concepts
Debugging Overview ........................................................................820
Considerations for Debugging ..........................................................821
Debug Session Speed .........................................................................821
Single Step Commands......................................................................822
Running to a Step and Debugging from a Step.................................823
Modifying and Watching the Values of
Variables and Properties of Objects During a Run Session...........824
Breakpoints ........................................................................................826
Run Errors ..........................................................................................827
Tasks
How to Debug Your Component or Function Library .....................828
How to Use Breakpoints ....................................................................832
How to Debug a Function - Exercise .................................................833
How to Step Into, Out of, or Over a Specific Step - Exercise ............837
Reference
Debug Viewer Pane............................................................................840
Watch Tab (Debug Viewer Pane) .....................................................842
Variables Tab (Debug Viewer Pane) ..................................................845
Command Tab (Debug Viewer Pane)................................................847
Run Error Message Box......................................................................849
Troubleshooting and Limitations - Debugging.................................850
Chapter 29: Maintaining and Updating Components .....................851
Concepts
Why Components Fail ......................................................................852
Maintenance Run Mode ....................................................................854
Updating Your Test Object Descriptions, Checkpoints, or
Output Values ...............................................................................855
Tasks
How to Use Maintenance Run Mode to Update Your Component
When Your Application Changes .................................................859
How to Update Test Object Descriptions, Checkpoints, or
Output Values ..............................................................................863
17
Table of Contents
Reference
Maintenance Run Wizard .................................................................865
Update Options Tab (Update Run Dialog Box) ................................881
Troubleshooting and Limitations - Maintenance Mode...................883
P A R T V I I I : W O R K I N G W IT H T H E Q U IC K T E S T P A N E S
Chapter 30: QuickTest Window Layout ............................................887
Concepts
QuickTest Window Layout Customization - Overview ....................888
Tasks
How to Customize the QuickTest Window ......................................889
Reference
Tips and Considerations for Customizing the
QuickTest Window Layout ...........................................................898
Button Appearance Dialog Box .........................................................901
Customization Mode - Context Menu Options................................903
Customize Dialog Box .......................................................................904
Windows Dialog Box.........................................................................911
Troubleshooting and Limitations - QuickTest Window Layout.......912
Chapter 31: Available Keywords Pane ..............................................913
Concepts
Available Keywords Pane Overview ..................................................914
Tasks
How to Work with the Available Keywords Pane .............................915
Reference
Available Keywords Pane User Interface ...........................................916
Chapter 32: Information Pane ..........................................................919
Concepts
Information Pane Overview ..............................................................920
18
Table of Contents
Tasks
How to Resolve VBScript Syntax Errors in the
Information Pane ..........................................................................921
Reference
Information Pane User Interface .......................................................922
Chapter 33: Missing Resources Pane ................................................925
Concepts
Missing Resources Overview ............................................................926
Tasks
How to Handle a Missing Resource...................................................929
Reference
Missing Resources Pane User Interface..............................................931
Chapter 34: Process Guidance Panes................................................935
Concepts
Process Guidance Overview ..............................................................936
Tasks
How to Manage Process Guidance ....................................................937
Reference
Process Guidance Management Dialog Box......................................939
Process Guidance Panes User Interface .............................................940
Chapter 35: Resources Pane..............................................................945
Concepts
Resources Pane Overview ..................................................................946
Tasks
How to View Associations Between Resources and
Your Component ..........................................................................946
Reference
Resources Pane User Interface ...........................................................948
19
Table of Contents
Chapter 36: To Do Pane ....................................................................953
Concepts
To Do Pane Overview........................................................................954
Tasks
How to Manage Tasks and TODO Comments ..................................955
Reference
Task Editor Dialog Box ......................................................................956
To Do Pane User Interface.................................................................958
P A R T I X : W O R K I N G W I TH A D V A N C E D F E A T U R E S
Chapter 37: Recovery Scenarios........................................................967
Concepts
Recovery Scenarios Overview ............................................................968
Tasks
How to Create and Manage Recovery Scenarios ...............................972
How to Manage Recovery Scenario Associations ..............................974
Reference
Add Recovery Scenario Dialog Box ...................................................976
Recovery Scenario Manager Dialog Box............................................978
Recovery Scenario Properties Dialog Box..........................................981
Recovery Scenario Wizard .................................................................983
Troubleshooting and Limitations - Recovery Scenarios .................1013
Chapter 38: QuickTest Automation Scripts ....................................1015
Concepts
QuickTest Automation Object Model Overview.............................1016
When to Use QuickTest Automation Scripts ..................................1018
Application Object ..........................................................................1019
QuickTest Automation Object Model Reference ............................1020
Generated Automation Scripts ........................................................1020
Tasks
How to Create a QuickTest Automation Script...............................1022
How to Run Automation Scripts on a Remote Computer ..............1026
20
Table of Contents
PA RT X : W O RK IN G W I T H QU AL IT Y C ENT E R
Chapter 39: Quality Center Integration..........................................1031
Concepts
Quality Center Integration Overview .............................................1033
QuickTest Remote Agent Preferences..............................................1035
Tasks
How to Work with Components in Quality Center .......................1036
How to Enable Quality Center to Run Tests on a
QuickTest Computer...................................................................1039
How to Use the Quality Center Connectivity Add-in ....................1039
How to View or Modify Remote Agent Settings .............................1040
Reference
HP ALM Connection Dialog Box ....................................................1041
Remote Agent Settings Dialog Box..................................................1048
Troubleshooting and Limitations Quality Center Integration .........................................................1054
Chapter 40: Resources and Dependencies Model ..........................1059
Concepts
Resources and Dependencies Model Overview...............................1060
Asset Dependencies - Advantages ...................................................1061
Reference
Relative Paths and Quality Center ..................................................1064
Resources and Dependencies Model Terminology .........................1065
Quality Center Resources-Related User Interface............................1066
Troubleshooting and Limitations Resources and Dependencies ......................................................1071
21
Table of Contents
Chapter 41: Viewing and Comparing Versions of
QuickTest Assets .........................................................................1073
Concepts
Asset Comparison Tool and Asset Viewer - Overview ....................1074
Tasks
How to Open the QuickTest Asset Comparison Tool .....................1077
How to Open the QuickTest Asset Viewer ......................................1079
How to Work with the Asset Comparison Tool and
Asset Viewer ................................................................................1081
Reference
Asset Comparison Tool ...................................................................1083
Asset Viewer.....................................................................................1091
Troubleshooting and Limitations - Asset Comparison Tool...........1094
Chapter 42: Version Control in Quality Center 10.00 or
HP ALM .......................................................................................1095
Concepts
Managing Versions of Assets in Quality Center Overview .............1096
Tasks
How to Check In the Currently Open Asset ...................................1103
How to Check Out the Latest Version of an Asset..........................1104
How to Cancel a Check-Out Operation ..........................................1105
Reference
Version Management Commands ..................................................1106
Check Out Dialog Box.....................................................................1107
Check In Dialog Box ......................................................................1108
Version History Dialog Box.............................................................1109
Baseline History Dialog Box ............................................................1111
Troubleshooting and Limitations Quality Center Version Control .................................................1114
Chapter 43: HP ALM Sprinter .........................................................1115
Concepts
HP ALM Sprinter Overview ............................................................1116
22
Table of Contents
P A R T X I : A PP E N D I X E S
Appendix A: Naming Conventions .................................................1121
Appendix B: Frequently Asked Questions.......................................1125
Creating Components .....................................................................1126
Working with Function Libraries ....................................................1127
Working with Dynamic Content ....................................................1129
Advanced Web Issues ......................................................................1131
Standard Windows Environment....................................................1134
Component Maintenance ...............................................................1134
Improving QuickTest Performance .................................................1135
Appendix C: Custom Process Guidance Packages ..........................1137
Concepts
Custom Process Guidance Packages - Overview .............................1138
Data Files for Process Guidance Packages .......................................1139
Tasks
How to Create a Custom Package Configuration File.....................1140
How to Install Custom Process Guidance Packages in
QuickTest ....................................................................................1141
Reference
XML Details for Custom Process Guidance Packages .....................1142
Appendix D: Bitmap Checkpoint Customization............................1145
Concepts
About Bitmap Checkpoint Customization .....................................1146
Custom Comparer for Images Whose Location Changes in the
Application - Use-Case Scenario .................................................1147
Custom Bitmap Comparer Development .......................................1149
Tasks
How to Develop a Custom Comparer .............................................1150
How to Implement the Bitmap Comparer Interfaces .....................1154
How to Install Your Custom Comparer and Register it to
QuickTest ....................................................................................1158
How to Use the Bitmap Checkpoint Customization Samples ........1162
How to Develop a Custom Comparer - Tutorial .............................1165
Reference
The Bitmap Checkpoint Comparer Interfaces ................................1177
23
Table of Contents
24
Welcome to the HP QuickTest
Professional for Business Process Testing
User Guide
This chapter includes:
➤
"HP QuickTest Professional for Business Process Testing User Guide
Overview" on page 25
➤
"How Do I Find the Information That I Need?" on page 26
➤
"Documentation Library Contents" on page 28
➤
"Additional Online Resources" on page 32
HP QuickTest Professional for Business Process Testing User
Guide Overview
Welcome to the HP QuickTest Professional for Business Process Testing User
Guide, which explains how to use QuickTest Professional when working
with HP Business Process Testing.
This guide describes how to use QuickTest to create and manage the
application areas on which components are based, including how to define
the various resource files used by components. It also describes how to work
with keyword-driven business components and scripted components for
Business Process Testing in QuickTest Professional.
Business Process Testing is fully integrated with QuickTest and
Quality Center, and is enabled if your license includes Business Process
Testing support.
25
Welcome to the HP QuickTest Professional for Business Process Testing User Guide
Note: Unless otherwise specified, references to Quality Center in this guide
apply to all currently supported versions of Quality Center and HP ALM.
Note that some features and options may not be supported in the specific
edition of Quality Center or HP ALM that you are using.
For a list of the supported versions of Quality Center or HP ALM, see the
HP QuickTest Professional Product Availability Matrix, available from the
Documentation Library Home page or the root folder of the
QuickTest Professional DVD.
For details on Quality Center or HP ALM editions, see the HP Quality Center
User Guide or the HP Application Lifecycle Management User Guide.
Prerequisite Background
This guide is intended for Automation Engineers who are using
QuickTest Professional to work with Business Process Testing. Automation
Engineers should be experts in automated testing using
QuickTest Professional, knowledgeable in keyword-driven testing
methodology and processes, and experienced in VBScript programming.
Automation Engineers work together with Subject Matter Experts to create
business process tests. Subject Matter Experts use the Business Components
module of Quality Center to create business process tests, using resources
created by the Automation Engineers. The Business Components module of
Quality Center is described in the HP Business Process Testing User Guide.
How Do I Find the Information That I Need?
Within this guide, each subject area is organized into topics. A topic
contains a distinct module of information for that subject. The topics are
generally classified according to the type of information they contain.
This structure is designed to create easier access to specific information by
dividing the documentation into the different types of information you
may need at different times.
26
Welcome to the HP QuickTest Professional for Business Process Testing User Guide
Three main topic types are in use: Concepts, Tasks, and Reference. The topic
types are differentiated visually using icons.
Topic Types
Topic Type
Description
Usage
Concepts
General Concepts.
Background, descriptive, or
conceptual information.
Learn general information
about what a feature does.
Use-case Scenario Concepts.
Real-life examples of when or
why to use a specific product
area.
Learn why or when you
may want to use the
feature.
Instructional Tasks.
Step-by-step guidance to help
you work with the application
and accomplish your goals.
Some task steps include
examples, using sample data.
➤ Learn about the overall
Tasks
Task steps can be with or
without numbering:
➤ Numbered steps. Tasks that
workflow of a task.
➤ Follow the steps listed in
a numbered task to
complete a task.
➤ Perform independent
operations by
completing steps in a
non-numbered task.
are performed by following
each step in consecutive
order.
➤ Non-numbered steps. A list
of self-contained operations
that you can perform in any
order.
Exercise Tasks. Step-by-step
instructions for a task using a
sample application or sample
data.
Follow the steps in these
topics to practice the
workflow of a task.
Use-case Scenario Tasks.
Examples of how to perform a
task for a specific situation.
Learn how a task could be
performed in a realistic
scenario.
27
Welcome to the HP QuickTest Professional for Business Process Testing User Guide
Topic Type
Description
Usage
Reference
General Reference. Detailed
lists and explanations of
reference-oriented material.
Look up a specific piece of
reference information
relevant to a particular
context.
User Interface Reference.
Specialized reference topics
that describe a particular user
interface in detail. Pressing F1
in the product area generally
open the user interface topics.
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.
Troubleshooting and
Limitations. Specialized
reference topics that describe
commonly encountered
problems and their solutions,
and list limitations of a feature
or product area.
Increase your awareness of
important issues before
working with a feature, or
if you encounter usability
problems in the software.
Troubleshooting
and Limitations
Documentation Library Contents
This guide is part of the QuickTest Professional Documentation Library. The
Documentation Library provides a single-point of access for all
QuickTest Professional documentation.
You can access the Documentation Library by using the following:
28
➤
Select Help > QuickTest Professional Help.
➤
In the Start menu, select Program Files > HP QuickTest Professional >
Documentation > HP QuickTest Professional Help.
➤
Click in selected QuickTest windows and dialog boxes or press F1.
➤
View a description, syntax, and examples for a QuickTest test object,
method, or property by placing the cursor on it and pressing F1.
Welcome to the HP QuickTest Professional for Business Process Testing User Guide
The Documentation Library includes the following:
Type
Included Documentation
Getting Started
Documentation
➤ Readme provides the latest news and information about
QuickTest. Select Start > Programs > HP Mercury Product >
Readme.
➤ HP Mercury Product Installation Guide explains how to
install and set up QuickTest. Select Help >
QuickTest Professional Help and click the link to the
Installation Guide from the Documentation Library Home
page.
➤ HP Mercury Product Tutorial teaches you basic QuickTest
skills and shows you how to design tests for your
applications. Select Help > Mercury Product Tutorial.
➤ Product Feature Movies provide an overview and step-by-
step instructions describing how to use selected QuickTest
features. Select Help > Product Feature Movies.
➤ What’s New provides an overview of the features,
enhancements and supported environments that are new in
the current version of QuickTest. Choose Help > What’s
New.
29
Welcome to the HP QuickTest Professional for Business Process Testing User Guide
Type
Included Documentation
Feature
Documentation
Mercury Product Help includes:
➤ Home provides links to the Documentation Library guides
in each available format (Help, PDF, and/or HTML).
➤ What’s New in QuickTest Professional describes the newest
features, enhancements, and supported environments in
the latest version of QuickTest.
➤ HP Mercury Product User Guide describes how to use
QuickTest to test your application.
➤ HP Mercury Product for Business Process Testing User
Guide provides step-by-step instructions for using QuickTest
to create and manage assets for use with Business Process
Testing.
➤ HP Mercury Product Add-ins Guide describes how to work
with supported environments using QuickTest add-ins, and
provides environment-specific information for each add-in.
➤ HP Mercury Product Object Model Reference describes
QuickTest test objects, lists the methods and properties
associated with each object, and provides syntax
information and examples for each method and property.
30
Welcome to the HP QuickTest Professional for Business Process Testing User Guide
Type
Included Documentation
Reference
Documentation
➤ HP Mercury Product Advanced References contains
documentation for the following QuickTest COM and XML
references:
➤ HP QuickTest Professional Automation Object Model
provides syntax, descriptive information, and examples
for the automation objects, methods, and properties. It
also contains a detailed overview to help you get started
writing QuickTest automation scripts. The automation
object model assists you in automating test management,
by providing objects, methods and properties that enable
you to control virtually every QuickTest feature and
capability.
➤ HP QuickTest Professional Run Results Schema
documents the run results XML schema, which provides
the information you need to customize your run results.
➤ HP QuickTest Professional Test Object Schema
documents the test object XML schema, which provides
the information you need to extend test object support
in different environments.
➤ HP QuickTest Professional Object Repository Schema
documents the object repository XML schema, which
provides the information you need to edit an object
repository file that was exported to XML.
➤ HP QuickTest Professional Object Repository Automation
documents the Object Repository automation object
model, which provides the information you need to
manipulate QuickTest object repositories and their
contents from outside of QuickTest.
➤ VBScript Reference contains Microsoft VBScript
documentation, including VBScript, Script Runtime, and
Windows Script Host.
31
Welcome to the HP QuickTest Professional for Business Process Testing User Guide
Additional Online Resources
Sample applications. The following sample applications are the basis for
many examples in this guide:
➤
Mercury Tours sample Web site. The URL for this Web site is
newtours.demoaut.com.
➤
Mercury Flight application. To access from the Start menu, select Program
Files > HP QuickTest Professional > Sample Applications > Flight.
Troubleshooting & Knowledge Base accesses 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 accesses 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 documentation, and more. Choose Help > HP Software
Support. The URL for this Web site is www.hp.com/go/hpsoftwaresupport.
Most of the support areas require that you register as an HP Passport user
and sign in. Many also require a support contract.
To find more information about access levels, go to:
http://h20230.www2.hp.com/new_access_levels.jsp
To register for an HP Passport user ID, go to:
http://h20229.www2.hp.com/passport-registration.html
HP Software Web site accesses the HP Software Web site. This site provides
you with the most up-to-date 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.
32
Part I
Introducing Business Process Testing
34
1
QuickTest Professional for Business
Process Testing Introduction
Note: Unless otherwise specified, references to Quality Center in this guide
apply to all currently supported versions of Quality Center and HP ALM.
Note that some features and options may not be supported in the specific
edition of Quality Center or HP ALM that you are using.
For a list of the supported versions of Quality Center or HP ALM, see the
HP QuickTest Professional Product Availability Matrix, available from the
Documentation Library Home page or the root folder of the
QuickTest Professional DVD.
For details on Quality Center or HP ALM editions, see the HP Quality Center
User Guide or the HP Application Lifecycle Management User Guide.
This chapter includes:
Concepts
➤
QuickTest Professional for Business Process Testing Overview on page 36
➤
Business Process Testing Overview on page 37
➤
QuickTest Program Management on page 48
Reference
➤
HP ALM / Quality Center Business Components Module User Interface
on page 52
35
Chapter 1 • QuickTest Professional for Business Process Testing Introduction
Concepts
QuickTest Professional for Business Process Testing
Overview
Welcome to QuickTest Professional for Business Process Testing. Business
Process Testing enables non-technical Subject Matter Experts (working in
Quality Center) to collaborate effectively with Automation Engineers
(working in QuickTest Professional). Together, you can build, document,
and run business process tests, without requiring programming knowledge
on the part of the Subject Matter Expert.
QuickTest Professional is Unicode compliant according to the requirements
of the Unicode standard (http://www.unicode.org/standard/standard.html),
enabling you to test applications in many international languages. Unicode
represents the required characters using 8-bit or 16-bit code values. This
allows processing and display of many diverse languages and character sets.
You can test non-English language applications, as long as the relevant
Windows language support is installed on the computer on which
QuickTest Professional is installed (Start > Settings > Control Panel >
Regional Options or similar). For additional information on Unicode and
multi-lingual support issues, see the "Troubleshooting and
Limitations - Multilingual Applications" on page 1206.
This guide describes the QuickTest Professional features and options that
enable you—the Automation Engineer—to create and modify the
automated resources required for Business Process Testing, as well as create
components, which are the building blocks of business process tests.
Note: Although you can also use QuickTest to create scripted components
for use in business process tests, this guide focuses on the functionality and
features associated primarily with business components. You can find
information on the differences between scripted components and business
components in QuickTest in Chapter 15, "Scripted Components."
36
Chapter 1 • QuickTest Professional for Business Process Testing Introduction
Business Process Testing Overview
Business Process Testing enables structured testing of an application by
combining test automation and automatically generated,
easy-to-understand test documentation. Business Process Testing is not
dependent on the completion of detailed testing scripts. This enables
applications to be tested manually before automated tests are ready. This
also enables business process tests to be created and implemented more
quickly than other automated tests, enabling potential performance issues
to be detected earlier in the development process, before downtime can
occur.
Role-Based Testing
Business Process Testing is a role-based testing model. It enables Automation
Engineers and Subject Matter Experts to work together to test an
application’s business processes during the application’s development life
cycle. For descriptions of the roles, see "QuickTest Professional for Business
Process Testing - Terminology" on page 39.
Note: Each organization defines the roles of Automation Engineer and
Subject Matter Expert according to its needs. This guide assumes that you
are performing the role of the Automation Engineer as defined above, and
that the role of Subject Matter Expert is performed by other personnel in
your organization. However, these roles are flexible and depend on the
abilities and time resources of the personnel using Business Process Testing.
There are no product-specific rules or limitations controlling which roles
must be defined in a particular organization, or which types of users can do
which Business Process Testing tasks (provided that the users have the
correct permissions).
37
Chapter 1 • QuickTest Professional for Business Process Testing Introduction
Integrating with Quality Center
Integration between QuickTest and Quality Center enables the Automation
Engineer to effectively create and maintain the required resources and
settings, while enabling Subject Matter Experts to create and implement
business process tests in a script-free environment, without the need for
programming knowledge.
This section also includes:
38
➤
"QuickTest Professional for Business Process Testing - Terminology" on
page 39
➤
"Business Components Overview" on page 41
➤
"Application Areas Overview" on page 43
➤
"Business Process Testing Workflow" on page 45
➤
"HP ALM / Quality Center Test Plan Module Overview" on page 46
➤
"HP ALM / Quality Center Business Components Module Overview" on
page 47
Chapter 1 • QuickTest Professional for Business Process Testing Introduction
QuickTest Professional for Business Process Testing Terminology
The following terminology, specific to QuickTest Professional for Business
Process Testing, is used in this guide:
Term
Description
Application
Area
A collection of resources and settings that are used for the
creation and implementation of business components. These
include function libraries, shared object repositories, keywords,
testing preferences, and other testing resources, such as recovery
scenarios.
An application area provides a single point of maintenance for
all elements associated with the testing of a specific part of your
application. You can define separate application areas for each
part of your application and then associate your components
with the appropriate application areas.
Automation
Engineer
An expert in QuickTest Professional automated testing. The
Automation Engineer defines and manages the resources that
are needed to create and work with business components. The
Automation Engineer creates application areas that specify all of
the resources and settings needed to enable Subject Matter
Experts to create business components and business process
tests in Quality Center.
The Automation Engineer can create and modify function
libraries, and populate a shared object repository with test
objects that represent the different objects in the application
being tested. The Automation Engineer can also create and
debug business components in QuickTest.
Business
Component
(or
Component)
An easily-maintained, reusable unit comprising one or more
steps that perform a specific task. Business components may
require input values from an external source or from other
components, and they can return output values to other
components. Also known as Keyword-Driven Component.
Business
Process Test
A scenario comprising a serial flow of business components,
designed to test a specific business process of an application.
39
Chapter 1 • QuickTest Professional for Business Process Testing Introduction
Term
Description
Component
Input
Parameters
Variable values that a business component can receive and use
as the values for specific, parameterized steps in the component.
Component
Output
Parameters
Values that a business component can return. These values can
be viewed in the business process run results and can also be
used as input for a component that is used later in the test.
Flow
A collection of business components in a fixed sequence. A flow
is a type of test that performs a specific task. You can use a flow
in multiple business process tests. When you modify a flow or
any of its components, all business process tests containing that
flow reflect that modification.
The Subject Matter Expert creates flows in the Quality Center
Test Plan module. You can also use Run conditions to enhance
the flexibility of a flow by enabling components to run
selectively, based on earlier stages within the flow.
40
Function
Library
A document containing VBScript functions, subroutines,
modules, and so forth. These functions can be used as
operations (keywords) in components. You can create and
debug function library documents using the QuickTest function
library editor.
Keyword View
A spreadsheet-like view that enables tests and components to be
created, viewed, and debugged using a keyword-driven,
modular, table format.
Local Input
Parameters
Variable values defined within a component. These values can
be received and used by a later parameterized step in the same
component.
Local Output
Parameters
Values that an operation or a component step can return for use
within the same component. These values can be viewed in the
business process run results and can also be used as input for a
later step in the component.
Manual
Component
A non-automated business component created in
Quality Center. In QuickTest, you can view and work with
manual components only after converting them to automated
business components.
Chapter 1 • QuickTest Professional for Business Process Testing Introduction
Term
Description
Roles
The various types of users who are involved in Business Process
Testing.
Scripted
Component
An automated component that can contain programming logic
and can be edited in QuickTest using the Keyword View, the
Expert View, and other QuickTest tools and options.
Subject Matter
Expert.
A person who has specific knowledge of the application logic, a
high-level understanding of the entire system, and a detailed
understanding of the individual elements and tasks that are
fundamental to the application being tested.
The Subject Matter Expert uses Quality Center to create and run
components and business process tests.
Business Components Overview
Components are easily-maintained, reusable units that perform a specific
task. They are the building blocks of business process tests. The task of
creating and running components and business process tests is generally
performed by Subject Matter Experts working in Quality Center.
Each component is comprised of several application steps that are logically
performed together in a specific order.
Example
In a Web application, a login component might be comprised of four steps.
Its first step could be to open the application. Its second step could be to
enter a user name. Its third step could be to enter a password, and its last
step could be to click the Submit button on the Web page. By creating and
calling functions stored in function libraries, you can enhance the
component with additional logic to test important details of the login task.
By design, each component tests the functionality in a specific part of an
application. When combined, components are incorporated into a business
process test in a serial flow representing the main tasks performed within a
particular business process.
41
Chapter 1 • QuickTest Professional for Business Process Testing Introduction
Example
A business process test for a flight reservation application may include a
login component, a flight finder component, a flight reservation component, a
purchasing component, and a logout component. The flight finder, flight
reservation, and purchasing components might be reused several times
within the same business process test to test multiple reservation scenarios.
The test might also include a component that resets the application between
flight reservations, enabling the test to perform multiple iterations of flight
reservations.
Due to the modularity and reusability of components, they can be used in
multiple business process tests.
Example
The same login and logout components could be used in conjunction with an
analysis (report) component that tests the report and graph generation
process in the application, or with a frequent flyer component that tests the
business process of subscribing to a frequent flyer program.
QuickTest provides two types of components: business components and
scripted components. Business components (also known as keyword-driven
components) are fully integrated with both QuickTest and Quality Center,
enabling both you and Subject Matter Experts to create, modify, and run
them.
Scripted components are more complex components containing
programming logic that can be created in Quality Center or QuickTest. Due
to their complexity, scripted components can be modified only in
QuickTest. Subject Matter Experts can incorporate scripted components in
business process tests, but they cannot modify them.
Tip: You can use QuickTest process guidance to guide you through the
process of creating a business component. For more information, see
"Process Guidance Panes" on page 935.
42
Chapter 1 • QuickTest Professional for Business Process Testing Introduction
Application Areas Overview
The application area is the foundation upon which components are built.
An application area provides a single point of maintenance for all elements
associated with the testing of a specific part of an application.
In the application area, you can define specific settings that are relevant for
testing a particular part of your application. For example, you can define
settings that instruct QuickTest to load specific add-ins at the start of a run
session, run a component only on specified applications, activate a recovery
scenario under particular conditions, and so forth. You can also specify the
keywords that are available to any component that is associated with that
particular application area.
An important aspect of application areas are the resource files that can be
used by a component. After you create these resource files you store them in
the same Quality Center project used by the Subject Matter Experts who
create and run the business process tests for the specific application. Typical
resource files include function libraries and shared object repositories.
Creating and Maintaining Application Areas
➤
You create, populate, and maintain shared object repository files that are
used by QuickTest to identify the objects in your application. You define
and modify test object information in shared object repositories using the
QuickTest Object Repository Manager.
➤
After you associate shared object repository files with the application area,
you can prioritize them according to relevance. By associating a shared
object repository with an application area, any component based on that
application area will have access to all of its test objects and other
elements. For more information, see Chapter 4, "Managing Test Objects in
Object Repositories," and Chapter 6, "Shared Object Repositories."
➤
You also create function libraries that contain functions, or operations
(also known as keywords), that can be called by a component. These
functions contain programming logic that encapsulates the steps needed
to perform a particular task, and they enhance the functionality of the
component that calls them. You can use QuickTest to create these
function libraries. You can also use the QuickTest Function Definition
Generator to insert basic function definitions, and then complete each
function by adding its code.
43
Chapter 1 • QuickTest Professional for Business Process Testing Introduction
44
➤
After you associate function library files with an application area, you can
prioritize them according to relevance. By associating a function library
with an application area, any component based on that application area
will have access to all public functions defined within that function
library. For more information on working with function libraries, see
Chapter 10, "Working in Function Library Windows."
➤
You can create multiple application areas—each one focusing on a
particular part (area) of the application being tested. For example, for a
flight reservation application, one application area could be created for
the login module, another application area for the flight search module,
another for the flight reservation module, and still another for the billing
module. For more information on application areas, see Chapter 14,
"Application Areas."
➤
In addition to creating and maintaining the resource files associated with
the application areas, you can also use QuickTest to debug components
and their associated function libraries. You can also create components in
QuickTest, although this is more often done by Subject Matter Experts
using Quality Center. For more information, see Chapter 13, "Business
Components."
➤
You can use QuickTest process guidance to guide you through the process
of creating an application area. For more information, see "Process
Guidance Panes" on page 935.
➤
You save application areas in the Test Resources module in
Quality Center, which enables you to see at a glance which resources are
associated with a particular application area, and which flows and
components are using that application area. For more information, see
"Resources and Dependencies Model" on page 1059.
Chapter 1 • QuickTest Professional for Business Process Testing Introduction
Business Process Testing Workflow
Business Process Testing is flexible and does not enforce any one particular
model for incorporating business processes into your testing environment.
The actual workflow in an organization may differ for different projects, or
at different stages of the application development life cycle.
A methodology of defining low-level components first and then designing
business process tests based on the defined components is a legitimate
methodology that may meet your needs. This section, however, presents a
top-down methodology as a preferred alternative from the perspective of the
subject matter expert with a high-level understanding of the entire system.
The top-down methodology presented here for working with Business
Process Testing comprises:
➤
The high-level design and creation of a structure for business process
tests. This means designing a modular business process test with reuse in
mind. The utilization of components and flows promotes reuse and easier
maintenance.
This part of the design phase is often done together by both the Subject
Matter Expert and the Automation Engineer.
➤
The mid-level design, including the:
➤
Creation of flows (sets of business components in a logical order that
can be executed).
➤
Creation of business components (reusable units that perform specific
tasks in a business process).
➤
Specifying criteria for more granular test coverage (requirements) as
necessary.
➤
Specifying different test configurations for testing different use-cases
and for more "true-to-life" test coverage (requirements).
This part of the design phase is typically done by the Subject Matter
Expert.
45
Chapter 1 • QuickTest Professional for Business Process Testing Introduction
➤
The low-level implementation of business component content by
creating component steps, setting up iterations (for business process tests,
flows, and components), parameterizing, and when necessary,
automating.
This part of the design phase can be performed by the Subject Matter
Expert, the Automation Engineer, or both together, depending on
available skills and resources.
➤
The execution of the business process tests and flows.
The top-down methodology therefore advocates the creation of business
process testing entities according to the following hierarchy:
➤
Business process tests, which contain flows and/or business components.
➤
Flows, which contain business components.
➤
Business components, which contain steps.
Business process tests, business components, and flows are created using the
Quality Center or HP ALM Business Components module and Test Plan
module. Components can also be created using QuickTest, when QuickTest
is connected to a Quality Center project with business process testing
support.
HP ALM / Quality Center Test Plan Module Overview
The Subject Matter Expert first creates a business process test or flow in the
Test Plan module. A flow is a collection of business components in a fixed
sequence that can be used as a unit in multiple business process tests. Flows
are available only in HP ALM / Quality Center.
To populate the business process test or flow, the Subject Matter Expert then
selects (drags and drops) the relevant components and configures their run
settings.
Each component can be used differently by different business process test
configurations or flows. For example, for each test configuration, the
component can use different input parameter values or run a different
number of iterations.
46
Chapter 1 • QuickTest Professional for Business Process Testing Introduction
If, while creating a business process test or flow, the Subject Matter Expert
realizes that a component has not been defined for an element that is
necessary for the business process test or flow, the Subject Matter Expert can
submit a component request from the Test Plan module.
HP ALM / Quality Center Business Components Module
Overview
Before automated testing resources are available, Subject Matter Experts can
define manual steps using the Business Components module. They can add
these manual components to a business process test and run the steps
manually using the HP ALM / Quality Center Manual Runner.
As they define components, Subject Matter Experts can add comments in
the Business Components module. This enables them to enter any
additional information or remarks that they want to communicate to you,
the Automation Engineer, such as requests for new operations, future
changes planned for the component, or alternative tests in which the
component can be used.
During this design phase, you can work with the Subject Matter Experts to
define which resources and settings are needed for each component. You
can then create individual application areas for the various parts of your
application based on real testing needs. Each application area specifies the
settings and resource files used by components when working with business
process tests. The Subject Matter Expert always associates a component with
a particular application area, as this enables it to access these settings and
resource files. For an overview of application areas, see "Application Areas
Overview" on page 43.
After you create the application area and define its settings and resource
files, the Subject Matter Expert can incorporate these automated testing
resources in business component steps, convert any existing manual
components to automated components, and create new automated
components.
For user interface details, see "HP ALM / Quality Center Business
Components Module User Interface" on page 52.
47
Chapter 1 • QuickTest Professional for Business Process Testing Introduction
QuickTest Program Management
The following sections describe different operations you can perform to
manage your QuickTest Professional program, set user permissions, and
update license information.
This section includes:
➤
"Access Permissions" on page 48
➤
"Mercury Tours Sample Site" on page 50
➤
"License Information" on page 50
➤
"QuickTest Software Updates" on page 50
Access Permissions
You must make sure the following access permissions are set to run
QuickTest Professional or to work with Quality Center.
Permissions Required When Working with
QuickTest Professional
You must have the following file system permissions:
➤
Full read and write permissions for all the files and folders under the
folder in which QuickTest is installed
➤
Full read and write permissions to the Temp folder
➤
Read permissions to the Windows folder and to the System folder
You must have the following registry key permissions:
48
➤
Full read and write permissions to all the keys under
HKEY_CURRENT_USER\Software\Mercury Interactive
➤
Read and Query Value permissions to all the HKEY_LOCAL_MACHINE and
HKEY_CLASSES_ROOT keys
Chapter 1 • QuickTest Professional for Business Process Testing Introduction
Permissions Required When Working with Quality Center
You must have the following Quality Center-specific permissions:
➤
Full read and write permissions to the Quality Center cache folder
➤
Full read and write permissions to the QuickTest Add-in for Quality
Center installation folder
Permissions Required When Working with Business Process
Testing
The Quality Center Project Administrator can control access to a project by
defining which users can log in to it and by specifying the types of tasks
each user may perform. The Quality Center Project Administrator can assign
permissions for adding, modifying, and deleting folders, components, steps,
and parameters in the Business Components module of a Quality Center
project.
You need to make sure you have the required Quality Center permissions
before working with business components and application areas.
➤
To work with component steps in Quality Center, you must have the
appropriate Add Step, Modify Step, or Delete Step permissions set. You
do not need Modify Component permission to work with component
steps. The Modify Component permission enables you to work with
component properties (the fields in the component Details tab).
➤
To work with parameters in Quality Center or in a testing tool, you must
have all the parameter task permissions set in Quality Center.
➤
To modify application areas, you must have the required permissions for
modifying components, and adding, modifying, and deleting steps. All
four permissions are required. If one of these permissions is not assigned,
you can open application areas only in read-only format.
For more information on setting user group permissions in the Business
Components module, see the HP Business Process Testing User Guide, available
from the Quality Center online Documentation Library.
49
Chapter 1 • QuickTest Professional for Business Process Testing Introduction
Mercury Tours Sample Site
Many examples in this guide use the Mercury Tours sample Web site. The
URL for this Web site is: http://newtours.demoaut.com.
Note that you must register a user name and password to use this site.
A sample Flight Windows-based application is also provided with the
QuickTest Professional installation. You can access it from Start > Programs
> HP QuickTest Professional > Sample Applications > Flight.
License Information
Working with QuickTest requires a license. When you install QuickTest, you
select one of the following license types:
➤
A permanent seat license that is specific to the computer on which it is
installed (includes a 30-day demo license)
➤
A network-based concurrent license that can be used by multiple
QuickTest users
You can change your license type at any time (as long as you are logged in
with administrator permissions on your computer). For example, if you are
currently working with a seat license, you can choose to connect to a
concurrent license server, if one is available on your network.
For information on modifying your license information, see the
HP QuickTest Professional Installation Guide.
QuickTest Software Updates
By default, QuickTest automatically checks for online software updates once
every seven days. When you start QuickTest, it checks to see if the last
automatic update took place more than seven days ago, and if so, it checks
for updates.
You can also manually check for updates to all HP products installed on
your computer at any time by choosing Help > HP Update from within
QuickTest, or by choosing Start > Programs > HP QuickTest Professional >
HP Update. (You must be logged on with Administrator privileges to use HP
Update.)
50
Chapter 1 • QuickTest Professional for Business Process Testing Introduction
If updates are available, you can choose which ones you want to download
and (optionally) install. Follow the on-screen instructions for more
information.
Tip: You can disable automatic checking for updates by clearing the Check
for software updates automatically check box in the General pane of the
Options dialog box. To open the Options dialog box, select Tools > Options.
51
Chapter 1 • QuickTest Professional for Business Process Testing Introduction
Reference
HP ALM / Quality Center Business Components Module
User Interface
The Business Components module is different depending on whether you
are accessing it from HP ALM or Quality Center. This section includes:
➤
"HP ALM Business Components Module" on page 52
➤
"Quality Center Business Components Module" on page 54
HP ALM Business Components Module
The Subject Matter Expert creates new components and defines them in the
HP ALM Business Components module.
52
Chapter 1 • QuickTest Professional for Business Process Testing Introduction
The HP ALM Business Components module enables you to provide a
complete overview of the component’s content and includes the following
tabs:
➤
Details. Provides a general summary of the component’s purpose or goals,
and the condition of the application before and after a component is run
(its pre-conditions and post-conditions). You can specify details and
implementation requirements for the currently selected business
component.
➤
Snapshot. Displays an image that provides a visual cue or description of
the component’s purpose or operations. You can capture a snapshot
image from the application and attach it to the currently selected
business component.
➤
Component Steps. Enables you to create or view the manual steps of your
business component, and to automate it if required.
➤
Parameters. Specifies the input and output component parameters and
parameter values for the business component. This allows the component
to receive data from an external source and to pass data to other
components or flows.
➤
Dependencies tab. Displays a list of assets that are linked to the currently
selected business component, enabling you to view the dependency
relationships between components, tests, flows, and resources (including
application areas).
➤
History tab. Displays a log of changes made to the component.
➤
Live Analysis tab. When a folder is selected, this tab is available for
creating a graphical representation of data related to business
components.
53
Chapter 1 • QuickTest Professional for Business Process Testing Introduction
Quality Center Business Components Module
The Subject Matter Expert creates new components and defines them in the
Quality Center Business Components module.
The Quality Center Business Components module includes the following
tabs:
54
➤
Details. Provides a general summary of the component’s purpose or goals,
and the condition of the application before and after a component is run
(its pre-conditions and post-conditions). You can specify details and
implementation requirements for the currently selected business
component.
➤
Snapshot. Displays an image that provides a visual cue or description of
the component’s purpose or operations. You can capture a snapshot
image from the application and attach it to the currently selected
business component.
Chapter 1 • QuickTest Professional for Business Process Testing Introduction
➤
Parameters. Specifies the input and output component parameters and
parameter values for the business component. Implementing and using
parameters enables a component to receive data from an external source
and to pass data to other components in the business process test flow.
➤
Design Steps. Enables you to create or view the manual steps of your
business component, and to automate it if required.
➤
Automation. Displays or provides access to automated components. For
keyword-driven components, enables you to create and modify the steps
of your automated business component in a keyword-driven, table
format, and provides a plain-language textual description of each step of
the implemented component.
➤
Dependencies tab. Displays a list of assets that are linked to the currently
selected business component.
➤
History tab. Displays a log of changes made to the component.
55
Chapter 1 • QuickTest Professional for Business Process Testing Introduction
56
2
QuickTest at a Glance
This chapter includes:
Concepts
➤
QuickTest Main Window Overview on page 58
➤
QuickTest Panes on page 63
Tasks
➤
How to Start QuickTest on page 71
Reference
➤
QuickTest Main Window - User Interface on page 72
➤
QuickTest Commands on page 76
➤
QuickTest Professional Program Folder Structure on page 99
➤
Start Page on page 104
➤
Add-in Manager Dialog Box on page 106
➤
About QuickTest Professional Dialog Box on page 110
➤
Product Information Window on page 112
Troubleshooting and Limitations - QuickTest Program Management
on page 114
57
Chapter 2 • QuickTest at a Glance
Concepts
QuickTest Main Window Overview
The following table introduces the key elements in the QuickTest window:
Element
Description
Keyword View
Contains each step, in a modular, icon-based table.
For details, see "Keyword View at a Glance" on
page 59.
Start Page
Welcomes you to QuickTest and provides links to
Process Guidance. You can use the shortcut buttons
to open new and existing documents.
For details, see "Start Page" on page 104.
QuickTest Panes
Provide information and functionality about the
currently open function library, business
component or application area.
For details, see "QuickTest Panes" on page 63.
The following document types are available in QuickTest Professional:
Document
Description
Business Component
Enables you to create, view, and modify your
business component using keywords and
operations.
For details, see "Business Components" on page 473.
Scripted Component
Enables you to create, view, and modify your
scripted component in Keyword View or Expert
View. For details on the Expert View, see the
HP QuickTest Professional User Guide.
For details, see "Scripted Components" on page 521.
58
Chapter 2 • QuickTest at a Glance
Document
Description
Application Area
Enables you to define resources and settings for
your components.
For details, see "Application Areas" on page 497.
Function Library
Enables you to create, view, and modify functions
and subroutines for use with your component.
For details, see "Function Libraries at a Glance" on
page 62.
Keyword View at a Glance
The Keyword View enables you to create and view the steps of your
component in a keyword-driven, modular, table format. The Keyword View
is comprised of a table-like view, in which each step is a separate row in the
table, and each column represents different parts of the steps. You can
modify the columns displayed to suit your requirements.
You create and modify components by selecting items and operations in the
Keyword View and entering information as required. Each step is
automatically documented as you complete it, enabling you to view a
description of your test steps in understandable English.
For details on using the Keyword View, see Chapter 16, "Keyword View."
59
Chapter 2 • QuickTest at a Glance
Application Areas at a Glance
Each business component is based on an application area that provides it
with settings and links to specific resource files, such as function library
files, shared object repositories (that contain the test objects used by the
application), associated add-ins, and recovery scenario files. You define
these assets in the application area window.
60
Chapter 2 • QuickTest at a Glance
The application area window contains four panes that are accessed by the
buttons in the left sidebar:
Pane
Description
General
Displays general information about the application
area and enables you to modify its general settings,
such as specifying associated add-ins, recovery
scenarios, and other settings.
Function Libraries
Enables you to associate function libraries with this
application area and to prioritize them.
Object Repositories
Enables you to associate shared object repositories
with this application area and to prioritize them.
Keywords
Enables you to set the keywords that are available to
this application area and to view their individual
properties.
For more information, see Chapter 14, "Application Areas."
61
Chapter 2 • QuickTest at a Glance
Function Libraries at a Glance
QuickTest provides a built-in editor that enables you to create and debug
function libraries using the same editing features that are available in the
Expert View. Each function library is a separate QuickTest document
containing VBscript functions, subroutines, classes, modules, and so forth.
Each function library opens in its own window, in addition to the
component that is already open. You can work on one or several function
libraries at the same time. After you finish editing a function library, you
can close it, leaving your QuickTest session open. You can also close all open
function libraries simultaneously.
For details, see Chapter 12, "User-Defined Functions and Function Libraries."
62
Chapter 2 • QuickTest at a Glance
QuickTest Panes
The following sections describe the available QuickTest panes:
➤
"Available Keywords Pane at a Glance" on page 64
➤
"Debug Viewer Pane at a Glance" on page 65
➤
"Information Pane at a Glance" on page 66
➤
"Missing Resources Pane at a Glance" on page 67
➤
"Process Guidance Panes at a Glance" on page 68
➤
"Resources Pane at a Glance" on page 69
➤
"To Do Pane at a Glance" on page 70
63
Chapter 2 • QuickTest at a Glance
Available Keywords Pane at a Glance
The Available Keywords pane displays all the keywords available to your
component. It enables you to drag and drop objects or calls to functions
into your component. When you drag and drop an object into your
component, QuickTest inserts a step with the default operation for that
object. When you drag and drop a function into your component,
QuickTest inserts a call to that function.
To view the Available Keywords pane, click the Available Keywords Pane
button or select View > Available Keywords.
For details, see "Available Keywords Pane Overview" on page 914.
64
Chapter 2 • QuickTest at a Glance
Debug Viewer Pane at a Glance
The Debug Viewer pane assists you in debugging your function libraries, and
contains the following tabs:
Tab
Description
Watch
Displays the current value and type of any variable or VBScript
expression that you added to the Watch tab. You can also set or
modify the values of the variables and properties that are displayed.
Variables
Displays the current value and type of all variables that were
recognized up to the last step performed during the run session
that you are debugging. You can also set or modify the values of the
variables that are displayed.
Command
Enables you to run lines of script to set or modify the current value
of a variable or VBScript object in your function library.
To view the Debug Viewer pane, select View > Debug Viewer.
For details, see "Debug Viewer Pane" on page 840.
65
Chapter 2 • QuickTest at a Glance
Information Pane at a Glance
The Information pane provides a list of VBscript syntax errors in your
function library scripts. You can double-click a syntax error to locate the
error in the function library, and then correct it.
To view the Information pane, select View > Information.
For details, see "Information Pane" on page 919.
66
Chapter 2 • QuickTest at a Glance
Missing Resources Pane at a Glance
The Missing Resources pane provides a list of the resources that are specified
in your component but cannot be found. Missing resources can include
missing function libraries, missing recovery scenarios, unmapped shared
object repositories, and parameters that are connected to shared object
repositories.
Each time you open your component or application area, QuickTest
automatically checks that all specified resources are accessible. If it finds any
resources that are not accessible, QuickTest lists them in the Missing
Resources pane. The Missing Resources pane then enables you to locate or
remove them from your application area. If the Missing Resources pane is
not currently displayed, QuickTest automatically opens it when a missing
resource is detected.
To view the Missing Resources pane, select View > Missing Resources or click
the Missing Resource button.
For details, see "Missing Resources Pane" on page 925.
67
Chapter 2 • QuickTest at a Glance
Process Guidance Panes at a Glance
Process guidance is a tool that provides procedures and descriptions on how
to best perform specific processes, such as creating a component in
QuickTest. You use process guidance to learn about new processes and to
learn the preferred methodology for performing processes with which you
are already familiar. Your organization may also provide you with process
guidance that is accessible from these panes. Process guidance is displayed
in two panes:
➤
Process Guidance Activities pane (shown on the left). Lists the activities
that are part of the selected process, such as adding steps to a component.
➤
Process Guidance Description pane (shown on the right). Describes the
tasks that you need to perform for a selected activity.
To view the Process Guidance panes, select View > Process Guidance or click
the Process Guidance panes toggle button.
.
For details, see Chapter 34, "Process Guidance Panes."
68
Chapter 2 • QuickTest at a Glance
Resources Pane at a Glance
Components are associated with resources such as function libraries,
recovery scenarios, and object repositories (via an application area).
QuickTest displays all the resources associated with a component in the
Resources pane. The Resources pane enables you to view and open all of the
resources in your component.
To view the Resources pane, click the Resources Pane button or select View >
Resources.
For details, see "Resources Pane" on page 945.
69
Chapter 2 • QuickTest at a Glance
To Do Pane at a Glance
The To Do pane enables you to create, view, and manage your TODO tasks.
A TODO task is anything that needs to be done in a component, such as
providing information relevant for handing over a testing document, or
adding a reminder to yourself to add steps that test a new page in your
application. You can assign tasks to others, and you can mark a task as
complete when it is done. Your TODO tasks are saved with the component.
The To Do pane also enables you to view the TODO comments that exist in
an open function library (for example, instructions or notes adjacent to a
step).
To show or hide the To Do pane, select View > To Do or click the To Do Pane
toolbar button.
For details, see "To Do Pane" on page 953.
70
Chapter 2 • QuickTest at a Glance
Tasks
How to Start QuickTest
1 From the Start menu, select Programs > HP QuickTest Professional >
HP QuickTest Professional, or double-click the QuickTest Professional
shortcut on your desktop.
Whenever you start QuickTest, the Add-in Manager dialog box opens,
displaying the currently installed add-ins—unless you specify otherwise.
For a user interface description, see "Add-in Manager Dialog Box" on
page 106.
2 In the Add-in Manager dialog box, select the add-ins you want to load
and click OK. The QuickTest Professional window opens, displaying the
Start Page and a blank test. For details on the Start Page, see "Start Page"
on page 104.
3 To work with components and application areas, connect to your
Quality Center project and begin working with components, as described
in "How to Work with Components in Quality Center" on page 1036.
Note: For details on installing, loading, and working with add-ins, see the
HP QuickTest Professional Installation Guide and the HP QuickTest
Professional Add-ins Guide.
71
Chapter 2 • QuickTest at a Glance
Reference
QuickTest Main Window - User Interface
The QuickTest window enables you to create, view and modify components,
application areas, and function libraries. It also provides access to different
resource management tools.
To access
Start QuickTest, as described in "How to Start QuickTest" on
page 71.
Note: To work with components and application areas, connect to
your Quality Center project. For details, see "HP ALM Connection
Dialog Box" on page 1041.
72
Chapter 2 • QuickTest at a Glance
Important
information
You can work on one component or application area and one or
more function libraries simultaneously. For details, see "Windows
Dialog Box" on page 911.
See also
➤ "QuickTest Main Window Overview" on page 58
➤ "QuickTest Commands" on page 76
➤ "QuickTest Panes" on page 63
➤ "How to Customize the QuickTest Window" on page 889
The following sections describe key elements and functionality in the main
QuickTest window:
➤
"General User Interface Elements" on page 73
➤
"Document Area" on page 74
➤
"Menus and Toolbars" on page 74
➤
"Additional Key Elements" on page 75
➤
"Connecting to Quality Center" on page 75
General User Interface Elements
UI Element
Description
Keyword View
Contains each step, in a modular, icon-based table.
Start Page
Welcomes you to QuickTest and provides links to Process
Guidance. You can use the shortcut buttons to open new and
existing documents.
QuickTest Panes
Provide information and functionality about the currently
open function library, business component or application
area. For a list of available QuickTest panes, see "QuickTest
Panes" on page 63.
73
Chapter 2 • QuickTest at a Glance
Document Area
For your convenience, you can display one active document in the
document area, or you can cascade or tile your open documents.
This area can display the following document types:
Document
Description
Business Component
Enables you to create, view, and modify your
business component using keywords and
operations.
Scripted Component
Enables you to create, view, and modify your
scripted component in Keyword View or Expert
View. For details on the Expert View, see the
HP QuickTest Professional User Guide.
Application Area
Enables you to define resources and settings for
your components.
Function Library
Enables you to create, view, and modify functions
and subroutines for use with your component.
Menus and Toolbars
74
➤
"File Menu" on page 76
➤
"Edit Menu" on page 80
➤
"View Menu" on page 84
➤
"Insert Menu" on page 85
➤
"Automation Menu" on page 88
➤
"Resources Menu" on page 90
➤
"Debug Menu" on page 91
➤
"Tools Menu" on page 92
➤
"Window Menu" on page 95
➤
"Help Menu" on page 96
➤
"Other QuickTest Commands" on page 98
Chapter 2 • QuickTest at a Glance
Additional Key Elements
➤
Document tabs and scroll arrows. Enable you to navigate open
documents in the document area by selecting the tab of the document
you want to activate (bring into focus). When there is not enough space
in the document area to display all of the tabs simultaneously, you can
use the left and right arrows to scroll between your open documents.
➤
QuickTest title bar. Displays the name of the active document. If changes
have been made since it was last saved, an asterisk (*) is displayed next to
the document name in the title bar.
➤
Status bar. Displays the status of the QuickTest application and other
relevant information.
Connecting to Quality Center
To work with business process testing, you must connect QuickTest to the
Quality Center server on which your Quality Center project is stored. This
server handles the connections between QuickTest and your Quality Center
project. For Business Process Testing, you can connect only to
Quality Center 9.2 or later.
Your Quality Center project stores component and run session information
for the application you are testing, including all of the resource files and
settings needed to create and run business process tests. The first time you
connect QuickTest to a Quality Center server and project, QuickTest sets up
default Business Process Testing folders and files in your project. This
enables you to prepare the resources and settings needed for business
components, as well as create, work with, and debug business components
using the intuitive, keyword-driven Keyword View.
Note: Quality Center projects are password protected, so you must provide a
user name and a password.
For details on connecting to a Quality Center project, see "HP ALM
Connection Dialog Box" on page 1041.
75
Chapter 2 • QuickTest at a Glance
QuickTest Commands
Most commands are available from the menu bar or by pressing shortcut
keys. You can also perform frequently used QuickTest commands by clicking
buttons in the toolbars.
The following menus are available:
➤
"File Menu" on page 76
➤
"Edit Menu" on page 80
➤
"View Menu" on page 84
➤
"Insert Menu" on page 85
➤
"Automation Menu" on page 88
➤
"Resources Menu" on page 90
➤
"Debug Menu" on page 91
➤
"Tools Menu" on page 92
➤
"Window Menu" on page 95
➤
"Help Menu" on page 96
➤
"Other QuickTest Commands" on page 98
Note: Not all toolbars are relevant for all document types.
File Menu
You can manage your component, application area, or function library
using the following File menu commands:
76
Command
Shortcut Key
Function
New > Test
CTRL+N
Creates a new test.
New > Business
Component
CTRL+SHIFT+N
Creates a new business
component.
Chapter 2 • QuickTest at a Glance
Command
Shortcut Key
New > Scripted
Component
Function
Creates a new scripted
component.
New > Application
Area
CTRL+ALT+N
Creates a new application area.
New > Function
Library
SHIFT+ALT+N
Creates a new function library.
Open > Test
CTRL+O
Opens an existing test.
Open > Business/
Scripted Component
CTRL+SHIFT+O
Opens an existing business or
scripted component.
Open > Application
Area
CTRL+ALT+O
Opens an existing application
area.
Open > Function
Library
SHIFT+ALT+O
Opens an existing function
library.
Close
Closes the active function
library.
Close All Function
Libraries
Closes all open function
libraries.
ALM/QC Connection
Opens the HP ALMConnection
dialog box, enabling you to
connect to an HP ALM or
Quality Center project.
Tip:
➤ Double-click the ALM/QC
icon on the status bar to
manage your connection.
➤ Point to the ALM/QC icon on
the status bar to view
connection information.
77
Chapter 2 • QuickTest at a Glance
Command
Shortcut Key
ALM/QC Version
Control
Function
Provides a sub-menu of options
for managing versions of
QuickTest assets and baselines in
Quality Center. The
version-related sub-menu is
available only when you are
connected to a version-control
enabled Quality Center project.
For details, see "Version
Management Commands" on
page 1106.
Save
78
CTRL+S
Saves the active document.
Save As
Opens the relevant Save dialog
box so you can save the open
document.
Save Test with
Resources
Saves a standalone copy of the
current test together with its
resource files. (Relevant only for
tests)
Save All
Saves all open documents.
Enable Editing
Makes read-only function
libraries editable.
Export Test to Zip File
CTRL+ALT+S
Creates a zip file of the active
test. (Relevant only for tests)
Import Test from Zip
File
CTRL+ALT+I
Imports a test from a zip file.
(Relevant only for tests)
Convert to Scripted
Component
CTRL+ALT+C
Converts a business component
to a scripted component.
Print
CTRL+P
Prints the active document.
Chapter 2 • QuickTest at a Glance
Command
Shortcut Key
Function
Print Preview
Displays the Keyword View as it
will look when printed and
enables you to modify the page
setup.
Settings
Opens the Settings dialog box,
enabling you to define settings
for the open document. (Not
relevant for function libraries)
Process Guidance
Management
Opens the Process Guidance
Management dialog box,
enabling you to manage the list
of processes that are available in
QuickTest.
Change Application
Area
Enables you to associate the
component with a different
application area.
Associate Library
’<Function Library
Name>’ with
’<Document Name>’
Associates the active function
library with the open document.
(Available only from function
libraries)
Recent Files
Lists the recently viewed files.
Exit
Closes the QuickTest session.
Many of the File menu commands are also available by default from the
Standard toolbar, shown below:
79
Chapter 2 • QuickTest at a Glance
Edit Menu
You can manage your component or function library steps using the
following Edit menu commands:
Command
Shortcut Key
Function
Undo
CTRL+Z
Reverses the last command or
deletes the last entry you typed.
Redo
CTRL+Y
Reverses the most recent
operation of the Undo
command.
Cut
CTRL+X
Removes the selection from
your document.
Copy
CTRL+C
Copies the selection from your
document.
Paste
CTRL+V
Pastes the selection to your
document.
Delete
DELETE
Deletes the selection from your
document.
Copy Documentation
to Clipboard
Copies the content of the
Documentation column of the
Keyword View, enabling you to
paste it in an external
application.
Action > Split Action
Separates an action into two
sibling actions or into
parent-child nested actions.
(Relevant only for tests)
Action > Rename
Action
Action > Delete
Action
80
SHIFT+F2
Changes the name of an action.
(Relevant only for tests)
Enables you to remove the
selected call to the action, or
delete the action and its calls
from the active test. (Relevant
only for tests)
Chapter 2 • QuickTest at a Glance
Command
Shortcut Key
Function
Action > Action
Properties
Enables you to specify options,
parameters, and associated
object repositories for a stored
action. (Relevant only for tests)
Action > Action Call
Properties
Enables you to specify the
number of run iterations
according to the number of
rows in the data table, and to
define the values of input
parameters and the storage
location of output parameters.
(Relevant only for tests)
Step Properties >
Comment Properties
CTRL+ENTER;
ALT+ENTER
Opens the Comment Properties
dialog box for a comment step.
Available only when the
selected step is a comment.
Step Properties >
Object Properties
CTRL+ENTER;
ALT+ENTER
Opens the Object Properties
dialog box for a selected object.
Available only when the
selected step contains a test
object.
Step Properties >
Checkpoint
Properties
Opens the relevant Checkpoint
Properties dialog box for a
selected object. Available only
when the selected step is a
checkpoint step.
Step Properties >
Output Value
Properties
Opens the relevant Output
Value Properties dialog box for a
selected object. Available only
when the selected step is an
output value step.
Step Properties >
Report Properties
CTRL+ENTER;
ALT+ENTER
Displays the Report Properties
dialog box for a report step.
Available only when the
selected step is a
Reporter.ReportEvent step.
81
Chapter 2 • QuickTest at a Glance
82
Command
Shortcut Key
Function
Find
CTRL+F
Searches for a specified string.
(Relevant for tests and function
libraries)
Replace
CTRL+H
Searches and replaces a specified
string. (Relevant for tests and
function libraries)
Go To
CTRL+G
Moves the cursor to a particular
line in the function library.
(Relevant also for tests)
Bookmarks
CTRL+B
Creates bookmarks in your
function library for easy
navigation. (Relevant also for
tests)
Advanced >
Comment Block
CTRL+M
Comments out the current row,
or selected rows in a function
library. (Relevant also for tests)
Advanced >
Uncomment Block
CTRL+SHIFT+M
Removes the comment
formatting from the current or
selected rows in a function
library. (Relevant also for tests)
Advanced > Indent
TAB
Indents the step in a function
library according to the tab
spacing defined in the Editor
Options dialog box. (Relevant
also for tests)
Advanced > Outdent
BACKSPACE
Outdents the step in a function
library (reduces the
indentation) according to the
tab spacing defined in the
Editor Options dialog box.
(Relevant also for tests)
Advanced > Go to
Function Definition
ALT+G
Navigates to the definition of
the selected function in the
function library.
Chapter 2 • QuickTest at a Glance
Command
Shortcut Key
Function
Advanced >
Complete Word
CTRL+SPACE
Completes the word when you
type the beginning of a
VBScript method or object in a
function library.
Advanced >
Argument Info
CTRL+SHIFT+
SPACE
Displays the syntax of a method
in a function library.
Advanced > Apply
"With" to Script
CTRL+W
Generates With statements for
the action displayed in the
Expert View, and enables
IntelliSense within With
statements. (Relevant only for
tests)
Advanced > Remove
"With" Statements
CTRL+SHIFT+W
Converts any With statements
in the action displayed in the
Expert View to regular
(single-line) VBScript
statements. (Relevant only for
tests)
Optional Step
Inserts an optional step (a step
that is not required to
successfully complete a run
session). (Relevant only for
tests)
Many of the Edit menu commands are also available by default from the
Edit toolbar, shown below:
83
Chapter 2 • QuickTest at a Glance
View Menu
You can manage the way that QuickTest is displayed on your screen using
the following View menu commands:
Command
Function
Start Page
Opens the Start Page. (Enabled only when the Start
Page is closed)
Active Screen
Displays the Active Screen. (Relevant only for tests)
Available Keywords
Shows and hides the Available Keywords pane.
Data Table
Displays the Data Table pane. (Relevant only for
tests)
Debug Viewer
Shows and hides the Debug Viewer pane.
Information
Shows and hides the Information pane.
Missing Resources
Shows and hides the Missing Resources pane.
Process Guidance
Shows and hides the Process Guidance panes.
Resources
Shows and hides the Resources pane.
Test Flow
Shows and hides the Test Flow pane. (Relevant
only for tests)
To Do
Shows and hides the To Do pane.
Expand All
Expands all steps in the Keyword View.
Collapse All
Collapses all steps in the Keyword View.
Keyword View
Displays the Keyword View if the Expert View is
displayed. (Relevant only for tests)
Note: This command is disabled if the Keyword
View is hidden. You can instruct QuickTest to show
or hide the Keyword View using the Display the
Keyword View for tests and scripted components
command (Tools > Options > General pane).
84
Chapter 2 • QuickTest at a Glance
Command
Function
Expert View
Displays the Expert View if the Keyword View is
displayed. (Relevant only for tests)
Toolbars
Enables you to show and hide QuickTest toolbars.
Window Theme
Enables you to select a theme to apply to your
QuickTest window.
Note: You can apply the Microsoft Windows XP
theme to the QuickTest window only if your
computer is set to use a Windows XP theme.
Some of the View menu commands are also available by default from the
View toolbar, shown below:
Insert Menu
You can insert various types of component and function library steps using
the following Insert menu commands:
Command
Shortcut Key
Function
Checkpoint >
Standard Checkpoint
F12
Opens the Checkpoint
Properties dialog box, enabling
you to create a standard
checkpoint for an object.
Output Value >
Standard Output
Value
CTRL+F12
Opens the Output Value
Properties dialog box, enabling
you to create a standard output
value for an object.
Step Generator
F7
Opens the Step Generator.
(Relevant for tests and function
libraries)
Function Definition
Generator
Opens the Function Definition
Generator. (Relevant for tests
and function libraries)
85
Chapter 2 • QuickTest at a Glance
Command
Shortcut Key
Synchronization
Point
86
Function
Inserts a synchronization point
in the test, instructing QuickTest
to pause the test until the object
property value is achieved (or
times out). (Relevant only for
tests)
New Step
F8; INSERT
Inserts a new step in the
Keyword View.
New Step After Block
SHIFT+F8
Inserts a new step after a
conditional or loop block in the
Keyword View. (Relevant only
for tests)
Operation
Inserts an operation (function)
step in a business component.
Comment
Inserts a Comment step in the
Keyword View.
Report
Inserts a Reporter step in the
Keyword View, instructing
QuickTest to report an event to
the Run Results. (Relevant only
for tests)
Conditional
Statement
Inserts an If...Then, ElseIf...Then,
or Else statement according to
your selection. (Relevant for
tests and function libraries)
Loop Statement
Inserts a While...Wend,
For...Next, Do...While, or
Do...Until statement according
to your selection. (Relevant for
tests and function libraries)
Call to New Action
Creates a new action and inserts
it in the specified location.
(Relevant only for tests)
Chapter 2 • QuickTest at a Glance
Command
Shortcut Key
Function
Call to Copy of
Action
Inserts a call to an editable copy
of an existing action. (Relevant
only for tests)
Call to Existing
Action
Inserts a call to an existing
reusable action. (Relevant only
for tests)
Call to Service Test
Test
Inserts a call to a Service Test
test.
(Applicable only if Service Test is
installed on the QuickTest
computer)
(Relevant only for tests)
Start Transaction
Inserts a StartTransaction step in
the test, marking the beginning
of the transaction to be timed.
(Relevant only if the test
includes transactions to be used
by LoadRunner or Business
Availability Center)
End Transaction
Inserts an EndTransaction step
in the test, marking the end of
the transaction to be timed.
(Relevant only if the test
includes transactions to be used
by LoadRunner or Business
Availability Center)
Some of the Insert menu commands are also available by default from the
Insert toolbar, shown below:
87
Chapter 2 • QuickTest at a Glance
Automation Menu
You can manage your record and run sessions using the following
Automation menu commands:
Command
Shortcut Key
Function
Record
F3
Starts a recording session.
Run
F5
Starts a run session from the
beginning or from the line at
which the session was paused.
Stop
F4 (You can also
Stops the recording or run
session.
define a shortcut
key or key
combination. See
"Run Pane
(Options Dialog
Box)" on
page 665.)
Run Current Action
Run from Step
CTRL+F5
Starts a run session from the
selected step.
Maintenance Run
Mode
Starts a run session during
which the Maintenance Run
Mode wizard opens for steps
that failed because an object
was not found in the
application (if applicable).
Update Run Mode
Starts a run session to update
test object descriptions and
other options (if applicable).
Analog Recording
88
Runs only the active action.
(Relevant only for tests)
SHIFT+ALT+F3
Starts recording in Analog
Recording mode. (Relevant only
for tests)
Chapter 2 • QuickTest at a Glance
Command
Shortcut Key
Function
Low Level
Recording
CTRL+SHIFT
+F3
Starts recording in Low Level
Recording mode. (Relevant only
for tests)
Record and Run
Settings
Opens the Record and Run
Settings dialog box, enabling
you to define browser
preferences for recording and
running your test. (Relevant
only for tests)
Process Guidance
List
Lists the processes that are
available for the current
document type and for the
currently loaded QuickTest
add-ins, enabling you to open
them.
Results
Opens the Run Results viewer,
enabling you to view results for
a component run session.
(Relevant also for tests)
Some of the Automation menu commands are also available by default from
the Automation toolbar, shown below:
89
Chapter 2 • QuickTest at a Glance
Resources Menu
You can manage your object repositories and other resources using the
following Resources menu commands:
90
Command
Shortcut Key
Function
Object Repository
CTRL+R
Opens the Object Repository
window, which displays a tree
containing all objects in the
current component. Also available
from the Automation toolbar
(described on page 88).
Object Repository
Manager
Opens the Object Repository
Manager dialog box, enabling you
to open and modify multiple
shared object repositories.
Associate
Repositories
Opens the Associate Repositories
dialog box, enabling you to
manage the object repository
associations for the test.
Map Repository
Parameters
Opens the Map Repository
Parameters dialog box, enabling
you to map repository parameters,
as needed.
Recovery Scenario
Manager
Opens the Recovery Scenario
Manager dialog box.
Associated
Function Libraries
Lists the function libraries
associated with the active
document, enabling you to open
them.
Chapter 2 • QuickTest at a Glance
Debug Menu
You can debug the steps in your component and any associated function
library using the following Debug menu commands:
Command
Shortcut
Key
Pause
Function
Pauses the debug session.
Step Into
F11
Runs only the current line of the script. If
the current line calls a method, the method
is displayed in the view but is not
performed.
Step Over
F10
Runs only the current line of the script.
When the current line calls a method, the
method is performed in its entirety, but is
not displayed in the view.
Step Out
SHIFT+F11
Runs to the end of the method then pauses
the run session. (Available only after
running a method using Step Into)
Run to Step
CTRL+F10
Runs until the current step.
Debug from
Step
Runs from the selected step instead of the
start of the component.
Add to Watch
CTRL+T
Adds the selected item to the Watch tab.
Insert/Remove
Breakpoint
F9
Sets or clears a breakpoint in the
component.
Enable/Disable
Breakpoint
CTRL+F9
Enables or disables a breakpoint in the
component.
Clear All
Breakpoints
CTRL+
SHIFT+F9
Deletes all breakpoints in the component.
Enable/Disable
All Breakpoints
Enables or disables all breakpoints in the
component.
91
Chapter 2 • QuickTest at a Glance
Some of the Debug commands are also available by default from the Debug
toolbar, shown below:
Tools Menu
You can perform the following Tools menu commands:
Command
Function
Options
Opens the Options dialog box,
enabling you to modify global
testing options.
View Options
Opens the Editor Options dialog
box, enabling you to customize
how tests and function libraries
are displayed in the Expert View
and function library windows.
Check Syntax
92
Shortcut Key
CTRL+F7
Checks the syntax of the active
document. (Relevant for tests
and function libraries)
Chapter 2 • QuickTest at a Glance
Command
Extensibility
Accelerator
Shortcut Key
Function
Opens Extensibility Accelerator
for HP Functional Testing,
enabling you to extend the Web
Add-in and customize how
QuickTest recognizes and
interacts with different types of
controls, using a Visual
Studio-like IDE.
Note: Extensibility Accelerator is
an external tool, which you
install from the
QuickTest Professional
Installation DVD. If
Extensibility Accelerator is not
installed, a message box informs
you that the tool is not installed
and provides links to more
information.
Regular Expression
Evaluator
Opens the Regular Expression
Evaluator dialog box, enabling
you to create and test a regular
expression to determine if it
suits your needs.
Object Identification
Opens the Object Identification
dialog box, enabling you to
specify how QuickTest identifies
a particular test object.
93
Chapter 2 • QuickTest at a Glance
Command
94
Shortcut Key
Function
Object Spy
Opens the Object Spy dialog
box, enabling you to view the
native properties and operations
of any object in an open
application, as well as the test
object hierarchy, identification
properties, and test object
operations that QuickTest uses
to represent that object. You can
also add an object to the local
object repository and highlight
the object in the application.
Web Event Recording
Configuration
Opens the Web Event Recording
Configuration dialog box,
enabling you to specify a
recording configuration level.
(Relevant only for tests)
Data Driver
Opens the Data Driver dialog
box, which displays the default
Constants list for the action.
(Relevant only for tests)
Change Active
Screen
Replaces the previously recorded
Active Screen with the selected
Active Screen. (Relevant only for
tests)
Virtual Objects >
New Virtual Object
Opens the Virtual Object
Wizard, enabling you to teach
QuickTest to recognize an area
of your application as a standard
test object. (Relevant only for
tests)
Chapter 2 • QuickTest at a Glance
Command
Shortcut Key
Function
Virtual Objects >
Virtual Object
Manager
Opens the Virtual object
Manager, enabling you to
manage all of the virtual object
collections defined on your
computer. (Relevant only for
tests)
Customize
Opens the Customize dialog
box, which enables you to
customize toolbars and menus,
and create new menus.
Some of the Tools menu commands are also available by default from the
Tools toolbar, shown below:
Window Menu
You can perform the following Window menu commands:
Command
Function
Cascade
Displays the open documents cascaded.
Tile Horizontally
Displays the open documents one above the other.
Tile Vertically
Displays the open documents side-by-side.
Close All Function Libraries
Closes all open function libraries.
<open files section>
Lists the documents that are currently open in the
QuickTest session.
Windows
Opens the Windows dialog box, enabling you to
manage your open document windows.
95
Chapter 2 • QuickTest at a Glance
Help Menu
You can perform the following Help menu commands:
Command
Shortcut Key
Function
QuickTest Professional
Help
F1
Opens the QuickTest Professional
Help.
QuickTest Professional
Tutorial
Opens the QuickTest Professional
tutorial, which teaches you basic
QuickTest skills and shows you how
to start testing your applications.
What’s New
Opens the What’s New in
QuickTest Professional Help.
Product Feature Movies
Enables you to view movies
illustrating various QuickTest
features.
Troubleshooting &
Knowledge Base
Opens the Troubleshooting area of
the HP Software Support Web site,
enabling you to select from several
self-help troubleshooting options,
including a product-specific
knowledge base articles. (Requires
login.)
The URL 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 HP Support Knowledge Base and
add your own articles. You can also
post to and search user discussion
forums, submit support requests,
download patches and updated
documentation, and more.
The URL is: www.hp.com/go/
hpsoftwaresupport
96
Chapter 2 • QuickTest at a Glance
Command
Send Feedback and Win!
Shortcut Key
Function
Opens the HP
QuickTest Professional Send
Feedback and Win Web site, where
you can answer surveys about
QuickTest and become eligible to
win prizes in special prize drawings.
The URL is: http://www.hpqtp.com
UP Update
Checks online for any available
updates to all HP products installed
on your computer. You can choose
which updates you want to
download and (optionally) install.
HP QuickTest Professional
Software Web Page
Uses your default Web browser to
access the HP QuickTest Professional
software Web page within the HP
corporate Web site. This site
provides you with overview
information, data sheets, demos and
white papers about QuickTest as well
as access to other technical
resources.
The URL is: http://www.hp.com/go/qtp
About
QuickTest Professional
Displays information about the
installed version of
QuickTest Professional.
97
Chapter 2 • QuickTest at a Glance
Other QuickTest Commands
You can perform the following special options using shortcut keys:
Option
Shortcut Key
Function
Switch between
Keyword View and
Expert View
CTRL+PAGE UP/PAGE
DOWN
Toggles between the Keyword
View and Expert View.
Switch between open
documents
CTRL+TAB
Changes the display to
another open document type.
Open context menu
SHIFT+F10,
Opens the context menu for
the selected step data cell in
the data table.
or press the
Application Key (
[Microsoft Natural
Keyboard only]
98
)
Expand all branches
*
[on the numeric
keypad]
Expands all branches in the
Keyword View.
Expand branch
+
[on the numeric
keypad]
Expands the selected item
branch and all branches
below it in the Keyword View.
Collapse branch
[on the numeric
keypad]
Collapses the selected item
branch and all branches
below it in the Keyword View.
Open the Item or
Operation list
SHIFT+F4 or SPACE,
Opens the Item or Operation
list in the Keyword View,
when the Item or Operation
column is selected.
when the Item or
Operation column is
selected in the
Keyword View.
Chapter 2 • QuickTest at a Glance
QuickTest Professional Program Folder Structure
After the QuickTest Professional setup process is complete, the following
items are added to your QuickTest Professional program folder (Start >
Programs > HP QuickTest Professional):
➤
Documentation. Provides the following links to commonly used
documentation files:
Option
Description
HP QuickTest Professional
Code Samples Plus
Opens the QuickTest Professional Code Samples
Plus Help, which provides sample function
libraries, code, and SDK samples with
accompanying explanations.
HP QuickTest Professional
Help
Opens a comprehensive help file containing the
following:
➤ HP QuickTest Professional User Guide
➤ HP QuickTest Professional for Business Process
Testing User Guide
➤ HP QuickTest Professional Add-ins Guide
➤ HP QuickTest Professional Object Model Reference
(including the relevant sections for any
installed add-ins)
➤ QuickTest Advanced References (Automation API
and XML Schema references)
➤ Microsoft VBScript Reference.
QuickTest Automation
Reference
Opens the QuickTest Professional Automation
Object Model Reference. The automation object
model assists you in automating test management,
by providing objects, methods and properties that
enable you to control QuickTest features and
configurations. The Automation Object Model
Reference provides syntax, descriptive
information, and examples for the objects,
methods, and properties. It also contains a
detailed overview to help you get started writing
QuickTest automation scripts.
99
Chapter 2 • QuickTest at a Glance
Description
Tutorial
Opens the QuickTest Professional tutorial, which
teaches you basic QuickTest skills and shows you
how to start testing your applications.
➤
Extensibility. Provides links to the Help for the add-in Extensibility SDKs
available with QuickTest Professional. If you install an extensibility SDK,
this program folder may also contain additional items.
➤
Sample Applications. Contains the following links to sample applications
that you can use to practice testing with QuickTest:
➤
100
Option
Option
Description
Flight
Opens a sample flight reservation Windows application.
To access the application, enter any username and the
password mercury.
Mercury Tours
Web site
Opens a sample flight reservation Web application. This
Web application is used as a basis for the QuickTest
tutorial. For details, see the HP QuickTest Professional
Tutorial.
Tools. Contains the following utilities and tools that assist you with the
testing process:
Option
Description
Additional
Installation
Requirements
Opens the Additional Installation Requirements dialog
box, which displays any prerequisite software that you
must install or configure to work with QuickTest.
HP Micro Player
Opens the HP Micro Player, which enables you to view
captured movies of a run session without opening
QuickTest. For details, click the Help button in the
HP Micro Player window.
Chapter 2 • QuickTest at a Glance
Option
Description
Java Add-in JRE
Support Tool
Opens the Java Add-in JRE Support Tool, which adjusts
the JVM Runtime Parameters of your JRE to enable the
Java Add-in to recognize Java applets and the Java objects
within them.
This tool is necessary only for certain operating systems,
browsers, and JRE versions. For details, see the Java
section of the HP QuickTest Professional Add-ins Guide.
License Validation
Utility
Opens the License Validation utility, which enables you
to retrieve and validate license information. For details,
click the Help button in the License Validation Utility
window.
Password Encoder
Opens the Password Encoder tool, which enables you to
encode passwords. You can use the resulting strings as
method arguments or Data Table parameter values (tests
only). For details, see "Password Encoder Tool" on
page 565.
QuickTest Script
Editor
(Relevant only for tests and function libraries) Opens the
QuickTest Script Editor, which enables you to open and
modify the scripts of multiple tests and function libraries,
simultaneously. For details, see the HP QuickTest
Professional User Guide.
Register New
Browser Control
Opens the Register Browser Control Utility, which
enables you to register your browser control application
so that QuickTest Professional recognizes your Web
objects when recording or running tests. For details, see
the section on registering browser controls in the
HP QuickTest Professional Add-ins Guide.
Remote Agent
Activates the QuickTest Remote Agent, which enables
you to configure how QuickTest behaves when a
component is run by a remote application such as
Quality Center. For details, see "Remote Agent Settings
Dialog Box" on page 1048.
101
Chapter 2 • QuickTest at a Glance
Option
Description
Run Results
Deletion Tool
(Relevant only for tests) Opens the Run Results Deletion
Tool dialog box, which enables you to delete unwanted
or obsolete results from your system according to specific
criteria that you define. For details, see the HP QuickTest
Professional User Guide.
Save and Restore
Settings
Opens the Save and Restore Settings dialog box, which
enables you to save certain existing configurations before
uninstalling a QuickTest 9.2 or older version, and then
restore them after installing a new version. For details,
see the HP QuickTest Professional User Guide.
Silent Test Runner
(Relevant only for tests) Opens the Silent Test Runner
dialog box, which enables you to run a QuickTest test the
way it is run from LoadRunner and Business Availability
Center. For details, see the HP QuickTest Professional User
Guide.
Test Batch Runner
(Relevant only for tests) Opens the Test Batch Runner
dialog box, which enables you to set up QuickTest to run
several tests in succession. For details, see the
HP QuickTest Professional User Guide.
Note: There may be additional tools depending on the installed QuickTest
add-ins.
102
➤
HP QuickTest Professional. Opens the QuickTest Professional application.
➤
HP QuickTest Professional Product Availability Matrix. Provides a
complete list of all environments, programs, and versions that are
supported for QuickTest Professional and its add-ins.
➤
HP Run Results Viewer. Opens the Run Results Viewer, which enables you
to select a component or business process test and view information
about the steps performed during the run session. For details, see "Run
Results Viewer User Interface" on page 761.
Chapter 2 • QuickTest at a Glance
➤
HP Update. Checks online for any available updates to all HP products
installed on your computer. You can choose which updates you want to
download and (optionally) install.HP
➤
Readme. Opens the HP QuickTest Professional Readme, which provides the
latest news and information on QuickTest Professional and the
QuickTest Professional add-ins.
Note: If you uninstalled a previous version of QuickTest Professional
before installing this version, you may have additional (outdated) items
in your QuickTest Professional program folder. In addition, if you have
QuickTest Professional add-ins or extensibility SDKs installed, you may
have items in your program folder that relate specifically to these items.
103
Chapter 2 • QuickTest at a Glance
Start Page
This page welcomes you to QuickTest and describes the new features in this
release, including links to more information about these features. It also
provides links to Process Guidance, a tool that offers best practices for
working with QuickTest.
To access
1 Start QuickTest, as described in "How to Start QuickTest" on
page 71.
2 If the Start Page window is not displayed, select View > Start Page.
104
Chapter 2 • QuickTest at a Glance
General User Interface Elements
UI Elements
Description
Welcome!
Enables you to open new or existing documents by using
the quick access buttons described below.
Process Guidance List
The list of available QuickTest processes. If your
organization has descriptions for its own custom
processes, these processes may also be available from the
Process Guidance List.
For details, see "Process Guidance Panes" on page 935.
Recently Used Files
The list of recently opened documents.
Don’t show the
Start Page window
on startup
When selected, instructs QuickTest to open a blank
document directly after starting.
What’s New area
The list of the newest features, enhancements, and
supported environments in the latest version of
QuickTest.
Quick Access Buttons
Button
Description
Button
Description
Opens a new test.
Opens an existing test.
Opens a new business
component.
Opens an existing business
component.
Opens a new application
area.
Opens an existing
application area.
Opens a new function
library.
Opens an existing function
library.
105
Chapter 2 • QuickTest at a Glance
Add-in Manager Dialog Box
This dialog box enables you to select the add-ins that you want QuickTest to
load by selecting the check boxes adjacent to required add-ins.
To access
By default, this dialog box opens when you start QuickTest.
To display the Add-in Manager if it does not open when you
start QuickTest, select Tools > Options > General node and
then select Display Add-in Manager on startup.
Important
information
➤ If you select the check box of an add-in that contains a
child add-in, the parent add-in is selected automatically.
➤ If you clear the check box for a parent add-in, the check
boxes for its children are also cleared.
➤ QuickTest remembers which add-ins you selected so that
the next time you open QuickTest, the same add-ins are
selected in the Add-in Manager dialog box.
106
Relevant tasks
"How to Start QuickTest" on page 71
See also
"Product Information Window" on page 112
Chapter 2 • QuickTest at a Glance
User interface elements are described below:
UI Element
Description
Add-in
The names of the installed add-ins.
The list of add-ins might also include child nodes
representing add-ins that you or a third party developed to
support additional environments or controls using add-in
extensibility. For more information, see the relevant Add-in
Extensibility Developer Guide, available from the QuickTest
Professional Extensibility Documentation program group
(Start > Programs > HP QuickTest Professional >
Extensibility > Documentation).
License
The license used by the add-in, if any, and the time
remaining until a time-limited license expires:
➤ Licensed. Applies to the add-ins that are provided with
QuickTest Professional. Add-ins use the same license as
QuickTest Professional. Therefore, if QuickTest uses a
Permanent license, the add-ins use the same Permanent
license; if QuickTest uses a Time-Limited license, the
add-ins use the same Time-Limited license.
➤ Not Licensed. Applies to an add-in that does not have an
installed seat license or access to a concurrent license (for
example, if all concurrent licenses are currently in use, or
if the required add-in license is not installed on the
concurrent license server on your subnet). To load the
add-in, you first need to install or access a license.
➤ Time Remaining. Specifies the number of days and hours
remaining until a time-limited add-in license expires.
(Displayed only when using a QuickTest seat license—not
a concurrent license.)
For more details, see the HP QuickTest Professional
Installation Guide.
Add-in
Description
The description of the environment that the selected add-in
supports.
107
Chapter 2 • QuickTest at a Glance
UI Element
Description
Load Unified
Functional Testing
license
Instructs QuickTest to use a UnifiedFunctionalTesting license
from the concurrent license server.
This check box must be selected if you want to work with
tests that contain calls to Service Test tests. (Not relevant for
components)
This option may be enabled, disabled, or hidden, as follows:
➤ Enabled. A UnifiedFunctionalTesting license is one of the
licenses currently available on the concurrent license
server.
➤ Enabled and selected. You selected this check box the last
time you opened QuickTest, and a Unified Functional
Testing license is one of the licenses currently available
on the concurrent license server.
➤ Disabled and selected. This occurs in any of the
following cases:
➤ The only available concurrent license is a
UnifiedFunctionalTesting license.
➤ Service Test is currently open on your computer, and
Service Test is using a UnifiedFunctionalTesting license.
➤ A UnifiedFunctionalTesting license is the minimum
required license for one or more of the installed
add-ins.
➤ Disabled and cleared. No UnifiedFunctionalTesting
license is currently available.
➤ Hidden. QuickTest is currently using a seat license.
Note: QuickTest remembers your last selection, so if you
cleared the Show on startup check box in a previous
session, QuickTest tries to load the same license type that it
used in that session, if available. To change the license type,
display this dialog box (as described below).
108
Chapter 2 • QuickTest at a Glance
UI Element
Description
Show on startup
Instructs QuickTest to display the Add-in Manager dialog
box each time you open QuickTest.
When this check box is cleared, QuickTest opens and loads
the same add-ins it loaded in the previous session, without
displaying the Add-in Manager.
Note for concurrent license users: If this check box was
cleared in the previous session, and the license type selected
from the concurrent license server in that session is not
currently available, QuickTest tries to load an available
license that matches the selected add-ins.
To display the Add-in Manager again:
Select Tools > Options > General node and select Display
Add-in Manager on startup.
109
Chapter 2 • QuickTest at a Glance
About QuickTest Professional Dialog Box
This dialog box enables you to view information regarding the QuickTest
add-ins, hotfixes, and patches installed on your computer, as well as other
basic information about your computer. This information is useful for
troubleshooting and when working with HP Software Support.
To access
110
Select Help > About QuickTest Professional.
Chapter 2 • QuickTest at a Glance
User interface elements are described below (unlabeled elements are shown
in angle brackets):
UI Element
Description
<version information
area>
The version of QuickTest that is installed on your
computer, its build number, and Product ID number.
Opens the "Product Information Window" on page 112,
enabling you to view more detailed information on the
QuickTest Professional products installed on your
computer.
List of add-ins
available on this
machine
The list of QuickTest add-ins that are installed on your
computer. A check mark next to the add-in name
indicates that the add-in is currently loaded. For details
on QuickTest add-ins, see the HP QuickTest Professional
Add-ins Guide.
License
Enables you to view details for, or modify, the
QuickTest Professional licenses installed on your
computer. For details, see the HP QuickTest Professional
Installation Guide.
111
Chapter 2 • QuickTest at a Glance
Product Information Window
This window displays detailed information on the QuickTest Professional
products installed on your computer.
112
To access
In the About QuickTest Professional dialog box, click the
Product Information button
.
See also
"About QuickTest Professional Dialog Box" on page 110
Chapter 2 • QuickTest at a Glance
User interface elements are described below (unlabeled elements are shown
in angle brackets):
UI Elements
Description
<general product
information>
The QuickTest Professional version, product ID, and
build numbers installed on your computer.
Operating system
The operating system version installed on your
computer.
Internet Explorer
version
The version of Microsoft Internet Explorer installed on
your computer.
ALM/QC connectivity
The version of the Quality Center or HP ALM
connectivity add-in installed on your computer.
Add-in Information
The QuickTest add-ins installed on your computer.
Hotfix and Patch
Information
The names of any QuickTest hotfixes or patches installed
on your computer, and links to their readme files.
113
Chapter 2 • QuickTest at a Glance
Troubleshooting and Limitations - QuickTest Program
Management
This section describes troubleshooting and limitations for QuickTest tools
and program management.
Tools in the HP QuickTest Professional program group
You cannot use some of the tools from the HP QuickTest Professional > Tools
program group when the UAC (User Account Control) option in is set to
ON. (Relevant for Microsoft Windows Vista, Windows 7, Windows
Server 2008, and Windows Server 2008 R2.)
Workaround: Temporarily turn off the UAC option while using these tools,
by doing the following:
For Microsoft Windows Vista and Windows Server 2008:
1 Log in as an administrator.
2 From the Control Panel, select User Accounts > Change Security Settings,
and clear the Use User Account Control (UAC) to help protect your
computer check box.
3 After working with the desired tool, return to the Change Security
Settings screen, and select the Use User Account Control (UAC) to help
protect your computer check box to turn on UAC again.
For Microsoft Windows 7 and Windows Server 2008 R2:
1 Log in as an administrator.
2 From the Control Panel, select User Accounts > User Accounts > Change
User Account Settings.
3 In the User Account Control Settings window, move the slider to Never
notify.
4 After working with the desired tool, return to the User Account Control
Settings window, and restore the slider to its previous position to turn the
UAC option on again.
114
Chapter 2 • QuickTest at a Glance
Characters do not display correctly
QuickTest does not fully support UTF-16 surrogate pairs and combining
characters. The Run Results Viewer and some user interface elements in
QuickTest do not display these characters correctly.
QuickTest and DEP (Data Execution Prevention)
On Windows 7 64-bit and Windows Server 2008 R2 operating systems,
QuickTest crashes when the DEP (Data Execution Prevention) flag is set to
Always On.
Workaround: Switch off the DEP, or modify its settings to be ON only for
important operating system processes.
115
Chapter 2 • QuickTest at a Glance
116
Part II
Working with Test Objects and
Object Repositories
118
3
The Test Object Model
This chapter includes:
Concepts
➤
Test Object Model - Overview on page 120
➤
How QuickTest Applies the Test Object Model Concept on page 124
➤
Object Repository Types - Overview on page 130
➤
Deciding Whether to Use Local or Shared Object Repositories on page 132
Tasks
➤
How to Use the Object Spy to View Object Properties and Operations or
Add an Object to a Repository on page 136
Reference
➤
Comparison of Object Repository Window and Object Repository
Manager on page 138
➤
Object Identification Process Workflow on page 140
➤
Object Spy Dialog Box on page 142
➤
Object Selection Dialog Box on page 147
➤
Tips for Using the Pointing Hand on page 148
Troubleshooting and Limitations - Object Spy on page 149
119
Chapter 3 • The Test Object Model
Concepts
Test Object Model - Overview
QuickTest tests your dynamically changing application by learning and
identifying test objects and their expected properties and values. To do this,
QuickTest analyzes each object in your application in much the same way
that a person would look at a photograph and remember its details.
The following sections introduce the concepts related to the test object
model and describe how QuickTest uses the information it gathers to test
your application.
How QuickTest Learns Objects
QuickTest learns objects just as you would. For example, suppose as part of
an experiment, Alex is told that he will be shown a photograph of a picnic
scene for a few seconds during which someone will point out one item in
the picture. Alex is told that he will be expected to identify that item again
in identical or similar pictures one week from today.
Before he is shown the photograph, Alex begins preparing himself for the
test by thinking about which characteristics he wants to learn about the
item that the tester indicates. Obviously, he will automatically note whether
it is a person, inanimate object, animal, or plant. Then, if it is a person, he
will try to commit to memory the gender, skin color, and age. If it is an
animal, he will try to remember the type of animal, its color, and so forth.
The tester shows the scene to Alex and points out one of three children
sitting on a picnic blanket. Alex notes that it is a Caucasian girl about 8
years old. In looking at the rest of the picture, however, he realizes that one
of the other children in the picture could also fit that description. In
addition to learning his planned list of characteristics, he also notes that the
girl he is supposed to identify has long, brown hair.
Now that only one person in the picture fits the characteristics he learned,
he is fairly sure that he will be able to identify the girl again, even if the
scene the tester shows him next week is slightly different.
120
Chapter 3 • The Test Object Model
Since he still has a few moments left to look at the picture, he attempts to
notice other, more subtle differences between the child he is supposed to
remember and the others in the picture—just in case.
If the two similar children in the picture appeared to be identical twins, Alex
might also take note of some less permanent feature of the child, such as the
child’s position on the picnic blanket. That would enable him to identify
the child if he were shown another picture in which the children were
sitting on the blanket in the same order.
QuickTest uses a very similar method when it learns objects.
First, it "looks" at the object being learned and stores it as a test object,
determining in which test object class it fits. In the same way, Alex
immediately checked whether the item was a person, animal, plant, or
inanimate object. QuickTest might classify the test object as a standard
Windows dialog box (Dialog), a Web button (WebButton), or a Visual Basic
scroll bar object (VbScrollBar), for example.
Then, QuickTest "considers" the identification properties for the test object.
For each test object class, QuickTest has a list of mandatory properties that it
always learns; similar to the list of characteristics that Alex planned to learn
before seeing the picture. When QuickTest learns an object, it always learns
these default property values, and then "looks" at the rest of the objects on
the page, dialog box, or other parent object to check whether this
description is enough to uniquely identify the object. If not, QuickTest adds
assistive properties, one by one, to the description, until it has compiled a
unique description; similar to when Alex added the hair length and color
characteristics to his list. If no assistive properties are available, or if those
available are not sufficient to create a unique description, QuickTest adds a
special ordinal identifier, such as the object’s location on the page or in the
source code, to create a unique description, just as Alex would have
remembered the child’s position on the picnic blanket if two of the children
in the picture had been identical twins.
121
Chapter 3 • The Test Object Model
How QuickTest Identifies Objects During a Run Session
QuickTest uses a human-like technique for identifying objects during the
run session.
Suppose as a continuation to the experiment (described in "How QuickTest
Applies the Test Object Model Concept" on page 124), Alex is now asked to
identify the same "item" he initially identified but in a new, yet similar
environment.
The first photograph he is shown is the original photograph. He searches for
the same Caucasian girl, about eight years old, with long, brown hair that he
was asked to remember and immediately picks her out. In the second
photograph, the children are playing on the playground equipment, but
Alex is still able to easily identify the girl using the same criteria.
Similarly, during a run session, QuickTest searches for a run-time object that
exactly matches the description of the test object it learned previously. It
expects to find a perfect match for both the mandatory and any assistive
properties it used to create a unique description while learning the object. As
long as the object in the application does not change significantly, the
description learned is almost always sufficient for QuickTest to uniquely
identify the object. This is true for most objects, but your application could
include objects that are more difficult to identify during subsequent run
sessions.
For example, Alex is told he will have to recognize a particular tree out of
multiple trees in the photo, and he knows he is going to have to be able to
identify it again in a photo taken from a different angle. If there isn’t
enough clearly identifying information about the tree itself, then he might
take note of where the tree is located relative to some other permanent item,
such as a nearby lamp post or picnic table. Then he will be able to identify
the tree again, even if the next picture he sees is from a different angle (as
long as all the required items are still visible in the picture).
122
Chapter 3 • The Test Object Model
This is similar to the visual relation identifier property, which enables
QuickTest to identify test objects according to their neighboring objects in
the application. You use this property to link less stable test objects to more
unique test objects, and as long as those objects in the application maintain
their relative location to your object, QuickTest should still be able to
identify the test object even after predictable user interface changes in the
application.
Consider the final phase of Alex’s experiment. In this phase, the tester
shows Alex another photograph of the same family at the same location, but
the children are older and there are also more children playing on the
playground. Alex first searches for a girl with the same characteristics he
used to identify the girl in the other pictures (the test object), but none of
the Caucasian girls in the picture have long, brown hair. Luckily, Alex was
smart enough to remember some additional information about the girl’s
appearance when he first saw the picture the previous week. He is able to
pick her out (the run-time object), even though her hair is now short and
dyed blond.
How is he able to do this? First, he considers which features he knows he
must find. Alex knows that he is still looking for a Caucasian female, and if
he were not able to find anyone that matched this description, he would
assume she is not in the photograph.
After he has limited the possibilities to the four Caucasian females in this
new photograph, he thinks about the other characteristics he has been using
to identify the girl—her age, hair color, and hair length. He knows that
some time has passed and some of the other characteristics he remembers
may have changed, even though she is still the same person.
Thus, since none of the Caucasian girls have long, dark hair, he ignores
these characteristics and searches for someone with the eyes and nose he
remembers. He finds two girls with similar eyes, but only one of these has
the petite nose he remembers from the original picture. Even though these
are less prominent features, he is able to use them to identify the girl.
123
Chapter 3 • The Test Object Model
QuickTest uses a very similar process of elimination with its Smart
Identification mechanism to identify an object, even when the learned
description is no longer accurate. Even if the values of your identification
properties change, QuickTest maintains your component’s reusability by
identifying the object using Smart Identification. For more information on
Smart Identification, see Chapter 7, "Configuring Object Identification."
The remainder of this guide assumes familiarity with the concepts presented
here, including test objects, run-time objects, identification properties
(including mandatory and assistive properties), visual relation identifiers,
and Smart Identification. An understanding of these concepts will enable
you to create well-designed, functional components for your application.
For a flowchart illustrating the general object identification process, see
"Object Identification Process Workflow" on page 140.
How QuickTest Applies the Test Object Model Concept
The test object model is a large set of object types or classes that QuickTest
uses to represent the objects in your application. Each test object class has a
list of identification properties that QuickTest can learn about the object, a
sub-set of these properties that can uniquely identify objects of that class,
and a set of relevant operations that QuickTest can perform on the object.
A test object is an object that QuickTest creates in the component to
represent the actual object in your application. QuickTest stores information
on the object that will help it identify and check the object during the run
session.
A run-time object is the actual object in your application on which methods
are performed during the run session.
124
Chapter 3 • The Test Object Model
When QuickTest learns an object in your application, it adds the
corresponding test object to an object repository, which is a storehouse for
objects. You can add test objects to an object repository in several ways. For
example, you can use the QuickTest Navigate and Learn option, add test
objects manually, or perform an operation on your application while
recording. For more information on object repositories, see Chapter 4,
"Managing Test Objects in Object Repositories" and Chapter 6, "Shared
Object Repositories".
When you add an object to an object repository, QuickTest:
➤
Identifies the QuickTest test object class that represents the learned object
and creates the appropriate test object.
➤
Reads the current value of the object’s properties in your application and
stores the list of identification properties and values with the test object.
➤
Chooses a unique name for the test object, generally using the value of
one of its prominent properties.
Example:
Suppose you add a Search button with the following HTML source code:
<INPUT TYPE="submit" NAME="Search" VALUE="Search">
QuickTest identifies the object as a WebButton test object. In the object
repository, QuickTest creates a WebButton object with the name Search,
learns a set of identification properties for the object, and decides to use the
following properties and values to uniquely identify the Search WebButton:
If you add an object to an object repository by recording on your
application, QuickTest records the operation that you performed on the
object using the appropriate QuickTest test object method. For example,
QuickTest records that you performed a Click method on the WebButton.
125
Chapter 3 • The Test Object Model
Suppose that clicking the Search button is the first step in your component,
QuickTest displays your step as follows:
When you run a component, QuickTest identifies each object in your
application by its test object class and its description (the set of
identification properties and values used to uniquely identify the object).
The list of test objects and their properties and values are stored in the
object repository. In the above example, QuickTest would search in the
object repository during the run session for the WebButton object with the
name Search to look up its description. Based on the description it finds,
QuickTest would then look for a WebButton object in the application with
the HTML tag INPUT, of type submit, with the value Search. When it finds
the object, it performs the Click method on it.
This section also includes:
126
➤
"Test Object Descriptions" on page 127
➤
"Properties and Operations for Test Objects and Run-Time Objects" on
page 128
Chapter 3 • The Test Object Model
Test Object Descriptions
For each test object class, QuickTest learns a set of identification properties
when it learns an object, and selects a sub-set of these properties to serve as
a unique object description. QuickTest then uses this description to identify
the object when it runs the component.
When the component runs, QuickTest searches for the object that matches
the description it learned. If it cannot find any object that matches the
description, or if it finds more than one object that matches, QuickTest may
use the Smart Identification mechanism to identify the object.
You can configure the mandatory, assistive, and ordinal identifier properties
that QuickTest uses to learn the descriptions of the objects in your
application, and you can enable and configure the Smart Identification
mechanism. For more information, see Chapter 7, "Configuring Object
Identification."
Example
By default, QuickTest learns the image type (such as plain image or image
button), the html tag, and the Alt text of each Web image it learns.
If these three mandatory property values are not sufficient to uniquely
identify the object within its parent object, QuickTest adds some assistive
properties and/or an ordinal identifier to create a unique description.
127
Chapter 3 • The Test Object Model
Properties and Operations for Test Objects and
Run-Time Objects
QuickTest uses unique terms to differentiate between the properties and
operations for test objects and run-time objects. The table below introduces
some of these terms.
QuickTest Test Objects
Run-time Objects From Your Application
Identification properties are
QuickTest-specific properties that
QuickTest uses to identify objects in
applications, to retrieve and store
information about those objects, or to
compare stored values with the
current values of an object in an
application.
Native properties are the properties
created by the object creator for each
run-time object. (Examples of object
creators include Microsoft for Microsoft
Internet Explorer objects, Netscape for
Netscape Browser objects, and the
product developer for ActiveX objects.)
The identification properties available
for a test object are determined by its
test object class (and not by the actual
properties available for the object in
the application).
A test object operation is a method or
property that QuickTest can perform
on an object from a particular test
object class.
Native operations are the methods of the
object in your application as defined by
the object creator.
Example: QuickTest can perform the
Click method on a WebButton test
object.
As you add steps to your component, you specify which operation to
perform on each test object. If you record steps, QuickTest records the
relevant operation as it is performed on an object. During a run session,
QuickTest performs the specified test object operation on the run-time
object.
The sections below describe some of the ways in which you can view and
modify properties and operations for test objects and run-time objects.
128
Chapter 3 • The Test Object Model
For test objects
➤
You can retrieve or modify identification property values manually while
designing your component, or you can use SetTOProperty statements
during a run session (via an operation defined in a function library).
For more information, see "Managing Test Objects in Object Repositories"
on page 151, "Retrieving and Setting Identification Property Values" on
page 384, and the HP QuickTest Professional Object Model Reference.
➤
You can use regular expressions in function libraries to identify property
values based on conditions or patterns you define.
For more information, see "Regular Expressions Overview" on page 633.
➤
You can view or modify the identification property values that are stored
with your component in the Object Properties or Object Repository dialog
box.
For more information, see "Specifying or Modifying Property Values" on
page 159.
➤
You can view the current identification property values of any visible
object using the Properties tab of the Object Spy.
For more information, see "How to Use the Object Spy to View Object
Properties and Operations or Add an Object to a Repository" on page 136.
➤
You can view the syntax of the test object operations of any visible object
using the Operations tab of the Object Spy. For more information, see
"How to Use the Object Spy to View Object Properties and Operations or
Add an Object to a Repository" on page 136.
For run-time objects
➤
You can view the syntax of the native operations of any visible object
using the Operations tab of the Object Spy. For more information, see
"How to Use the Object Spy to View Object Properties and Operations or
Add an Object to a Repository" on page 136.
➤
You can retrieve native property values from the run-time object during
the run session by adding GetROProperty statements. For more
information, see "Retrieving and Setting Identification Property Values"
on page 384.
129
Chapter 3 • The Test Object Model
➤
If the available test object operations and identification properties do not
provide the functionality you need, you can access the internal
operations and native properties of the run-time object using the Object
property. You can also use the attribute object property to identify Web
objects in your application according to user-defined properties. For
information, see "Native Properties and Operations" on page 385 and the
HP QuickTest Professional Object Model Reference.
Object Repository Types - Overview
Objects can be stored in two types of object repositories—a shared object
repository and a local object repository.
A shared object repository stores objects in a file that can be accessed by
multiple components (via their application areas) in read-only mode. You
can use the same shared object repository for multiple components. You can
also use multiple object repositories for each component.
A local object repository stores objects in a file that is associated with one
specific component, so that only that component can access the stored
objects.
Components always use the object repositories that are specified in the
application area with which the component is associated. Shared object
repositories are read-only when accessed from components; you edit them
using the Object Repository Manager.
You perform many object repository-related tasks either in the Object
Repository window or in the Object Repository Manager. To view a list of
the tasks that you can perform in each, see "Comparison of Object
Repository Window and Object Repository Manager" on page 138.
130
Chapter 3 • The Test Object Model
Planning where to store objects
When you plan and create components, you must consider how you want
to store the objects in your components. You can:
➤
Store the objects for each component in its corresponding local object
repository.
➤
Store the objects in your components in one or more shared object
repositories. By storing objects in shared object repositories and
associating these repositories with your components’ application areas,
you enable multiple components to use the objects. Use a combination of
objects from your local and shared object repositories, according to your
needs.
➤
Transfer local objects to a shared object repository, if required. This
reduces maintenance and enhances the reusability of your components
because it enables you to maintain the objects in a single, shared location
instead of multiple locations. For more information, see "Deciding
Whether to Use Local or Shared Object Repositories" on page 132.
How QuickTest determines the object to use when an object
with the same name exists in multiple object repositories
➤
If an object with the same name is located in both the local object
repository and in a shared object repository associated with the same
component, the component uses the local object definition.
➤
If more than one shared object repository associated with the same
component, the object definition is used from the first occurrence of the
object, according to the order in which the shared object repositories are
associated with the component. For more information on associating
shared object repositories, see "Object Repositories Pane (Application Area
Window)" on page 693.
131
Chapter 3 • The Test Object Model
Deciding Whether to Use Local or Shared Object
Repositories
To choose where to save objects, you need to understand the differences
between local and shared object repositories.
The following table describes when it is preferable to use each type of object
repository:
Use this object repository
type...
In these situations...
local object repository
➤ You are creating simple components, especially
under the following conditions:
➤ You have only one, or very few, components that
correspond to a given application, interface, or
set of objects.
➤ You do not expect to frequently modify object
properties.
➤ You are new to using QuickTest. You can record
and run components without creating, choosing,
or modifying shared object repositories because
all objects are automatically saved in a local
object repository that can be accessed by its
corresponding component.
See also: "Local Object Repository - Overview" on
page 134
132
Chapter 3 • The Test Object Model
Use this object repository
type...
In these situations...
shared object repository
➤ You are creating components using
keyword-driven methodologies (not by
recording).
➤ You have several components that test elements
of the same application, interface, or set of
objects.
➤ You expect the object properties in your
application to change from time to time and/or
you regularly need to update or modify object
properties.
➤ If you are familiar with testing, it is probably
most efficient to save objects in a shared object
repository. In this way, you can use the same
shared object repository for multiple
components—if the components include the
same objects.
Object information that applies to many
components is kept in one central location.
When the objects in your application change,
you can update them in one location for all the
components that use this shared object
repository.
See also: "Shared Object Repository - Overview" on
page 135
133
Chapter 3 • The Test Object Model
Local Object Repository - Overview
When you use a local object repository, QuickTest uses a separate object
repository for each component. (You can also use one or more shared object
repositories if needed. For more information, see "Shared Object Repositories
Overview" on page 232.) The local object repository is fully editable from
within its component.
When working with a local object repository:
➤
QuickTest creates a new (empty) object repository for each component.
➤
When QuickTest learns new objects (either because you add them to the
local object repository, or you record operations on objects in your
application), it automatically stores the information about those objects
in the corresponding local object repository (if the test objects do not
already exist in an associated shared object repository).
QuickTest adds all new objects to the local object repository even if one or
more shared object repositories are already associated with the
component. (This assumes that a object with the same description does
not already exist in one of the associated shared object repositories).
134
➤
If a child object is added to a local object repository, and its parents are in
a shared object repository, its parents are automatically added to the local
object repository.
➤
Every time you create a new component, QuickTest creates a new,
corresponding local object repository and adds test objects to the
repository as it learn them.
➤
If QuickTest learns the same object in your application in two different
components, the test object is stored as a separate test object in each of
the local object repositories.
➤
When you save your component, the local object repository is
automatically saved with the it. The local object repository is not
accessible as a separate file (unlike the shared object repository).
Chapter 3 • The Test Object Model
Shared Object Repository - Overview
When you use shared object repositories, QuickTest uses the shared object
repositories you specified for the selected component’s application area. You
can use one or more shared object repositories. (You can also save some
objects in a local object repository for each component if you need to access
them only from the specific component. For more information, see "Local
Object Repository - Overview" on page 134.)
After you begin creating your component, you can specify additional shared
object repositories. You can also create new ones and associate them with
your component. Before running the component, you must ensure that the
object repositories being used by the component contain all of the objects
in your component. Otherwise, the component may fail. For more
information, see "Adding and Deleting Test Objects in an Object Repository"
on page 152.
You modify a shared object repository using the Object Repository Manager.
For more information, see Chapter 6, "Shared Object Repositories."
When working with a shared object repository:
➤
If QuickTest Professional learns a test object that already exists in either
the shared or local object repository, QuickTest uses the existing
information and does not add the object to that object repository.
➤
If a child object is added to a local object repository, and its parents are in
a shared object repository, its parents are automatically moved to the
local object repository.
➤
When QuickTest learns a test object, it adds it to the local object
repository (not the shared object repository)—unless the same test object
already exists in an associated shared object repository. (In this case,
QuickTest uses the existing information in the shared object repository.)
You can export objects from the local object repository to a shared object
repository. This enables you to make the local objects accessible to other
components. For more information, see "Exporting Local Objects to a
Shared Object Repository" on page 209.
135
Chapter 3 • The Test Object Model
You can also merge objects from the local object repository directly to a
shared object repository that is associated with the same component. This
can help reduce maintenance since you can maintain the objects in a single
shared location, instead of multiple locations. For more information, see
"When to Update a Shared Object Repository from Local Object
Repositories" on page 317.
Tasks
How to Use the Object Spy to View Object Properties and
Operations or Add an Object to a Repository
This task describes how to use the Object Spy to view identification
properties, native properties, test object operations, or native operations, as
well as add an object to an object repository.
This task includes the following steps:
➤
"Prerequisites" on page 136
➤
"Open the Object Spy dialog box" on page 137
➤
"Select the details you want to view for the object" on page 137
➤
"Resize the Object Spy dialog box - Optional" on page 137
➤
"Use the pointing hand to select the application object on which you
want to Spy" on page 137
➤
"Add selected objects to the object repository - Optional" on page 138
1 Prerequisites
Open your application to the page containing the object on which you
want to spy.
136
Chapter 3 • The Test Object Model
2 Open the Object Spy dialog box
For more information, see the To Access section of the "Object Spy Dialog
Box" on page 142.
3 Select the details you want to view for the object
In the Object Spy dialog box, select the Properties or Operations tab, and
then select the radio button to view the Native or Identification
properties. For information about using the run-time object’s operations
or retrieving the values of its properties, see "Retrieving and Setting
Identification Property Values" on page 384 and "Native Properties and
Operations" on page 385.
4 Resize the Object Spy dialog box - Optional
This is useful if the objects on which you want to spy have a deep
hierarchy or long property names and values, as it enables you to view all
of the information without scrolling. For more information, see "Object
Spy Dialog Box" on page 142.
5 Use the pointing hand to select the application object on
which you want to Spy
In the Object Spy, click the pointing hand button and then mouse over or
click an object in your application. In most environments, as you mouse
over objects in your application, the Object Spy highlights the object it
identifies and displays the relevant information in the Object Spy,
according to the options you selected in step 3. For details on using the
pointing hand, see "Tips for Using the Pointing Hand" on page 148.
When you click an object in your application, the Object Spy captures its
information, and you can:
➤
Change the selected radio button or tab in the Object Spy to view
additional details.
➤
View properties, values, or operations of other test objects currently
displayed in the Object hierarchy tree, by selecting that test object in
the tree.
137
Chapter 3 • The Test Object Model
➤
Highlight the object in the application, by clicking the Highlight in
Application button.
6 Add selected objects to the object repository - Optional
After clicking an object you can add it (or any other object in the Object
hierarchy tree) to the object repository using the Add to Repository
button. For details, see "Object Spy Dialog Box" on page 142.
If an object in the Object hierarchy tree already exists in a repository
associated with the component, a repository icon is displayed in the
lower-right corner of the object’s icon.
Reference
Comparison of Object Repository Window and Object
Repository Manager
You perform many object repository-related tasks either in the Object
Repository window or in the Object Repository Manager. Some object
repository-related tasks can also be performed in both. The following table
lists features and functionality, indicating if they are available in the Object
Repository window or the Object Repository Manager:
Functionality
"Adding and Deleting Test Objects in an Object
Repository" on page 152
"Copying, Pasting, Moving, or Deleting Objects in the
Object Repository" on page 170
"Highlighting an Object in Your Application" on
page 157
138
Object
Repository
window
Object
Repository
Manager
Chapter 3 • The Test Object Model
Functionality
Object
Repository
window
Object
Repository
Manager
"Locating a Test Object in the Object Repository" on
page 157
"Specifying or Modifying Property Values" on page 159
"Updating Identification Properties from an Object in
Your Application" on page 159
"Restoring Default Mandatory Properties for a Test
Object" on page 160
"Renaming Test Objects" on page 161
"Adding Properties to a Test Object Description" on
page 162
"Defining New Identification Properties" on page 164
"Removing Properties from a Test Object Description"
on page 178
"Exporting Local Objects to a Shared Object
Repository" on page 209
"Copying Objects to the Local Object Repository" on
page 210
"Managing Shared Object Repositories" on page 241
(includes creating, opening, saving, closing, and
enabling editing functionality)
"Adding a Test Object to an Object Repository" on
page 167
"Adding Test Objects Using the Navigate and Learn
Option" on page 246
"Working with Repository Parameters" on page 234
"Merging Two Shared Object Repositories" on page 322
"Importing and Exporting Shared Object Repositories
Using XML" on page 233
139
Chapter 3 • The Test Object Model
Object Identification Process Workflow
The following flowchart provides a general overview of the main process of
QuickTest object identification.
140
Chapter 3 • The Test Object Model
Note for Web-based objects:
➤
If you defined Web object identifiers (such as XPath/CSS properties) for
these test objects, they are used before the description properties. If one
or more objects are found, QuickTest continues to identify the object
using the description properties. For details, see the section on Web
Object Identifiers (described in the HP QuickTest Professional Add-ins
Guide).
➤
Additional QuickTest-generated properties, such as source index or
automatic XPath, may also affect the object identification process. You
enable these properties in the Advanced Web Options tab of the Options
dialog box (described in the HP QuickTest Professional Add-ins Guide).
141
Chapter 3 • The Test Object Model
Object Spy Dialog Box
This dialog box enables you to view the native properties and operations of
any object in an open application, as well as the test object hierarchy,
identification properties, and operations of the test object that QuickTest
uses to represent that object.
You can also check if an object is in a repository associated with your
component (via its application area), add the selected object to the local
object repository (or a shared object repository if you are using the Object
Spy from the Object Repository Manager), and highlight an object in the
application.
142
Chapter 3 • The Test Object Model
To access
Use one of the following:
➤ Select Tools > Object Spy.
➤ Click the Object Spy toolbar button
.
Available from:
➤ QuickTest Main Window - User Interface (described on page 72)
➤ Object Repository Window (described on page 221)
➤ Object Repository Manager Main Window (described on
page 247)
Relevant
tasks
"How to Use the Object Spy to View Object Properties and
Operations or Add an Object to a Repository" on page 136
See also
"Properties and Operations for Test Objects and Run-Time Objects"
on page 128
User interface elements are described below:
Option
Description
Pointing Hand. Turns the mouse pointer into a pointing hand. Use
the pointing hand to highlight or click the object whose properties
and/or operations you want to view.
➤ As you move the pointing hand over the objects in the
application, the objects are highlighted in the application (in
some environments), and their details are displayed in the
Object Spy dialog box.
➤ To capture information about a particular object and its parent
objects in the Object Spy, click on the object in the application.
See also: "Tips for Using the Pointing Hand" on page 148.
Keep on Top. Keeps the Object Spy dialog box in view while spying
on an object in your application.
Note: When the Keep on Top button is not pressed, the Object Spy
dialog box may be hidden on your screen behind your application.
To view the Object Spy dialog box, press the left CTRL key and
arrange the windows as needed.
143
Chapter 3 • The Test Object Model
Option
Description
Highlight in Application. Highlights the object in the application
that corresponds to the test object currently selected in the Object
Spy.
Add Object to Repository. Adds the test Object selected in the Spy
hierarchy tree to the object repository.
➤ If the object is successfully added to the object repository, the
repository icon
is added to the bottom of the test object icon.
➤ When the Object Spy dialog box is opened from QuickTest or the
Object Repository Window, the object is added to the local
object repository of the component.
➤ When the Object Spy dialog box is opened from the Object
Repository Manager, the object is added to the active object
repository. This option is disabled when there is no open
repository.
Copy Identification Properties to Clipboard. Copies all of the
properties and values for the object currently selected in the Object
hierarchy tree. You can paste the copied data from the Clipboard
into any document.
Enabled only when the Identification radio button is selected in the
Properties tab.
The copied properties and values are formatted in standard
programmatic description syntax with line breaks between each
property-value pair. For example:
"Class Name:=Image",
"abs_x:=585",
"abs_y:=573",
"alt:=Specials",
....
This option is useful if you want to:
➤ Compare the properties and values of two objects in your
application.
➤ Copy the relevant strings when creating programmatic
descriptions.
For more information on programmatic descriptions, see
"Programmatic Descriptions" on page 370.
144
Chapter 3 • The Test Object Model
Option
Description
Object
hierarchy
Displays the hierarchy of test objects that are related to the object
you selected in your application.
➤ If an object in the hierarchy already exists in a repository
associated with the component, a repository icon
in the lower-right corner of the object’s icon.
is displayed
➤ To view properties, values, or operations for another test object
in the Object hierarchy tree, select that test object in the tree.
➤ While an object is highlighted in the application, test object
classes are displayed in the Object hierarchy tree, but test object
names are not. Test object names (such as Atlanta to Las Vegas
and Specials in the image shown above) are displayed only after
clicking the object to capture the information in the Object Spy.
Properties
tab
Select the Native or Identification radio button to display the native
properties and their values, or the test object identification
properties and values of the run-time object associated with the
selected test object in the Object hierarchy tree.
➤ Properties. Displays the identification or native property names
for the test object that is currently selected in the Object
hierarchy tree.
➤ Values. Displays the identification or native property values of
the relevant object in the application.
Operations
tab
Select the Native or Test Object radio button to display the native
operations or test object operations, and their corresponding
syntax, for the test object that is currently selected in the Object
Spy test Object hierarchy tree, or the run-time object associated
with it.
145
Chapter 3 • The Test Object Model
Option
Description
Selection
The content in this box differs depending on which tab is displayed
above it.
Properties tab: Displays the property name or value that was most
recently clicked.
Operations tab: Displays the syntax of the most recently clicked
operation.
Tip: To copy the text that is displayed in this box to the Clipboard,
highlight the text and press CTRL+C or right-click the highlighted
text and select Copy.
Description
146
Provides a description of the most recently clicked operation, when
available.
Chapter 3 • The Test Object Model
Object Selection Dialog Box
This dialog box enables you to specify which object you want QuickTest to
use when you select a location in your application that is associated with
more than one object.
To access
After performing an operation that changes the pointer
to a pointing hand, if you point to a location that is
associated with more than one object, the Object
Selection dialog box opens.
See also
"Tips for Using the Pointing Hand" on page 148
User interface elements are described below (unlabeled elements are shown
in angle brackets):
UI Elements
Description
<object tree>
A tree containing the parent hierarchy of the object you
selected. Select the object that you want QuickTest to use
from the tree and click OK.
147
Chapter 3 • The Test Object Model
Tips for Using the Pointing Hand
Clicking the pointing hand button converts the mouse (device) pointer into
a pointing hand. You use the pointing hand to highlight or click an object
in your application.
This section provides tips for working with the pointing hand.
➤
You can hold the left CTRL key to change the pointing hand to a standard
pointer. You can then change the window focus or perform operations in
QuickTest or in your application, such as right-clicking, using the scroll
bars, or moving the pointer over an object to display a context menu.
➤
If the window containing the object you want to select is partially hidden
by another window, hold the pointing hand over the partially hidden
window for a few seconds until it comes to the foreground. Then point to
and click the required object. You can configure the length of time
required to bring a window into the foreground using the General pane of
the Options dialog box.
➤
If the window containing the object you want to select is fully hidden by
another window, or if a dialog box is hidden behind a window, press the
left CTRL key and arrange the windows as needed.
➤
If the window containing the object you want to select is minimized, you
can display it by holding the left CTRL key, right-clicking the application
in the Windows task bar, and choosing Restore from the context menu.
➤
If the object you want to select can be displayed only by performing an
event (such as right-clicking or moving the pointer over an object to
display a context menu), hold the left CTRL key. The pointing hand
temporarily turns into a standard pointer and you can perform the event.
When the object you want to select is displayed, release the left CTRL key.
The pointer becomes a pointing hand again.
Examples of pointing hand usage
148
➤
From the Object Spy, you use the pointing hand to view the object’s
properties and/or operations.
➤
From the Select Object for Step dialog box, you use the pointing hand to
add an object to your component. When you click the pointing hand,
QuickTest is hidden, enabling you to view the entire desktop.
Chapter 3 • The Test Object Model
Troubleshooting and Limitations - Object Spy
When working in Windows XP, using CTRL+Left mouse button to select
Taskbar items is not supported.
Workaround: Use CTRL+Right mouse button to open the shortcut menu,
and then select Restore to display the selected item.
149
Chapter 3 • The Test Object Model
150
4
Managing Test Objects in Object
Repositories
This chapter includes:
Concepts
➤
Adding and Deleting Test Objects in an Object Repository on page 152
➤
Guidelines for Copying, Pasting, and Moving Objects on page 155
➤
Locating Objects on page 156
➤
Maintaining Identification Properties - Overview on page 158
➤
Visual Relation Identifiers on page 165
Tasks
➤
How to Add a Test Object to an Object Repository on page 167
➤
How to Copy, Paste, Move, or Delete Objects in the Object Repository
on page 170
➤
How to Locate an Object in an Object Repository on page 173
➤
How to Maintain Test Objects in Object Repositories on page 174
➤
How to Define a Visual Relation Identifier for a Specific Test Object Use-Case Scenario on page 180
Reference
➤
Add Properties Dialog Box on page 186
➤
Define New Test Object Dialog Box on page 189
➤
Define Object Filter Dialog Box on page 191
➤
Find and Replace Dialog Box on page 195
151
Chapter 4 • Managing Test Objects in Object Repositories
➤
Ordinal Identifier Dialog Box on page 197
➤
Visual Relation Identifier Dialog Box on page 198
Troubleshooting and Limitations - Managing Test Objects on page 205
Concepts
Adding and Deleting Test Objects in an Object
Repository
The functionality described in this section is available in the Object
Repository window for the local object repository, and the Object
Repository Manager for shared object repositories.
When you create an object repository for your keyword-driven testing
infrastructure, you can add test objects to it in different ways. You can
choose to add only a selected test object, or to add all test objects of a certain
type, such as all button objects, or to add all test objects of a specific class,
such as all WebButton objects.
You can use the Navigate and Learn option, for example, to add objects to
the shared object repository according to your defined filter. If you record a
component, QuickTest adds each object on which you perform an operation
to the local object repository (for objects that do not already exist in an
associated shared object repository). You can also add test objects to the
local object repository while editing your component.
For example, you may find that users need to perform a step on an object
that is not in the object repository. You may also find that an additional
object was added to the application you are testing after you built the object
repository. You can add the object directly to a shared object repository
using the Object Repository Manager, so that it is available in all
components that use this shared object repository. Alternatively, you can
add it to the local object repository of the component.
152
Chapter 4 • Managing Test Objects in Object Repositories
You can add test objects to a local or shared object repository directly from
your application. You can choose to add a specific test object either with or
without its descendants. You can also control which descendants to add,
according to their object and class types, based on selections that you define
in the object filter.
If needed, you can merge test objects from the local object repository into a
shared object repository. For more information, see Chapter 9, "Object
Repository Merge Tool."
You can also add test objects to a shared object repository while navigating
through your application. For more information, see "Navigate and Learn
Toolbar" on page 254.
This section also includes:
➤
"Defining New Test Objects" on page 153
➤
"Deleting Objects in the Object Repository" on page 154
Defining New Test Objects
You can define test objects in your object repository that do not yet exist in
your application. This enables you to prepare an object repository and build
components for your application before the application is ready for testing.
For example, you may already know the names, types, and descriptive
properties of some of the objects in your application, and know only the
types of other objects in your application. Before your application is ready,
you can create WebEdit objects for UserName and Password fields in your
Login page (plus the relevant parent Page and Browser objects). If you know
the property values for these objects, you can also add them. If not, you can
add them when your application is ready for testing.
When you define a new object in the object repository as described in this
section, the object is added to the local object repository and can be used
only by the current component. If you want to add the object to the shared
object repository so that it can be used in multiple components, you must
add it using the Object Repository Manager. For more information, see
Chapter 6, "Shared Object Repositories."
153
Chapter 4 • Managing Test Objects in Object Repositories
After you have defined the new test object, if the properties of the object in
your application do not match the test object description that you defined,
or if an object has been updated in your application, you can update the
object description at any time. For more information, see "Updating
Identification Properties from an Object in Your Application" on page 159.
Deleting Objects in the Object Repository
When you remove a step from your component, its corresponding object
remains in the object repository.
If you are working with a local object repository and the object in the step
you removed does not occur in any other steps within that component, you
can delete the object from the object repository.
If you are working with a shared object repository, confirm that the object
does not appear in any other component using the same shared object
repository before you choose to delete the object from the object repository.
Also, confirm that the object you are deleting is not use in a visual relation
identifier for another test object.
You delete objects in the local object repository using the Object Repository
window, and objects in the shared object repository using the Object
Repository Manager.
Note: If your component contains references to an object that you deleted
from the object repository, your component run will fail.
154
Chapter 4 • Managing Test Objects in Object Repositories
Guidelines for Copying, Pasting, and Moving Objects
When copying, pasting, or moving objects, consider the following
guidelines:
➤
You cannot modify the root node of an object repository.
➤
If you change the object hierarchy, ensure that the new hierarchy is valid.
➤
If you paste or move an object to a different hierarchical level, you can
choose whether to copy all objects up to the shared parent object (in the
message displayed when you perform such an operation).
➤
In the Object Repository window, when you copy, paste, and move
objects from a shared object repository associated with a component, the
objects are copied, pasted, or moved to the local object repository of the
component.
➤
If you move an object to its immediate parent, QuickTest creates a copy of
the object (renamed with an incremental suffix) and pastes it as a sibling
of the original object.
➤
If you cut or copy an object, and then paste it on its parent object,
QuickTest creates copy of the object (renamed with an incremental suffix)
and inserts it at the same level as the original object.
➤
You cannot move an object to any of its descendants.
➤
You cannot copy or move an object to be a child of a bottom-level object
(an object that cannot contain a child object) in the object hierarchy.
➤
You cannot copy, paste, or move objects that have unmapped repository
parameters from a shared object repository to the local object repository.
If you copy, paste, or move an object from a shared object repository to
the local object repository and the object or one of its parent objects are
parameterized using one or more repository parameters, the repository
parameter values are converted when you copy, paste, or move the object.
For example, if the repository parameter is mapped to a local parameter,
the property is parameterized using a local parameter. If the value is a
constant value, the property receives the same constant value.
➤
If you delete a test object that are used in a visual relation identifier for
another test object, object identification for that test object will fail.
155
Chapter 4 • Managing Test Objects in Object Repositories
Locating Objects
The functionality described in this section is available in the Object
Repository window for the local object repository, and the Object
Repository Manager for shared object repositories.
You can search for a specific object in your object repository in several ways.
You can search for an object according to its type. For example, you can
search for a specific edit box, or you can point to an object in your
application to automatically highlight that same object in your repository.
You can select an object in your object repository and highlight it in your
application to check which object it is. For local objects (and shared objects
in an editable shared object repository when using the Object Repository
Manager), you can also replace specific property values with other property
values. For example, you can replace the property value userName with
user name.
Note: When locating test objects, QuickTest also takes into account the
visual relation identifier property, if defined for that test object. For details,
see "Visual Relation Identifiers" on page 165.
This section also includes:
156
➤
"Finding Objects in an Object Repository" on page 157
➤
"Highlighting an Object in Your Application" on page 157
➤
"Locating a Test Object in the Object Repository" on page 157
Chapter 4 • Managing Test Objects in Object Repositories
Finding Objects in an Object Repository
You can use the Find and Replace dialog box to find an object, property, or
property value in an object repository. You can also find and replace
specified property values.
You replace property values for objects in the local object repository using
the Object Repository window. You replace property values for objects in
shared object repositories using the Object Repository Manager.
Highlighting an Object in Your Application
You can select a test object in your object repository and highlight it in the
application you are testing. When you choose to highlight a test object,
QuickTest indicates the selected object's location in your application by
temporarily showing a frame around the object and causing it to flash
briefly. The application must be open to the correct context so that the
object is visible.
For example, to locate the User Name edit box in a Web page, you can open
the relevant page in the Web browser and then select the User Name test
object in the object repository. When you choose the Highlight in
Application option, the User Name edit box in your browser is framed in the
Web page and flashes several times. Both the frame and the flashing
behavior are temporary.
Locating a Test Object in the Object Repository
You can select an object in the application you are testing and highlight the
test object in the object repository.
For example, to locate a Find a Flight image in a Web page, you can select it
in your Web page using the pointing hand mechanism. After you select the
Find a Flight image object from the selection dialog box and click OK, the
parent hierarchy in the object repository tree expands and the Find a Flight
image test object is highlighted.
157
Chapter 4 • Managing Test Objects in Object Repositories
Maintaining Identification Properties - Overview
The functionality described in this section is available in the Object
Repository window for objects in the local object repository, and the Object
Repository Manager for objects in shared object repositories.
As applications change, you may need to change the property values of the
steps in your component. Suppose an object in your application is modified.
If that object is part of your component, you should modify its values so
that QuickTest can continue to identify it. For example, if a company Web
site contains a Contact Us hypertext link, and the text string in this link is
changed to Contact My Company, you need to update the object’s details in
the object repository so that QuickTest can continue to identify the link
properly (assuming that the text property is included in the test object’s
description).
You can modify identification properties in a number of ways. For an object
stored in a local object repository, you can modify its properties directly
from the Object Repository window. For an object stored in a shared object
repository, you can either open it in the Object Repository Manager and
modify its properties, or you can copy it to the local object repository and
then modify its properties.
This section also includes:
158
➤
"Specifying or Modifying Property Values" on page 159
➤
"Updating Identification Properties from an Object in Your Application"
on page 159
➤
"Restoring Default Mandatory Properties for a Test Object" on page 160
➤
"Renaming Test Objects" on page 161
➤
"Adding Properties to a Test Object Description" on page 162
➤
"Defining New Identification Properties" on page 164
➤
"Ordinal Identifiers" on page 164
Chapter 4 • Managing Test Objects in Object Repositories
Specifying or Modifying Property Values
You can specify or modify values for properties in the test object description.
You can specify a value using a constant value (either a simple value or a
constant value that includes regular expressions) or you can parameterize it.
You can also change the set of properties used to identify that object.
You can also automatically update the description of one or more test
objects in your object repository based on the actual updated object
properties in your application. For more information, see "Updating
Identification Properties from an Object in Your Application" on page 159.
You can also find and replace specific identification property values. For
more information, see "Find and Replace Dialog Box" on page 195.
Note: In some cases, the Smart Identification mechanism may enable
QuickTest to identify a test object, even when some of its property values
change. However, if you know about property value changes for a specific
test object, you should try to correct the test object definition so that
QuickTest can identify the test object from its basic object description. For
more information on the Smart Identification mechanism, see Chapter 7,
"Configuring Object Identification."
Updating Identification Properties from an Object in Your
Application
You can update a test object in your object repository by selecting the
corresponding object in your application and relearning its properties and
property values from the application. When you update a test object
description in this way, all currently defined properties and values are
overwritten, including description properties and values, the ordinal
identifier, and Smart Identification information. The updated object
description is based on the current definitions in the Object Identifications
dialog box. Only the object-specific comments, if any, are retained.
This is useful if an object’s properties have changed since you added it to the
object repository, since QuickTest may not be able to recognize the object
unless you update its description.
159
Chapter 4 • Managing Test Objects in Object Repositories
You can also use this option to update an object that you defined (using the
Object > Define New Test Object option) before the application was
completely developed, and as a result some of the identification properties
and values are missing in the test object description, or are no longer
sufficient to identify the object. For more information on the Define New
Test Object option, see "Define New Test Object Dialog Box" on page 189.
Note: If you just want to restore the original test object description property
set, while retaining any property values you have modified, you can use the
Restore mandatory property set option. For more information, see
"Restoring Default Mandatory Properties for a Test Object" on page 160.
Restoring Default Mandatory Properties for a Test Object
You can restore the default properties for a selected test object. When you
restore the default properties, it restores the mandatory property set defined
for the selected object class, based on the settings that were set in the Object
Identification dialog box at the time the object was learned. If you added or
removed properties to or from the description, those changes are
overwritten. However, if property values were defined or modified for any of
the mandatory properties, those values are not modified when you choose
this option. In addition, restoring the default mandatory property set does
not change the values for the ordinal identifier or Smart Identification
settings for the test object.
You can use the Restore mandatory property set option to restore the object
description property set to the mandatory properties that were defined for
that class when your object was learned. If the mandatory properties in the
Object Identification dialog box are currently different for this test object
class than they were when your object was learned, and you want to use the
new definition, you can use the Update From Application option, which
relearns the object properties and values based on the current definitions in
the Object Identifications dialog box. For more information, see "Updating
Identification Properties from an Object in Your Application" on page 159.
160
Chapter 4 • Managing Test Objects in Object Repositories
Renaming Test Objects
When an object changes in your application, or if you are not satisfied with
the current name of a test object for any reason, you can change the name
that QuickTest assigns to the stored object. You can also provide test objects
with meaningful names to assist users in identifying them when using them
in component steps.
For example, suppose you have a graphics application in which all the tools
in the toolbar are saved as WinObjects in the object repository with the
names ToolChild1, ToolChild2, ToolChild3, and so forth. You may want to
rename all the buttons to their actual labels to make them easier for you to
identify in the test, for example, Color_Picker, Eraser, Airbrush, and so forth.
Renaming a test object does not affect the way QuickTest recognizes the
object in your application, as the test object name is not included in the test
object description.
If you are working with a shared object repository, your change applies to all
occurrences of the test object in all components that use this shared object
repository.
If you are working with a local object repository, your change applies to all
occurrences of the test object in the selected component. If other
components in your business process test also include operations on the
local test object, you should modify the test object’s name in each relevant
component.
When you modify the name of a test object in the local object repository,
the name is automatically updated for all occurrences of the test object.
When you modify the name of a test object in a shared repository, the name
is automatically updated in all components open on the same computer
that use the object repository as soon as you make the change, even if you
have not yet saved the object repository with your changes. If you close the
object repository without saving your changes, the changes are rolled back
in any open components that were open at the time. Changes that are saved
are also automatically updated in components that use the object repository
as soon as you open them. To load and view saved changes in a component
or object repository that is currently open on a different computer, you
must open the object repository or lock it for editing on your computer.
161
Chapter 4 • Managing Test Objects in Object Repositories
Tip: If you do not want to automatically update test object names for all
occurrences of the test object, you can clear the Automatically update test
and component steps when you rename test objects check box in the
General pane of the Options dialog box (Tools > Options > General node). If
you clear this option, you will need to manually change the test object
names in all steps in which they are used, otherwise your component run
will fail.
Note: If you rename test objects in a shared object repository and save the
changes, when you open another component using the same shared object
repository, that component updates the test object name in all of its
relevant steps. This process may take a few moments. If you save the
changes to the second component, the renamed steps are saved. However, if
you close the second component without saving, then the next time you
open the same component, it will again take a few moments to update the
test object names in its steps.
Adding Properties to a Test Object Description
You can add to the list of properties that QuickTest uses to identify an
object. For each object class, QuickTest has a default property set that it uses
for the object description for a particular test object. You can use the Add
Properties dialog box to change the properties that are included in the test
object description.
Note: You can also add any valid identification property to a test object
description, even if it does not appear in the Add Properties dialog box. For
more information, see "New Property Dialog Box" on page 188.
162
Chapter 4 • Managing Test Objects in Object Repositories
Adding to the list of properties is useful when you want to create and run
components on an object that changes dynamically. An object may change
dynamically if it is frequently updated, or if its property values are set using
dynamic content (for example, from a database).
You can also change the properties that identify an object if you want to
reference objects using properties that QuickTest did not learn automatically
when it learned the object. For example, suppose you are testing a Web site
that contains an archive of newsletters. The archive page includes a
hypertext link to the current newsletter and additional hypertext links to all
past newsletters.
The text in the first hypertext link on the page changes as the current
newsletter changes, but it always links to a page called current.html.
Suppose you want to create a step in your component in which you always
click the first hypertext link in your archive page. Since the news is always
changing, the text in the hypertext link keeps changing. You need to modify
how QuickTest identifies this hypertext link so that it can continue to find
it.
The default properties for a Link object (hypertext link) are text and HTML
tag. The text property is the text inside the link. The HTML tag property is
always A, which indicates a link.
You can modify the default properties for a hypertext link for the learned
object so that QuickTest can identify it by its destination page, rather than
by the text in the link. You can use the href property to check the
destination page instead of using the text property to check the link by the
text in the link.
163
Chapter 4 • Managing Test Objects in Object Repositories
Note: You can also modify the set of properties that QuickTest learns when
it learns objects from a particular object class using the Object Identification
dialog box. Such a change generally affects only those objects that QuickTest
learns after you make the change. For more information, see "Configuring
Object Identification" on page 263. You can also apply the changes you
make in the Object Identification dialog box to the descriptions of all
objects in an existing component using the Update Run Mode option. For
more information, see "Update Options Tab (Update Run Dialog Box)" on
page 881.
Defining New Identification Properties
You can add any valid identification property to a test object description,
even if it does not appear in the Add Properties dialog box.
For example, suppose you want QuickTest to use a specific property to
identify your object, but that property is not listed in the Add Properties
dialog box. You can open the Add Properties dialog box and add that
property to the list.
Ordinal Identifiers
An ordinal identifier assigns a numerical value to a test object that indicates
its order or location relative to other objects with an otherwise identical
description (objects that have the same values for all properties). This
ordered value provides a backup mechanism that enables QuickTest to
create a unique description to recognize an object when the defined
properties are not sufficient to do so. For more information on ordinal
identifiers, see "Ordinal Identifiers" on page 267.
Note: When visual relation identifiers are used, the Ordinal identifier option
is disabled in the Object Repository Manager or window. For details on
visual relation identifiers, see "Visual Relation Identifiers" on page 165.
164
Chapter 4 • Managing Test Objects in Object Repositories
Visual Relation Identifiers
When testing applications with multiple identical objects, QuickTest assigns
an ordinal identifier to each test object. This may lead to unreliable object
identification. However, it may not (immediately) result in a failed step. For
details on ordinal identifiers, see "Ordinal Identifiers" on page 267.
A visual relation identifier is a set of definitions that enable you to identify
the object in the application according its neighboring objects in the
application. You can select neighboring objects that will maintain the same
relative location to your object, even if the user interface design changes.
This enables you to help QuickTest identify similar objects much as a
human tester would, and helps in creating more stable object repositories
that can withstand predictable changes to the application’s user interface.
You define visual relations in the Visual Relation Identifier dialog box,
which is accessible from the local or shared object repository, and from the
Object Properties dialog box. For user interface details, see "Visual Relation
Identifier Dialog Box" on page 198. For details on maintaining test object in
object repositories, see "How to Maintain Test Objects in Object
Repositories" on page 174.
How Visual Relation Identifiers Work
Suppose that you are shown a photograph of a classroom, and are then
asked to note identical twins sitting at different desks, and to be able to
identify each twin successfully when shown different photographs of the
same classroom at a later time.
You are told that one differentiating characteristic is that one twin always
carries a blue school bag, and that the other twin always carries a red school
bag. You are then also told that each twin has an assigned desk partners,
which means that even if the twins sit at a different desk in other
photographs, they always sit next to their assigned lab partners.
Therefore, the solution is to identify the twin with the blue school bag in
this manner: <twin> is nearest to <twin’s desk partner>, and carries
<blue school bag>.
165
Chapter 4 • Managing Test Objects in Object Repositories
QuickTest uses visual relation identifiers in a similar manner, by examining
related objects in the application that you are testing. However, because
QuickTest compares the related objects based on their relation to the test
object to identify as a set of definitions, you would state that
<twin’s desk partner> is nearest to <twin>, and not vice versa.
How QuickTest Uses Visual Relation Identifiers
166
➤
During a run session, QuickTest first attempts to identify the test object
using the object’s description properties. For details, see "How QuickTest
Identifies Objects During a Run Session" on page 122.
➤
If QuickTest finds one or more objects matching the test object’s
description, it attempts to identify the object using the visual relation
identifier. For details, see "How to Define a Visual Relation Identifier for a
Specific Test Object - Use-Case Scenario" on page 180.
➤
After the visual relation identifier is applied, if no objects or more than
one object is found, the visual relation identifier fails, and QuickTest
continues to Smart Identification (when defined for that test object class).
For details, see "Smart Identification" on page 272.
➤
After Smart Identification is applied, if no objects or more than one object
is found, no ordinal identifiers are used for that test object.
➤
For general considerations on working with visual relation identifiers, see
"Considerations for Working with Visual Relation Identifiers" on
page 203.
➤
For a workflow of the general object identification process, see "Object
Identification Process Workflow" on page 140.
Chapter 4 • Managing Test Objects in Object Repositories
Tasks
How to Add a Test Object to an Object Repository
This task describes how to add test objects to object repositories. This
functionality is available in the Object Repository window for the local
object repository, and the Object Repository Manager for shared object
repositories.
This section includes:
➤
"Add test objects to the object repository using the Add Objects to Local
or Add Objects option" on page 168
➤
"Add a test object to the local object repository using the Select Object for
Step dialog box" on page 169
➤
"Define a new test object" on page 169
➤
"Add a test object to the object repository using the Object Spy dialog
box" on page 170
167
Chapter 4 • Managing Test Objects in Object Repositories
Note:
➤
You can add a test object to the local object repository only if that test
object does not already exist in a shared object repository that is
associated with the component. If a test object already exists in an
associated shared object repository, you can add it to the local object
repository using the Copy to Local option. For more information, see
"Local Copies of Objects from Shared Object Repositories" on page 210.
➤
You cannot add WinMenu objects directly to an object repository using
the Add Objects to Local button in the Object Repository window or the
Add Objects button in the Object Repository Manager. If you want to add
a WinMenu object to the object repository, you can use the Add Objects
or Add Objects to Local button to add its parent object and then select to
add the parent object together with its descendants, or you can record a
step on a WinMenu object and then delete the recorded step.
Add test objects to the object repository using the Add Objects to Local or
Add Objects option
1 Perform one of the following:
➤
In the Object Repository window, Select Object > Add Objects to Local
or click the Add Objects to Local toolbar button. If you select this
option, the test object is added to the local object repository and can
be used only by the current component.
➤
In the Object Repository Manager, select Object > Add Objects or click
the Add Objects toolbar button. If you select this option, the test
object is added to a shared object repository and can be used in
multiple components.
QuickTest and the Object Repository window or Object Repository
Manager are hidden, and the pointer changes into a pointing hand. In
some environments, as you move the pointing hand over your
application, the test objects are highlighted. For information on using the
pointing hand, see "Tips for Using the Pointing Hand" on page 148.
168
Chapter 4 • Managing Test Objects in Object Repositories
2 Click the object you want to add to your object repository.
3 If the location you click is associated with more than one object, the
Object Selection dialog box opens. Select the object you want to add to
the repository and click OK. For more information, see "Object Selection
Dialog Box" on page 147.
If the object you select in the Object Selection dialog box is a bottom-level
object in the test object hierarchy, for example, a WebButton object, it is
added directly to the object repository.
If the object you select in the Object Selection dialog box is a parent
(container) object, such as a browser or page in a Web environment, or a
dialog box in a standard Windows application, the Define Object Filter
dialog box opens. The Define Object Filter dialog box retains the settings
that you defined in the previous add object session. For details on the
Define Object Filter dialog box, see "Define Object Filter Dialog Box" on
page 191.
QuickTest also adds the new object’s parent objects if they do not already
exist in the object repository. Local objects are shown in black in the
object repository tree to indicate they are editable; shared objects are
shown in gray and can be edited only in the Object Repository Manager.
Add a test object to the local object repository using the Select Object for
Step dialog box
You can add a test object to the local object repository by choosing it from
your application in the Select Object for Step dialog box (from a new step in
the Keyword View).
For more information, see "How to Select an Item for Your Step" on
page 539.
Define a new test object
1 Select the object under which you want to define the new object,
according to the correct object hierarchy.
2 Click the Define New Test Object button or select Object > Define New
Test Object. The Define New Test Object dialog box opens. For details see,
"Define New Test Object Dialog Box" on page 189.
169
Chapter 4 • Managing Test Objects in Object Repositories
Add a test object to the object repository using the Object Spy dialog box
1 Click the Object Spy button from QuickTest or the Object Repository
Manager.
2 Click the Add Object button. Depending on from where you opened the
Object Spy dialog box, the object is added to the local or shared object
repository. For more details, see "Object Spy Dialog Box" on page 142.
How to Copy, Paste, Move, or Delete Objects in the
Object Repository
The following steps describe how to copy, paste, move, and delete objects in
an object repository. This functionality is available in the Object Repository
window for objects in the local object repository, and the Object Repository
Manager for objects in shared object repositories:
170
➤
"Move an object to a different location within an object repository" on
page 171
➤
"Copy an object to a different location within an object repository" on
page 171
➤
"Move or copy an object without its child objects" on page 171
➤
"Cut, copy, and paste objects within an object repository" on page 171
➤
"Cut, copy, and paste objects between shared object repositories" on
page 171
➤
"Copy objects from one shared object repository to another" on page 171
➤
"Move objects from one shared object repository to another" on page 172
➤
"Delete an object from the object repository" on page 172
➤
"Add test objects from a local or shared object repository to your
component" on page 172
Chapter 4 • Managing Test Objects in Object Repositories
Move an object to a different location within an object
repository
Drag the object up or down the tree and drop it at the required location. By
default, when you drag an object, any child objects are also moved with it.
Copy an object to a different location within an object
repository
Press the CTRL key while dragging the object and drop it at the required
location in the tree. By default, when you drag an object, any child objects
are also moved with it.
Move or copy an object without its child objects
Drag the object using the right mouse button. When you drop the object at
the required location, you can choose whether to drop it with or without its
children. By default, when you drag an object, any child objects are also
moved or copied with it.
Cut, copy, and paste objects within an object repository
Use the corresponding toolbar buttons or the options in the Edit menu.
When you cut, copy, and paste objects, the operation is performed also on
the child objects of the selected object, if any.
Cut, copy, and paste objects between shared object
repositories
In the Object Repository Manager, use the corresponding toolbar buttons or
the options in the Edit menu. When you cut, copy, and paste objects, the
operation is performed also on the child objects of the selected object, if
any.
Copy objects from one shared object repository to another
In the Object Repository Manager, open the required shared object
repositories. Drag the object from one window and drop it at the required
location in the other window.
171
Chapter 4 • Managing Test Objects in Object Repositories
Move objects from one shared object repository to another
In the Object Repository Manager, open the required shared object
repositories. Press the CTRL key while you drag the object from one window
and drop it at the required location in the other window. Note that moving
an object removes it from one shared object repository and adds it to the
other shared object repository.
You can also copy objects from a shared object repository to the local object
repository to modify them locally. For more information, see "Local Copies
of Objects from Shared Object Repositories" on page 210.
Delete an object from the object repository
In the repository tree, select the object you want to delete and then click the
Delete button.
Add test objects from a local or shared object repository to
your component
You can drag and drop test objects from a shared or local object repository to
your component. When you drag and drop a test object to your component,
QuickTest inserts a step with the default operation for that test object in
your component.
For example, if you drag and drop a button object to your component, a
step is added to your component using the button object, with a Click
operation (the default operation for a button object).
Note: You cannot drag and drop checkpoint or output value objects from
the Object Repository Manager.
For details on adding objects to your component, see:
172
➤
"Available Keywords Pane Overview" on page 914
➤
"Object Repository Window" on page 221
Chapter 4 • Managing Test Objects in Object Repositories
How to Locate an Object in an Object Repository
The following steps describe how to locate a specific object in your object
repository.
➤
"Find an Object in an Object Repository" on page 173
➤
"Highlight an Object in Your Application" on page 173
➤
"Locate an Object from Your Application in the Object Repository" on
page 173
Find an Object in an Object Repository
1 Make sure that the relevant object repository is open (in the Object
Repository window or Object Repository Manager).
2 Click the Find & Replace button. The Find & Replace dialog box opens.
For user interface details, see "Find and Replace Dialog Box" on page 195.
Highlight an Object in Your Application
1 Make sure your application is open to the correct window or page.
2 Select the test object you want to highlight in your object repository.
3 Click the Highlight in Application button.
Locate an Object from Your Application in the Object
Repository
1 Make sure your application is open to the correct window or page.
2 Click the Locate in Repository button.
QuickTest is hidden, and the pointer changes into a pointing hand. In
some environments, as you move the pointing hand over your
application, the test objects are highlighted.
3 Use the pointing hand to click the required object in your application. For
information on using the pointing hand, see "Tips for Using the Pointing
Hand" on page 148.
173
Chapter 4 • Managing Test Objects in Object Repositories
4 If the location you clicked is associated with more than one object, the
Object Selection dialog box opens. For details, see "Object Selection
Dialog Box" on page 147. The selected object is highlighted in the object
repository.
Note: If the relevant object repository is not open or the object cannot be
found, the object is not highlighted. In the Object Repository Manager, if
more than one shared object repository is open, and QuickTest cannot
locate the selected object in the active object repository, you can choose
whether to look for the object in all of the currently open object
repositories.
How to Maintain Test Objects in Object Repositories
The following steps describe different options for maintaining and
modifying the test object details of objects in your repositories.
174
➤
"Specify an identification property value" on page 175
➤
"Update identification properties from an object in your application" on
page 176
➤
"Restore the mandatory property set" on page 176
➤
"Rename test objects" on page 177
➤
"Add properties to a test object description" on page 177
➤
"Define a new identification property" on page 178
➤
"Remove properties from a test object description" on page 178
➤
"Specify an ordinal identifier" on page 179
➤
"Define related objects for a specific test object" on page 179
Chapter 4 • Managing Test Objects in Object Repositories
Specify an identification property value
1 In the Object Repository window or Manager, select the test object whose
property value you want to specify.
2 In the Test object details area, click in the value cell for the required
property.
Tips:
➤
For a test object in the local object repository, you can also right-click
the step containing the test object and select Object Properties, and
then make the following property value changes in the Object
Properties dialog box.
➤
If you want to view all objects in the component, click the View in
Repository button. The Object Repository window opens and displays
all objects stored in the repository in a repository tree.
➤
You can also open the object repository for the selected component by
choosing Resources > Object Repository or by clicking the Object
Repository toolbar button.
3 Specify the property value in one of the following ways:
➤
If you want to specify a constant value, enter it in the value cell.
➤
If you want to parameterize the value or specify a constant value using
a regular expression, click the parameterization button in the value
cell. If you specify a constant value using a regular expression, the
icon is displayed next to the value. For information on parameterizing
values, see "How to Define Values for Your Step Arguments" on
page 541.
If you specified a constant value, it is shown in the Value column of the
Test object details area. If you parameterized the value, the parameter
name is shown with one of the following icons in the Value column. For
more details, see "Object Repository Window" on page 221.
175
Chapter 4 • Managing Test Objects in Object Repositories
Update identification properties from an object in your
application
1 In the object repository tree, select the test object whose description you
want to update.
2 Select Object > Update from Application or click the Update from
Application button. QuickTest is hidden, and the pointer changes into a
pointing hand. In some environments, as you move the pointing hand
over your application, the test objects are highlighted. For more
information on using the pointing hand, see "Tips for Using the Pointing
Hand" on page 148.
3 Find the object in your application whose properties you want to update
in the object repository and click it. You must choose an object of the
same object class as the test object you selected in the object repository
tree.
The properties and property values for the selected object are updated in
the object repository, according to the properties and values required to
identify the object that were learned by QuickTest when you clicked the
object in your application. Note that all properties and property values in
the Test object details area are updated, together with the ordinal
identifier and Smart Identification selections. Any object-specific
comments that you may have entered are not removed.
Restore the mandatory property set
1 In the object repository tree, select the test object whose description you
want to restore.
2 In the Test object details area, click the Restore mandatory property set
button.
3 Click Yes to confirm the operation. The test object’s description properties
are restored to the mandatory property set for the selected object class at
the time that the object was learned.
176
Chapter 4 • Managing Test Objects in Object Repositories
Rename test objects
1 In the object repository tree of the Object Repository window or Manager,
select the test object that you want to rename.
2 In the Name box in the Object Properties pane, enter the new name for
the test object. Then click anywhere else to remove the focus from the
object. For a list of naming conventions, see the Test object name section
in "Naming Conventions" on page 1121. Test object names are not
case-sensitive.
Add properties to a test object description
1 In the object repository tree of the Object Repository window or Manager,
select the test object whose description you want to modify.
2 In the Test object details area, click the Add description properties
button.
3 The Add Properties dialog box opens listing the properties that can be
used to identify the object (properties that are not already part of the test
object description). For details, see "Add Properties Dialog Box" on
page 186.
Tip: For a test object in the local object repository, you can also select the
required test object and select Edit > Step Properties > Object Properties,
click the Add description properties button, and then perform the
following steps in the Add Properties dialog box.
177
Chapter 4 • Managing Test Objects in Object Repositories
Define a new identification property
1 In the object repository tree of the Object Repository window or Manager,
select the test object for which you want to define a new property.
1 In the Test object details area, click the Add description properties
button.The Add Properties dialog box opens.
Tip: For a test object in the local object repository, you can also select the
required test object and select Edit > Step Properties > Object Properties,
click the Add description properties button, and then perform the
following steps in the Add Properties dialog box.
2 Click the Define new property button. The New Property dialog box
opens. For details, see "New Property Dialog Box" on page 188.
Remove properties from a test object description
1 In the object repository tree of the Object Repository window or Manager,
select the test object whose description you want to modify.
2 In the Test object details area, select one or more properties that you want
to remove from the test object description.
Tip: For an object in the local object repository, you can also select the
required test object and select Edit > Step Properties > Object Properties,
and then perform the following steps in the Object Properties dialog box.
3 Click the Remove selected description properties button. The selected
properties are removed from the test object description.
178
Chapter 4 • Managing Test Objects in Object Repositories
Specify an ordinal identifier
1 In the object repository tree of the Object Repository window or Manager,
select the test object whose ordinal identifier you want to specify.
2 In the Test object details area, click in the cell to the right of the Type,
Value cell under the Ordinal identifier row.
Tip: For an object in the local object repository, you can also select the
required test object and select Edit > Step Properties > Object Properties,
click in the cell to the right of the Type, Value cell under the Ordinal
identifier row, and then perform the following steps in the Object
Properties dialog box.
3 Click the Browse button. The Ordinal Identifier dialog box opens. For
details, see "Ordinal Identifier Dialog Box" on page 197.
Define related objects for a specific test object
1 In the Visual Relation Identifier Settings row of the Object Repository
window or Object Properties dialog box, click in the Value cell.
2 Click the Browse button in the cell. The Visual Relation Identifier dialog
box opens.
3 Set the options for the visual relation identifier. For details, see "Visual
Relation Identifier Dialog Box" on page 198.
Results:
➤
The visual relation identifier is added to the selected test object, and the
text in the Value cell indicates that a visual relation identifier is defined.
➤
Any related objects you specified are linked to the test object for which
you are using a visual relation identifier. You cannot define visual
relations for those objects.
179
Chapter 4 • Managing Test Objects in Object Repositories
➤
The Ordinal identifier property is disabled in the Object Details area of
the local or shared object repository, and is not used during the object
identification process. However, QuickTest still uses this property during
the learn process, when comparing existing objects with the objects to be
learned, and therefore the ordinal identifier value should not be manually
changed or removed.
For considerations on working with visual relation identifiers, see
"Considerations for Working with Visual Relation Identifiers" on page 203.
For a use-case scenario related to this task, see "How to Define a Visual
Relation Identifier for a Specific Test Object - Use-Case Scenario" on
page 180.
How to Define a Visual Relation Identifier for a Specific
Test Object - Use-Case Scenario
This scenario describes the process you would follow to define a visual
relation identifier for a specific test object that would otherwise require the
use of ordinal identifiers.
Note: For a task related to this scenario, see "How to Maintain Test Objects
in Object Repositories" on page 174.
This scenario includes the following steps:
180
➤
"Background" on page 181
➤
"Access the Visual Relation Identifier dialog box" on page 182
➤
"Highlight the objects in the application that match the test object’s
description" on page 182
➤
"Define the first related test object using horizontal visual relations" on
page 183
➤
"Define the second related object using vertical visual relations" on
page 184
Chapter 4 • Managing Test Objects in Object Repositories
➤
"Define the third related object using distance visual relations" on
page 185
➤
"Results" on page 186
1 Background
➤
The application you are testing contains three identical instances of
the Candidate object.
➤
When QuickTest learned the objects in the application, it assigned an
ordinal identifier to each Candidate test object.
➤
For the purpose of this exercise, Object #1 and Object #9 make up an
object pair, which is always to the left and right of the Candidate object
to identify. You want to instruct QuickTest to identify the instance of
the Candidate object that is located between the Object #1 and Object
#9 object pair during every run session, even if the sorting order of the
object pairs changes between run sessions.
181
Chapter 4 • Managing Test Objects in Object Repositories
2 Access the Visual Relation Identifier dialog box
a In QuickTest, open the relevant object repository and select the
Candidate test object to identify.
b Verify that you have selected the correct test object by selecting
Object > Highlight in Application, and making sure that the correct
object is highlighted in the application.
c Open the Visual Relation Identifier dialog box, as described in "Visual
Relation Identifier Dialog Box" on page 198.
3 Highlight the objects in the application that match the test
object’s description
In the Visual Relation Identifier dialog box, click the Preview button. This
instructs QuickTest to highlight all objects that match the test object
description (ignoring the ordinal identifiers). The main QuickTest
window is hidden, and each instance of the Candidate object in the
application is highlighted, including the instance of the test object you
want to identify.
You then click the Preview button again to restore the QuickTest window.
182
Chapter 4 • Managing Test Objects in Object Repositories
4 Define the first related test object using horizontal visual
relations
a In the Related Objects area, click the Add button. The Select Test
Object dialog box opens, enabling you to either select a test object
from the object repository, or add an object from the application. For
details, see "Select Test Object Dialog Box" on page 560.
For the purpose of this scenario, the first related test object is
Object #1, which is located to the left of the Candidate object in the
application.
b In the Relation Details area, select the first checkbox and then select
Left from the drop-down list. The description area displays a summary
of the visual relation identifier.
c To verify that the visual relation is defined correctly, click the Preview
button again. The main QuickTest window is hidden, and the visual
relation identifier displays the objects that match the test object’s
description, including the currently defined visual relation. It also
highlights the selected related object, and a visual representation of
the defined relation details. Since Object #1 is to the left of all three
Candidate buttons, all three buttons are still highlighted when you use
the Preview button.{
183
Chapter 4 • Managing Test Objects in Object Repositories
5 Define the second related object using vertical visual
relations
a In the Related Objects area, click the Add button. The Select Test
Object dialog box opens, enabling you to select or add another object.
For the purpose of this scenario, the second related test object is
Object #5, which is located above and vertically in line with the
Candidate object.
b In the Relation Details area, select the second check box. From the
drop-down list select Above, and then select the In line (vertically)
checkbox. The description area displays a tooltip of all the selected
visual relations.
c To verify that the visual relations are defined correctly, click the
Preview button again. Since Object #5 is above all three Candidate
objects, all three are still highlighted. That means you still need to
select another related object to create a visual relation identifier that
uniquely identifies your object.
184
Chapter 4 • Managing Test Objects in Object Repositories
6 Define the third related object using distance visual relations
a In the Related Objects area, click the Add button. The Select Test
Object dialog box opens, enabling you to select another test object.
For the purpose of this scenario, the third related test object is
Object #9, which is the closest object to the right of the Candidate
object.
b In the Relation Details area, select the third checkbox and then select
Closest on the Y-axis from the drop-down list. The description area
displays an updated summary of the visual relation identifier.
c To verify that the visual relations are defined correctly, click the
Preview button again. you can now see that this third related object
enables QuickTest to uniquely identify the correct object.
185
Chapter 4 • Managing Test Objects in Object Repositories
7 Results
After you finish defining all of the necessary visual relations:
➤
The desired Candidate object is the only object in the application that
is identified when you use Preview.
➤
QuickTest can now correctly identify the desired Candidate object
during every run session, even if the user interface changes, as long as
the Candidate object maintains it's relative location to the three related
objects you defined.
➤
The Ordinal Identifier property is disabled in the Object Repository
Manager or window.
Reference
Add Properties Dialog Box
This dialog box enables you to add properties to the test object description
of test objects.
186
Chapter 4 • Managing Test Objects in Object Repositories
To access
From the Object Repository Manager or window, in the
Test object details area, click the Add description
properties button
.
Important
information
➤ Values for all properties are displayed only if the
application that contains the object is currently open.
If the application is closed, only values for properties
that were part of the object description when the
object was learned are shown.
➤ You can resize the Add Properties dialog box to enable
you to view long property values.
➤ After you add a new property to the object description,
you can modify its value. For more information on
modifying object property values, see "Specifying or
Modifying Property Values" on page 159.
Relevant tasks
"How to Maintain Test Objects in Object Repositories" on
page 174
See also
"Maintaining Identification Properties - Overview" on
page 158
User interface elements are described below:
UI Elements
Description
Define new property. Opens the New Property dialog
box. For details see "New Property Dialog Box" on
page 188.
<Properties list>
Select one or more properties to add to the test object
description and click OK. You can also double-click a
property to add it to the test object description. You can
type the first letters of a property to highlight the first
property in the list that matches the pattern.
187
Chapter 4 • Managing Test Objects in Object Repositories
New Property Dialog Box
This dialog box enables you to define a new identification property for a test
object.
To access
Click the Define new property button
Properties Dialog Box.
Important
information
You must enter a valid identification property in the
Property value edit box. If you enter an invalid property
and then select it to be part of the object description,
your run session will fail.
Relevant tasks
"How to Maintain Test Objects in Object Repositories" on
page 174
User interface elements are described below:
188
UI Elements
Description
Property name
The property name.
Property value
The value for the property.
in the Add
Chapter 4 • Managing Test Objects in Object Repositories
Define New Test Object Dialog Box
This dialog box enables you to define test objects in your object repository
that do not yet exist in your application.
.
To access
From the Object Repository Manager or Object
Repository window, select Object > Define New Test
Object.
Relevant tasks
"Adding and Deleting Test Objects in an Object
Repository" on page 152
See also
"Defining New Test Objects" on page 153
189
Chapter 4 • Managing Test Objects in Object Repositories
User interface elements are described below:
UI Elements
Description
Environment
The list of available environments. The test object classes
associated with the selected environment are displayed
in the Class box.
Note:
➤ The environments included in the Environment list
correspond to the loaded add-ins. For more
information on loading add-ins, see the section on
loading QuickTest add-ins in the HP QuickTest
Professional Add-ins Guide.
➤ The Environment list might also include additional
environments for which you or a third party
developed support using QuickTest extensibility.
190
Class
Select the class of the test object you want to define.
Name
Enter a name for the new test object. After you enter a
name, the Test object details area is enabled.
Test object details
Define the properties and values for your test object. The
Test object details area automatically contains the
mandatory properties defined for the object class in the
Object Identification dialog box. You can add or remove
properties as required, and define values for the
properties. For more information, see "Maintaining
Identification Properties - Overview" on page 158.
Chapter 4 • Managing Test Objects in Object Repositories
Define Object Filter Dialog Box
This dialog box enables you to define which objects should be learned
(while using the Navigate and Learn option or the Add Objects option). The
object filter contains predefined settings that decide which objects should
be learned (while using the Navigate and Learn option or the Add Objects
option). The option you select in the Define Object Filter dialog box is saved
and used for each subsequent learn session.
To access
Do one of the following:
➤ Add a test object to the object repository using the
Add Objects to Local from the Object Repository
window.
➤ Add a test object to the object repository using the
Add Objects option from the Object Repository
Manager.
For details, see "Adding and Deleting Test Objects in an
Object Repository" on page 152.
Relevant tasks
"Adding and Deleting Test Objects in an Object
Repository" on page 152
191
Chapter 4 • Managing Test Objects in Object Repositories
User interface elements are described below:
192
UI Elements
Description
Selected object only
(no descendants)
Adds to the object repository the previously selected
object’s properties and values, without its descendant
objects.
Default object types
Adds to the object repository the previously selected
object’s properties and values, with the properties and
values of its descendant objects according to the object
types specified by the default filter. You can see which
objects are in the default filter by selecting Selected
object types, clicking the Select button, and then
clicking the Default button.
All object types
Adds to the object repository the previously selected
object’s properties and values, together with the
properties and values of all of its descendant objects.
Selected object types
Adds to the object repository the previously selected
object’s properties and values, as well as the properties
and values of its descendant objects according to the
object types and classes you specify in the object filter.
You specify the objects and classes in the filter by clicking
the Select button and selecting the required items in the
Select Object Types dialog box. For more information on
the Select Object Types dialog box, see "Select Object
Types Dialog Box" on page 193.
Chapter 4 • Managing Test Objects in Object Repositories
Select Object Types Dialog Box
This dialog box enables you to specify a custom object filter for adding test
objects to the object repository (while using the Navigate and Learn option
or the Add Objects option).
To access
Click the Select button in the Define Object Filter Dialog
Box.
193
Chapter 4 • Managing Test Objects in Object Repositories
Important
information
➤ When you define an object filter, it is automatically
saved for future add object operations (performed
from both the Navigate and Learn option and the Add
Objects option).
➤ The object types in this list are a generic grouping of
objects according to the general object characteristics.
For example, the List type contains list and list view
objects, as well as combo boxes; the Table type
contains both tables and grids.
➤ The list shows all objects supported by the installed
add-ins and is not specific to the object you selected.
For some add-ins, certain child objects may be
automatically filtered out and not added to the object
repository when you choose to add all descendants of
a specific object, even if those object types are selected
in the list. If you want to add an object that is
automatically filtered out, you can add it by selecting
it in the Object Selection dialog box. To check whether
your add-in automatically filters out certain objects,
see the HP QuickTest Professional Add-ins Guide.
Relevant tasks
"Adding and Deleting Test Objects in an Object
Repository" on page 152
User interface elements are described below:
194
UI Elements
Description
Default
Restores the check box selections to their preset defaults.
The preset defaults are equivalent to choosing the
Default object types option in the Define Object Filter
dialog box.
Select All
Selects all the check boxes.
Clear All
Clears all the check boxes.
Chapter 4 • Managing Test Objects in Object Repositories
Find and Replace Dialog Box
This dialog box enables you to find an object, property, or property value in
the object repository.
To access
Click the Find & Replace button
in the Object Repository
Manager or Object Repository window.
Important
information
➤ The functionality in this dialog box is available in the Object
Repository window for the local object repository, and the
Object Repository Manager for shared object repositories.
➤ You can search using any or all of the criteria in the Find and
Replace dialog box.
➤ The Find and Replace dialog box can find checkpoint and
output values only by searching for the object name.
➤ You cannot use the Find and Replace dialog box to replace
property or object names. You cannot replace property
values in a read-only component.
195
Chapter 4 • Managing Test Objects in Object Repositories
Relevant tasks
"How to Locate an Object in an Object Repository" on page 173
See also
"Locating Objects" on page 156
User interface elements are described below:
UI Elements
Description
Object name
The name or partial name of the object you want to find.
Object type
The type of object you want to find, for example, Button.
The object types in this list are a generic grouping of
objects according to the general object characteristics.
For example, the List type contains list and list view
objects, as well as combo boxes; the Table type contains
both tables and grids.
Object class
The class of object you want to find, for example,
WebButton. The classes available depend on the selection
you made in the Object type box.
Property name
The name or partial name of the property you want to
find.
Property value
The property value or partial property value you want to
find.
New property value
The new property value if you specified a property value
and want to replace it with a different value.
Options
➤ Match case. Select this option if you want the search
to distinguish between upper and lower case letters.
➤ Match whole word. Select this option if you want the
search to find only complete words that exactly match
the single word you entered.
➤ Direction. The direction you want to search.
196
Chapter 4 • Managing Test Objects in Object Repositories
Ordinal Identifier Dialog Box
This dialog box enables you to define an ordinal identifier for a test object.
To access
1 From the Object Repository Manager or window, in the Test
object details area, click in the Value column of the Type, Value
row in the Ordinal identifier section.
2 Click the Browse button in that cell.
Relevant
tasks
"How to Maintain Test Objects in Object Repositories" on page 174
See also
"Maintaining Identification Properties - Overview" on page 158
User interface elements are described below:
UI Elements
Description
Identifier
type
➤ Index. The order in which the object appears within the parent
window, frame, or dialog box relative to other objects with an
otherwise identical description.
➤ Creation Time. (Browser objects only). The order in which the
browser was opened relative to other open browsers with an
otherwise identical description. This identifier type is only
available if more than one Browser object was open when the
test object was learned.
➤ None. Does not specify an ordinal identifier. This is the default
value if QuickTest did not learn an ordinal identifier.
Identifier
value
The numeric value of the ordinal identifier.
197
Chapter 4 • Managing Test Objects in Object Repositories
Visual Relation Identifier Dialog Box
This dialog box enables you to define related objects for the visual relation
identifier of a specific test object. QuickTest uses this identifier in addition
to the test object description during the run session to identify the test
object.
To access
1 In the Object Repository window, or the Object
Properties dialog box, select the test object you want
to identify.
2 In the Visual Relation Identifier Settings row of the
Object Repository window or Object Properties dialog
box, click in the Value cell.
3 Click the Browse button in the text box.
Important
information
198
"Considerations for Working with Visual Relation
Identifiers" on page 203
Chapter 4 • Managing Test Objects in Object Repositories
Relevant tasks
➤ "How to Maintain Test Objects in Object Repositories"
on page 174
➤ "How to Define a Visual Relation Identifier for a
Specific Test Object - Use-Case Scenario" on page 180
See also
➤ "Visual Relation Identifiers" on page 165
➤ "How QuickTest Identifies Objects During a Run
Session" on page 122
➤ "How QuickTest Interprets Horizontal and Vertical
Visual Relations" on page 202
User Interface Elements
User interface elements are described below (unlabeled elements are shown
in angle brackets):
UI Elements
Description
Test object to
identify
The name of the test object as it appears in the object repository
(read-only).
Add. Opens the Select Test Object dialog box, which enables you
to add a test object to the Related Objects list, either from the
object repository or directly from the application. Any object you
add from the application is automatically added to the object
repository. For details, see "Select Test Object Dialog Box" on
page 560.
Remove. Removes the selected related object from the Related
Objects list.
Note: Removing the related object from the list does not remove
the test object remains from the object repository.
199
Chapter 4 • Managing Test Objects in Object Repositories
UI Elements
Description
Preview
Highlights the visual relation between all related objects and the
objects matching the test object to identify (main QuickTest
window is hidden). While in Preview mode, the text to the right
of the button displays the number of matching objects. This
enables you to test the relation details you are defining without
closing the dialog box or running the steps.
Note:
➤ During the Preview process, the main QuickTest window is
hidden. Click the Preview button again to restore the
QuickTest window.
➤ While the Preview button is pressed, you can change the
relation details and preview the changes without returning to
the QuickTest window.
➤ If QuickTest is unable to perform the Preview operation, a
message box opens. This could be the result of one of the
following scenarios:
➤ One or more related objects cannot be found in the object
repository.
➤ One or more related objects are already used in a visual
relation identifier for another test object.
➤ One or more related objects cannot be uniquely identified
in the object repository.
Related
Objects
The list of related objects.
Tooltip. The tooltip for each related object displays the full name.
Note: If the related object cannot be found in the object
repository, an indicating icon is displayed next to the name of
that related object, and a tooltip is displayed when you hover the
cursor over the icon.
Relation
Details
The details of the visual relation for the selected related object.
You can select a value from one or more of the relation categories.
For details on the available visual relation categories, see "Visual
Relation Categories (Relation Details Area)" on page 201.
<Relation
description>
200
Textual description of the currently defined visual relations.
Chapter 4 • Managing Test Objects in Object Repositories
Visual Relation Categories (Relation Details Area)
Category
Description
Horizontal
Enables you to define related objects according to their
horizontal location relative to the object to identify. The
following options are available:
➤ Left
➤ Right
➤ In line (horizontally)
For details on this option, see "How QuickTest Interprets
Horizontal and Vertical Visual Relations" on page 202.
Vertical
Enables you to define related objects according to their vertical
location relative to the object to identify. The following
options are available:
➤ Above
➤ Below
➤ In line (vertically)
For details on this option, see "How QuickTest Interprets
Horizontal and Vertical Visual Relations" on page 202.
Distance and
hierarchy
Enables you to define related objects according to their
distance or hierarchical location relative to the object to
identify. The following options are available:
➤ Closest on the X-axis
➤ Closest on the Y-axis
➤ Closest on both axes
➤ Contains
201
Chapter 4 • Managing Test Objects in Object Repositories
How QuickTest Interprets Horizontal and Vertical
Visual Relations
The following diagram illustrates the way QuickTest interprets horizontal
and vertical visual relations. It also shows the boundaries that are used for
determining in line related objects.
How QuickTest Identifies In Line Related Objects
When you select a related object as a horizontal and/or vertical relation in
the Visual Relation Identifier dialog box, you can also fine-tune that
definition by indicating that it is in line with the test object to identify.
QuickTest identifies the related object as in line even if the area of the
related object surface is only partially in line with the test object.
202
Chapter 4 • Managing Test Objects in Object Repositories
The following example illustrates how QuickTest identifies related objects
that are in line with the test object to identify.
Considerations for Working with Visual Relation
Identifiers
Consider the following when working with visual relation identifiers:
➤
If you define a visual relation identifier for a test object, then that test
object’s ordinal identifier (if it exists) is not used during the test object
identification process (when running steps, highlighting objects in the
application, etc.). To indicate this, the Ordinal identifier option for that
test object is disabled in the Object Repository window.
➤
If you add a related object that was not previously in the object
repository, then the test object for the related object is added to that
object repository, even if you click Cancel in the Visual Relation Identifier
dialog box.
Workaround: If you do not need that test object, manually delete it from
the object repository.
➤
Visual relation identifiers are used only during a run session, or when
identifying objects in the application (for example, from the Object
Repository window or the Object Spy). Therefore, even if you define
related objects for a specific test object, if QuickTest re-learns the object, it
uses only the identification properties that are defined in the Object
Identification dialog box for that test object class, as well as an ordinal
identifier (if needed). This may cause QuickTest to learn the same object
more than once.
203
Chapter 4 • Managing Test Objects in Object Repositories
Example: If you learned the Object1 test object with an ordinal identifier
property value of 1, and then you manually remove the ordinal identifier
or otherwise significantly modify the description properties (because you
are depending on the visual relation identifiers to fine tune the
description), then the next time a learn session includes this object,
QuickTest will not recognize Object1 as the same object and will learn a
new test object with the name Object1_1.
➤
QuickTest uses visual relation identifiers only when one or more objects
match the test object’s description properties during the identification
process. If no objects in the application match the test object’s description
properties, then the visual relation identifier you defined is ignored, and
QuickTest continues to Smart Identification (if defined for that test object
class).
For details on the complete flow QuickTest uses to identify objects, see
"Object Identification Process Workflow" on page 140.
204
➤
A test object cannot be used as a related object to itself.
➤
The following test objects cannot act as related objects for another test
object’s visual relation identifier:
➤
A test object that has a visual relation identifier.
➤
A child test object for one of its parent objects.
➤
If you delete a test object (A) that is used in the visual relation identifier
for another test object (B), you must make sure to remove the deleted test
object A from the Related Object list for test object B.
➤
Visual relation identifiers are not supported for WebService test objects.
➤
You can retrieve or replace the visual relation identifier settings of a
specific test object during a run session using the
VisualRelationsCollection object. For details, see the
VisualRelationsCollection object in the HP QuickTest Professional Object
Model Reference.
Chapter 4 • Managing Test Objects in Object Repositories
➤
After performing a Preview operation, if you close your application while
the Visual Relation Identifier dialog box is open and then open your
application again, no objects are highlighted when you press Preview
again.
Workaround: After opening your application, close the Visual Relation
Identifier dialog box, select a different test object in the object repository,
return to the test object you want to identify, and open the Visual
Relation Identifier dialog box again.
Troubleshooting and Limitations - Managing Test
Objects
For troubleshooting and limitations for learning objects, see "Learning
objects and running steps" on page 744.
205
Chapter 4 • Managing Test Objects in Object Repositories
206
5
Working with Your Component's Object
Repositories
This chapter includes:
Concepts
➤
Object Repository Window - Overview on page 208
➤
Exporting Local Objects to a Shared Object Repository on page 209
➤
Local Copies of Objects from Shared Object Repositories on page 210
➤
Repository Parameter Value Mappings on page 211
➤
Working with Test Objects During a Run Session on page 212
Tasks
➤
How to Export Local Objects to a Shared Object Repository on page 213
➤
How to Copy an Object to the Local Object Repository on page 214
➤
How to Modify Identification Properties During a Run Session
on page 214
Reference
➤
Map Repository Parameters Dialog Box on page 215
➤
Object Properties Dialog Box on page 218
➤
Object Repository Window on page 221
Troubleshooting and Limitations - Object Repositories on page 230
207
Chapter 5 • Working with Your Component's Object Repositories
Concepts
Object Repository Window - Overview
The Object Repository window displays a tree of all test objects and all
checkpoint and output objects in the current component (including all local
objects and all objects in any shared object repositories associated with the
selected component).
For each object you select in the tree, the Object Repository window displays
information on the object, its type, the repository in which it is stored, and
its object details. Local objects are editable (black); shared objects are
read-only (gray).
While the Object Repository window is open, you can continue using
QuickTest, and you can continue modifying objects and object repositories.
The Object Repository window reflects changes you make to in real time.
For example, if you add objects to the local object repository, or if you
associate an additional object repository with the current component, the
Object Repository window immediately displays the updated content.
Note: You modify objects in a shared object repository using the Object
Repository Manager. For details, see Chapter 6, "Shared Object Repositories."
You can also modify an object in a shared object repository by copying to
the local object repository and then modifying the local copy. For details,
see "Local Copies of Objects from Shared Object Repositories" on page 210.
208
Chapter 5 • Working with Your Component's Object Repositories
Exporting Local Objects to a Shared Object Repository
You can export all of the test objects, checkpoint objects, and output value
objects contained in a component’s local object repository to a shared object
repository in the file system or to a Quality Center project (if QuickTest is
connected to Quality Center). This enables you to make the local objects
accessible to other components.
Note: The Export and Replace Local Objects option (File > Export and
Replace Local Objects) is not available for components.
When you export local objects to a shared object repository, the parameters
of any parameterized objects are converted to repository parameters using
the same name as the source parameter. The default (mapped) value of each
repository parameter is the corresponding source parameter. You can modify
the mapping used within your component using the Map Repository
Parameters dialog box (described in "Repository Parameter Value Mappings"
on page 211). For details on repository parameters, see "Working with
Repository Parameters" on page 234.
Tip: After you export the local objects, you can use the Object Repository
Merge Tool to merge the test objects from the shared object repository
containing the exported objects with another shared object repository. For
details, see Chapter 9, "Object Repository Merge Tool."
209
Chapter 5 • Working with Your Component's Object Repositories
Local Copies of Objects from Shared Object Repositories
The functionality described in this section is available only when working in
the Object Repository window.
You can create a local copy of any object stored in a shared object repository
that is associated with the component currently displayed in the in the
object repository tree.
Copying an object to the local repository is useful, for example, if you want
to modify an object in the current component without affecting other
components that use the shared object repository.
When you create a local copy of an object and modify it in the Object
Repository window, the changes you make affect only the component in
which you make the change. Conversely, if you modify the object in the
shared object repository using the Object Repository Manager, the changes
you make are reflected in all components that use the shared object
repository. However, if you modify an object in a shared object repository,
and a copy of the object (with the same name) exists in the local repository,
your changes do not affect the local copy of the object in your component.
During a run session, QuickTest uses the object in the local object repository
to identify the object in your application. This is because the component’s
local object repository has higher priority than any shared object repository
associated with the component.
Considerations for Copying an Object to the Local Object
Repository
210
➤
When you copy an object to the local object repository, its parent objects
are also copied to the local object repository.
➤
If an object or its parent objects use unmapped repository parameters, you
cannot copy the object to the local object repository. You must make sure
that all repository parameters are mapped before copying an object to the
local object repository.
Chapter 5 • Working with Your Component's Object Repositories
➤
If an object or its parent objects are parameterized using one or more
repository parameters, the repository parameter values are converted
when you copy the object to the local object repository. For example, if
the repository parameter is mapped to a local parameter, the property is
parameterized using a local parameter. If the value is a constant value, the
property receives the same constant value.
➤
If you are copying multiple objects to the local object repository, during
the copy process you can choose to skip a specific object if it has
unmapped repository parameters, or if it has mapped repository
parameters whose values you do not want to convert. You can then
continue copying the next object from your original selection.
Repository Parameter Value Mappings
You use repository parameters to specify that certain property values of an
object in a shared object repository should be parameterized, but that the
actual values should be defined in each component that is associated with
the shared object repository. For details on repository parameters, see
"Working with Repository Parameters" on page 234.
Mapping a repository parameter to a value or parameter specifies the
property values used to identify the test object during a run session. You can
specify that the property value is taken from a constant value, or
parameterize it using a local or component parameter.
You can map each repository parameter as required in each component that
has an associated object repository containing repository parameters. For
example, in one component you may want to retrieve the username object’s
text property value from an environment variable parameter, and in another
component you may want the same object property value to use a constant
value or a local parameter.
Before you map repository parameters, if you have more than one repository
parameter with the same name in different shared object repositories that
are associated with the same component, the repository parameter from the
shared object repository with the highest priority (as defined in the shared
object repositories list) is used.
211
Chapter 5 • Working with Your Component's Object Repositories
After you map repository parameters, QuickTest uses the mappings you
defined. In addition, changing the priority or default values has no effect
after the parameters are mapped.
When you open a component that uses an object repository with an object
property value that is parameterized using a repository parameter with no
default value, an indication that there is a repository parameter that needs
mapping is displayed in the Missing Resources pane. You can then map the
repository parameter as needed in the component. You can also map
repository parameters that have default values, and change mappings for
repository parameters that are already mapped.
If you do not map a repository parameter, the default value that was defined
with the parameter, if any, is used during the component run. If the
parameter is unmapped, meaning no default value was specified for it, the
component run may fail if a test object cannot be identified because it has
an unmapped parameter value.
Working with Test Objects During a Run Session
The first time QuickTest encounters an object during a run session, it creates
a temporary version of the test object for that run session. QuickTest uses
the object description to create this temporary version of the object. For the
remainder of the component, QuickTest refers to the temporary version of
the test object rather than to the test object in the object repository. The
Object Repository window is read-only during a run session.
Creating Test Objects During a Run Session
You can use programmatic descriptions to create temporary versions of test
objects that represent objects from your application. You can perform
operations on those objects without referring to the object repository. For
example, suppose an edit box was added to a form on your Web site. You
can use a programmatic description to add a statement in a user-defined
function that enters a value in the new edit box. QuickTest could then
identify the object even though the object was never added to the object
repository. For details on programmatic descriptions, see "Programmatic
Descriptions" on page 370.
212
Chapter 5 • Working with Your Component's Object Repositories
Tasks
How to Export Local Objects to a Shared Object
Repository
This task describes how to export local objects to a shared object repository.
This task includes the following steps:
➤
"Prerequisites" on page 213
➤
"Export the local objects" on page 213
➤
"Results" on page 213
1 Prerequisites
a Open the component that has the local objects you want to export.
b Open the Object Repository window by selecting Resources > Object
Repository or clicking the Object Repository button.
2 Export the local objects
Select File > Export Local Objects. The Save Shared Object Repository
dialog box opens. For details, see "Save <Resource> Dialog Box for
Application Area Resources" on page 516.
3 Results
If you chose Export Local Objects, the local objects are exported to the
specified shared object repository (a file with a .tsr extension). Your
component continues to use the objects in the local object repository, and
the new shared object repository is not associated with your test.
You can now use the new shared object repository like any other shared
object repository.
213
Chapter 5 • Working with Your Component's Object Repositories
How to Copy an Object to the Local Object Repository
This task describes how to copy an object from a shared object repository to
the local object repository.
1 Open the component to whose local object repository you want to copy
the object.
2 In the object repository tree of the Object Repository window, select the
component associated with the shared object repository containing the
object you want to copy.
3 Select the object that you want to copy to the local object repository.
(Objects in a shared object repository are read-only.) You can select
multiple objects as long as the selected objects have the same parent
object.
4 Select Object > Copy to Local or right-click the objects and select Copy to
Local. The objects (and parent objects, if any) are copied to the local
object repository and are made editable.
How to Modify Identification Properties During a Run
Session
You can modify the properties of the temporary version of the object during
the run session without affecting the permanent values in the object
repository by adding a SetTOProperty statement in a user-defined function.
Use the following syntax for the SetTOProperty method:
Object(description).SetTOProperty Property, Value
For details, see the HP QuickTest Professional Object Model Reference.
214
Chapter 5 • Working with Your Component's Object Repositories
Reference
Map Repository Parameters Dialog Box
This dialog box enables you to map values for the repository parameters that
are used in shared object repositories that are associated with your
component. This enables you to specify the property values used to identify
the test object during a run session.
215
Chapter 5 • Working with Your Component's Object Repositories
To access
Use one of the following:
➤ Select Resources > Map Repository Parameters
➤ In the Missing Resources pane, double-click the Repository
Parameters row (Relevant only if your component contains
unmapped repository parameters (repository parameters without
a default value)).
See also
"Repository Parameter Value Mappings" on page 211
User interface elements are described below:
UI Elements
Description
Map
parameters for
Enables you to filter the list of parameters that is displayed. You
can choose to display:
➤ All unmapped parameters. Displays all of the parameters in
your test that are not mapped to values.
➤ <Component name>. (For example, LogIn) Displays all of the
parameters in the specified component (with mapped or
unmapped values).
Name
216
The name of the repository parameter.
Chapter 5 • Working with Your Component's Object Repositories
UI Elements
Description
Value
The parameter’s current value, if any. This column shows either
the new value you defined, or the default value that was
defined when the parameter was created. If no default value
was defined, then the parameter is currently unmapped, and
the text {No default value} is shown.
You can:
➤ Enter a new constant value or modify an existing constant
value by typing directly in the Value cell.
Tip: You can also enter a constant value in the Value
Configuration Options dialog box by clicking the
parameterization button
. For details, see "Configure
Value Area" on page 639.
➤ Parameterize the value by clicking in the Value cell of the
relevant parameter and then clicking the parameterization
button
. You can parameterize the value using a local or
component parameter. For details, see "Value Configuration
Options Dialog Box" on page 641.
➤ Reset a parameter to its default value by clicking in the Value
cell of the relevant parameter and then clicking the Reset to
Default Value button
. The default value, if any, that was
defined in the Add Repository Parameter dialog box is
displayed in the cell. For details, see "Add Repository
Parameter Dialog Box" on page 260.
Description
A textual description of the parameter, if any.
Find in
Repository
Opens the Object Repository window and highlights the first
test object in the object repository tree that uses the selected
repository parameter. You can click this button again to find
the next occurrence of the selected parameter, and so forth.
217
Chapter 5 • Working with Your Component's Object Repositories
Object Properties Dialog Box
This dialog box enables you to:
➤
View identification properties and values for objects in your component
steps, as well as other object details.
➤
Modify the properties and property values used to identify the object (for
objects that are stored in the local object repository). You modify the
properties and values in the Object Properties dialog box in the same way
as you modify the test object details in the Object Repository window. For
details, see "Maintaining Identification Properties - Overview" on
page 158.
There are slight differences in the Object Properties dialog box, depending
on whether the selected object is currently stored in the local object
repository or a shared object repository associated with the current
component’s application area.
This section describes options shown in the dialog box for objects in the
local object repository. For objects stored in a shared object repository the
information is in read-only format.
218
Chapter 5 • Working with Your Component's Object Repositories
To access
In your component, click the step of the object whose properties
you want to view and choose Edit > Step Properties > Object
Properties.
User interface elements are described below:
UI Elements
Description
Add description properties button.
Remove selected description properties button.
Name
The name that QuickTest assigns to the object. You can change
the name of a object in the local object repository. For details, see
"Renaming Test Objects" on page 161.
Class
The class of the object.
Description
properties
The properties and property values used to identify the object
during a run session.
Tips:
➤ For details on adding properties to or removing properties
from the test object description, see "Add Properties Dialog
Box" on page 186.
➤ For details on specifying a property value as a constant or
parameterizing a value, see "Specifying or Modifying Property
Values" on page 159.
Visual
relation
identifier
A set of definitions that enable you to identify the object in the
application according to its neighboring objects in the
application. When this option is defined and enabled, the
Ordinal identifier option is disabled. For details, see "Visual
Relation Identifier Dialog Box" on page 198.
Note: If one or more related objects cannot be found in the
object repository, indicating text is displayed in the cell.
219
Chapter 5 • Working with Your Component's Object Repositories
UI Elements
Description
Ordinal
identifier
A numerical value that indicates the object’s order or location
relative to other objects with an otherwise identical description
(objects that have the same values for all properties). For details,
see "Ordinal Identifier Dialog Box" on page 197.
Note: If a visual relation identifier is defined for a specific test
object, this option is disabled. For details, see "Considerations for
Working with Visual Relation Identifiers" on page 203.
Additional
details
Contains the following options:
➤ Enable Smart Identification. Enables you to select True or False
to specify whether QuickTest should use Smart Identification
to identify the test object during the run session if it is not
able to identify the object using the test object description.
Note: This option is available only if Smart Identification
properties are defined for the test object's class in the Object
Identification dialog box. For details, see "Smart
Identification" on page 272.
➤ Comment. Enables you to add textual information about the
test object.
View in
Repository
220
Opens the Object Repository window and displays the
identification properties and values for the selected object.
Chapter 5 • Working with Your Component's Object Repositories
Object Repository Window
This window enables you to manage identification properties and object
repository associations for your component.
You can use the Object Repository window to:
➤
View the object description of any object in the repository (in local and
shared object repositories).
➤
Modify local objects and their properties.
➤
Add test objects to your local object repository.
➤
Drag and drop test objects to your component. When you drag and drop
a test object to your component, QuickTest inserts a step with the default
operation for that test object in your component.
221
Chapter 5 • Working with Your Component's Object Repositories
For example, if you drag and drop a button object to your component, a
step is added to your component using the button object, with a Click
operation (the default operation for a button object).
To access
Do one of the following:
➤ QuickTest main window: Click the Object Repository
button
, or choose Resources > Object Repository
➤ Resources pane: Double-click an object repository, or right-click
an object repository and choose Open Repository
➤ Available Keywords pane: Right-click an object in the
repository and choose Open Resource
222
Chapter 5 • Working with Your Component's Object Repositories
Important
information
➤ Local objects are editable (black). Objects from a shared object
repository are read-only format (gray).
➤ You can modify checkpoint and output value details for objects
saved in the local object repository.
➤ You cannot drag and drop checkpoint and output objects from
the Object Repository window to your testing document.
➤ You can copy an object from a shared object repository to the
local object repository, and then modify it.
➤ Test objects for environments that are not installed/loaded with
QuickTest are displayed with a question mark icon.
➤ The Object Repository window is read-only during a record or
run session.
Relevant
tasks
Primary tasks:
➤ "How to Copy, Paste, Move, or Delete Objects in the Object
Repository" on page 170
➤ "How to Define a Visual Relation Identifier for a Specific Test
Object - Use-Case Scenario" on page 180
Related tasks:
➤ "How to Export Local Objects to a Shared Object Repository" on
page 213
➤ "How to Copy an Object to the Local Object Repository" on
page 214
See also
➤ For an overview of this window, see "Object Repository
Window - Overview" on page 208.
➤ For details on dragging and dropping test objects from other
locations, see "Available Keywords Pane Overview" on page 914
and "How to Manage Objects in Shared Object Repositories" on
page 245.
➤ For details on modifying the properties of a test object during
a run session, see "Working with Test Objects During a Run
Session" on page 212.
➤ For details on viewing and modify object properties from other
locations, see "Maintaining Identification Properties Overview" on page 158.
223
Chapter 5 • Working with Your Component's Object Repositories
User interface elements are described in the following sections:
➤
"Object Repository Window - Edit Toolbar" on page 224
➤
"Object Repository Window - Filter Toolbar" on page 226
➤
"Object Repository Window Options" on page 227
➤
"Object Repository Window - Object Details Area" on page 228
Object Repository Window - Edit Toolbar
Button
Name
Description
Compact
View
Compact View mode displays only the object
repository tree, while Full View mode displays the
object repository tree together with the object details
area.
Full View
Undo
Redo
224
All changes you make to a local object are
automatically updated in all steps that use the local
object as soon as you make the change. You can use
the Edit > Undo and Edit > Redo menu options or
Undo and Redo toolbar buttons to cancel or repeat
your changes. After you save the current component,
you cannot undo or redo operations that were
performed before the save operation.
Cut
Cuts the selected object from the object repository
tree. For details, see "How to Copy, Paste, Move, or
Delete Objects in the Object Repository" on page 170.
Paste
Pastes the object in the clipboard into the object
repository tree as a child of the object selected in the
tree. Bottom level objects cannot contain children. For
details, see "How to Copy, Paste, Move, or Delete
Objects in the Object Repository" on page 170.
Copy
Copies the selected object from the object repository
tree into the clipboard. For details, see "How to Copy,
Paste, Move, or Delete Objects in the Object
Repository" on page 170.
Delete
Deletes the selected object from the object repository
tree.
Chapter 5 • Working with Your Component's Object Repositories
Button
Name
Description
Find &
Replace
Finds and replaces an object in the object repository.
For details, see "Find and Replace Dialog Box" on
page 195.
Add Objects
to Local
Adds an object to the local object repository. For
details, see "Adding and Deleting Test Objects in an
Object Repository" on page 152.
Update from
Application
Updates the identification properties from an object in
the application. For details, see "Updating
Identification Properties from an Object in Your
Application" on page 159.
Define New
Test Objects
Defines a new test object. For details, see "Define New
Test Object Dialog Box" on page 189.
Highlight in
Application
Highlights the selected object in the object repository
tree, in the application. For details, see "Highlighting
an Object in Your Application" on page 157.
Locate in
Repository
Enables you to select an object in the application you
are testing and highlight the test object in the object
repository. For details, see "Locating a Test Object in
the Object Repository" on page 157.
Object Spy
Enables you to view the native properties and
operations of any object in an open application, as
well as the test object hierarchy, identification
properties, and operations of the test object that
QuickTest uses to represent that object. You can also
add an object to the local object repository and
highlight an object in the application. For details, see
"Object Spy Dialog Box" on page 142.
225
Chapter 5 • Working with Your Component's Object Repositories
Object Repository Window - Filter Toolbar
UI Element
Description
You can use the Filter toolbar to filter the objects
shown in the Object Repository window.
You can choose to show objects that meet one of
the following criteria:
➤ All objects in the current component
➤ Only the local objects in the current component
➤ Only the objects in a specific shared object
repository associated with the current
component
To filter the Object Repository window:
In the Filter toolbar list, select one of the following
options:
➤ All Objects
➤ Local Objects
➤ The name of a specific shared object repository
associated with the current component
The object repository tree is filtered to display only
the objects from the location that you selected. The
title bar of the Object Repository window indicates
the current filter.
226
Chapter 5 • Working with Your Component's Object Repositories
Object Repository Window Options
User interface elements are described below (unlabeled elements are shown
in angle brackets):
UI Elements
Description
Business
Component
Indicates that the current testing document is a business
component.
<Object
repository tree>
Displays all of the test objects, checkpoint objects, and output
objects in the local and shared object repositories associated
with in the current component.
You can filter the objects shown in the object repository tree.
For details, see "Object Repository Window - Filter Toolbar"
on page 226.
Note: If there are test objects in different associated object
repositories with the same name, object class, and parent
hierarchy, the object repository tree shows only the first one
it finds based on the priority order defined. For details, see
"Object Repositories Pane (Application Area Window)" on
page 693.
Name
The name that QuickTest assigns to the object. You can
change the name of a object in the local object repository. For
details, see "Renaming Test Objects" on page 161.
Class
The class of the object.
Repository
The location (file name and path) of the object repository in
which the object is located. If the object is located in the local
object repository, Local is displayed.
<Object details
area>
Displays one of the following:
➤ The properties and property values used to identify a test
object during a run session
➤ The properties of a checkpoint or output object.
For details, see the "Object Repository Window - Object
Details Area" below.
227
Chapter 5 • Working with Your Component's Object Repositories
Object Repository Window - Object Details Area
The Object Details area in the lower right side of the Object Repository
window enables you to view and modify the properties and property values
used to identify an object during a run session or the properties of a
checkpoint or output object.
For test objects:
UI Elements
Description
Description
properties
The properties and property values used to identify the object
during a run session.
Tips:
➤ For details on adding properties to or removing properties from
the test object description, see "Add Properties Dialog Box" on
page 186.
➤ For details on specifying a property value as a constant or
parameterizing a value, see "Specifying or Modifying Property
Values" on page 159.
228
Chapter 5 • Working with Your Component's Object Repositories
UI Elements
Description
Visual
relation
identifier
A set of definitions that enable you to identify the object in the
application according to its neighboring objects in the
application. When this option is defined and enabled, the Ordinal
identifier option is disabled. For details, see "Visual Relation
Identifier Dialog Box" on page 198.
Note: If one or more related objects cannot be found in the object
repository, indicating text is displayed in the cell.
Ordinal
identifier
A numerical value that indicates the object’s order or location
relative to other objects with an otherwise identical description
(objects that have the same values for all properties). For details,
see "Ordinal Identifier Dialog Box" on page 197.
Note: If a visual relation identifier is defined for a specific test
object, this option is disabled. For details, see "Considerations for
Working with Visual Relation Identifiers" on page 203.
Additional
details
Contains the following options:
➤ Enable Smart Identification. Enables you to select True or False
to specify whether QuickTest should use Smart Identification to
identify the test object during the run session if it is not able to
identify the object using the test object description.
Note: This option is available only if Smart Identification
properties are defined for the test object's class in the Object
Identification dialog box. For details on Smart Identification,
see "Smart Identification" on page 272.
➤ Comment. Enables you to add textual information about the
test object.
For checkpoints: The object details area contains the same information as
the Checkpoint Properties dialog box. For details, see "Checkpoint
Properties Dialog Box" on page 576.
For output objects: The object details area contains the same information as
the Output Value Properties dialog box. For details, see "Output Value
Properties Dialog Box" on page 609.
229
Chapter 5 • Working with Your Component's Object Repositories
Troubleshooting and Limitations - Object Repositories
This section describes troubleshooting and limitations for working with
object repositories.
If you modify the name of a test object in the Object Repository while your
component script contains a syntax error, the new name is not updated
correctly within your component steps.
Workaround: Clear the Automatically update test and component steps
when you rename test objects check box (Tools > Options > General node)
and perform the renames in the steps manually (recommended) or solve the
syntax error, and then close and reopen the document in QuickTest to
display the renamed objects in your steps.
230
6
Shared Object Repositories
This chapter includes:
Concepts
➤
Shared Object Repositories Overview on page 232
➤
Considerations for Working with Shared Object Repositories on page 237
Tasks
➤
How to Manage Shared Object Repositories on page 240
➤
How to Manage Objects in Shared Object Repositories on page 245
Reference
➤
Object Repository Manager Main Window on page 247
➤
Manage Repository Parameters Dialog Box on page 258
231
Chapter 6 • Shared Object Repositories
Concepts
Shared Object Repositories Overview
A shared object repository contains information that enables QuickTest to
identify the objects in your application. QuickTest enables you to maintain
the reusability of your components by storing all the information regarding
your test objects in shared object repositories.
You use the Object Repository Manager to create and maintain shared object
repositories. You can work with shared object repositories saved both in the
file system and in a Quality Center project.
When objects in your application change, the Object Repository Manager
provides a single, central location in which you can update test object
information for multiple components.
Advantages of Shared Object Repositories
➤
You can use the same shared object repository with multiple components,
instead of saving objects directly with a component in a local object
repository. This enables them to be accessed from multiple components.
➤
You can use multiple shared object repositories with each component.
➤
If your shared object repositories are stored in Quality Center, you can
apply version control to them. For details, see "Version Control in
Quality Center 10.00 or HP ALM" on page 1095.
For details on associating shared object repositories, see "Object Repositories
Pane (Application Area Window)" on page 693.
Note: Instead of, or in addition to, shared object repositories, you can
choose to store all or some of the objects in a local object repository for each
component, using the Object Repository window. For details on local object
repositories, see Chapter 4, "Managing Test Objects in Object Repositories."
232
Chapter 6 • Shared Object Repositories
This section also includes:
➤
"Importing and Exporting Shared Object Repositories Using XML" on
page 233
➤
"Working with Repository Parameters" on page 234
➤
"Managing Shared Object Repositories Using Automation" on page 235
Importing and Exporting Shared Object Repositories
Using XML
You can import and export shared object repositories from and to XML files.
XML provides a structured, accessible format that enables you to make
changes to shared object repositories using the XML editor of your choice
and then import them back into QuickTest. You can view the required
format for the shared object repository in the HP QuickTest Professional Object
Repository Schema Help (Help > QuickTest Professional Help > HP
QuickTest Professional Advanced References > HP QuickTest Professional
Object Repository Schema), or by exporting a saved shared object
repository.
Note: QuickTest uses a defined XML schema for shared object repositories.
You must follow this schema when creating or modifying shared object
repository files in XML format. To view the required XML structure and
format, see the HP QuickTest Professional Object Repository Schema Help (Help
> QuickTest Professional Help > HP QuickTest Professional Advanced
References > HP QuickTest Professional Object Repository Schema).
You can import and export files either from and to the file system or a
Quality Center project (if QuickTest is connected to Quality Center).
For details, see:
➤
"Import a shared object repository from XML" on page 244
➤
"Export a shared object repository to XML" on page 244
233
Chapter 6 • Shared Object Repositories
Working with Repository Parameters
Repository parameters enable you to specify that certain property values
should be parameterized, but leave the actual parameterization to be defined
in each component that is associated with the shared object repository that
contains the parameterized identification property values.
Repository parameters are useful when you want to create and run
components on an object that changes dynamically. An object may change
dynamically if it is frequently updated in the application, or if its property
values are set using dynamic content, for example, from a database.
Example
Suppose you have a button whose text property value changes in a localized
application depending on the language of the user interface. You can
parameterize the name property value using a repository parameter, and
then in each component that uses the shared object repository you can
specify the location from which the property value should be taken. For
example, in one component that uses this shared object repository you can
specify that the property value comes from a component parameter. In
another component it can come from a local parameter. In a third
component you can specify it as a constant value.
You define all the repository parameters for a specific shared object
repository using the Manage Repository Parameters dialog box. For details,
see "Manage Repository Parameters Dialog Box" on page 258.
234
Chapter 6 • Shared Object Repositories
Considerations for Working with Repository Parameters
➤
When you delete a repository parameter that is used in a test object
definition, the identification property value remains mapped to the
parameter, even though the parameter no longer exists. Therefore, before
deleting a repository parameter, you should make sure that it is not used
in any test object descriptions, otherwise components that have steps
using these test objects will fail when you run them.
➤
When you open a component that uses a shared object repository with a
repository parameter that has no default value, an indication that there is
a repository parameter that needs mapping is displayed in the Missing
Resources pane. You can then map the repository parameter as needed in
the component. You can also map repository parameters that have default
values, and change mappings for repository parameters that are already
mapped. For details on mapping repository parameters, see "Unmapped
Shared Object Repository Parameter Values" on page 928.
Managing Shared Object Repositories Using
Automation
QuickTest provides an Object Repository automation object model that
enables you to manage QuickTest shared object repositories and their
contents from outside of QuickTest. The automation object model enables
you to use a scripting tool to access QuickTest shared object repositories via
automation.
Just as you use the QuickTest Professional automation object model to
automate your QuickTest operations, you can use the objects and methods
of the Object Repository automation object model to write scripts that
manage shared object repositories, instead of performing these operations
manually using the Object Repository Manager. For example, you can add,
remove, and rename test objects; import from and export to XML; retrieve
and copy test objects; and so forth.
After you retrieve a test object, you can manipulate it using the methods
and properties available for that test object class. For example, you can use
the GetTOProperty and SetTOProperty methods to retrieve and modify its
properties. For details on available test object methods and properties, see
the HP QuickTest Professional Object Model Reference.
235
Chapter 6 • Shared Object Repositories
Automation programs are especially useful for performing the same tasks
multiple times or on multiple shared object repositories. You can write your
automation scripts in any language and development environment that
supports automation. For example, you can use VBScript, JavaScript, Visual
Basic, Visual C++, or Visual Studio .NET. For general information on
controlling QuickTest using automation, see "QuickTest Automation Scripts"
on page 1015.
Using the QuickTest Professional Object Repository
Automation Reference
The QuickTest Professional Object Repository Automation Reference is a
Help file that provides detailed descriptions, syntax information, and
examples for the objects and methods in the QuickTest shared object
repository automation object model.
The Help topic for each automation object includes a list and description of
the methods associated with that object. Method Help topics include
detailed description, syntax, return value type, and argument value
information.
You can open the QuickTest Professional Object Repository Automation Reference
from the main QuickTest Help (Help > QuickTest Professional Help > HP
QuickTest Professional Advanced References > HP QuickTest Professional
Object Repository Automation).
Note: The syntax and examples in the Help file are written in VBScript-style.
If you are writing your automation program in another language, the syntax
for some methods may differ slightly from what you find in the
corresponding Help topic. For information on syntax for the language you
are using, see the documentation included with your development
environment or to general documentation for the programming language.
236
Chapter 6 • Shared Object Repositories
Considerations for Working with Shared Object
Repositories
Consider the following when working with shared object repositories:
Opening, Modifying, and Saving Shared Object Repositories
➤
Enabling editing. If you opened the shared object repository in read-only
mode, you must enable editing for the shared object repository before you
can modify it. This locks the shared object repository and prevents it from
being modified simultaneously by multiple users. For details on enabling
editing, see "How to Manage Shared Object Repositories" on page 240.
➤
Unlocking. When you enable editing for a shared object repository, the
shared object repository is locked so that it cannot be modified by other
users. To enable other users to modify the shared object repository, you
must first unlock it (by disabling edit mode, or by closing it). If a shared
object repository is already locked by another user, if it is saved in
read-only format, or if you do not have the permissions required to open
it, you cannot enable editing for it.
➤
Applying changes. All changes you make to a shared object repository are
automatically updated in all components open on the same computer
that use the shared object repository as soon as you make the change—
even if you have not yet saved the shared object repository with your
changes.
If you close the shared object repository without saving your changes, the
changes are rolled back in any open components that were open at the
time.
➤
Updating changes. When you open a component on the same computer
on which you modified the shared object repository, the component is
automatically updated with all saved changes made in the associated
shared object repository. To see saved changes in a component or
repository open on a different computer, you must open the component
or shared object repository file or lock it for editing on your computer to
load the changes.
237
Chapter 6 • Shared Object Repositories
➤
Merging. You can modify a shared object repository by merging it with
another shared object repository. When you merge two shared object
repositories, a new shared object repository is created, containing the
content of both shared object repositories. If you merge a shared object
repository with a local object repository, the shared object repository is
updated with the content of the local object repository. For details, see
Chapter 9, "Object Repository Merge Tool."
Managing Objects in Shared Object Repositories
238
➤
If one or more of the property values of an object in your application
differ from the property values QuickTest uses to identify the object, your
component may fail. Therefore, when the property values of objects in
your application change, you should modify the corresponding
identification property values in the corresponding object repository so
that you can continue to use your existing components.
➤
The following table describes QuickTest behavior in cases of duplicate
objects in shared object repositories:
If...
QuickTest Uses...
An object with the same name and
description is located in both the local
object repository and in a shared object
repository that is associated with the
same component.
The local object definition.
An object with the same name and
description is located in more than one
shared object repository, and these
shared object repositories are all
associated with the same component.
The object definition from the first
occurrence of the object, according
to the order in which the shared
object repositories are associated
with the component.
Chapter 6 • Shared Object Repositories
General Tips and Guidelines
➤
If your component contains test objects from environments that are not
installed/loaded with QuickTest, the test objects are displayed with a
question mark in the shared object repository.
➤
When you modify a shared object repository, an asterisk (*) is displayed in
the title bar until the object repository is saved.
➤
You can use the Edit > Undo and Edit > Redo options or Undo and Redo
buttons to cancel or repeat your changes as necessary. The Undo and
Redo options are related to the active document. When you save a shared
object repository, you cannot undo and redo operations that were
performed on that file before the save operation.
➤
You perform search operations in the shared object repository the same
way you perform them in the local object repository. For details, see
"Locating Objects" on page 156.
239
Chapter 6 • Shared Object Repositories
Tasks
How to Manage Shared Object Repositories
This task describes the different operations you can perform to manage
shared object repositories using the Object Repository Manager.
This task includes the following steps:
➤
"Prerequisites and considerations" on page 240
➤
"Create a new shared object repository" on page 241
➤
"Open a shared object repository" on page 241
➤
"Enable editing for a shared object repository" on page 241
➤
"Save a shared object repository" on page 241
➤
"Close shared object repositories" on page 242
➤
"Associate a shared object repository with components" on page 243
➤
"Merge shared object repositories" on page 243
➤
"Import a shared object repository from XML" on page 244
➤
"Export a shared object repository to XML" on page 244
Prerequisites and considerations
240
➤
If you want to edit a shared object repository stored in the file system, and
the shared object repository was created using a version of QuickTest
earlier than version 9.0, QuickTest must convert it to the current format
before you can edit it. If you do not want to convert it, you can view it in
read-only format. After the file is converted and saved, you cannot use it
with earlier versions of QuickTest.
➤
If you are working with shared object repositories that are stored in a
Quality Center project, you must connect to Quality Center either from
QuickTest or from the Object Repository Manager by choosing File >
ALM/QC Connection or clicking the ALM/QC Connection button. For
details, see "HP ALM Connection Dialog Box" on page 1041.
Chapter 6 • Shared Object Repositories
Create a new shared object repository
Open the Object Repository Manager and create a new shared object
repository, as described in "Object Repository Manager Main Window" on
page 247.
Open a shared object repository
➤
Use the Open Shared Object Repository dialog box to open shared object
repositories from the file system or a Quality Center project. For a user
interface description, see "Open <Resource> Dialog Box for Application
Area Resources" on page 512.
Make sure you clear the Open in read-only mode check box if you want to
modify the shared object repository.
➤
You can also open a shared object repository from the Recent Files list in
the File menu.
Enable editing for a shared object repository
Select File > Enable Editing or click the Enable Editing button. The shared
object repository becomes editable. For details, see "Object Repository
Manager Toolbar Buttons" on page 251.
For considerations on enabling editing, see "Considerations for Working
with Shared Object Repositories" on page 237.
Save a shared object repository
Save the shared object repository, as described in "Object Repository
Manager Toolbar Buttons" on page 251. If the file has already been saved,
the changes you made are saved. If the file has not yet been saved, the Save
Shared Object Repository dialog box opens. For details, see "Save <Resource>
Dialog Box for Application Area Resources" on page 516.
For considerations on saving shared object repositories, see "Considerations
for Working with Shared Object Repositories" on page 237.
241
Chapter 6 • Shared Object Repositories
Note about relative and absolute paths: When you specify a path to a
resource in the file system or in Quality Center 9.2, QuickTest checks if the
path, or a part of the path, exists in the Folders pane of the Options dialog
box (Tools > Options > Folders node). If the path exists, you are prompted to
define the path using only the relative part of the path you entered. If the
path does not exist, you are prompted to add the resource's location path to
the Folders pane and define the path relatively. For details, see "Global
Testing Options" on page 653.
If you are working with the Resources and Dependencies model with
Quality Center 10.00 or HP ALM, you should specify an absolute
Quality Center path. For details, see "Relative Paths and Quality Center" on
page 1064.
Close shared object repositories
Do one of the following:
➤
To close a single shared object repository, select File > Close or click the
Close button in the shared object repository window’s title bar. The
shared object repository closes and is automatically unlocked. If you
made changes that are not yet saved, you are prompted to do so before
the file closes.
➤
To close all open shared object repositories, select File > Close All
Windows, or Window > Close All Windows. All open shared object
repositories close and are automatically unlocked. If you made changes
that are not yet saved, you are prompted to do so before the files close.
Note: If you close QuickTest, the Object Repository Manager also closes. If
you have made changes that are not yet saved, you are prompted to do so
before the Object Repository Manager closes.
242
Chapter 6 • Shared Object Repositories
Associate a shared object repository with components
You can associate the shared object repository with one or more
components from within QuickTest. For details on associating shared object
repositories, see "Object Repositories Pane (Application Area Window)" on
page 693.
If you want to associate the shared object repository with an application
area so that it can be accessed by components, you must save it to your
Quality Center project.
Merge shared object repositories
Using the Object Repository Merge tool, you can merge objects from the
local object repository of one or more components to a shared object
repository using the Update from Local Repository option in the Object
Repository Manager (Tools > Update from Local Repository).
For example, you may have learned objects locally in a specific component
and want to add them to the shared object repository so they are available
to all components that use that shared object repository.
You can also use the Object Repository Merge Tool to merge two shared
object repositories into a single shared object repository.
For details, see Chapter 9, "Object Repository Merge Tool."
243
Chapter 6 • Shared Object Repositories
Import a shared object repository from XML
You can import an XML file (created using the required format) as a shared
object repository. The XML file can either be a shared object repository that
you exported to XML format using the Object Repository Manager, or an
XML file created using a tool such as QuickTest Siebel Test Express or a
custom built utility. You must adhere to the XML structure and format.
To import from XML:
1 Select File > Import from XML. The Open XML File dialog box opens. For
a user interface description, see "Open <Resource> Dialog Box for
Application Area Resources" on page 512.
The XML file is imported and a summary message box opens showing
information regarding the number of test objects, checkpoint and output
objects, parameters, and metadata that were successfully imported from
the specified file.
2 Click OK to close the message box. The imported XML file is opened as a
new shared object repository. You can now modify it as required and save
it as a shared object repository.
Export a shared object repository to XML
You can export the objects in a shared object repository to an XML file. This
enables you to edit it using any XML editor, and also enables you to save it
in an accessible, versatile format.
To export to XML:
1 Make sure that the shared object repository whose objects you want to
export is the active window.
2 Make sure that the shared object repository is saved.
3 Select File > Export to XML. The Save XML File dialog box opens. For a
user interface description, see "Save <Resource> Dialog Box for
Application Area Resources" on page 516.
244
Chapter 6 • Shared Object Repositories
QuickTest exports the objects in the shared object repository to the
specified XML file, and a summary message box opens showing
information regarding the number of test objects, checkpoint and output
objects, parameters, and metadata that were successfully exported to the
specified file.
4 Click OK to close the message box. You can now open the XML file and
view or modify it with any XML editor.
How to Manage Objects in Shared Object Repositories
This task describes various operations you can perform to manage object in
shared object repositories using the Object Repository Manager.
Note: Many of the shared object repository operations you can perform in
the Object Repository Manager are done in a similar way to how you modify
objects stored in a local object repository (using the Object Repository
window).
For this reason, many of the procedures are described in Chapter 4,
"Managing Test Objects in Object Repositories", and are only referenced
here. This task contains operations that you can only perform in the Object
Repository Manager.
Although most of the procedures apply equally to the Object Repository
Manager and the Object Repository window, the windows and options may
differ slightly.
This task includes the following steps:
➤
"Prerequisites" on page 246
➤
"Manage objects in a shared object repository" on page 246
➤
"Add test objects using the Navigate and Learn option" on page 246
➤
"Manage repository parameters" on page 247
245
Chapter 6 • Shared Object Repositories
Prerequisites
Make sure that the shared object repository you want to edit is the active
window.
Manage objects in a shared object repository
You can perform the following operations to manage objects in a shared
object repository, as described in Chapter 4, "Managing Test Objects in
Object Repositories":
➤
"How to Add a Test Object to an Object Repository" on page 167
➤
"How to Copy, Paste, Move, or Delete Objects in the Object Repository"
on page 170
➤
"How to Locate an Object in an Object Repository" on page 173
➤
"How to Maintain Test Objects in Object Repositories" on page 174
➤
"How to Copy an Object to the Local Object Repository" on page 214
Add test objects using the Navigate and Learn option
1 Select Object > Navigate and Learn or press F6. The Navigate and Learn
toolbar opens. For a user interface description, see "Navigate and Learn
Toolbar" on page 254.
2 Click the parent object (for example, Browser, Dialog, Window) you want
to add to the shared object repository to focus it. The Learn button in the
toolbar is enabled.
3 Click the Learn button or focus the Navigate and Learn toolbar and press
ENTER. A flashing highlight surrounds the focused window and the object
and its descendants are added to the shared object repository according to
the defined filter.
4 When you finish adding the required objects to the shared object
repository, click the Close button in the Navigate and Learn toolbar or
press ESC. The Navigate and Learn toolbar closes and the Object
Repository Manager is redisplayed, showing the objects you just added to
the shared object repository.
246
Chapter 6 • Shared Object Repositories
Manage repository parameters
Use the Manage Repository Parameters dialog box, as described in "Manage
Repository Parameters Dialog Box" on page 258.
Reference
Object Repository Manager Main Window
This window enables you to open multiple shared object repositories and
modify them as needed.
The options available when specifying property values for objects in shared
object repositories are different from those available when specifying
properties for objects in local repositories.
247
Chapter 6 • Shared Object Repositories
To access
Select Resources > Object Repository Manager.
Important
information
See "Considerations for Working with the Object Repository
Manager" on page 248
Relevant
tasks
➤ "How to Manage Shared Object Repositories" on page 240
➤ "How to Manage Objects in Shared Object Repositories" on
page 245
See also
➤ "Shared Object Repositories Overview" on page 232
➤ "Considerations for Working with Shared Object Repositories"
on page 237
➤ "New Property Dialog Box" on page 188
➤ "Ordinal Identifier Dialog Box" on page 197
Considerations for Working with the Object Repository
Manager
248
➤
You can open as many shared object repositories as you want.
➤
Each shared object repository opens in a separate document window. You
can then resize, maximize, or minimize the windows to arrange them as
you require to copy, drag, and move objects between different shared
object repositories, as well as perform operations on a single object
repository.
➤
While the Object Repository Manager is open, you can continue working
with other QuickTest windows.
➤
You cannot add checkpoint or output value objects to a shared object
repository via the Object Repository Manager. They are added to the local
object repository as the test object they are performed on. You can then
upload them to the shared object repository, if needed. For details, see
"How to Update a Shared Object Repository From a Local Object
Repository" on page 325.
➤
When you choose a menu item or click a toolbar button in the Object
Repository Manager, the operation you select is performed on the shared
object repository whose window is currently active (in focus).
Chapter 6 • Shared Object Repositories
➤
If QuickTest is connected to a Quality Center project with version control
enabled, you can view and manage versions of your shared object
repositories, view comparisons of two shared object repository versions,
and view baseline history. For details, see "Version Control in
Quality Center 10.00 or HP ALM" on page 1095 and "Viewing and
Comparing Versions of QuickTest Assets" on page 1073.
➤
Even when steps containing an object are deleted from your component,
the objects remain in the shared object repository.
User interface elements are described in the sections below:
➤
"Object Repository Document Window" on page 249
➤
"Object Details Area (Test Objects)" on page 250
➤
"Object Details Area (Checkpoint Objects)" on page 250
➤
"Object Details Area (Output Value Objects)" on page 250
➤
"Object Repository Manager Toolbar Buttons" on page 251
Object Repository Document Window
Each open object repository contains the following user interface elements
(unlabeled elements are shown in angle brackets):
UI Element
Description
Title bar
Displays the name and file path of the shared object
repository currently active (in focus).
Object Repository
tree
Located on the left side of the Object Repository window,
and contains all objects in the shared object repository.
Test objects of environments that are not installed with
QuickTest are displayed with a question mark icon in the
test object tree.
Name
Specifies the name that QuickTest assigns to the selected
object. You can change the object name. For details, see
"Renaming Test Objects" on page 161.
Class
Specifies the class of the selected object.
249
Chapter 6 • Shared Object Repositories
Object Details Area (Test Objects)
Enables you to view the properties and property values used to identify a
test object during a run session.
For details on key functionality of this area, see:
➤
"Updating Identification Properties from an Object in Your Application"
on page 159
➤
"Restoring Default Mandatory Properties for a Test Object" on page 160
➤
"How to Maintain Test Objects in Object Repositories" on page 174
➤
"Renaming Test Objects" on page 161
➤
"How to Define a Visual Relation Identifier for a Specific Test Object Use-Case Scenario" on page 180
Object Details Area (Checkpoint Objects)
Enables you to view the properties of a checkpoint object, the same way as
you do in the relevant checkpoint properties dialog box.
For details on specifying and modifying values for properties of a
checkpoint object, see:
➤
"Checkpoint Properties Dialog Box" on page 576
➤
"Bitmap Checkpoint Properties Dialog Box" on page 592
Object Details Area (Output Value Objects)
Enables you to view the properties of an output value object, the same way
as you do in the relevant checkpoint properties dialog box.
For details on specifying and modifying values for properties of an output
object, see "Output Value Properties Dialog Box" on page 609.
250
Chapter 6 • Shared Object Repositories
Object Repository Manager Toolbar Buttons
The Object Repository Manager toolbar contains the following buttons:
Button
Description
New. Enables you to create a new shared object repository. For details,
see "Create a new shared object repository" on page 241.
Open. Enables you to open a shared object repository from the file
system or from Quality Center. For details, see "Open a shared object
repository" on page 241.
Save. Enables you to save the active shared object repository to the file
system or to Quality Center. For details, see "Save a shared object
repository" on page 241.
Enable Editing. Enables you to edit the active shared object repository,
by making the shared object repository editable. For details, see
"Enable editing for a shared object repository" on page 241.
Undo. Enables you to undo the previous operation performed in the
active shared object repository. You do this in the same way as in a
local object repository. For details, see "How to Copy, Paste, Move, or
Delete Objects in the Object Repository" on page 170.
Redo. Enables you to redo the operation that was previously undone
in the active shared object repository. You do this in the same way as
in a local object repository. For details, see "How to Copy, Paste, Move,
or Delete Objects in the Object Repository" on page 170.
Cut. Enables you to cut the selected item or object in the active shared
object repository. You do this in the same way as in a local object
repository. For details, see "How to Copy, Paste, Move, or Delete
Objects in the Object Repository" on page 170.
Copy. Enables you to copy the selected item or object to the Clipboard
in the active shared object repository. You do this in the same way as
in a local object repository. For details, see "How to Copy, Paste, Move,
or Delete Objects in the Object Repository" on page 170.
Paste. Enables you to paste the data from the Clipboard to the active
shared object repository. You do this in the same way as in a local
object repository. For details, see "How to Copy, Paste, Move, or Delete
Objects in the Object Repository" on page 170.
251
Chapter 6 • Shared Object Repositories
Button
Description
Delete. Enables you to delete the selected item or object in the active
shared object repository. You do this in the same way as in a local
object repository. For details, see "How to Copy, Paste, Move, or Delete
Objects in the Object Repository" on page 170.
Find and Replace. Enables you to find an object, property, or property
value in the active shared object repository. You can also find and
replace specified property values. You do this in the same way as in a
local object repository. For details, see "Find and Replace Dialog Box"
on page 195.
Add Object to Repository. Enables you to add objects to the active
shared object repository. You do this in the same way as in a local
object repository. For details, see "Adding and Deleting Test Objects in
an Object Repository" on page 152.
Update from Application. Enables you to update identification
properties in the active shared object repository according to the
actual properties of the object in your application. You do this in the
same way as in a local object repository. For details, see "Updating
Identification Properties from an Object in Your Application" on
page 159.
Define new Test Object. Enables you to define a test object that does
not yet exist in your application and add it to the active shared object
repository. You do this in the same way as in a local object repository.
For details, see "Define New Test Object Dialog Box" on page 189.
Highlight in Application. Enables you to select an object in the active
shared object repository and highlight it in your application. You do
this in the same way as in a local object repository. For details, see
"How to Locate an Object in an Object Repository" on page 173.
Locate in Repository. Enables you to select an object in your
application and highlight it in the active shared object repository. You
do this in the same way as in a local object repository. For details, see
"Locating a Test Object in the Object Repository" on page 157.
252
Chapter 6 • Shared Object Repositories
Button
Description
Quality Center Connection. Enables you to connect to Quality Center
to work with object repository files stored in a Quality Center project.
You can connect to Quality Center from the main QuickTest window
or from the Object Repository Manager. For details, see "HP ALM
Connection Dialog Box" on page 1041.
Object Spy. Opens the Object Spy dialog box, enabling you to view the
native properties and operations of any object in an open application,
as well as the test object hierarchy, identification properties, and
operations of the test object that QuickTest uses to represent that
object. For details, see "How to Use the Object Spy to View Object
Properties and Operations or Add an Object to a Repository" on
page 136.
Manage Repository Parameters. Enables you to add, edit, and delete
repository parameters in the active shared object repository. For
details, see "Manage Repository Parameters Dialog Box" on page 258.
253
Chapter 6 • Shared Object Repositories
Navigate and Learn Toolbar
This toolbar enables you to add multiple test objects to a shared object
repository while navigating through your application.
To access
In the Object Repository Manager, do one of the following:
➤ Select Object > Navigate and Learn.
➤ Press F6.
Important
information
➤ Each time you select a window to learn, the selected window
and its descendant objects are added to the active shared object
repository according to a predefined object filter. You can
change the object filter definitions at any time to meet your
requirements. The object filter is used for both the Navigate
and Learn option and the Add Objects option. The settings you
define are used in both places when QuickTest learns objects.
For details on modifying the filter definitions, see "Define
Object Filter Dialog Box" on page 191.
➤ The Navigate and Learn option is not supported for
environments with mixed hierarchies (object hierarchies that
include objects from different environments), for example,
Browser("Homepage").Page("Welcome").AcxButton("Save") or
Dialog("Edit").AcxEdit("MyEdit"). To add objects within mixed
hierarchies, use other options, as described in "Adding and
Deleting Test Objects in an Object Repository" on page 152.
➤ Minimized windows are not learned when using the Navigate
and Learn option.
254
Relevant
tasks
"How to Manage Shared Object Repositories" on page 240
See also
"Object Repository Manager Main Window" on page 247
Chapter 6 • Shared Object Repositories
User interface elements are described below (unlabeled elements are shown
in angle brackets):
UI Elements
Description
Learn
Adds the active (in focus) parent object and its descendants to the
shared object repository, according to the defined filter.
Note: This button is disabled if there is no recognized active
parent object (for example, Browser, Dialog, Window).
Keyboard shortcut: ENTER
Define Object Filter. Opens the Define Object Filter dialog box,
enabling you to set filter definitions for objects learned. For
details, see "Define Object Filter Dialog Box" on page 191. The
current filter definitions are displayed in the button tooltip (in
parentheses after the button name).
Note: If this is the first time you are adding objects to the shared
object repository, you may want to change the filter definitions
before you continue.
Keyboard shortcut: CTRL+F
<keyboard
shortcuts>
➤ Help. F1
➤ Return to Object Repository Manager. ESC
255
Chapter 6 • Shared Object Repositories
Repository Parameter Dialog Box
This dialog box enables you to specify or modify property values for test
objects in the shared object repository. You can specify a value using a
constant value (either a simple value or a constant value that includes
regular expressions), or you can parameterize a value using a repository
parameter.
To access
In the Object Repository Manager, do the following:
1 Select the test object whose property value you want to specify.
2 In the Test object details area, click in the Value cell for the
required property.
Important
information
You can also specify or modify values for properties of a
checkpoint or output object, directly in the object details area of
the Object Repository Manager. For details, see "Object Repository
Manager Main Window" on page 247.
Relevant
tasks
"How to Manage Objects in Shared Object Repositories" on
page 245
See also
➤ "Working with Repository Parameters" on page 234
➤ "Manage Repository Parameters Dialog Box" on page 258
256
Chapter 6 • Shared Object Repositories
User interface elements are described below:
UI Elements
Description
Constant
The constant value of the object property.
Note: You can also enter a constant value directly in the Value
cell of the Test object details area.
Regular
expression
Enables you to specify a regular expression for the constant
value.
For details on regular expressions, see "Regular Expressions
Overview" on page 633 and "Regular Expression Characters and
Usage Options" on page 643.
Parameter
Enables you to select a repository parameter from the list of
defined parameters.
Default value
The default value for the parameter, where applicable.
257
Chapter 6 • Shared Object Repositories
Manage Repository Parameters Dialog Box
This dialog box enables you to add, edit, and delete repository parameters
for a single shared object repository.
To access
In the Object Repository Manager, do one of the
following:
➤ Select Tools > Manage Repository Parameters.
➤ Click the Manage Repository Parameters button
Relevant tasks
"How to Manage Objects in Shared Object Repositories"
on page 245
See also
➤ "Working with Repository Parameters" on page 234.
➤ "Add Repository Parameter Dialog Box" on page 260
➤ "Repository Parameter Dialog Box" on page 256
258
.
Chapter 6 • Shared Object Repositories
User interface elements are described below:
Option
Description
<Repository>
Displays the name and path of the shared object
repository whose repository parameters you are
managing.
Add Repository Parameter. Enables you to add a new
repository parameter. For details, see "Add Repository
Parameter Dialog Box" on page 260.
Delete Repository Parameter. Enables you to delete the
currently selected repository parameters.
Parameter list
(Name, Default Value,
and Description)
Displays the list of repository parameters currently
defined in this shared object repository. You can
modify a parameter’s default value and description
directly in the parameter list. For considerations, see
"Working with Repository Parameters" on page 234.
Clear Default Value. Enables you to remove the default
value of the parameter. If you remove the default value,
the text {No Default Value} is displayed in the cell.
Note: If you delete the text manually, it does not
remove the default value. It creates a default value of an
empty string. You must click the Clear Default Value
button if you want to remove the default value.
Find in Repository
Searches for and highlights the first test object in the
shared object repository tree that uses the selected
repository parameter. You can click this button again to
find the next occurrence of the selected parameter, and
so on.
259
Chapter 6 • Shared Object Repositories
Add Repository Parameter Dialog Box
This dialog box enables you to define a new repository parameter. You can
specify a default value for the parameter and a meaningful description to
help identify it when it is used in a component step.
To access
In the Manage Repository Parameters dialog box (Tools >
Manage Repository Parameters), click the Add
Repository Parameter button
.
Relevant tasks
"How to Manage Objects in Shared Object Repositories"
on page 245
See also
➤ "Working with Repository Parameters" on page 234
➤ "Manage Repository Parameters Dialog Box" on
page 258
➤ "Repository Parameter Dialog Box" on page 256
260
Chapter 6 • Shared Object Repositories
User interface elements are described below:
UI Elements
Description
Name
A meaningful name for the parameter. For a list of
naming conventions, see "Naming Conventions" on
page 1121.
Default value
The default value to be used for the repository parameter.
This value is used if you do not map the repository
parameter to a value or parameter type in a component
that uses this shared object repository. If you do not
specify a default value, the repository parameter will
appear as unmapped in any components that use this
shared object repository.
Note: If you specify a default value, you can later remove
it by clicking in the Default Value cell of the relevant
parameter in the Manage Repository Parameters dialog
box and then clicking the Clear Default Value button.
The text {No Default Value} is displayed in the cell.
Description
A description of the repository parameter. The
description will help you identify the parameter when
mapping repository parameters in a component.
261
Chapter 6 • Shared Object Repositories
262
7
Configuring Object Identification
This chapter includes:
Concepts
➤
Object Identification Configuration - Overview on page 264
➤
Smart Identification on page 272
➤
Test Object Mapping for Unidentified or Custom Classes on page 278
Tasks
➤
How to Configure Object Identification for a Test Object Class
on page 279
➤
How to Manage Identification Properties of a Test Object Class
on page 281
➤
How to Map an Unidentified or Custom Class to a Standard Windows
Class on page 282
Reference
➤
Object Identification Dialog Box on page 283
➤
Object Mapping Dialog Box on page 289
➤
Smart Identification Properties Dialog Box on page 291
263
Chapter 7 • Configuring Object Identification
Concepts
Object Identification Configuration - Overview
When QuickTest learns an object, it learns a set of properties and values that
uniquely describe the object within the object hierarchy. In most cases, this
description is sufficient to enable QuickTest to identify the object during the
run session.
If you find that the description QuickTest uses for a certain object class is
not the most logical one for the objects in your application, or if you expect
that the values of the properties in the object description may change
frequently, you can configure the way that QuickTest learns and identifies
objects. You can also map user-defined objects to standard test object classes
and configure the way QuickTest learns objects from your user-defined
object classes.
QuickTest has a predefined set of properties that it learns for each test
object. If these mandatory property values are not sufficient to uniquely
identify a learned object, QuickTest can add some assistive properties and/or
an ordinal identifier to create a unique description.
Mandatory properties are properties that QuickTest always learns for a
particular test object class.
Assistive properties are properties that QuickTest learns only if the
mandatory properties that QuickTest learns for a particular object in your
application are not sufficient to create a unique description. If several
assistive properties are defined for an object class, then QuickTest learns one
assistive property at a time, and stops as soon as it creates a unique
description for the object. If QuickTest does learn assistive properties, those
properties are added to the test object description.
264
Chapter 7 • Configuring Object Identification
Note:
➤
If the combination of all defined mandatory and assistive properties is
not sufficient to create a unique test object description, QuickTest also
learns the value for the selected ordinal identifier. For more information,
see "Ordinal Identifiers" on page 267.
➤
If a specific test object relies mainly on ordinal identifiers, you can also
define visual relation identifiers for that test object, to help improve
identification reliability for that object. For details, see "Visual Relation
Identifiers" on page 165.
When you run a component, QuickTest searches for the object that matches
the description it learned (without the ordinal identifier). If it cannot find
any object that matches the description, or if more than one object matches
the description, QuickTest uses the Smart Identification mechanism (if
enabled) to identify the object. In many cases, a Smart Identification
definition can help QuickTest identify an object, if it is present, even when
the learned description fails due to changes in one or more property values.
The test object description is used together with the ordinal identifier only
in cases where the Smart Identification mechanism does not succeed in
narrowing down the object candidates to a single object.
You use the Object Identification dialog box (Tools > Object Identification)
to configure the mandatory, assistive, and ordinal identifier properties that
QuickTest uses to learn descriptions of the objects in your application, and
to enable and configure the Smart Identification mechanism.
The Object Identification dialog box also enables you to configure new
user-defined classes and map them to an existing test object class so that
QuickTest can recognize objects from your user-defined classes when you
run your component.
This section also includes:
➤
"Mandatory and Assistive Properties" on page 266
➤
"Ordinal Identifiers" on page 267
265
Chapter 7 • Configuring Object Identification
Mandatory and Assistive Properties
If you find that the description QuickTest uses for a certain object class is
not the most logical one for the objects in your application, or if you expect
that the values of the properties currently used in the object description
may change, you can modify the mandatory and assistive properties that
QuickTest learns when it learns an object of a given class.
During the run session, QuickTest looks for objects that match all properties
in the test object description—it does not distinguish between properties
that were learned as mandatory properties and those that were learned as
assistive properties.
For example, the default mandatory properties for a Web Image object are
the alt, html tag, and image type properties. There are no default assistive
properties defined. Suppose your Web site contains several space holders for
different collections of rotating advertisements. You want to create a
component that clicks on the images in each one of these space holders.
However, since each advertisement image has a different alt value, one alt
value would be added when you create the component, and most likely
another alt value will be captured when you run the component, causing
the run to fail. In this case, you could remove the alt property from the Web
Image mandatory properties list. Instead, since each advertisement image
displayed in a certain space holder in your site has the same value for the
image name property, you could add the name property to the mandatory
properties to enable QuickTest to uniquely identify the object.
Also, suppose that whenever a Web image is displayed more than once on a
page (for example, a logo displayed on the top and bottom of a page), the
Web designer adds a special ID property to the Image tag. The mandatory
properties are sufficient to create a unique description for images that are
displayed only once on the page, but you also want QuickTest to learn the
ID property for images that are displayed more than once on a page. To do
this, you add the ID property as an assistive property, so that QuickTest
learns the ID property only when it is necessary for creating a unique test
object description.
266
Chapter 7 • Configuring Object Identification
Ordinal Identifiers
In addition to learning the mandatory and assistive properties specified in
the Object Identification dialog box, QuickTest can also learn a backup
ordinal identifier for each test object. The ordinal identifier assigns the
object a numerical value that indicates its order relative to other objects
with an otherwise identical description (objects that have the same values
for all properties specified in the mandatory and assistive property lists).
This ordered value enables QuickTest to create a unique description when
the mandatory and assistive properties are not sufficient to do so.
The assigned ordinal property value is a relative value and is accurate only
in relation to the other objects displayed when QuickTest learns an object.
Therefore, changes in the layout or composition of your application page or
screen can cause this value to change, even though the object itself has not
changed in any way. For this reason, QuickTest learns a value for this backup
ordinal identifier only when it cannot create a unique description using all
available mandatory and assistive properties.
In addition, even if QuickTest learns an ordinal identifier, it will use the
identifier during the run session only if:
➤
The learned description and the Smart Identification mechanism are not
sufficient to identify the object in your application.
➤
A visual relation identifier is not defined for the test object. For details, see
"Visual Relation Identifiers" on page 165.
267
Chapter 7 • Configuring Object Identification
QuickTest can use the following types of ordinal identifiers to identify an
object:
➤
Index. Indicates the order in which the object appears in the application
code relative to other objects with an otherwise identical description. For
more information, see "The Index Ordinal Identifier" on page 269.
➤
Location. Indicates the order in which the object appears within the
parent window, frame, or dialog box relative to other objects with an
otherwise identical description. For more information, see "The Location
Ordinal Identifier" on page 270.
➤
CreationTime. (Browser object only.) Indicates the order in which the
browser was opened relative to other open browsers with an otherwise
identical description. For more information, see "The CreationTime
Ordinal Identifier" on page 271.
By default, an ordinal identifier type exists for each test object class. To
modify the default ordinal identifier, you can select the desired type from
the Ordinal identifier box.
Tip: When learning an object, if QuickTest successfully creates a unique test
object description using the mandatory and assistive properties, it does not
learn an ordinal identifier value. You can add an ordinal identifier to an
object’s identification properties at a later time using the Add/Remove
option from the Object Properties or Object Repository dialog box. For more
information, see Chapter 4, "Managing Test Objects in Object Repositories."
This section also includes:
268
➤
"The Index Ordinal Identifier" on page 269
➤
"The Location Ordinal Identifier" on page 270
➤
"The CreationTime Ordinal Identifier" on page 271
Chapter 7 • Configuring Object Identification
The Index Ordinal Identifier
While learning an object, QuickTest can assign a value to the test object’s
Index property to uniquely identify the object. The value is based on the
order in which the object appears within the source code. The first
occurrence is 0.
Index property values are object-specific. Therefore, if you use Index:=3 to
describe a WebEdit test object, QuickTest searches for the fourth WebEdit
object in the page. However, if you use Index:=3 to describe a WebElement
object, QuickTest searches for the fourth Web object on the page—regardless
of the type—because the WebElement object applies to all Web objects.
For example, suppose a page contains the following objects:
➤
An image with the name Apple
➤
An image with the name UserName
➤
A WebEdit object with the name UserName
➤
An image with the name Password
➤
A WebEdit object with the name Password
The following statement refers to the third item in the list, as this is the first
WebEdit object on the page with the name UserName:
WebEdit("Name:=UserName", "Index:=0")
In contrast, the following statement refers to the second item in the list, as
that is the first object of any type (WebElement) with the name UserName:
WebElement("Name:=UserName", "Index:=0")
269
Chapter 7 • Configuring Object Identification
The Location Ordinal Identifier
While learning an object, QuickTest can assign a value to the test object’s
Location property to uniquely identify the object. The value is based on the
order in which the object appears within the window, frame, or dialog box,
in relation to other objects with identical properties. The first occurrence of
the object is 0. Values are assigned in columns from top to bottom, and left
to right.
In the following example, the radio buttons in the dialog box are numbered
according to their Location property:
Location property values are object-specific. Therefore, if you use Location:=3
to describe a WinButton test object, QuickTest searches from top to bottom,
and left to right for the fourth WinButton object in the page. However, if
you use Location:=3 to describe a WinObject object, QuickTest searches from
top to bottom, and left to right for the fourth standard object on the page—
regardless of the type—because the WinObject object applies to all standard
objects.
For example, suppose a dialog box contains the following objects:
270
➤
A button object with the name OK
➤
A button object with the name Add/Remove
➤
A check box object with the name Add/Remove
➤
A button object with the name Help
➤
A check box object with the name Check spelling
Chapter 7 • Configuring Object Identification
The following statement refers to the third item in the list, as this is the first
check box object on the page with the name Add/Remove:
WinCheckBox("Name:=Add/Remove", "Location:=0")
In contrast, the following statement, refers to the second item in the list, as
that is the first object of any type (WinObject) with the name Add/Remove:
WinObject("Name:=Add/Remove", "Location:=0")
The CreationTime Ordinal Identifier
While learning a browser object, QuickTest assigns a value to the
CreationTime identification property. This value indicates the order in
which the browser was opened relative to other open browsers. The first
browser that opens receives the value CreationTime = 0.
During the run session, if QuickTest is unable to identify a browser object
based solely on its test object description, it examines the order in which the
browsers were opened, and then uses the CreationTime property to identify
the correct one.
For example, if QuickTest learns three browsers that are opened at 9:01 pm,
9:03 pm, and 9:05 pm, QuickTest assigns the CreationTime values, as
follows: CreationTime = 0 to the 9:01 am browser, CreationTime = 1 to the
9:03 am browser, and CreationTime = 2 to the 9:06 am browser.
At 10:30 pm, when you run a component with these browser objects,
suppose the browsers are opened at 10:31 pm, 10:33 pm, and 10:34 pm.
QuickTest identifies the browsers, as follows: the 10:31 pm browser is
identified with the browser test object with CreationTime = 0, 10:33 pm
browser is identified with the test object with CreationTime = 1, 10:34 pm
browser is identified with the test object with CreationTime = 2.
If there are several open browsers, the one with the lowest CreationTime is
the first one that was opened and the one with the highest CreationTime is
the last one that was opened. For example, if there are three or more
browsers open, the one with CreationTime = 2 is the third browser that was
opened. If seven browsers are opened during a recording session, the
browser with CreationTime = 6 is the last browser opened.
271
Chapter 7 • Configuring Object Identification
If a step was created on a Browser object with a specific CreationTime value,
but during a run session there is no open browser with that CreationTime
value, the step will run on the browser that has the highest CreationTime
value. For example, if a step was created on a Browser object with
CreationTime = 6, but during the run session there are only two open
browsers, with CreationTime = 0 and CreationTime = 1, then the step runs
on the last browser opened, which in this example is the browser with
CreationTime = 1.
Note: It is possible that at a particular time during a session, the available
CreationTime values may not be sequential. For example, if you open six
browsers during a record or run session, and then during that session, you
close the second and fourth browsers (CreationTime values 1 and 3), then at
the end of the session, the open browsers will be those with CreationTime
values 0, 2, 4, and 5.
Smart Identification
When QuickTest uses the learned description to identify an object, it
searches for an object that matches all of the property values in the
description. In most cases, this description is the simplest way to identify
the object, and, unless the main properties of the object change, this
method will work.
If QuickTest is unable to find any object that matches the learned object
description, or if it finds more than one object that fits the description, then
QuickTest ignores the learned description, and uses the Smart Identification
mechanism (if defined and enabled) to try to identify the object.
The Smart Identification dialog box enables you to create and modify the
Smart Identification definition that QuickTest uses for a selected test object
class. Configuring Smart Identification properties enables you to help
QuickTest identify objects in your application, even if some of the properties
in the object’s learned description have changed.
272
Chapter 7 • Configuring Object Identification
While the Smart Identification mechanism is more complex, it is more
flexible. Therefore, if configured logically, a Smart Identification definition
can probably help QuickTest identify an object, if it is present, even when
the learned description fails.
The Smart Identification mechanism uses two types of properties:
➤
Base Filter Properties. The most fundamental properties of a particular
test object class; those whose values cannot be changed without changing
the essence of the original object. For example, if a Web link’s tag was
changed from <A> to any other value, you could no longer call it the
same object.
➤
Optional Filter Properties. Other properties that can help identify objects
of a particular class. These properties are unlikely to change on a regular
basis, but can be ignored if they are no longer applicable.
This section also includes:
➤
"When to Use Smart Identification" on page 273
➤
"The Smart Identification Process" on page 274
➤
"Smart Identification Information in the Run Results" on page 275
➤
"How QuickTest Uses Smart Identification - Use-Case Scenario" on
page 276
When to Use Smart Identification
You should enable the Smart Identification mechanism only for test object
classes that have defined Smart Identification configuration. However, even
if you define a Smart Identification configuration for a test object class, you
may not always want to learn the Smart Identification property values. If
you do not want to learn the Smart Identification properties, clear the
Enable Smart Identification check box.
Even if you choose to learn Smart Identification properties for an object,
you can disable use of the Smart Identification mechanism for a specific
object in the Object Properties or Object Repository dialog box. For more
information, see Chapter 4, "Managing Test Objects in Object Repositories."
273
Chapter 7 • Configuring Object Identification
However, if you do not learn Smart Identification properties, you cannot
enable the Smart Identification mechanism for an object later. For more
information on learning Smart Identification properties, see "Smart
Identification Properties Dialog Box" on page 291.
The Smart Identification Process
If QuickTest activates the Smart Identification mechanism during a run
session (because it was unable to identify an object based on its learned
description), it follows the following process to identify the object:
1 QuickTest "forgets" the learned test object description and creates a new
object candidate list containing the objects (within the object’s parent
object) that match all of the properties defined in the Base Filter
Properties list.
2 QuickTest filters out any object in the object candidate list that does not
match the first property listed in the Optional Filter Properties list. The
remaining objects become the new object candidate list.
3 QuickTest evaluates the new object candidate list:
274
➤
If the new object candidate list still has more than one object,
QuickTest uses the new (smaller) object candidate list to repeat step 2
for the next optional filter property in the list.
➤
If the new object candidate list is empty, QuickTest ignores this
optional filter property, returns to the previous object candidate list,
and repeats step 2 for the next optional filter property in the list.
➤
If the object candidate list contains exactly one object, then QuickTest
concludes that it has identified the object and performs the statement
containing the object.
Chapter 7 • Configuring Object Identification
4 QuickTest continues the process described in steps 2 and 3 until it either
identifies one object, or runs out of optional filter properties to use.
If, after completing the Smart Identification elimination process,
QuickTest still cannot identify the object, then QuickTest uses the learned
description plus the ordinal identifier to identify the object.
If the combined learned description and ordinal identifier are not
sufficient to identify the object, then QuickTest stops the run session and
displays a Run Error message.
Smart Identification Information in the Run Results
If the learned description does not enable QuickTest to identify a specified
object in a step, and a Smart Identification definition is defined (and
enabled) for the object, then QuickTest tries to identify the object using the
Smart Identification mechanism.
If QuickTest successfully uses Smart Identification to find an object after no
object matches the learned description, the step is assigned a Warning status
in the Run Results, and the result details for the step indicate that the Smart
Identification mechanism was used.
If the Smart Identification mechanism cannot successfully identify the
object, QuickTest uses the learned description plus the ordinal identifier to
identify the object. If the object is still not identified, the component fails
and a normal failed step is displayed in the results.
For more information, see "Smart Identification in the Run Results" on
page 808.
275
Chapter 7 • Configuring Object Identification
How QuickTest Uses Smart Identification - Use-Case
Scenario
The following example walks you through the object identification process
for an object:
Suppose you have the following statement in your component:
Browser("Mercury Tours").Page("Mercury Tours").Image("Login").Click 22,17
When you created your component, QuickTest learned the following object
description for the Login image:
However, at some point after you created your component, a second login
button (for logging into the VIP section of the Web site) was added to the
page, so the Web designer changed the original Login button’s alt tag to:
basic login.
The default description for Web Image objects (alt, html tag, image type)
works for most images in your site, but it no longer works for the Login
image, because that image’s alt property no longer matches the learned
description. Therefore, when you run your component, QuickTest is unable
to identify the Login button based on the learned description. However,
QuickTest succeeds in identifying the Login button using its Smart
Identification definition.
276
Chapter 7 • Configuring Object Identification
The following explanation describes the process that QuickTest uses to find
the Login object using Smart Identification:
1 According to the Smart Identification definition for Web image objects,
QuickTest learned the values of the following properties when it learned
the Login image:
The learned values are as follows:
Base Filter Properties:
Property
Value
html tag
INPUT
Optional Filter Properties:
Property
Value
alt
Login
image type
Image Button
name
login
file name
login.gif
class
<null>
visible
1
277
Chapter 7 • Configuring Object Identification
2 QuickTest begins the Smart Identification process by identifying the five
objects on the Mercury Tours page that match the base filter properties
definition (html tag = INPUT). QuickTest considers these to be the object
candidates and begins checking the object candidates against the
Optional Filter Properties list.
3 QuickTest checks the alt property of each of the object candidates, but
none have the alt value: Login, so QuickTest ignores this property and
moves on to the next one.
4 QuickTest checks the image type property of the each of the object
candidates, but none have the image type value: Image Button, so
QuickTest ignores this property and moves on to the next one.
5 QuickTest checks the name property of each of the object candidates, and
finds that two of the objects (both the basic and VIP Login buttons) have
the name: login. QuickTest filters out the other three objects from the list,
and these two login buttons become the new object candidates.
6 QuickTest checks the file name property of the two remaining object
candidates. Only one of them has the file name login.gif, so QuickTest
correctly concludes that it has found the Login button and clicks it.
Test Object Mapping for Unidentified or Custom Classes
The Object Mapping dialog box enables you to map an object of an
unidentified or custom class to a standard Windows class. For example, if
your application has a button that cannot be identified, this button is
learned as a generic WinObject.
You can teach QuickTest to identify your object as if it belonged to a
standard Windows button class. Then, when you click the button while
recording, QuickTest records the operation in the same way as a click on a
standard Windows button.
When you map an unidentified or custom object to a standard object, your
object is added to the list of standard Windows test object classes as a
user-defined test object class. You can configure the object identification
settings for a user-defined test object class just as you would any other test
object class.
278
Chapter 7 • Configuring Object Identification
You should map an object that cannot be identified only to a standard
Windows class with comparable behavior. For example, do not map an
object that behaves like a button to the Edit class.
Tasks
How to Configure Object Identification for a Test Object
Class
This task describes steps you can perform to configure the properties that
QuickTest uses to learn and identify objects. Perform one or more of these
steps to configure object identification for a specific test object class.
Repeat the task for all relevant test object classes.
This task includes the following steps:
➤
"Prerequisites" on page 279
➤
"Set the properties that QuickTest learns for identifying an object in this
test object class" on page 280
➤
"Set the properties that QuickTest uses for Smart Identification" on
page 280
Prerequisites
Determine what you would like to change about how QuickTest identifies
objects of various test object classes within your application. For more
information, see "Object Identification Configuration - Overview" on
page 264.
279
Chapter 7 • Configuring Object Identification
Set the properties that QuickTest learns for identifying an
object in this test object class
In the Object Identification Dialog Box (described on page 283), set the
properties that are learned for the test object description:
1 Select the environment.
2 Select the test object class.
3 Set mandatory and assistive properties.
4 Select an ordinal identifier.
Set the properties that QuickTest uses for Smart Identification
1 In the Object Identification Dialog Box, select the Enable Smart ID check
box. The Configure button is enabled.
2 Click the Configure button to open the Smart Identification Properties
Dialog Box (described on page 291).
3 Set the base and optional properties.
4 Set the order in which the optional properties are used.
5 If you do not want QuickTest to learn the Smart Identification properties,
clear the Enable Smart Identification check box. The configuration is
saved, but not used.
For more information, see "Smart Identification" on page 272.
280
Chapter 7 • Configuring Object Identification
How to Manage Identification Properties of a Test Object
Class
The following task describes how to manage the identification properties of
a specified test object class in the Add/Remove Properties Dialog Box
(described on page 287) and includes the following:
➤
"Add and remove properties to the object identification property lists" on
page 281
➤
"Add identification properties to the test object class" on page 281
Add and remove properties to the object identification
property lists
To include a property in the Mandatory, Assistive, Base Filter, or Optional
Filter Properties lists, open the Add/Remove Properties Dialog Box, select
the check box next to the property name you want to add. To remove a
property from the list, clear the corresponding check box.
Add identification properties to the test object class
To add a new property to the test object class, open the Add/Remove
Properties dialog box and click New. The New Property dialog box opens.
Enter a valid property in the format attribute/<PropertyName> (for Web
objects) or <PropertyName> (for other environment objects) and click OK.
The new property is added to the available properties list.
281
Chapter 7 • Configuring Object Identification
How to Map an Unidentified or Custom Class to a
Standard Windows Class
This task describes how to map an unidentified or custom class to a standard
Windows class. This instructs QuickTest to identify objects of the specified
class in the same way as it identifies objects of the Windows class to which it
is mapped.
To map an unidentified or custom class to a standard Windows class:
1 Open the Object Mapping dialog box by selecting Standard Windows in
the Environment box in the Object Identification dialog box and then
clicking the User-Defined button. For more information, see "Object
Mapping Dialog Box" on page 289.
2 Click the pointing hand and then click the object whose class you want
to add as a user-defined test object class. The name of the user-defined
object is displayed in the Class name box.
For information on using the pointing hand, see "Tips for Using the
Pointing Hand" on page 148.
3 In the Map to box, select the standard object class to which you want to
map your user-defined test object class and click Add. The class name and
mapping is added to the object mapping list.
4 Click OK. The Object Mapping dialog box closes and your object is added
to the list of standard Windows test object classes as a user-defined test
object class. Note that your object has an icon with a red U in the
lower-right corner, identifying it as a user-defined class.
5 Configure the object identification settings for your user defined test
object class just as you would any other test object class. For more
information, see "How to Configure Object Identification for a Test Object
Class" on page 279.
Caution: If you click the down arrow on the Reset Test Object button and
select Reset Environment, when Standard Windows is selected in the
Environment box, all of the user-defined test object classes are deleted.
282
Chapter 7 • Configuring Object Identification
Reference
Object Identification Dialog Box
This dialog box enables you to set mandatory and assistive properties, to
select the ordinal identifier, and to specify whether you want to enable the
Smart Identification mechanism for each test object class.
To access
Select Tools > Object Identification.
283
Chapter 7 • Configuring Object Identification
Important
information
➤ Only currently loaded environments are listed in the
Environments box.
➤ You cannot include the same property in both the mandatory
and assistive property lists.
➤ Any changes you make in the Object Identification dialog box
have no effect on objects already added to the object repository.
➤ The learned and Smart Identification properties of certain
classes cannot be configured, for example, the WinMenu,
VbLabel, and VbToolbar objects. These classes are therefore not
included in the Test Object classes list for the selected
environment.
Relevant
tasks
"How to Configure Object Identification for a Test Object Class" on
page 279
See also
"Object Identification Configuration - Overview" on page 264
User interface elements are described below:
UI Elements
Description
Environment
The list of environments, according to the loaded add-ins.
This list may also include additional environments for
which you or a third party developed support using
QuickTest Add-in Extensibility.
For more information on loading add-ins, see the section
on loading QuickTest add-ins in the HP QuickTest
Professional Add-ins Guide.
Test Object classes
The alphabetized list of the test object classes associated
with the selected environment.
Note: In Standard Windows, the user-defined classes are
displayed at the bottom of the list.
284
Mandatory
Properties
The list of properties that QuickTest always learns as part of
the description for test objects of the selected class.
Assistive
Properties
The list of additional properties that QuickTest can learn for
a test object of the selected class to create a unique test
object description.
Chapter 7 • Configuring Object Identification
UI Elements
Description
Up and Down arrows. Enable you to set the preferred order
for the Assistive Properties list.
When QuickTest learns an object, and assistive properties
are necessary to create a unique object description,
QuickTest adds the assistive properties to the description
one at a time until it has enough information to create a
unique description, according to the order you set in the
Assistive Properties list.
Add/Remove
Enables you to add or remove properties for the test object
class using the Add/Remove Properties Dialog Box. For
more information, see "Add/Remove Properties Dialog Box"
on page 287.
Enable Smart
Identification
Enables or disables Smart Identification for the selected test
object class.
Configure
Opens the Smart Identification Properties Dialog Box
(described on page 291), which enables you to specify the
properties for QuickTest to learn as Smart Identification
Properties.
Enabled only when the Enable Smart Identification check
box is selected.
Ordinal identifier
The type of ordinal identifier to use when QuickTest needs
to identify an object with an otherwise identical
description. The ordinal identifier enables QuickTest to
assign a serial order value to each of the otherwise identical
objects. For more information, see "Ordinal Identifiers" on
page 267.
User-Defined
Enables you to map an unidentified or custom class to a
standard Windows class by opening the Object Mapping
Dialog Box. For more information, see "Object Mapping
Dialog Box" on page 289.
Note: To enable this option, you must select the Standard
Windows environment from the Environment list.
285
Chapter 7 • Configuring Object Identification
UI Elements
Description
Reset Test Object
The down arrow enables you to select one of the following
options:
➤ Reset Test Object. Resets the selected test object to the
system default. (Default selection)
➤ Reset Environment. Resets the settings for all the test
objects in the current environment to the system default.
➤ Reset All. Resets the settings for all currently loaded
environments to the system default.
You can restore the default settings for object identification
and the Smart Identification property settings for all loaded
environments, for the current environment only, or for a
selected test object, using the Reset Test Object option in
the Object Identification Dialog Box. For more information,
see "Object Identification Dialog Box" on page 283.
Only built-in object properties can be reset. When you reset
the settings for the standard Windows environment,
user-defined objects are also deleted. For more information
on user-defined objects, see "Test Object Mapping for
Unidentified or Custom Classes" on page 278.
Generate Script
Enables you to generate an automation script that sets the
current object identification settings.
When you click the Generate Script button, a Save As
dialog box opens, enabling you to specify the name and file
system location to store the generated file.
You can use some or all of the script lines from this
generated script in an automation script. This can be useful,
for example, if you to set the same object identification
settings on multiple QuickTest computers.
For more information, see "QuickTest Automation Scripts"
on page 1015 and the QuickTest Professional Automation
Object Model Reference
286
Chapter 7 • Configuring Object Identification
Add/Remove Properties Dialog Box
This dialog box enables you to set the properties you want to include in the
Mandatory, Assistive, Base Filter, or Optional Filter Properties lists that are
used to define the object identification preferences for a selected test object
class. You can also add new property names to the set of usable properties.
To access
You can access this dialog box by clicking Add/Remove in the
following dialog boxes:
➤ Object Identification Dialog Box (described on page 283)
➤ Smart Identification Properties Dialog Box (described on
page 291)
Important
information
➤ You cannot add the same property to both the mandatory and
assistive property lists.
➤ You cannot add the same property to both the base and
optional filter property lists.
Relevant
tasks
"How to Configure Object Identification for a Test Object Class" on
page 279
See also
➤ "Object Identification Configuration - Overview" on page 264
➤ "Smart Identification" on page 272
287
Chapter 7 • Configuring Object Identification
User interface elements are described below (unlabeled elements are shown
in angle brackets):
UI Elements
Description
<Properties> list
The list of available identification properties for the selected
test object class. For more information, see "Add and remove
properties to the object identification property lists" on
page 281.
New
Enables you to add new identification properties to the
available properties list.
QuickTest retrieves the property values from the object’s
native properties. Therefore, the name of a new identification
property must be identical to the name of a native property.
(In most environments, you can use the Object Spy to view
the list of available native properties.)
Note: New properties are displayed in the Object Spy but are
not available for checkpoints on objects of the selected class.
For more information, see "Add identification properties to
the test object class" on page 281.
288
Chapter 7 • Configuring Object Identification
Object Mapping Dialog Box
This dialog box enables you to map an object of an unidentified or custom
class to a standard Windows test object class.
To access
In the Object Identification Dialog Box (described on
page 283), select the Standard Windows environment,
and click the User Defined button.
Relevant tasks
"How to Map an Unidentified or Custom Class to a
Standard Windows Class" on page 282
See also
"Test Object Mapping for Unidentified or Custom
Classes" on page 278
289
Chapter 7 • Configuring Object Identification
User interface elements are described below:
UI Elements
Description
Class name
The name of the user-defined object selected by using the
Pointing Hand.
Pointing Hand. Enables you to add the object whose class
you want to as a user-defined class by minimizing the
QuickTest window and navigating to the object. The
name of the user-defined object is displayed in the Class
name box.
For information on using the pointing hand, see "Tips for
Using the Pointing Hand" on page 148.
290
Map to
The list of available standard Windows test object classes
to map to the user-defined object.
Add
Enables you to add the selected class name and mapping
in the object mapping list with values set in the Class
Name and Map to fields.
Update
Enables you to update the selected class name and
mapping in the object mapping list with new values set
in the Class Name and Map to fields.
Delete
Enables you to delete the selected class name and
mapping from the object mapping list.
Chapter 7 • Configuring Object Identification
Smart Identification Properties Dialog Box
The Smart Identification dialog box enables you to configure the Smart
Identification mechanism for the selected test object class.
To access
In the Object Identification Dialog Box (described on
page 283), select an environment and a test object class,
select Enable Smart Identification, and click Configure.
Important
information
By default, some test object classes already have Smart
Identification configurations and others do not. Those
with default configurations also have the Enable Smart
Identification check box selected by default in the Object
Identification Dialog Box (described on page 283).
See also
"Smart Identification" on page 272
291
Chapter 7 • Configuring Object Identification
User interface elements are described below:
UI Elements
Description
Base Filter Properties
The list of properties that QuickTest learns as base
filter properties for this test object class. The Smart
Identification mechanism uses these properties to
create a list of possible candidate objects.
Optional Filter Properties
The list of properties that QuickTest learns as
optional filter properties for this test object class.
The Smart Identification mechanism uses these
properties in the specified order to narrow down the
object candidate list to one object.
Up and Down arrows. Enable you to set the
preferred order for the Optional Filter Properties list.
When QuickTest uses Smart Identification, it creates
a list of possible candidate objects according the
Base Filter Properties, and then checks the values of
the Optional Filter Properties one by one according
to the order you set, until it narrows down the
candidate list to one object.
Add/Remove
292
Opens the Add/Remove Properties Dialog Box,
enabling you to modify the list of properties learned
for Smart Identification for this test object class. For
more information, see "Add/Remove Properties
Dialog Box" on page 287.
8
Object Repository Comparison Tool
This chapter includes:
Concepts
➤
Object Repository Comparison Tool Overview on page 294
Tasks
➤
How to Compare Two Object Repositories on page 296
Reference
➤
Object Repository Comparison Tool Main Window on page 298
➤
New Comparison Dialog Box on page 312
293
Chapter 8 • Object Repository Comparison Tool
Concepts
Object Repository Comparison Tool Overview
The QuickTest Object Repository Comparison Tool enables you to compare
two shared object repositories, and view the differences in their objects,
such as different object names, different test object descriptions, and so on.
The tool is accessible from the Object Repository Manager.
Differences between objects in the two object repository files are identified
according to default rules. During the comparison process, the object
repository files remain unchanged. For more information about the types of
comparisons identified by the Object Repository Comparison Tool, see
"Understanding Object Differences" on page 309.
After the comparison process, the Comparison Tool provides a graphic
presentation of the objects in the object repositories, which are shown as
nodes in a hierarchy. Objects that have differences, as well as unique objects
that are included in one object repository only, can be identified according
to a color configuration that you can specify. Objects that are included in
one object repository only are indicated in the other object repository by
the text "Does not exist". You can also view the properties and values of each
object that you select in either object repository.
You can use the information displayed by the Object Repository
Comparison Tool when managing or merging object repositories. For more
information, see Chapter 9, "Object Repository Merge Tool."
This section also includes:
294
➤
"When to Use the Object Repository Comparison Tool" on page 295
➤
"Understanding the Repository Panes" on page 295
Chapter 8 • Object Repository Comparison Tool
When to Use the Object Repository Comparison Tool
In addition to this tool, you can perform merge and comparison operations
using the Asset Comparison Tool and the Object Repository Merge Tool.
Consider the following when selecting which tool to use:
➤
The Object Repository Comparison Tool is designed for comparing
repositories that are different, but have a set of overlapping objects. This
tool is useful if you want to decide whether to merge two repositories
without performing the actual merge and addressing object conflicts in
the Object Repository Merge Tool. For details, see "How to Compare Two
Object Repositories" on page 296 and "Object Repository Merge Tool" on
page 315.
➤
The Asset Comparison Tool can also compare two repositories, but it is
designed for comparing different versions of the same repository to
identify changes between versions. For details, see "Viewing and
Comparing Versions of QuickTest Assets" on page 1073.
Understanding the Repository Panes
The object repository panes of the Object Repository Comparison Tool
display the hierarchies of the objects, and their properties and values, in the
object repository files that you are comparing. The file path is shown above
each object hierarchy.
To make it easier to see the status of an object at a glance, the text and
background of object names in the object repositories are displayed using
different colors, according to the type of comparison found.
The Object Repository Comparison Tool enables you to navigate the two
object repositories independently. You can also resize the various panes to
display only some of the objects contained in the object repositories. When
using large object repositories, this can result in the various panes displaying
different areas of the object repository hierarchies, making it difficult to
locate and track specific objects affected by the comparison process. You can
synchronize the object repositories to display the same object in both views.
295
Chapter 8 • Object Repository Comparison Tool
Tasks
How to Compare Two Object Repositories
This task describes how to compare two object repositories according to
predefined settings that define how comparisons between objects are
identified.
This task includes the following steps:
➤
"Prerequisites" on page 296
➤
"Select the Shared Object Repositories to compare" on page 297
➤
"Analyze the initial comparison results" on page 297
➤
"Analyze the detailed comparison results" on page 297
➤
"Utilize additional tools to help you perform the comparison - Optional"
on page 297
1 Prerequisites
296
➤
Determine the shared object repositories you want to compare.
Generally, shared object repositories should contain objects from the
same application, and may have differences in objects or test object
descriptions because the repositories were created at different times or
under different circumstances.
➤
Make sure that the Object Repository Manager window is open. For
information on working with the Object Repository Manager, see
"Object Repository Manager Main Window" on page 247.
➤
Make sure the color settings are configured to match your needs. For
details, see "Color Settings Dialog Box (Object Repository Comparison
Tool)" on page 311.
Chapter 8 • Object Repository Comparison Tool
2 Select the Shared Object Repositories to compare
a In the Object Repository Manager window, select Tools > Object
Repository Comparison Tool to open the Object Repository
Comparison Tool. The New Comparison Dialog Box (described on
page 312) opens.
b Specify the two object repository files you want to compare.
3 Analyze the initial comparison results
After the comparison is complete, you can view the results summary in
the Comparison Statistics Dialog Box (described on page 308).
4 Analyze the detailed comparison results
Review and analyze the comparisons between the repositories in the
Object Repository Comparison Tool Main Window (described on
page 308).
5 Utilize additional tools to help you perform the
comparison - Optional
➤
Synchronize the object repositories to display the same object in both
views by clicking the Synchronized Nodes button using the Menu
Commands and Toolbar Buttons (described on page 299).
➤
Filter the objects and show only the objects that you want to view
using the Filter Dialog Box (Object Repository Comparison Tool)
(described on page 304).
➤
Locate one or more objects in a selected object repository whose name
contains a specified string using the Find Dialog Box (Object
Repository Comparison Tool) (described on page 306).
➤
Adjust the colors of text and background of object names, and empty
nodes representing objects that exist in the other object repository
only, using the Color Settings Dialog Box (Object Repository
Comparison Tool) (described on page 311).
297
Chapter 8 • Object Repository Comparison Tool
Reference
Object Repository Comparison Tool Main Window
This window displays the two repositories selected for comparison and
provides tools for analyzing the comparison.
298
Chapter 8 • Object Repository Comparison Tool
To access
In the Object Repository Manager, select
Tools > Object Repository Comparison Tool.
Important
information
➤ You cannot work with the Object Repository Manager
or the Object Repository Merge Tool while the Object
Repository Comparison Tool is open.
➤ The Object Repository Comparison Tool gives
precedence to matching test object descriptions over
the matching of test object names.
Relevant tasks
"How to Compare Two Object Repositories" on page 296
The Object Repository Comparison Tool window contains the following key
elements:
➤
"Menu Commands and Toolbar Buttons" on page 299
➤
"Repository Panes" on page 302
➤
"Test Object Details Areas" on page 303
➤
"Status Bar" on page 303
Menu Commands and Toolbar Buttons
File Menu
Command
Shortcut Key
Function
New Comparison
CTRL+N
Opens the New Comparison Dialog
Box (described on page 312),
enabling you to specify two object
repositories on which to perform a
new comparison operation.
ALM/QC
Connection
Enables you to connect the Object
Repository Comparison Tool to a
Quality Center project. For more
information, see "HP ALM
Connection Dialog Box" on
page 1041.
Exit
Closes the Object Repository
Comparison Tool window.
299
Chapter 8 • Object Repository Comparison Tool
View Menu
Command
Function
Statistics
Opens the Comparison Statistics Dialog Box
(described on page 308), which summarizes the
comparison between the two repositories,
including the number and type of any differences
found.
Collapse All
Collapses the entire hierarchy in both comparison
panes.
Tip: While Synchronized Nodes is on,
double-clicking an expanded node collapses it in
both panes simultaneously.
Expand All
Expands the entire hierarchy in both comparison
panes.
Tip: Double-clicking a collapsed node expands it
in both panes simultaneously.
Navigate Menu
300
Command
Shortcut Key
Function
Next Difference
F4
Finds the next difference between
objects in the object repositories.
Previous
Difference
SHIFT+F4
Finds the previous difference
between objects in the object
repositories.
Find
CTRL+F
Opens the Find Dialog Box (Object
Repository Comparison Tool)
(described on page 306).
Find Next
F3
Finds the next object in the object
repositories according to the search
specifications in the Find dialog box.
Find Previous
SHIFT+F3
Finds the previous object in the
object repositories according to the
search specifications in the Find
dialog box.
Chapter 8 • Object Repository Comparison Tool
Tools Menu
Command
Function
Synchronized
Nodes
Enables you to navigate the two object repository panes
simultaneously or independently of one another.
Filter
Opens the Filter Dialog Box (Object Repository
Comparison Tool) (described on page 304), enabling
you to specify the comparison types that you want to
show.
Possible values:
➤ OFF
. Indicates that the object repositories are not
filtered and all objects are shown.
➤ ON
. Indicates a filter is active and that some
objects may have been filtered out of the display.
Color Settings
Opens the Color Settings Dialog Box (Object Repository
Comparison Tool) (described on page 311), enabling
you to specify the text and background color of the
object names and empty nodes displayed in the
comparison panes.
Help Menu
Command
Shortcut Key
Function
Object Repository
Comparison Tool Help
F1
Opens the Object Repository
Comparison Tool Help.
301
Chapter 8 • Object Repository Comparison Tool
Repository Panes
The repository panes display a hierarchical view of the objects in the object
repositories being compared. The differences and similarities between
objects in the two panes are indicated by colored text and background
colors for each object.
Differences can also be identified by the icons displayed to the left of the
objects in the object repository panes, as follows:
UI Elements
Description
The number of objects that are unique to the first file.
The number of objects that are unique to the second file.
The number of objects in the first and second file that are
not identical, but partially match.
For more information on all comparison types, see "Understanding Object
Differences" on page 309.
The object repository panes provide the following functionality:
302
➤
While in Synchronized Nodes mode, when you select an object in one
object repository pane, the corresponding object in the other file
hierarchy is located and highlighted. You can press the CTRL button when
you select an object to highlight only the selected object without
highlighting the corresponding object in the other file.
➤
When you select an object in an object repository pane, its properties and
values are displayed in the respective Test object details area at the
bottom of the pane.
➤
When you position your cursor over an icon to the left of an object in an
object repository pane, the comparison details are displayed as a tooltip,
for example, Partial match, or Unique to second file.
Chapter 8 • Object Repository Comparison Tool
➤
You can expand or collapse the hierarchy of a parent node by
double-clicking the node, or by clicking the expand (+) or collapse (-)
symbol to the left of the node name. You can also expand or collapse the
entire hierarchy in the object repository pane by choosing Collapse All or
Expand All from the View menu.
➤
You can jump directly to the next or previous difference in the object
repository hierarchy by choosing Next Difference or Previous Difference
from the Navigate menu, by clicking the Next Difference or Previous
Difference buttons in the toolbar, or by using keyboard shortcuts. For
more information about shortcuts, see "Menu Commands and Toolbar
Buttons" on page 299.
➤
You can drag the edges of the panes to resize them in the Object
Repository Comparison Tool window.
Test Object Details Areas
Shows the properties and values of the object selected in an object
repository pane. For more information, see "Understanding the Repository
Panes" on page 295.
Status Bar
Shows the status of the comparison process and details of the comparisons
found during the object repository comparison.
User interface elements of the status bar are described below (unlabeled
elements are shown in angle brackets):
UI Elements
Description
<progress bar>
Displays the comparison process status on the left of the
status bar. Ready is displayed when the process is
complete.
ALM/QC Connection. Displayed when QuickTest is
connected to a Quality Center project.
303
Chapter 8 • Object Repository Comparison Tool
UI Elements
Description
<filter>
Opens the Filter Dialog Box (Object Repository
Comparison Tool) (described on page 304). The icon
image indicates the filter status of the repository panes.
Possible values:
➤ OFF
. Indicates that the object repositories are not
filtered and all objects are shown.
➤ ON
. Indicates a filter is active and that some
objects may have been filtered out of the display.
The number of objects that are unique to the first file.
The number of objects that are unique to the second file.
The number of objects in the first and second file that are
not identical, but partially match.
This section also includes:
➤
"Filter Dialog Box (Object Repository Comparison Tool)" on page 304
➤
"Find Dialog Box (Object Repository Comparison Tool)" on page 306
➤
"Comparison Statistics Dialog Box" on page 308
➤
"Color Settings Dialog Box (Object Repository Comparison Tool)" on
page 311
➤
"New Comparison Dialog Box" on page 312
Filter Dialog Box (Object Repository Comparison Tool)
This dialog box enables you to filter objects in the repository panes of the
Object Repository Comparison Tool Main Window. For more information,
see "Object Repository Comparison Tool Main Window" on page 298.
304
Chapter 8 • Object Repository Comparison Tool
To access
In the Object Repository Comparison Tool, do one of the
following:
➤ Select Tools > Filter.
➤ Click the Filter
Important
information
button in the toolbar.
➤ To view all the objects in both object repositories, select all of
the check boxes.
➤ After closing the dialog box, the Filter icon in the status bar
indicates the filter status of the repository panes.
Possible values:
➤ OFF
. Indicates that the object repositories are not
filtered and all objects are shown.
➤ ON
. Indicates a filter is active and that some objects
may have been filtered out of the display.
Relevant tasks
"How to Compare Two Object Repositories" on page 296
See also
"Understanding the Repository Panes" on page 295
User interface elements are described below:
UI Elements
Description
Identical
objects
Instructs the Object Repository Comparison tool to display
objects that appear in both object repository files and have no
differences in their name or in their properties.
Unique
objects
Instructs the Object Repository Comparison tool to display
objects that appear only in the first or only in the second object
repository file.
Partial
match
objects
Instructs the Object Repository Comparison tool to display
objects that are similar but have name or description differences.
305
Chapter 8 • Object Repository Comparison Tool
Find Dialog Box (Object Repository Comparison Tool)
This dialog box enables you to find objects in the selected object repository
pane according to predefined search criteria.
To access
In the Object Repository Comparison Tool, click the
object repository pane that contains the required object
and do one of the following:
➤ Select Navigate > Find.
➤ Click the Find
306
button in the toolbar.
Important
information
After you set the Find options, you can close the Find
dialog box and use menu commands, toolbar buttons, or
shortcut keys to navigate to the next or previous node
that matches your search criteria. For more information,
see "Menu Commands and Toolbar Buttons" on
page 299.
Relevant tasks
"How to Compare Two Object Repositories" on page 296
See also
"Understanding the Repository Panes" on page 295
Chapter 8 • Object Repository Comparison Tool
User interface elements are described below:
UI Elements
Description
Object name
contains
The full or partial name of the object you want to find.
Criteria
The criteria to use to refine your search.
The following criteria are available:
➤ All objects
➤ Unique objects
➤ Partial match objects
➤ Unique or partial match objects
Match case
Instructs the Object Repository Comparison tool to
distinguish between upper-case and lower-case characters
in the search. When Match case is selected, QuickTest
finds only those occurrences with the exact capitalization
match to the text you entered in the Object name
contains box.
Match whole word
Instructs the Object Repository Comparison tool to
search only for whole word occurrences that match the
text you entered in the Find Objects dialog box, and not
as part of larger words.
Direction
The direction from the current cursor location in which
you want to search. The following options are available:
➤ Up
➤ Down
The Find operation continues to search the entire file
after it reaches the beginning or end of the object
repository.
Find Next
Highlights the next object that matches the specified
criteria in the object repository.
307
Chapter 8 • Object Repository Comparison Tool
Comparison Statistics Dialog Box
This dialog box lists the quantity for each type of comparison identified by
the Object Repository Comparison Tool.
To access
In the Object Repository Comparison Tool, do one of the
following:
➤ Select View > Statistics.
➤ Click the Statistics button
308
in the toolbar.
Important
information
The icons displayed for each comparison type in the object
statistics are the same as those used in the object repository
panes. For more information, see "Understanding Object
Differences" on page 309.
Relevant tasks
"How to Compare Two Object Repositories" on page 296
See also
"Understanding the Repository Panes" on page 295
Chapter 8 • Object Repository Comparison Tool
User interface elements are described below:
UI Elements
Description
Object Statistics
The number and type of objects meeting each
comparison criteria. Comparison types are described in
"Understanding Object Differences" on page 309.
Open this dialog box
automatically after
comparisons
Indicates whether the Statistics dialog box is
automatically displayed every time the Object Repository
Comparison Tool completes a comparison.
Go to first difference
When selected, the Comparison tool highlights the first
difference in the object repositories immediately after
you close the Statistics dialog box.
Understanding Object Differences
The Comparison Tool automatically identifies objects during the
comparison process by classifying them into one of the following types:
➤
Identical. Objects that are identical in both object repository files.
➤
Unique to first file, or Unique to second file. Objects that appear in only
one of the object repository files.
➤
Test objects with identical descriptions and different names. Test objects
that appear in both object repository files that have different names, but
the same description properties and values.
➤
Test objects with similar descriptions. Test objects that appear in both
object repository files that have similar, but not identical, description
properties and values. One of the test objects always has a subset of the
properties set of the other test object. This implies that it is likely to be a
less detailed description of the same test object. For example, a test object
named Button in the second object repository has the same description
properties and values as a test object named Button in the first object
repository, but also has additional properties and values.
309
Chapter 8 • Object Repository Comparison Tool
Test objects that do not have any description properties, such as Page or
Browser objects, are compared by name only. If the same test object is
contained in both object repositories but with different names, they will
be shown in the object repositories as two separate objects.
Note: Test objects with different visual relation identifier definitions are
treated as objects with different descriptions.
➤
Checkpoint or output objects with the same name and different content.
This option is relevant for checkpoint and output objects that are not
completely identical for all settings.
➤
Does not exist. Objects that do not exist in one of the repository files, but
do exist in the other file.
Object differences can also be viewed in the Object Repository Comparison
Tool Main Window (described on page 298), according to settings defined in
the Color Settings Dialog Box (Object Repository Comparison Tool)
(described on page 311).
310
Chapter 8 • Object Repository Comparison Tool
Color Settings Dialog Box (Object Repository
Comparison Tool)
This dialog box enables you to define text and background color settings to
help differentiate between the compared objects.
To access
In the Object Repository Comparison Tool, do one of the
following:
➤ Select Tools > Color Settings.
➤ Click the Color Settings
button in the toolbar.
Relevant tasks
"How to Compare Two Object Repositories" on page 296
See also
"Understanding the Repository Panes" on page 295
311
Chapter 8 • Object Repository Comparison Tool
User interface elements are described below (unlabeled elements are shown
in angle brackets):
UI Elements
Description
<comparison types>
The list of comparison options on the left side of the
dialog box. Difference types are described in
"Understanding Object Differences" on page 309.
Test Color
Displays the current color used for the object names
matching the corresponding comparison type.
Background Color
Displays the current color used for the repository pane
rows matching the corresponding comparison type.
New Comparison Dialog Box
This dialog box enables you to select two object repositories to compare.
To access
In the Object Repository Comparison Tool, do one of the
following:
➤ Select File > New Comparison.
➤ Click the New Comparison
button in the toolbar.
Note: This dialog box also opens automatically when you initially
open the Object Repository Comparison Tool Main Window
(described on page 298).
312
Chapter 8 • Object Repository Comparison Tool
Important
information
➤ The object repository files can be located in the file system or
Quality Center. By default, the boxes display the last files
selected for comparison.
➤ If you want to compare an object repository that was last saved
using a version of QuickTest earlier than version 9.0, you must
first open and save the repository in the Object Repository
Manager to update it to the new format.
➤ If you want to change the color settings before comparing the
object repositories, click Cancel to close the New Comparison
dialog box, change the settings as described in "How to
Compare Two Object Repositories" on page 296, and then
perform the comparison.
Relevant
tasks
"How to Compare Two Object Repositories" on page 296
User interface elements are described below:
UI Elements
Description
First file
The file path for the first object repository.
Second file
The file path for the second object repository.
Warning icon. Displayed next to the relevant text box if you enter
the name of a file without a .tsr suffix, a file with an incorrect
path, or a file that does not exist.
Tip: Position your pointer over the icon to see a tooltip
explanation of the error. Supply an existing .tsr file with the
correct path.
313
Chapter 8 • Object Repository Comparison Tool
314
9
Object Repository Merge Tool
This chapter includes:
Concepts
➤
Object Repository Merge Tool Overview on page 316
➤
Object Conflicts on page 318
Tasks
➤
How to Merge Two Shared Object Repositories on page 322
➤
How to Update a Shared Object Repository From a Local Object
Repository on page 325
Reference
➤
New Merge Dialog Box on page 328
➤
Object Repository Merge Tool Main Window on page 330
➤
Settings Dialog Box (Object Repository Merge Tool) on page 346
➤
Object Repository Merge Tool - Multiple Merge Window on page 351
➤
Update from Local Repository Dialog Box on page 354
315
Chapter 9 • Object Repository Merge Tool
Concepts
Object Repository Merge Tool Overview
QuickTest Professional enables you to merge two shared object repositories
into a single shared object repository using the Object Repository Merge
Tool.
This tool also enables you to merge objects from the local object repository
of one or more components into a shared object repository. For example, if
QuickTest learned objects locally in a specific component, you may want to
add the objects to the shared object repository, so that they are available to
all components that use that object repository.
When to Merge Shared Object Repositories
When you have multiple shared object repositories that contain test objects
from the same area of your application, it may be useful to combine those
test objects into a single object repository for easier maintenance. You could
do this by manually moving or copying objects in the Object Repository
Manager. However, if you have test objects in different object repositories
that represent the same object in your application, and the descriptions for
these objects in the different object repositories are not identical, it may be
difficult to recognize and handle these conflicts.
The Object Repository Merge Tool helps you to solve the above problem by
merging two selected object repositories for you and providing options for
addressing test objects with conflicting descriptions. Using this tool, you
merge two shared object repositories (called the primary object repository
and the secondary object repository), into a new, third object repository,
called the target object repository. Objects in the primary and secondary
object repositories are automatically compared and then added to the target
object repository according to configurable rules that define the defaults for
how conflicts between objects are resolved.
316
Chapter 9 • Object Repository Merge Tool
After the merge process, the Object Repository Merge Tool provides a
graphic presentation of the original objects in the primary and secondary
object repositories, which remain unchanged, as well as the objects in the
merged target object repository. Objects that had conflicts are highlighted.
The conflict of each object that you select in the target object repository is
described in detail. The Object Repository Merge Tool provides specific
options that enable you to keep the default resolution for each conflict, or
modify conflict resolutions individually, according to your requirements.
For more information, see "How to Merge Two Shared Object Repositories"
on page 322.
Note: If you want to compare two shared object repositories without
merging, you can use the Object Repository Comparison Tool. For details,
see "Object Repository Comparison Tool Overview" on page 294.
When to Update a Shared Object Repository from Local
Object Repositories
You can update a shared object repository by merging local object
repositories associated with one or more components (via their application
area) into the shared object repository. The objects that are merged from the
local object repositories are then available to any components that use that
shared object repository.
In the merge process, the objects in the local object repository for the
selected components are moved to the target shared object repository (and
removed from the local object repository). The component’s steps then use
the objects from the updated shared object repository.
You can view or change how conflicting objects are dealt with during the
update process in the Settings dialog box. For more information, see
"Settings Dialog Box (Object Repository Merge Tool)" on page 346.
317
Chapter 9 • Object Repository Merge Tool
If you choose to merge local object repositories from more than one
component, QuickTest performs multiple merges, merging each
component’s local object repository with the target object repository one at
a time, for all the components in the list. You can view and modify the
results of each merge if necessary.
For more information, see "How to Update a Shared Object Repository From
a Local Object Repository" on page 325.
Object Conflicts
Merging two object repositories can result in conflicts arising from
similarities between the objects they contain.
Conflicts between objects in the primary and secondary object repositories
are resolved automatically by the Object Repository Merge Tool according to
the default resolution settings that you can configure before performing the
merge. For more information, see "Settings Dialog Box (Object Repository
Merge Tool)" on page 346.
Conflicts between checkpoint or output value objects with the same name
but different content are always resolved by merging both objects into the
new repository and renaming one of them.
The Object Repository Merge Tool also allows you to change the way the
merge was performed for each individual object that causes a conflict.
Example:
An object in the primary object repository could have the same name as an
object in the secondary object repository, but have a different description.
You may have defined in the default settings that in this case, the object
with the more generic object description, meaning the object with fewer
properties, should be added to the target object repository. However, when
you review the conflicts after the automatic merge, you could decide to
handle a specific conflict differently, for example, by keeping both objects.
318
Chapter 9 • Object Repository Merge Tool
Changes that you make to the default conflict resolution can themselves
affect the target object repository by causing new conflicts. In the above
example, keeping both objects would cause a name conflict. Therefore, the
target object repository is updated after each conflict resolution change and
redisplayed.
The Object Repository Merge Tool identifies three possible conflict types:
➤
"Different Objects with the Same Name Conflict" on page 319
➤
"Identical Description Different Name Conflict (Test Objects Only)" on
page 320
➤
"Similar Description Conflict (Test Objects Only)" on page 321
Different Objects with the Same Name Conflict
An object in the primary object repository and an object in the secondary
object repository have the same name, but completely different content.
You can resolve this conflict type by:
➤
Keeping the object added from the primary object repository only.
➤
Keeping the object added from the secondary object repository only.
➤
Keeping the objects from both object repositories. In this case, the Object
Repository Merge Tool automatically renames the object that is added
from the secondary file by adding an incremental numeric suffix to the
name, for example, Edit_1.
➤
Ignoring the object from the local object repository and keeping the
object from the shared object repository (when updating a shared object
repository from a local object repository).
319
Chapter 9 • Object Repository Merge Tool
By default, the conflict resolution settings for conflicts of this type are
configured so that the target object repository takes the object from both
files. The object that is added from the secondary file is renamed by adding
an incremental numeric suffix to the name, for example, Edit_1. For
information on changing the default settings, see "Settings Dialog Box
(Object Repository Merge Tool)" on page 346.
Note: Test objects with different visual relation identifier definitions are
treated as objects with different descriptions.
Identical Description Different Name Conflict (Test
Objects Only)
A test object in the primary object repository and a test object in the
secondary object repository have different names, but the same description
properties and values.
You can resolve this conflict type by:
➤
Taking the test object name from the object in the primary object
repository.
➤
Taking the test object name from the object in the secondary object
repository.
➤
Ignoring the test object from the local object repository and keeping the
test object from the shared object repository (when updating a shared
object repository from a local object repository).
By default, the conflict resolution settings for conflicts of this type are
configured so that the target object repository takes the object name from
the primary source file. For information on changing the default settings,
see "Settings Dialog Box (Object Repository Merge Tool)" on page 346.
320
Chapter 9 • Object Repository Merge Tool
Similar Description Conflict (Test Objects Only)
A test object in the primary object repository and a test object in the
secondary object repository have the same name, and they have similar, but
not identical, description properties and values. One of the test objects
always has a subset of the properties set of the other test object. For
example, a test object named Button in the secondary object repository has
the same description properties and values as a test object named Button in
the primary object repository, but also has additional properties and values.
You can resolve this conflict type by:
➤
Keeping the test object added from the primary object repository only.
➤
Keeping the test object added from the secondary object repository only.
➤
Keeping the test objects from both object repositories. In this case, the
Object Repository Merge Tool automatically renames the test object that
is added from the secondary file by adding an incremental numeric suffix
to the name, for example, Button_1.
➤
Ignoring the test object from the local object repository and keeping the
test object from the shared object repository (when updating a shared
object repository from a local object repository).
By default, the conflict resolution settings for conflicts of this type are
configured so that the target object repository takes the test object that has
fewer identifying properties than the test object with which it conflicts. For
information on changing the default settings, see "Settings Dialog Box
(Object Repository Merge Tool)" on page 346.
321
Chapter 9 • Object Repository Merge Tool
Tasks
How to Merge Two Shared Object Repositories
This task describes how to merge two shared object repositories according to
predefined settings that define how conflicts between objects are resolved.
This task includes the following steps:
➤
"Prerequisites" on page 322
➤
"Select the shared object repositories to merge" on page 323
➤
"Analyze the initial merge results" on page 323
➤
"Analyze the detailed merge results" on page 323
➤
"Utilize additional tools to help you perform the comparison (Optional)"
on page 323
➤
"Adjust object conflict resolutions" on page 324
➤
"Save the target object repository" on page 324
➤
"Associate the target object repository with application areas" on page 324
1 Prerequisites
322
➤
Determine the shared object repositories you want to compare. You
generally merge two shared object repositories that contain objects
from the same application, and that may have differences in objects or
test object descriptions because the repositories were created at
different times or under different circumstances.
➤
Make sure that the Object Repository Manager window is open. For
information on working with the Object Repository Manager, see
"Object Repository Manager Main Window" on page 247.
➤
Make sure the resolution and color settings are configured to match
your needs. For details, see "Resolution Tab (Settings Dialog Box Object Repository Merge Tool)" on page 347 and "Colors Tab (Settings
Dialog Box - Object Repository Merge Tool)" on page 349.
Chapter 9 • Object Repository Merge Tool
2 Select the shared object repositories to merge
a In the Object Repository Manager window, select Tools > Object
Repository Merge Tool to open the Object Repository Merge Tool. The
New Merge Dialog Box (described on page 328) opens.
b Specify the two object repository files you want to merge.
3 Analyze the initial merge results
After the merge is complete, you can view the results summary in the
Merge Statistics Dialog Box (described on page 339).
4 Analyze the detailed merge results
Review and analyze the merge between the repositories in the Object
Repository Merge Tool Main Window (described on page 330).
5 Utilize additional tools to help you perform the comparison
(Optional)
➤
Change the view presented by the Object Repository Merge Tool
according to your working preferences, by dragging the edges of the
panes to resize them, or selecting the appropriate option from the
View menu, as described in "Object Repository Merge Tool Main
Window" on page 330.
➤
Filter the objects and show only the objects that you want to view by
using the Filter Dialog Box (Object Repository Merge Tool) (described
on page 336).
➤
Locate one or more objects in a selected object repository whose name
contains a specified string using the Find Dialog Box (Object
Repository Merge Tool) (described on page 337).
323
Chapter 9 • Object Repository Merge Tool
6 Adjust object conflict resolutions
If one or more of the merge resolutions does not match your needs,
follow the steps below to adjust them:
a In the target object repository, select an object that had a conflict, as
indicated by the icon to the left of the object name. The conflicting
objects are highlighted in the source object repositories.
A description of the conflict and the resolution method used by the
Object Repository Merge Tool is described in the Resolution Options
pane. A radio button for each possible alternative resolution method is
displayed. For information on each of the conflict types, see "Object
Conflicts" on page 318.
b In the Resolution Options pane, select a radio button to choose an
alternative resolution method. The target object repository is updated
according to your selection and redisplayed.
c In the Resolution Options pane, click the Previous Conflict or Next
Conflict buttons to jump directly to the next or previous conflict in the
target object repository hierarchy.
7 Save the target object repository
When the object conflicts are resolved satisfactorily, save the new merged
shared object repository. QuickTest saves the object repository with a .tsr
extension in the specified location and displays the file name and path
above the target object repository in the Object Repository Merge Tool
window.
If you are connected to Quality Center, you can save your merged shared
object repository in the Test Resources module of your project.
8 Associate the target object repository with application areas
You can now associate the new merged object repository with application
areas, especially ones that were previously associated with the original
object repositories, so that the objects in the object repository can be
accessed by the components.
324
Chapter 9 • Object Repository Merge Tool
How to Update a Shared Object Repository From a Local
Object Repository
This task describes how to add the objects from a local object repository to a
shared object repository.
This task includes the following steps:
➤
"Prerequisites" on page 325
➤
"Select the shared object repository into which you want to merge the
local repositories" on page 326
➤
"Analyze the initial merge results" on page 326
➤
"Analyze the detailed merge results" on page 326
➤
"Utilize additional tools to help you perform the comparison (Optional)"
on page 326
➤
"Adjust object conflict resolutions" on page 327
➤
"Save the target object repository" on page 327
1 Prerequisites
➤
Make sure that the shared object repository you want to update from
the local object repository is already associated with the relevant
component.
➤
Make sure the component containing the local object repository is
closed.
➤
Make sure that the Object Repository Manager window is open. For
information on working with the Object Repository Manager, see
"Object Repository Manager Main Window" on page 247.
➤
Make sure the resolution and color settings are configured to match
your needs. For details, see "Resolution Tab (Settings Dialog Box Object Repository Merge Tool)" on page 347 and "Colors Tab (Settings
Dialog Box - Object Repository Merge Tool)" on page 349.
325
Chapter 9 • Object Repository Merge Tool
2 Select the shared object repository into which you want to
merge the local repositories
a In the Object Repository Manager, open the shared object repository
into which you want to merge the local repositories. If the object
repository opened in read-only mode, select Enable Editing.
b Select Tools > Update from Local Repository to open the Update from
Local Repository Dialog Box (described on page 354), and then select
the local object repositories to add.
3 Analyze the initial merge results
View the initial merge results in the "Merge Statistics Dialog Box" on
page 339.
4 Analyze the detailed merge results
Review and analyze the detailed merge results in the "Object Repository
Merge Tool - Multiple Merge Window" on page 351.
5 Utilize additional tools to help you perform the comparison
(Optional)
326
➤
Change the view presented by the Object Repository Merge Tool
according to your working preferences, by dragging the edges of the
panes to resize them, or selecting the appropriate option from the
View menu, as described in "Object Repository Merge Tool - Multiple
Merge Window" on page 351.
➤
Filter the objects and show only the objects that you want to view by
using the Filter Dialog Box (Object Repository Merge Tool) (described
on page 336).
➤
Locate one or more objects in a selected object repository whose name
contains a specified string using the Find Dialog Box (Object
Repository Merge Tool) (described on page 337).
Chapter 9 • Object Repository Merge Tool
6 Adjust object conflict resolutions
If one or more of the merge resolutions does not match your needs,
follow the steps below to adjust them:
a In the target object repository, select an object that had a conflict, as
indicated by the icon to the left of the object name. The conflicting
object is highlighted in the local object repository.
A description of the conflict and the resolution method used by the
Object Repository Merge Tool is described in the Resolution Options
pane. A radio button for each possible alternative resolution method is
displayed. For information on each of the conflict types, see "Object
Conflicts" on page 318.
b In the Resolution Options pane, select a radio button to choose an
alternative resolution method. The target object repository is updated
according to your selection and redisplayed.
c In the Resolution Options pane, click the Previous Conflict or Next
Conflict buttons to jump directly to the next or previous conflict in the
target object repository hierarchy.
7 Save the target object repository
When the object conflicts are resolved satisfactorily, save the new merged
shared object repository. QuickTest saves the object repository with a .tsr
extension in the specified location and displays the file name and path
above the target object repository in the Object Repository Merge Tool
window.
If you are connected to Quality Center, you can save your merged shared
object repository in the Test Resources module of your project.
327
Chapter 9 • Object Repository Merge Tool
Reference
New Merge Dialog Box
This dialog box enables you to select two object repositories to merge.
To access
In the Object Repository Merge Tool window, do one of the
following:
➤ Select File > New Merge.
➤ Click the New Merge
button in the toolbar.
Note: This dialog box also opens automatically when you
initially open the Object Repository Merge Tool Main Window
(described on page 330).
328
Chapter 9 • Object Repository Merge Tool
Important
information
➤ An object repository that is currently open by another user is
locked. If you try to merge a locked file, a warning message
displays, but you can still perform the merge because the
merge process does not modify the source files. Note that
changes made to the locked file by the other user may not be
included in the merged object repository.
➤ If this dialog box opens automatically, but you want to
change the configured settings before merging the object
repositories, click Cancel to close the New Merge dialog box,
change the settings as described in "Settings Dialog Box
(Object Repository Merge Tool)" on page 346, and then open
this dialog box again to perform the merge.
➤ To improve efficiency of the merge process, select as your
primary object repository the object repository in which you
have invested the most effort, meaning the object repository
with more objects, object properties, and values.
➤ If you want to merge an object repository that was last saved
using a version of QuickTest earlier than version 9.0, you
must first open and save the repository in the Object
Repository Manager to update it to the new format.
Relevant tasks
"How to Merge Two Shared Object Repositories" on page 322
User interface elements are described below:
UI Elements
Description
Primary file
The file system or Quality Center path for the first object
repository.
Secondary file
The file system or Quality Center path for the second
object repository.
Warning icon. Displayed next to the relevant text box if
you enter the name of a file without a .tsr suffix, a file
with an incorrect path, or a file that does not exist.
Tip: Position your pointer over the icon to see a tooltip
explanation of the error. Supply an existing .tsr file with
the correct path.
329
Chapter 9 • Object Repository Merge Tool
Object Repository Merge Tool Main Window
This window displays the two repositories selected for merging and the
target repository containing the merged content. This window also provides
tools for analyzing the merge and resolving conflicts.
330
Chapter 9 • Object Repository Merge Tool
To access
In the Object Repository Manager, select
Tools > Object Repository Merge Tool.
Important
information
➤ You cannot work with the Object Repository Manager
or the Object Repository Comparison Tool while the
Object Repository Merge Tool is open.
➤ Test objects that do not have description properties,
such as Page or Browser objects, are compared by
name only. If the same object is contained in both the
source object repositories but with different names,
they will be merged into the target object repository as
two separate objects.
Relevant tasks
"How to Merge Two Shared Object Repositories" on
page 322
The Object Repository Merge Tool main window contains the following key
elements:
➤
"Menu Bar and Toolbar" on page 331
➤
"Target Repository Pane" on page 331
➤
"Primary and Secondary Repository Panes" on page 333
➤
"Resolution Options Pane" on page 333
➤
"Status Bar" on page 334
Menu Bar and Toolbar
Displays menus with Object Repository Merge Tool commands. These
commands are described in "Object Repository Merge Tool Menu
Commands and Toolbar Buttons" on page 340.
Target Repository Pane
The target object repository pane displays a hierarchy of the objects, as well
as their respective properties and values, that were merged from the primary
and secondary object repositories. In the column to the left of the object
hierarchy, the pane displays the source file of each object (1 is displayed for
the primary file and 2 for the secondary file), and an icon representing the
type of conflict, if any.
331
Chapter 9 • Object Repository Merge Tool
When you save the target object repository, the file path is displayed above
the object hierarchy.
Note: To make it easier to see the status of an object at a glance, the text
colors of the object names in the target object repository can be set
according to their source and whether they caused a conflict. For more
information, see "Colors Tab (Settings Dialog Box - Object Repository Merge
Tool)" on page 349.
Merging two object repositories can result in a target object repository
containing a large number of objects. To make navigation and the location
of specific objects easier in the target object repository pane, the Object
Repository Merge Tool enables you to filter the objects in the pane and show
only the objects that had conflicts that were resolved during the merge.
The target object repository pane provides the following functionality:
332
➤
When you select an object in the target object repository, the
corresponding object in the primary and/or secondary source file
hierarchy is located and indicated by a check mark.
➤
When you select an object in the target object repository, its properties
and values are displayed in the Object Properties - Target File area at the
bottom of the target object repository pane (View > Target Repository
Object Properties).
➤
If the merge results in a conflict, an icon is displayed to the left of the
conflicting object in the target object repository. You can see a tooltip
description of the conflict type by positioning your pointer over the icon.
➤
When you right-click an object, a context-sensitive menu opens. You can
expand an option or collapse the entire hierarchy in the target object
repository, or, when applicable, you can change the conflict resolution
method and result.
➤
You can expand or collapse the hierarchy of the node by double-clicking a
node. You can also expand or collapse the entire hierarchy in the target
object repository by choosing Collapse All or Expand All from the View
menu.
Chapter 9 • Object Repository Merge Tool
➤
You can jump directly to the next or previous conflict in the target object
repository hierarchy by choosing Next Conflict or Previous Conflict from
the Navigate menu, or by clicking the Next Conflict or Previous Conflict
buttons in the toolbar or Resolution Options pane.
➤
You can locate one or more objects in the target object repository by using
the Find dialog box. For more information, see "Find Dialog Box (Object
Repository Merge Tool)" on page 337.
➤
You can show or hide the target object repository object properties by
choosing View > Target Repository Object Properties.
Primary and Secondary Repository Panes
The primary and secondary object repository panes display the hierarchies
of the objects, and their properties and values, in the original source object
repositories that you chose to merge. The file path is shown above each
object hierarchy.
The panes provide the following functionality:
➤
You can expand or collapse the hierarchy of a selected item by
double-clicking the item.
➤
You can view the properties and values of an object in the Test object
details area by selecting it in the relevant pane.
➤
You can show or hide the panes by selecting or clearing Primary
Repository or Secondary Repository in the View menu.
Resolution Options Pane
The Resolution Options pane provides information about any conflict
encountered during the merge for the object selected in the target object
repository. The pane also provides options that enable you to keep or
change the conflict resolution method that was applied using the default
resolution options.
333
Chapter 9 • Object Repository Merge Tool
The Resolution Options pane provides the following functionality:
➤
When you select a conflicting object in the target object repository, the
pane displays a textual description of the conflict and the resolution
method used by the Object Repository Merge Tool. A choice of alternative
resolution methods is offered.
➤
You can select a radio button to choose an alternative resolution method
for the conflict. Every time you make a change, the target object
repository is automatically updated and is redisplayed.
➤
You can jump directly to the next or previous conflict in the target object
repository hierarchy by clicking the Previous Conflict or Next Conflict
buttons.
➤
For a local object repository merge, you can click the Ignore Object
button to exclude a specific local object repository object from the merge
process. The object remains in the local object repository when the merge
is complete.
➤
You can show or hide the pane by selecting or clearing Resolution
Options in the View menu.
Status Bar
The status bar shows the following UI elements (unlabeled elements are
shown in angle brackets):
UI Elements
Description
Conflict
number
The conflict number (if any) of the object selected in the target
object repository pane.
<progress bar>
Displayed during the merge process. Ready is displayed when
the merge is complete.
Filter. Displays the filter status of the target object repository
pane. Possible states:
➤ ON. Indicated that a filter is currently in use.
➤ OFF. indicates that the object repositories are not filtered and
all objects are shown.
Note: Click the Filter icon to open the "Filter Dialog Box
(Object Repository Merge Tool)" on page 336.
334
Chapter 9 • Object Repository Merge Tool
UI Elements
Description
ALM/QC Connection. Displayed when QuickTest is connected
to a Quality Center project
Similar Description Conflict. For information on object
conflicts, see "Object Conflicts" on page 318.
Same Name Different Description Conflict. For information on
object conflicts, see "Object Conflicts" on page 318.
Same Description Different Name Conflict. For information on
object conflicts, see "Object Conflicts" on page 318.
This section also includes:
➤
"Filter Dialog Box (Object Repository Merge Tool)" on page 336
➤
"Find Dialog Box (Object Repository Merge Tool)" on page 337
➤
"Merge Statistics Dialog Box" on page 339
➤
"Object Repository Merge Tool Menu Commands and Toolbar Buttons" on
page 340
335
Chapter 9 • Object Repository Merge Tool
Filter Dialog Box (Object Repository Merge Tool)
This dialog box enables you to filter the target repository pane in the Object
Repository Merge Tool Main Window. For more information, see "Object
Repository Merge Tool Main Window" on page 330.
To access
In the Object Repository Merge Tool main window, do
one of the following:
➤ Select Tools > Filter.
➤ Click the Filter
button in the toolbar.
Important
information
The filter only affects which objects are displayed in the
target object repository pane. It does not affect which
objects are included in the target object repository.
Relevant tasks
"How to Merge Two Shared Object Repositories" on
page 322
User interface elements are described below:
336
UI Elements
Description
Show all objects
Instructs the Object Repository Merge Tool to display all
objects in the target object repository
Show only
conflicting objects
Instructs the Object Repository Merge Tool to display
only objects in the target object repository that have
conflicts.
Chapter 9 • Object Repository Merge Tool
Find Dialog Box (Object Repository Merge Tool)
This dialog box enables you to find objects in the target object repository
pane according to predefined search criteria. The located object is also
highlighted in the relevant primary and/or secondary object repositories.
To access
In the Object Repository Merge Tool main window, do
one of the following:
➤ Select Navigate > Find.
➤ Click the Find
button in the toolbar.
Important
information
After you set the Find options, you can close the Find
dialog box and use menu commands or toolbar buttons
to navigate to the next or previous node that matches
your search criteria. For more information, see "Object
Repository Merge Tool Menu Commands and Toolbar
Buttons" on page 340.
Relevant tasks
➤ "How to Merge Two Shared Object Repositories" on
page 322
➤ "How to Update a Shared Object Repository From a
Local Object Repository" on page 325
See also
"Object Conflicts" on page 318
337
Chapter 9 • Object Repository Merge Tool
User interface elements are described below:
UI Elements
Description
Object name
contains
The full or partial name of the object you want to find.
Criteria
The criteria to use to refine your search.
The following criteria are available:
➤ All objects
➤ Objects from one source
➤ Objects with conflicts
➤ Objects with conflicts or from one source
Match case
Instructs the Object Repository Merge Tool to distinguish
between upper-case and lower-case characters in the
search. When Match case is selected, QuickTest finds
only those occurrences with the exact capitalization
match to the text you entered in the Object name
contains box.
Match whole word
Instructs the Object Repository Merge Tool to search only
for whole word occurrences that match the text you
entered in the Find Objects dialog box, and not as part of
larger words.
Direction
The direction from the current cursor location in which
you want to search. The following options are available:
➤ Up
➤ Down
The Find operation continues to search the entire file
after it reaches the beginning or end of the object
repository.
Find Next
338
Highlights the next object that matches the specified
criteria in the target object repository.
Chapter 9 • Object Repository Merge Tool
Merge Statistics Dialog Box
This dialog box displays the result of the merge, and the number and type of
any conflicts that were resolved during the merge.
To access
In the Object Repository Merge Tool main window, do
one of the following:
➤ Select View > Statistics.
➤ Click the Statistics button
in the toolbar.
Important
information
➤ The Statistics dialog box shown after performing an
Relevant tasks
➤ "How to Merge Two Shared Object Repositories" on
Update from Local Repository merge differs slightly
from the dialog box shown above.
page 322
➤ "How to Update a Shared Object Repository From a
Local Object Repository" on page 325
339
Chapter 9 • Object Repository Merge Tool
User interface elements are described below:
UI Elements
Description
Conflicts Found
The number and type of any conflicts between the
objects added to the target object repository. Conflict
types are described in "Object Conflicts" on page 318.
Merge Summary
The number of objects merged from each object
repository during the merge.
Go to first conflict
When selected, the Object Repository Merge Tool
highlights the first conflict in the target object repository
immediately after you close the Statistics dialog box.
Object Repository Merge Tool Menu Commands and
Toolbar Buttons
The tables below describe commands available for:
➤
The Object Repository Merge Tool Main Window (described on page 330),
for merging two shared object repositories
➤
The Object Repository Merge Tool - Multiple Merge Window (described
on page 351), for updating objects from local object repositories
File Menu
Command
340
Shortcut
Key
Function
New Merge
(shared object repositories
merge only)
CTRL+N
Enables you to specify two object
repositories with which to
perform a new merge operation.
Save
(shared object repositories
merge only)
CTRL+S
Saves the merged shared object
repository.
Chapter 9 • Object Repository Merge Tool
Command
Shortcut
Key
Function
Save As
(shared object repositories
merge only)
Opens the Save Shared Object
Repository dialog box, enabling
you to specify a name, file type,
and storage location for the
merged shared object repository.
Save and Merge Next
(update from local
repository only)
When merging multiple local
object repositories, saves the
current merge and merges the
next local object repository.
Revert to Original Merged
Files
(update from local
repository only)
Cancels any manual conflict
resolution adjustments and
returns the target object
repository to the original state at
the time of the merge.
ALM/QC Connection
Enables you to connect
QuickTest to a Quality Center
project. For more information,
see "HP ALM Connection Dialog
Box" on page 1041.
Exit
Closes the Object Repository Merge Tool window. If you did
not yet save the merged
repository, you are prompted to
save it.
341
Chapter 9 • Object Repository Merge Tool
View Menu
342
Command
Function
Primary Repository
Displays the Primary Repository File pane,
containing a hierarchical view of the objects from
the first source object repository that you chose to
merge. Also displays the details for each object
selected in this pane. For more information, see
"Primary and Secondary Repository Panes" on
page 333 and "New Merge Dialog Box" on
page 328.
Secondary
Repository
(shared object
repositories merge
only)
Displays the Secondary Repository File pane,
containing a hierarchical view of the objects from
the second source object repository that you chose
to merge. Also displays the details for each object
selected in this pane. For more information, see
"Primary and Secondary Repository Panes" on
page 333 and "New Merge Dialog Box" on
page 328.
Target Repository
Object Properties
Displays the Object Properties - Target File pane,
which displays the details for each test object
selected in the target repository pane. For more
information, see "Target Repository Pane" on
page 331.
Resolution Options
Displays the Resolution Options pane, which
provides information about any conflict that
occurred during the merge. For more information,
see "Resolution Options Pane" on page 333 and
"Object Conflicts" on page 318.
Restore Default
Layout
Restores the view that you saved using the Set as
Default Layout option (described below). This is
useful if you resize a pane, or show or hide specific
panes and then want to restore your saved view.
For more information, see "Object Repository
Merge Tool Menu Commands and Toolbar
Buttons" on page 340.
Chapter 9 • Object Repository Merge Tool
Command
Function
Set as Default Layout
Enables you to save the current view so that each
time you open the Object Repository - Merge Too,
this view is displayed. If you later modify this view
by resizing panes, or showing or hiding them, you
can restore your default view using the Restore
Default Layout option (described above). For more
information, see "Object Repository Merge Tool
Menu Commands and Toolbar Buttons" on
page 340.
Statistics
Opens the Statistics dialog box, which describes
how the files were merged, and the number and
type of any conflicts that were resolved during the
merge. For more information, see "Merge Statistics
Dialog Box" on page 339.
Collapse All
Collapses the entire hierarchy in the Target Object
Repository pane.
Tip: You can collapse a single node by
double-clicking it.
Expand All
Expands the entire hierarchy in the Target Object
Repository pane.
Tip: You can expand a single node by
double-clicking it.
343
Chapter 9 • Object Repository Merge Tool
Navigate Menu
344
Command
Shortcut Key
Function
Next Conflict
F4
Navigates to the next conflicting
object in the merged object
repository.
Previous
Conflict
SHIFT+F4
Navigates to the previous conflicting
object in the merged object
repository.
Find
CTRL+F
Opens the Find Dialog Box (Object
Repository Merge Tool) (described on
page 337).
Find Next
F3
Navigates to the next object in the
merged object repository according
to the search specifications in the
Find dialog box.
Find Previous
SHIFT+F3
Navigates to the previous object in
the merged object repository
according to the search
specifications in the Find dialog box.
Chapter 9 • Object Repository Merge Tool
Tools Menu
Command
Function
Settings
Opens the Settings dialog box, enabling you to:
➤ Configure how the Object Repository Merge Tool
deals with conflicting objects during a merge
➤ Specify the text color of the object names displayed
in the target object repository
For more information, see "Settings Dialog Box (Object
Repository Merge Tool)" on page 346.
Filter
Opens the Filter dialog box, enabling you to show all of
the objects in the Target Repository pane, or to show
only the objects that had conflicts that were resolved
during the merge. For more information, see "Filter
Dialog Box (Object Repository Merge Tool)" on
page 336.
Help Menu
Command
Shortcut Key
Function
Object Repository
Merge Tool Help
F1
Opens the Object Repository Merge
Tool Help.
345
Chapter 9 • Object Repository Merge Tool
Settings Dialog Box (Object Repository Merge Tool)
The Object Repository Merge Tool uses predefined settings when merging
object repositories or when updating a shared object repository from local
object repositories.
You can change these settings at any time. After you change the settings, all
new merges are performed according to the new settings.
The Settings dialog box contains the following tabs:
➤
Resolution Tab (described on page 347). Enables you to configure how the
Object Repository Merge Tool deals with conflicting objects in the
primary and secondary object repositories (or local and shared object
repositories when updating a shared object repository from local object
repositories).
➤
Colors Tab (described on page 349). Enables you to specify the text color
of the object names that are displayed in the target object repository.
Tip: If the New Merge dialog box opens when you open the Object
Repository Merge Tool, and you want to change the settings before merging
two object repositories, click Cancel to close the New Merge dialog box,
change the settings as described in the next sections, and then open this
dialog box again to perform the merge.
346
Chapter 9 • Object Repository Merge Tool
Resolution Tab (Settings Dialog Box - Object
Repository Merge Tool)
This tab enables you to configure how the Object Repository Merge Tool
automatically deals with conflicting objects during the merge process or
when performing an Update from Local Repository operation.
To access
In the Object Repository Merge Tool, do one of the following:
➤ Select Tools > Settings, and select the Resolution tab.
➤ Click the Settings
button in the toolbar, and select the
Resolution tab.
347
Chapter 9 • Object Repository Merge Tool
Important
information
➤ The resolution settings are relevant only for test objects.
Conflicts between checkpoint or output value objects with the
same name but different content are always resolved by merging
both objects into the new repository and renaming one of
them.
➤ When updating a shared object repository from a local object
repository, the object repositories are referred to as the Local
and Shared object repository.
➤ If you make any change to the resolution settings while a
merged object repository is open, you are asked whether you
want to merge the open files again with the new settings. If you
click No, the new settings will apply only to future merges.
Relevant
tasks
➤ "How to Merge Two Shared Object Repositories" on page 322
➤ "How to Update a Shared Object Repository From a Local Object
Repository" on page 325
See also
➤ "Object Conflicts" on page 318
➤ "Colors Tab (Settings Dialog Box - Object Repository Merge
Tool)" on page 349
User interface elements are described below:
UI Elements
Description
Take test
object
description
that is
Specifies how to resolve conflicts in which two test objects have
the same name, but their descriptions differ. You can specify
that the target object repository takes the test object description
that is more generic or less generic, as follows:
➤ More generic. Instructs the Object Repository Merge Tool to
take the test object that has fewer identifying properties than
the test object with which it conflicts, or uses regular
expressions in its property values. This is the default setting.
➤ Less generic. Instructs the Object Repository Merge Tool to
take the test object that has all the identifying properties of
the test object with which it conflicts, plus additional
identifying properties.
348
Chapter 9 • Object Repository Merge Tool
UI Elements
Description
Take test
object name
from
Specifies how to resolve conflicts where two test objects have
the same or similar descriptions, but their names differ. You can
select the source from which the target test object repository
takes the object name, as follows:
➤ Primary repository file. The target object repository takes the
test object name from the test object in the primary object
repository. This is the default setting. (When updating a
shared object repository from a local object repository, this
option is for the Local object repository.)
➤ Secondary repository file. The target object repository takes
the test object name from the test object in the secondary
object repository. (When updating a shared object repository
from a local object repository, this option is for the Shared
object repository.)
➤ Same file as the object description. The target object
repository takes the object name from the object in the same
object repository from which it took the object description.
Colors Tab (Settings Dialog Box - Object Repository
Merge Tool)
This tab enables you to specify the color in which object names are
displayed in the target object repository according to their source, and
whether they caused a conflict.
349
Chapter 9 • Object Repository Merge Tool
To access
In the Object Repository Merge Tool, do one of the
following:
➤ Select Tools > Settings, and select the Colors tab.
➤ Click the Settings
button in the toolbar, and
select the Colors tab.
Important
information
When performing an Update from Local Repository
operation, the options in the Colors tab of the Settings
dialog box also apply to objects added from the local
(primary) and shared (secondary) object repositories.
Relevant tasks
"How to Merge Two Shared Object Repositories" on
page 322
"How to Update a Shared Object Repository From a Local
Object Repository" on page 325
See also
➤ "Object Conflicts" on page 318
➤ "Resolution Tab (Settings Dialog Box - Object
Repository Merge Tool)" on page 347
User interface elements are described below (unlabeled elements are shown
in angle brackets):
350
UI Elements
Description
<object criteria>
The list of object criteria on the left side of the dialog
box.
Text Color
Displays the current color used for the object names that
match the corresponding object criteria.
Chapter 9 • Object Repository Merge Tool
Object Repository Merge Tool - Multiple Merge Window
This window displays merge results of the selected local object repositories
into the target shared object repository. The local object repositories are
merged one by one into the shared object repository.
The active local object repository is treated as the primary object repository,
and the shared object repository is treated as the target object repository.
To access
In the Object Repository Manager, select Tools > Update from
Local Repository.
351
Chapter 9 • Object Repository Merge Tool
Important
information
➤ If you specified more than one component in the Update from
Local Repository dialog box, QuickTest performs multiple
merges, merging each component’s local object repository with
the target object repository one at a time.
➤ The image above shows the merge results of the first merge (the
local object repository of the first component being merged into
the shared object repository).
➤ The number of each merge set in a multiple merge is displayed
in the title bar, for example, [Set 2 of 3].
➤ When you click Save and Merge Next, the current merge is
saved and cannot be modified without performing another
merge.
➤ The Ignore Object button is visible in the Merge Tool window
only for a local object repository merge, and is only enabled
when an object in the local object repository is selected.
➤ If you are performing multiple merges, click the Save and
Merge Next
button in the Object Repository Merge Tool
toolbar to perform the next merge (the local object repository of
the next component being merged into the shared object
repository).
Relevant
tasks
"How to Update a Shared Object Repository From a Local Object
Repository" on page 325
The Object Repository Merge Tool - Multiple Merge window contains the
following key elements:
➤
"Menu Bar and Toolbar" on page 352
➤
"Target Repository Pane" on page 353
➤
"Primary Repository Pane" on page 353
➤
"Resolution Options Pane" on page 353
➤
"Status Bar" on page 354
Menu Bar and Toolbar
Displays menus of Object Repository Merge Tool commands. These
commands are described in "Object Repository Merge Tool Menu
Commands and Toolbar Buttons" on page 340.
352
Chapter 9 • Object Repository Merge Tool
Target Repository Pane
Displays the objects that were added from the local object repositories to the
shared object repository.
At the left of each object in the target object hierarchy is an icon that
indicates the source of the objects:
UI Elements
Description
Indicates that the object was added from the local object
repository.
Indicates that the object already existed in the shared object
repository.
Primary Repository Pane
Displays the objects in the local object repository that you are currently
merging. For more information, see "Update from Local Repository Dialog
Box" on page 354.
Resolution Options Pane
Provides source, conflict, and resolution details about the objects in the
target object repository pane, and enables you to modify how a selected
conflict is resolved. For more information, see "Resolution Options Pane" on
page 333.
In the Resolution Options pane, you can select from one of the following
options:
➤
Keep a specific object from the shared object repository and delete the
conflicting object from the local object repository.
➤
Keep a specific object from the local object repository and delete the
conflicting object from the shared object repository.
353
Chapter 9 • Object Repository Merge Tool
➤
Keep conflicting objects from both the shared object repository and
the local object repository.
➤
Ignore Object. Exclude a specific local repository object from the
merge process so that it is not included in the shared object repository.
The object is removed from the shared object repository and grayed in
the local object repository tree. It remains in the component’s local
object repository when the merge is complete.
Caution: The Ignore Object operation cannot be reversed. To include
the object again in the merge process, you must repeat the merge by
clicking Revert to Original Merged Files in the toolbar.
Status Bar
Provides source, conflict, and resolution details about the object selected in
the target object repository pane, the filter status, and an icon legend. For
more information, see "Status Bar" on page 334.
Update from Local Repository Dialog Box
This dialog box enables you to select components, whose local object
repositories you want to merge into a shared object repository.
354
Chapter 9 • Object Repository Merge Tool
To access
In the Object Repository Manager, select Tools > Update from
Local Repository.
Important
information
➤ You can select multiple components.
➤ If you are currently connected to a Quality Center project, you
can select components from the file system or from
Quality Center.
➤ You can add components only if you are currently connected to
the Quality Center project in which they are stored. The
components must be associated (via their application area) with
the shared object repository you are updating and their local
object repositories must contain objects.
➤ Before each merge, QuickTest checks whether the local object
repository is in use by another user. If so, the local object
repository is locked and the objects for the selected component
cannot be moved to the target shared object repository. A
warning message is displayed. The merge can be performed
when the local object repository is no longer in use by the other
user.
Relevant
tasks
"How to Update a Shared Object Repository From a Local Object
Repository" on page 325
User interface elements are described below (unlabeled elements are shown
in angle brackets):
UI Elements
Description
<selected
components>
The list of components that contain local object repositories to
include in the merge.
Add Components. Enables you to browse to a component and
add it to the list. Click the down arrow
to browse for
components. (You can browse for components only when
connected to Quality Center).
355
Chapter 9 • Object Repository Merge Tool
UI Elements
Description
Update All
Instructs the Object Repository Merge Tool to automatically
merge the local object repositories with the shared object
repository according to the preconfigured settings and opens the
Object Repository Merge Tool. You can then modify any conflict
resolutions if necessary.
Note: If you selected multiple components, merges are
performed one after the other, and you can review the shared
object repository and modify any conflict resolutions after each
merge.
356
Part III
Defining Functions and Other
Programming Tasks
358
10
Working in Function Library Windows
This chapter includes:
Concepts
➤
The Function Library Window Overview on page 360
➤
Generating Statements in a Function Library on page 361
➤
Bookmarks in a Function Library on page 369
➤
Programmatic Descriptions on page 370
➤
Opening and Closing Applications Programmatically on page 382
➤
Comments, Control-Flow, and Other VBScript Statements on page 383
➤
Retrieving and Setting Identification Property Values on page 384
➤
Native Properties and Operations on page 385
➤
Running DOS Commands on page 387
➤
Choosing Which Steps to Report During the Run Session on page 387
➤
Windows API on page 387
Tasks
➤
How to Navigate in Function Libraries on page 388
➤
How to Enhance Your Function Libraries Using the Windows API
on page 389
Reference
➤
Basic VBScript Syntax on page 392
➤
Report Modes on page 405
➤
Function Library Window User Interface on page 406
359
Chapter 10 • Working in Function Library Windows
Concepts
The Function Library Window Overview
You can use the QuickTest Function Library window to create function
libraries using VBScript. This chapter provides a brief introduction to
VBScript and shows you how to enhance your function libraries using a few
simple programming techniques.
You can create and work with function libraries using the Function Library
window. To learn about working with VBScript, you can view the VBScript
documentation directly from the QuickTest Help menu (Help >
QuickTest Professional Help > VBScript Reference).
You can add statements that perform operations on objects or retrieve
information from your application. For example, you can add a step that
checks that an object exists, or you can retrieve the return value of an
operation.
You can add steps to your test or function library either manually or using
the Step Generator. For more information on using the Step Generator, see
the HP QuickTest Professional User Guide.
You can print a function library at any time. You can also include additional
information in the printout. more information on printing a function
library, see the HP QuickTest Professional User Guide.
360
Chapter 10 • Working in Function Library Windows
Generating Statements in a Function Library
You can generate statements in the following ways:
➤
You can use the Step Generator to add steps that use methods and
functions. For more information, see the HP QuickTest Professional User
Guide.
➤
You can manually insert VBScript statements that perform operations.
QuickTest includes features that help you adhere to the correct syntax
and select the relevant items for your statements.
➤
Statement completion (IntelliSense). This option, when enabled,
helps you select the variable, operation, or property for your statement
and view the relevant syntax as you type in a function library. For
more information, see "Statement Completion (IntelliSense)" on
page 361.
➤
Auto-expand VBScript syntax. When this option is enabled, QuickTest
automatically adds the relevant syntax or blocks to your script, when
you start to type a VBScript keyword in a function library. For more
information, see "Automatic Completion of VBScript Syntax" on
page 368.
Statement Completion (IntelliSense)
When you type in a function library, IntelliSense (the statement completion
feature included with QuickTest) enables you to select items for your
statement from a drop-down list and view the relevant syntax. IntelliSense
provides drop-down lists for the following types of items:
➤
Variables
➤
Operations
➤
Properties
➤
Possible values for arguments (in some cases)
361
Chapter 10 • Working in Function Library Windows
The Statement Completion option is enabled by default. You can disable or
enable this option in the Editor Options dialog box. For more information,
see Chapter 11, "Customizing Function Library Windows."
Tips:
➤
In some cases, QuickTest needs to retrieve IntelliSense information from
an actual object. In such cases, you may experience a delay while typing
in a function library. To avoid this delay, you can disable the statement
completion option.
➤
Although IntelliSense in function library documents is supported to help
generate test object statements, as described below, it is generally not
recommended to include a full object hierarchy statement in a function.
It is preferable to make your functions generic so that they can be used
with different objects.
➤
QuickTest might not display IntelliSense information if the statement is
typed incorrectly and contains syntax errors or other VBScript errors.
➤
If you resize the frame in which the IntelliSense drop-down list is
displayed, QuickTest subsequently uses the new size when it displays
IntelliSense drop-down lists.
➤
To close the IntelliSense drop-down list without selecting from it, press
ESC.
When the Statement Completion option is enabled it provides the
following types of information:
➤
"Available Operations" on page 363
➤
"Operation Syntax" on page 365
➤
"Possible Argument Values" on page 365
➤
"Available Constants and Local Variables" on page 366
For instructions on generating a statement using statement completion in a
function library, see page 366.
362
Chapter 10 • Working in Function Library Windows
Available Operations
If you type a period after a test object (or after the Object property) in a
statement, QuickTest displays a list of the relevant operations, properties,
and registered functions that you can add after the item you typed.
As you type the name of an operation, QuickTest highlights the first
operation (alphabetically) that matches the text you typed. Pressing ENTER
or SPACE enters the highlighted word in the step.
Tip: If you type the name of an operation when the list of available
operations is not displayed, pressing CTRL+SPACE automatically completes
the word if there is only one option, or displays the list and highlights the
first operation (alphabetically) that matches the text you typed. Pressing
ENTER or SPACE enters the highlighted word in the step.
QuickTest provides this type of IntelliSense information, when available, for
test objects, reserved objects, objects you create in your function, variables
to which objects or test objects are assigned, and properties or operations
which return objects.
Available Operations: Guidelines and Considerations
➤
If you type a period after an object that you created in your script (using
the CreateObject method, for example), QuickTest displays the
operations and properties that you can use for that object.
➤
If you use the Object property in your statement and the object data is
currently available in the open application, QuickTest displays the native
operations and properties of the object.
➤
If you type a period within a With statement, QuickTest displays a list of
the operations and properties available for the relevant object.
363
Chapter 10 • Working in Function Library Windows
Note: If you manually type a With statement (as opposed to using a menu
command to create it), you must use the Edit > Advanced > Apply "With"
to Script command (or press CTRL+W) to enable IntelliSense within the
With statement.
➤
If you assign an object to a variable, and then type the name of the
variable followed by a period, QuickTest displays a list of the operations
and properties available for the object.
In some cases, the value of a variable cannot be determined while editing
the test (for example, if the value is set by a conditional assignment or
returned by another function). In this case, QuickTest provides
IntelliSense information according to the most recent line of code in
which the value of the variable could be evaluated, if any.
The following examples illustrate this:
Example 1:
Line 1: Set x = CreateObject("Excel.Application")
Line 2: z = GetValueFromUser()
Line 3: If z = 2 Then
Line 4: Set x = CreateObject("Word.Application")
Line 5: End If
Line 6: x.
While editing this test, QuickTest cannot determine which object will
actually be assigned to x in line 6. However, because the value of x can be
evaluated independently in line 4, QuickTest displays the IntelliSense
information relevant to the object "Word.Application" for the variable x in
line 6.
Example 2:
Line 1: Set x = CreateObject("Excel.Application")
Line 2: Set x = MyGetObject()
Line 3: x.
364
Chapter 10 • Working in Function Library Windows
While editing this test, QuickTest cannot determine the type of object
that the MyGetObject function returns (line 2). Therefore, in line 3 in the
example above, QuickTest displays the IntelliSense information relevant
to the object "Excel.Application", because line 1 is the most recent line of
code in which the value of x could be evaluated. However, if line 2 were
not preceded by a line in which the value could be evaluated, QuickTest
would not display any IntelliSense information for x in line 3.
Operation Syntax
If you type a space after the name of an operation, QuickTest displays the
syntax for it, including its mandatory and optional arguments. When you
add a step that uses an operation, you must define a value for each
mandatory argument associated with the operation.
When you type a comma after an argument value (other than the last one in
the step), QuickTest displays the operation syntax again, bolding the next
argument for which you need to enter a value.
You can also place the cursor on any operation or function that contains
arguments and press CTRL+SHIFT+SPACE or select Edit > Advanced >
Argument Info to display the statement completion (argument syntax)
tooltip for that item.
Possible Argument Values
For certain operations, when you type the space or comma before an
argument that has a predefined list of values, QuickTest displays the list of
possible values.
365
Chapter 10 • Working in Function Library Windows
Available Constants and Local Variables
If you begin to type a constant or a local variable name, QuickTest displays a
list of constants and local variables (relevant to the current programming
scope) that begin with the letters you typed. If there is only one matching
constant or variable defined, QuickTest automatically enters its name in the
step.
Tip: If you press CTRL+SPACE, QuickTest displays a list of the relevant
operations, properties, VBScript functions, user-defined functions, VBScript
constants, and utility objects that you can add.
Example
To generate a statement using statement completion in a function library:
1 Confirm that the Statement completion option is selected (Tools > View
Options > General tab).
2 In the function library, type the full hierarchy of an object, for example:
Browser("Welcome: Mercury Tours").Page("Book a Flight:
Mercury).WebEdit("username")
3 Type a period (.) after the object description, for example ("username").
QuickTest displays a list of the available operations and properties for the
object.
366
Chapter 10 • Working in Function Library Windows
Tips:
➤
As you type the name of an operation, QuickTest highlights the first
operation (alphabetically) that matches the text you typed. Pressing
ENTER or SPACE inserts the highlighted word in the step.
➤
If you type the name of an operation when the list of available
operations and properties is not displayed, you can press CTRL+SPACE
or select Edit > Advanced > Complete Word. If only one operation
matches the text you typed, QuickTest automatically completes the
operation name. Otherwise, QuickTest displays the list and highlights
the first operation (alphabetically) that matches the text you typed.
Pressing ENTER or SPACE inserts the highlighted word in the step.
4 Double-click an operation in the list or use the arrow keys to choose an
operation and press ENTER. QuickTest inserts the operation into the
statement. If the operation contains arguments, QuickTest displays the
syntax of the operation in a tooltip.
In the above example, the ReportEvent method has four arguments.
Tip: You can also place the cursor on any operation or function that
contains arguments and press CTRL+SHIFT+SPACE or select Edit > Advanced
> Argument Info to display the statement completion (argument syntax)
tooltip for that item.
5 Enter the operation arguments after the operation.
367
Chapter 10 • Working in Function Library Windows
For more details and examples of any QuickTest operation, see the
HP QuickTest Professional Object Model Reference.
For more information on VBScript syntax, see "Basic VBScript Syntax" on
page 392.
Automatic Completion of VBScript Syntax
When the Auto-expand VBScript syntax option is enabled and you start to
type a VBScript keyword in a function library, QuickTest automatically
recognizes the first two characters of the keyword and adds the relevant
VBScript syntax or blocks to the script. For example, if you enter the letters if
and then enter a space at the beginning of an empty line, QuickTest
automatically enters:
If Then
End If
The Auto-expand VBScript syntax option is enabled by default. You can
disable or enable this option in the Editor Options dialog box. For more
information, see "Function Library Window Customization Options" on
page 418.
If you enter two characters that are the initial characters of multiple
keywords, the Select a Keyword dialog box is displayed and you can select
the keyword you want. For example, if you enter the letters pr and then
enter a space, the Select a Keyword dialog box opens containing the
keywords private and property. You can then select a keyword from the list
and click OK. QuickTest automatically enters the relevant VBScript syntax or
block in the script.
For details on the Select a Keyword dialog box, see "Select a Keyword Dialog
Box" on page 415.
For details on VBScript syntax, see "Basic VBScript Syntax" on page 392.
368
Chapter 10 • Working in Function Library Windows
Bookmarks in a Function Library
You can use bookmarks to mark important sections in your function library
so that you can navigate between the various parts more easily. Bookmarks
are not preserved when you navigate between documents, and they are not
saved with the function library.
In the following example, two bookmarks have been added to a function
library:
For details on using bookmarks, see "How to Navigate in Function Libraries"
on page 388.
369
Chapter 10 • Working in Function Library Windows
Programmatic Descriptions
When QuickTest learns an object in your application, it adds the appropriate
test object to the object repository. After the object exists in the object
repository, you can add statements in the Expert View to perform additional
operations on that object. To add these statements, you usually enter the
name (not case sensitive) of each of the objects in the object’s hierarchy as
the object description, and then add the appropriate operation.
Because each object in the object repository has a unique name, the object
name is all you need to specify. During the run session, QuickTest finds the
object in the object repository based on its name and parent objects, and
uses the stored test object description for that test object to identify the
object in your application.
You can also instruct QuickTest to perform operations on objects without
referring to the object repository or to the object’s name. To do this, you
provide QuickTest with a list of properties and values that QuickTest can use
to identify the object or objects on which you want to perform an
operation.
Such a programmatic description can be very useful if you want to perform
an operation on an object that is not stored in the object repository. You can
also use programmatic descriptions to perform the same operation on
several objects with certain identical properties, or to perform an operation
on an object whose properties match a description that you determine
dynamically during the run session.
In the Run Results, square brackets around a test object name indicate that
the test object was created dynamically during the run session using a
programmatic description or the ChildObjects method.
370
Chapter 10 • Working in Function Library Windows
Use-case scenario:
Suppose you are testing a Web site that generates a list of potential
employers based on biographical information you provide, and offers to
send your resume to the employer names you select from the list. You want
your test to select all the employers displayed in the list, but when you
design your test, you do not know how many check boxes will be displayed
on the page, and you cannot, of course, know the exact object description of
each check box. In this situation, you can use a programmatic description to
instruct QuickTest to perform a Set "ON" method for all objects that fit the
description: HTML TAG = input, TYPE = check box.
Programmatic Description Types
There are two types of programmatic descriptions:
➤
Static. You list the set of properties and values that describe the object
directly in a VBScript statement. For details, see "Static Programmatic
Descriptions" on page 372.
➤
Dynamic. You add a collection of properties and values to a Description
object, and then enter the Description object name in the statement. For
details, see "Dynamic Programmatic Descriptions" on page 375
Using the Static type to enter programmatic descriptions directly into your
statements may be easier for basic object description needs. However, in
most cases, using the Dynamic type provides more power, efficiency, and
flexibility.
This section also includes:
➤
"Static Programmatic Descriptions" on page 372
➤
"Dynamic Programmatic Descriptions" on page 375
➤
"Retrieving Child Objects" on page 377
➤
"Programmatic Description Checks" on page 380
371
Chapter 10 • Working in Function Library Windows
Static Programmatic Descriptions
You can describe an object directly in a statement by specifying
property:=value pairs describing the object instead of specifying an object’s
name.
The general syntax is:
TestObject("PropertyName1:=PropertyValue1", "..." ,
"PropertyNameX:=PropertyValueX")
TestObject. The test object class.
PropertyName:=PropertyValue. The identification property and its value.
Each property:=value pair should be separated by commas and quotation
marks.
The statement below specifies a WebEdit test object in the Mercury Tours
page with the Name author and an index of 3. During the run session,
QuickTest finds the WebEdit object with matching property values and
enters the text Mark Twain.
Browser("Mercury Tours").Page("Mercury Tours").WebEdit("Name:=Author",
"Index:=3").Set "Mark Twain"
Guidelines for Using Static Programmatic Descriptions
When working with static programmatic descriptions, be aware of the
following guidelines:
372
➤
"Regular Expressions in Programmatic Descriptions" on page 373
➤
"Variables in Programmatic Descriptions" on page 373
➤
"Programmatic Descriptions for Parent Test Objects" on page 373
➤
"Reuse of Static Programmatic Descriptions" on page 374
➤
"Copying Programmatic Description Data from the Object Spy" on
page 375
Chapter 10 • Working in Function Library Windows
Regular Expressions in Programmatic Descriptions
QuickTest evaluates all property values in programmatic descriptions as
regular expressions. Therefore, if you want to enter a value that contains a
special regular expression character (such as *, ?, or +), use the \ (backslash)
character to instruct QuickTest to treat the special characters as literal
characters.
Variables in Programmatic Descriptions
You can enter a variable name as the property value if you want to find an
object based on property values you retrieve during a run session. For
example:
MyVar="some text string"
Browser("Hello").Page("Hello").Webtable("table").Webedit("name:=" & MyVar)
Programmatic Descriptions for Parent Test Objects
When using programmatic descriptions from a specific point within a test
object hierarchy, you must continue to use programmatic descriptions from
that point onward within the same statement. If you specify a test object by
its object repository name after parent objects in the hierarchy have been
specified using programmatic descriptions, QuickTest cannot identify the
object.
Example:
➤
You can use the following statement, which uses object repository names
for the parent objects and a programmatic description for the object on
which the operation is performed:
Browser("Mercury Tours").Page("Mercury Tours").
WebEdit("Name:=Author", "Index:=3").Set "Mark Twain"
➤
You can use the following statement since it uses programmatic
descriptions throughout the entire test object hierarchy:
Browser("Title:=Mercury Tours").Page("Title:=Mercury Tours").
WebEdit("Name:=Author", "Index:=3").Set "Mark Twain"
373
Chapter 10 • Working in Function Library Windows
➤
You can also use the statement below, since it uses programmatic
descriptions from a certain point in the description (starting from the
Page object description):
Browser("Mercury Tours").Page("Title:=Mercury Tours").
WebEdit("Name:=Author", "Index:=3").Set "Mark Twain"
➤
However, you cannot use the following statement, since it uses
programmatic descriptions for the Browser and Page objects but then
attempts to use an object repository name for the WebEdit test object:
Browser("Title:=Mercury Tours").Page("Title:=Mercury Tours").
WebEdit("Author").Set "Mark Twain"
In this case, QuickTest tries to locate the WebEdit object based on its
name, but cannot locate it in the repository because the parent objects
were specified using programmatic descriptions.
For more information on working with test objects, see Chapter 4,
"Managing Test Objects in Object Repositories."
Reuse of Static Programmatic Descriptions
If you want to use the same static programmatic description several times in
a function library, you may want to assign the object you create to a variable
or use a With statement.
Example
Instead of entering:
Window("Text:=Myfile.txt - Notepad").Move 50, 50
Window("Text:=Myfile.txt - Notepad").WinEdit("AttachedText:=Find what:").
Set "hello"
Window("Text:=Myfile.txt - Notepad").WinButton("Caption:=Find next").Click
You can enter:
Set MyWin = Window("Text:=Myfile.txt - Notepad")
MyWin.Move 50, 50
MyWin.WinEdit("AttachedText:=Find what:").Set "hello"
MyWin.WinButton("Caption:=Find next").Click
374
Chapter 10 • Working in Function Library Windows
Copying Programmatic Description Data from the Object Spy
You can use the Copy Identification Properties to Clipboard option in the
Object Spy dialog box to copy all identification properties and values for a
selected object to the Windows Clipboard. The copied values are formatted
in standard programmatic description syntax with line breaks between each
property-value pair. For example:
"Class Name:=Image",
"abs_x:=585",
"abs_y:=573",
"alt:=Specials",
....
You can paste the copied data to any document and then copy selected lines
(remove the line breaks) into a programmatic description. For details on this
option, see "Object Spy Dialog Box" on page 142.
Dynamic Programmatic Descriptions
You can use the Description object to return a Properties collection object
containing a set of Property objects. A Property object consists of a property
name and value. You can then specify the returned Properties collection in
place of an object name in a statement. (Each property object contains a
property name and value pair.)
To create the Properties collection, you enter a Description.Create
statement using the following syntax:
Set MyDescription = Description.Create()
After you have created a Properties object (such as MyDescription in the
example above), you can enter statements to add, edit, remove, and retrieve
properties and values to or from the Properties object during the run
session. This enables you to determine which, and how many properties to
include in the object description in a dynamic way during the run session.
375
Chapter 10 • Working in Function Library Windows
After you fill the Properties collection with a set of Property objects
(properties and values), you can specify the Properties object in place of an
object name in a test statement.
For example, instead of entering:
Window("Error").WinButton("text:=OK", "width:=50").Click
you can enter:
Set MyDescription = Description.Create()
MyDescription("text").Value = "OK"
MyDescription("width").Value = 50
Window("Error").WinButton(MyDescription).Click
When working with Properties objects, you can use variable names for the
properties or values to generate the object description based on properties
and values you retrieve during a run session.
You can create several Properties objects in your test if you want to use
programmatic descriptions for several objects.
For more information on the Description and Properties objects and their
associated methods, see the HP QuickTest Professional Object Model Reference.
Considerations for Description Objects
➤
By default, the value of all Property objects added to a Properties
collection are treated as regular expressions. Therefore, if you want to
enter a value that contains a special regular expression character (such as
*, ?, +), use the \ (backslash) character to instruct QuickTest to treat the
special characters as literal characters.
You can set the RegularExpression property to False to specify a value as a
literal value for a specific Property object in the collection. For more
information, see the Utility section of the HP QuickTest Professional Object
Model Reference.
376
Chapter 10 • Working in Function Library Windows
➤
When using programmatic descriptions from a specific point within a test
object hierarchy, you must continue to use programmatic descriptions
from that point onward within the same statement. If you specify a test
object by its object repository name after other objects in the hierarchy
have been described using programmatic descriptions, QuickTest cannot
identify the object.
For example, you can use Browser(Desc1).Page(Desc1).Link(desc3), since
it uses programmatic descriptions throughout the entire test object
hierarchy.
You can also use Browser("Index").Page(Desc1).Link(desc3), since it uses
programmatic descriptions from a certain point in the description
(starting from the Page object description).
However, you cannot use Browser(Desc1).Page(Desc1).Link("Example1"),
since it uses programmatic descriptions for the Browser and Page objects
but then attempts to use an object repository name for the Link test
object (QuickTest tries to locate the Link object based on its name, but
cannot locate it in the repository because the parent objects were
specified using programmatic descriptions).
Retrieving Child Objects
You can use the ChildObjects method to retrieve all objects located inside a
specified parent object, or only those child objects that fit a certain
programmatic description. To retrieve this subset of child objects, you first
create a description object, and then you add the set of properties and values
that you want your child object collection to match using the Description
object.
Note: You must use the Description object to create the programmatic
description for the ChildObjects description argument. You cannot enter the
programmatic description directly into the argument using the
property:=value syntax.
After you build a description in your description object, use the following
syntax to retrieve child objects that match the description:
Set MySubSet=TestObject.ChildObjects(MyDescription)
377
Chapter 10 • Working in Function Library Windows
Example
The statements below instruct QuickTest to select all of the check boxes on
the Itinerary Web page:
Set MyDescription = Description.Create()
MyDescription("html tag").Value = "INPUT"
MyDescription("type").Value = "checkbox"
Set Checkboxes =
Browser("Itinerary").Page("Itinerary").ChildObjects(MyDescription)
NoOfChildObjs = Checkboxes.Count
For Counter=0 to NoOfChildObjs-1
Checkboxes(Counter).Set "ON"
Next
In the Run Results, square brackets around a test object name indicate that
the test object was created dynamically during the run session using the
ChildObjects method or a programmatic description.
For more information on the ChildObjects method, see the HP QuickTest
Professional Object Model Reference.
Using the Index Property in Programmatic Descriptions
The index property can sometimes be a useful identification property for
uniquely identifying an object. The index identification property identifies
an object based on the order in which it appears within the source code,
where the first occurrence is 0.
Index property values are object-specific. Thus, if you use an index value
of 3 to describe a WebEdit test object, QuickTest searches for the fourth
WebEdit object in the page.
If you use an index value of 3 to describe a WebElement object, however,
QuickTest searches for the fourth Web object on the page regardless of the
type, because the WebElement object applies to all Web objects.
378
Chapter 10 • Working in Function Library Windows
For example, suppose you have a page with the following objects:
➤
An image with the name Apple
➤
An image with the name UserName
➤
A WebEdit object with the name UserName
➤
An image with the name Password
➤
A WebEdit object with the name Password
The description below refers to the third item in the list above, as it is the
first WebEdit object on the page with the name UserName:
WebEdit("Name:=UserName", "Index:=0")
The following description, however, refers to the second item in the list
above, as that is the first object of any type (WebElement) with the name
UserName:
WebElement("Name:=UserName", "Index:=0")
Note: If there is only one object, using index=0 will not retrieve it. You
should not include the index property in the object description.
379
Chapter 10 • Working in Function Library Windows
Programmatic Description Checks
You can compare the run-time value of a specified object property with the
expected value of that property using either programmatic descriptions or
user-defined functions.
Programmatic description checks are useful in cases in which you cannot
apply a regular checkpoint, for example, if the object whose properties you
want to check is not stored in an object repository. You can then write the
results of the check to the Run Results report.
For example, suppose you want to check the run-time value of a Web
button. You can use the GetROProperty or Exist operations to retrieve the
run-time value of an object or to verify whether the object exists at that
point in the run session.
Example
The following examples illustrate how to use programmatic descriptions to
check whether the Continue Web button is disabled during a run session:
Using the GetROProperty operation:
ActualDisabledVal =
Browser(micClass:="Browser").Page(micClass:="Page").WebButton
(alt:="Continue").GetROProperty("disabled")
Using the Exist operation:
While Not Browser(micClass:="Browser").Page(micClass:="Page").WebButton
(alt:="Continue").Exist(30)
Wend
By adding Report.ReportEvent statements, you can instruct QuickTest to
send the results of a check to the Run Results:
If ActualDisabledVal = True Then
Reporter.ReportEvent micPass, "CheckContinueButton = PASS", "The
Continue
button is disabled, as expected."
Else
Reporter.ReportEvent micFail, "CheckContinueButton = FAIL", "The Continue
button is enabled, even though it should be disabled."
380
Chapter 10 • Working in Function Library Windows
You can also create and use user-defined functions to check whether your
application is functioning as expected. The following example illustrates a
function that checks whether an object is disabled and returns True if the
object is disabled:
'@Description Checks whether the specified test object is disabled
'@Documentation Check whether the <Test object name> <test object type> is
enabled.
Public Function VerifyDisabled (obj)
Dim enable_property
' Get the disabled property from the test object
enable_property = obj.GetROProperty("disabled")
If enable_property = 1 Then ' The value is True (1)—the object is disabled
Reporter.ReportEvent micPass, "VerifyDisabled Succeeded", "The test
object is disabled, as expected."
VerifyDisabled = True
Else
Reporter.ReportEvent micFail, "VerifyDisabled Failed", "The test object is
enabled, although it should be disabled."
VerifyDisabled = False
End If
End Function
Note: For information on using the GetROProperty operation, see
"Retrieving Native Properties" on page 386. For information on using
While...Wend statements, see "While...Wend Statement" on page 404. For
information on specific test objects, operations, and properties, see the
HP QuickTest Professional Object Model Reference.
381
Chapter 10 • Working in Function Library Windows
Opening and Closing Applications Programmatically
You can run any application from a specified location using a
SystemUtil.Run statement in a function library. This is especially useful if
you want to provide an operation (function) that opens an application from
within a component. You can specify an application and pass any supported
parameters, or you can specify a file name and the associated application
starts with the specified file open.
You can close most applications using the Close method. You can also use
SystemUtil statements to close applications.
For example, you could use the following statements to open a file named
type.txt in the default text application (Notepad), type happy days, save the
file using shortcut keys, and then close the application:
SystemUtil.Run "C:\type.txt", "","",""
Window("Text:=type.txt - Notepad").Type "happy days"
Window("Text:=type.txt - Notepad").Type micAltDwn & "F" & micAltUp
Window("Text:=type.txt - Notepad").Type micLShiftDwn & "S" & micLShiftUp
Window("Text:=type.txt - Notepad").Close
For more information, see the HP QuickTest Professional Object Model
Reference.
382
Chapter 10 • Working in Function Library Windows
Comments, Control-Flow, and Other VBScript Statements
QuickTest enables you to incorporate decision-making into your function
library by adding conditional statements that control the logical flow of
your function library. In addition, you can define messages in your test that
QuickTest sends to your run results. To improve the readability of your
function libraries, you can also add comments to them.
Note: The VBScript Reference (available from Help > QuickTest Professional
Help) contains Microsoft VBScript documentation, including VBScript,
Script Runtime, and Windows Script Host.
For more details, see:
➤
"Comments in VBScript" on page 396
➤
"Calculations in VBScript" on page 399
➤
"For...Next Statement" on page 402
➤
"For...Each Statement" on page 401
➤
"Do...Loop Statement" on page 401
➤
"While...Wend Statement" on page 404
➤
"If...Then...Else Statement" on page 403
383
Chapter 10 • Working in Function Library Windows
Retrieving and Setting Identification Property Values
Identification properties are the set of properties defined by QuickTest for
each object. You can set and retrieve a test object’s identification property
values, and you can retrieve the values of identification properties from a
run-time object.
When you run your function, QuickTest creates a temporary version of the
test object that is stored in the test object repository. You can use the
GetTOProperty, GetTOProperties, and SetTOProperty methods in your
function library to set and retrieve the identification property values of the
test object.
The GetTOProperty and GetTOProperties methods enable you to retrieve a
specific property value or all the properties and values that QuickTest uses to
identify an object.
The SetTOProperty method enables you to modify a property value that
QuickTest uses to identify an object.
Note: Because QuickTest refers to the temporary version of the test object
during the run session, any changes you make using the SetTOProperty
method apply only during the course of the run session, and do not affect
the values stored in the test object repository.
For example, the following statements would set the Submit button’s name
value to my button, and then retrieve the value my button to the ButtonName
variable:
Browser("QA Home Page").Page("QA Home Page").
WebButton("Submit").SetTOProperty "Name", "my button"
ButtonName=Browser("QA Home Page").Page("QA Home Page").
WebButton("Submit").GetTOProperty("Name")
You use the GetROProperty method to retrieve the current value of an
identification property from a run-time object in your application.
384
Chapter 10 • Working in Function Library Windows
For example, you can retrieve the target value of a link during the run
session as follows:
link_href = Browser("HP Technologies").Page("HP Technologies").
Link("Jobs").GetROProperty("href")
Tip: If you do not know the identification properties of objects in your
application, you can view them using the Object Spy. For information on
the Object Spy, see "Object Spy Dialog Box" on page 142.
For a list and description of identification properties supported by each
object, and for more information on the GetROProperty, GetTOProperty,
GetTOProperties, and SetTOProperty methods, see the HP QuickTest
Professional Object Model Reference.
Native Properties and Operations
If the test object operations and identification properties available for a
particular test object do not provide the functionality you need, you can
access the native operations and properties of any run-time object in your
application using the Object property.
You can view the native properties and their values, or the identification
properties, of the run-time object associated with an object in your
application, in the Object Spy dialog box. For details, see "Object Spy Dialog
Box" on page 142.
You can use the statement completion feature with object properties to view
a list of the available native operations and properties of an object. For more
information on the statement completion option, see "Generating
Statements in a Function Library" on page 361.
Tip: If the object is a Web object, you can also reference its native properties
in programmatic descriptions using the attribute/property notation. For
details, see the HP QuickTest Professional Add-ins Guide.
385
Chapter 10 • Working in Function Library Windows
This section also includes:
➤
"Retrieving Native Properties" on page 386
➤
"Activating Native Operations" on page 386
Retrieving Native Properties
You can use the Object property to access the native properties of any
run-time object. For example, you can retrieve the current value of the
ActiveX calendar’s internal Day property as follows:
Dim MyDay
Set MyDay=
Browser("index").Page("Untitled").ActiveX("MSCAL.Calendar.7").Object.Day
For more information on the Object property, see the HP QuickTest
Professional Object Model Reference.
Activating Native Operations
You can use the Object property to activate the internal operations of any
run-time object. For example, you can activate the native focus method of
the edit box as follows:
Dim MyWebEdit
Set MyWebEdit=Browser("Mercury Tours").Page("Mercury Tours").
WebEdit("username").Object
MyWebEdit.focus
For more information on the Object property, see the HP QuickTest
Professional Object Model Reference.
386
Chapter 10 • Working in Function Library Windows
Running DOS Commands
You can run standard DOS commands in your QuickTest function using the
VBScript Windows Scripting Host Shell object (WSCript.shell). For example,
you can open a DOS command window, change the path to C:\, and run
the DIR command using the following statements:
Dim oShell
Set oShell = CreateObject ("WSCript.shell")
oShell.run "cmd /K CD C:\ & Dir"
Set oShell = Nothing
For more details, see the Microsoft VBScript Language Reference (select
Help > QuickTest Professional Help > VBScript Reference > VBScript).
Choosing Which Steps to Report During the Run Session
You can use the Report.Filter method to determine which steps or types of
steps are included in the Run Results. You can completely disable or enable
reporting of steps following the statement, or you can indicate that you
only want subsequent failed or failed and warning steps to be included in
the report. You can also use the Report.Filter method to retrieve the current
report mode.
For details, see "Report Modes" on page 405.
Windows API
Using the Windows API, you can extend testing abilities and add usability
and flexibility to your function libraries. The Windows operating system
provides a large number of functions to help you control and manage
Windows operations. You can use these functions to obtain additional
functionality.
The Windows API is documented in the Microsoft MSDN Web site, which
can be found at: http://msdn2.microsoft.com/en-us/library/Aa383750
For details on how to use the Windows API, see "How to Enhance Your
Function Libraries Using the Windows API" on page 389.
387
Chapter 10 • Working in Function Library Windows
Tasks
How to Navigate in Function Libraries
The following steps describe how to navigate in function libraries.
➤
"Use the Go To dialog box" on page 388
➤
"Use bookmarks" on page 388
➤
"Find or find and replace strings" on page 389
Use the Go To dialog box
1 Activate the function library, if needed.
2 Select Edit > Go To. The Go To dialog box opens. For details, see "Go To
Dialog Box" on page 414.
Tip: By default, line numbers are displayed in function libraries. If they are
not displayed, you can select the Show line numbers option in the Tools >
View Options > General tab. For more information on the Editor options,
see Chapter 11, "Customizing Function Library Windows."
Use bookmarks
1 Activate the function library, if needed.
2 Click in the line to which you want to assign a bookmark.
3 Select Edit > Bookmarks. The Bookmarks dialog box opens. For details, see
"Bookmarks Dialog Box" on page 407.
When you assign a bookmark, an icon is added to the left of the selected
line in the function library. You can then use the Go To button in the
Bookmarks dialog box to jump to the bookmarked rows.
For more details, see "Bookmarks in a Function Library" on page 369.
388
Chapter 10 • Working in Function Library Windows
Find or find and replace strings
For details on using the find dialog box, see "Find Dialog Box (Function
Libraries)" on page 408.
For details on using the Find and Replace dialog box, see "Replace Dialog
Box (Function Libraries)" on page 410.
How to Enhance Your Function Libraries Using the
Windows API
1 In MSDN, locate the function you want to use in your function library.
2 Read its documentation and understand all required parameters and
return values.
3 Note the location of the API function. API functions are located inside
Windows DLLs. The name of the DLL in which the requested function is
located is usually identical to the Import Library section in the function’s
documentation. For example, if the documentation refers to User32.lib,
the function is located in a DLL named User32.dll, typically located in
your System32 library.
4 Use the QuickTest Extern object to declare an external function. For more
information, see the HP QuickTest Professional Object Model Reference.
The following example declares a call to a function called
GetForegroundWindow, located in user32.dll:
extern.declare micHwnd, "GetForegroundWindow", "user32.dll",
"GetForegroundWindow"
5 Call the declared function, passing any required arguments, for example:
hwnd = extern.GetForegroundWindow().
In this example, the foreground window’s handle is retrieved. You can
enhance your function library if the foreground window is not in the
object repository or cannot be determined beforehand (for example, a
window with a dynamic title). You may want to use this handle as part of
a programmatic description of the window, for example:
Window("HWND:="&hWnd).Close
389
Chapter 10 • Working in Function Library Windows
In some cases, you may have to use predefined constant values as function
arguments. Since these constants are not defined in the context of your
function, you need to find their numerical value to pass them to the called
function. The numerical values of these constants are usually declared in the
function’s header file. A reference to header files can also be found in each
function’s documentation under the Header section. If you have Microsoft
Visual Studio installed on your computer, you can typically find header files
under X:\Program Files\Microsoft Visual Studio\VC98\Include.
For example, the GetWindow API function expects to receive a numerical
value that represents the relationship between the specified window and the
window whose handle is to be retrieved. In the MSDN documentation, you
can find the constants: GW_CHILD, GW_ENABLEDPOPUP,
GW_HWNDFIRST, GW_HWNDLAST, GW_HWNDNEXT, GW_HWNDPREV
and GW_HWNDPREV.
If you open the WINUSER.H file, mentioned in the GetWindow
documentation, you will find the following flag values:
/*
* GetWindow() Constants
*/
#define GW_HWNDFIRST0
#define GW_HWNDLAST 1
#define GW_HWNDNEXT2
#define GW_HWNDPREV 3
#define GW_OWNER 4
#define GW_CHILD 5
#define GW_ENABLEDPOPUP 6
#define GW_MAX 6
390
Chapter 10 • Working in Function Library Windows
Example
The following example retrieves a specific menu item's value in the Notepad
application:
' Constant Values:
const MF_BYPOSITION = 1024
' API Functions Declarations
Extern.Declare micHwnd,"GetMenu","user32.dll","GetMenu",micHwnd
Extern.Declare
micInteger,"GetMenuItemCount","user32.dll","GetMenuItemCount",micHwnd
Extern.Declare
micHwnd,"GetSubMenu","user32.dll","GetSubMenu",micHwnd,micInteger
Extern.Declare
micInteger,"GetMenuString","user32.dll","GetMenuString",micHwnd,micInteger,
micString+micByRef,micInteger,micInteger
' Notepad.exe
hwin = Window("Notepad").GetROProperty ("hwnd")' Get Window's handle
MsgBox hwin
' Use API Functions
men_hwnd = Extern.GetMenu(hwin)' Get window's main menu's handle
MsgBox men_hwnd
item_cnt = Extern.GetMenuItemCount(men_hwnd)
MsgBox item_cnt
hSubm = Extern.GetSubMenu(men_hwnd,0)
MsgBox hSubm
rc = Extern.GetMenuString(hSubm,0,value,64,MF_BYPOSITION)
MsgBox value
391
Chapter 10 • Working in Function Library Windows
Reference
Basic VBScript Syntax
You write function libraries using VBScript, a powerful scripting language.
This section provides some basic guidelines to help you use VBScript
statements to enhance your QuickTest function library. For more detailed
information on using VBScript, you can view the VBScript documentation
from the QuickTest Help menu (Help > QuickTest Professional Help >
VBScript Reference).
Each VBScript statement has its own specific syntax rules. If you do not
follow these rules, errors will be generated when you run the problematic
step. You can check the syntax of the function library script at any time by
clicking the Check Syntax button, or by choosing Tools > Check Syntax.
General VBScript Syntax Rules and Guidelines
When working in a function library, you should consider the following
general VBScript syntax rules and guidelines:
➤
Case-sensitivity. By default, VBScript is not case sensitive and does not
differentiate between upper-case and lower-case spelling of words, for
example, in variables, object and operation names, or constants.
For example, the two statements below are identical in VBScript:
Browser("Mercury").Page("Find a Flight:").WebList("toDay").Select "31"
browser("mercury").page("find a flight:").weblist("today").select "31"
392
Chapter 10 • Working in Function Library Windows
➤
Text strings. When you enter a value as a text string, you must add
quotation marks before and after the string. For example, in the above
segment of script, the names of the Web site, Web page, and edit box are
all text strings surrounded by quotation marks.
Note that the value 31 is also surrounded by quotation marks because it is
a text string that represents a number and not a numeric value.
In the following example, only the property name (first argument) is a
text string and is in quotation marks. The second argument (the value of
the property) is a variable and therefore does not have quotation marks.
The third argument (specifying the timeout) is a numeric value, which
also does not need quotation marks.
Browser("Mercury").Page("Find a Flight:").WaitProperty("items count",
Total_Items, 2000)
➤
Variables. You can specify variables to store strings, integers, arrays and
objects. Using variables helps to make your script more readable and
flexible. For more information, see "Variables in VBScript" on page 400.
➤
Parentheses. To achieve the desired result and to avoid errors, it is
important that you use parentheses () correctly in your statements. For
more information, see "Parentheses in VBScript" on page 397.
➤
Indentation. You can indent or outdent your script to reflect the logical
structure and nesting of the statements. For more information, see
"Formatting VBScript Text" on page 395.
➤
Comments. You can add comments to your statements using an
apostrophe ('), either at the beginning of a separate line, or at the end of a
statement. It is recommended that you add comments wherever possible,
to make your scripts easier to understand and maintain. For more
information, see "Formatting VBScript Text" on page 395, and
"Comments in VBScript" on page 396.
➤
Spaces. You can add extra blank spaces to your script to improve clarity.
These spaces are ignored by VBScript.
For more information on using specific VBScript statements to enhance
your function libraries, see "Comments, Control-Flow, and Other VBScript
Statements" on page 383.
393
Chapter 10 • Working in Function Library Windows
Handling VBScript Syntax Errors
You can check the syntax of the current function library at any time by
clicking the Check Syntax button, or by choosing Tools > Check Syntax. If
QuickTest finds any errors, it displays them in the Information pane.
You can view a description of each of the VBScript errors in the VBScript
Reference. For more information, select Help > QuickTest Professional
Help > VBScript Reference > VBScript > Reference > Errors > VBScript Syntax
Errors.
The Information pane lists the syntax errors found in your document, and
enables you to locate each syntax error so that you can correct it. For details
on the information pane, see "Information Pane User Interface" on
page 922.
394
Chapter 10 • Working in Function Library Windows
Formatting VBScript Text
When working in a function library, it is important to follow accepted
VBScript practices for comments and indentation.
Comments
Use comments to explain sections of a script. This improves readability and
make function libraries easier to maintain and update. For more
information, see "Comments in VBScript" on page 396.
➤
Adding Comments. You can add comments to your statements by adding
an apostrophe ('), either at the beginning of a separate line, or at the end
of a statement.
Tips:
➤
➤
You can comment a statement by clicking anywhere in the statement
and clicking the Comment Block button.
➤
You can comment a selected block of text by clicking the Comment
Block button, or by choosing Edit > Advanced > Comment Block. Each
line in the block will be preceded by an apostrophe.
Removing Comments. You can remove comments from your statements
by deleting the apostrophe ('), either at the beginning of a separate line,
or at the end of a statement.
Tip: You can remove the comments from a selected block or line of text by
clicking the Uncomment Block button, or by choosing Edit > Advanced >
Uncomment Block.
395
Chapter 10 • Working in Function Library Windows
Indentation
Use indentation to reflect the logical structure and nesting of your
statements.
➤
Indenting Statements. You can indent your statements by selecting the
text and choosing Edit > Advanced > Indent or by press the TAB key. The
text is indented according to the tab spacing selected in the Editor
Options dialog box, as described in "General Tab (Editor Options Dialog
Box)" on page 419.
Note: The Indent selected text when using the Tab key check box must be
selected in the Editor Options dialog box, otherwise pressing the TAB key
will delete the selected text.
➤
Outdenting Statements. You can outdent your statements by selecting
Edit > Advanced > Outdent or by deleting the space at the beginning of
the statements.
For more detailed information on formatting in VBScript, you can view the
VBScript documentation from the QuickTest Help menu (Help >
QuickTest Professional Help > VBScript Reference).
Comments in VBScript
A comment is a line or part of a line in a script that is preceded by an
apostrophe ('). When you run a a function in a function library, QuickTest
does not process the comments. Use comments to explain sections of a
script to improve readability and to make function libraries easier to update.
The following example shows how a comment describes the purpose of the
statement below it:
‘Sets the word "mercury" into the "username" edit box.
Browser("Mercury Tours").Page("Mercury Tours").WebEdit("username").
Set "mercury"
396
Chapter 10 • Working in Function Library Windows
By default, comments are displayed in green in function libraries. You can
customize the appearance of comments in the Editor Options dialog box.
For more information, see "Fonts and Colors Tab (Editor Options Dialog
Box)" on page 422.
Tips:
➤
You can comment a block of text by choosing Edit > Advanced >
Comment Block or by clicking the Comment Block button.
➤
To remove the comment, select Edit > Advanced > Uncomment Block or
click the Uncomment Block button.
Note: You can also add a comment line using the VBScript Rem statement.
For more information, see the Microsoft VBScript Language Reference (select
Help > QuickTest Professional Help > VBScript Reference > VBScript).
Parentheses in VBScript
When programming in VBScript, it is important that you follow the rules for
using or not using parentheses () in your statements.
You must use parentheses around method arguments if you are calling a
method that returns a value and you are using the return value.
For example, use parentheses around method arguments if you are
returning a value to a variable, if you are using the method in an If
statement, or if you are using the Call keyword to call a function.
Tip: If you receive an Expected end of statement error message when
running a step in your function library, it may indicate that you need to add
parentheses around the arguments of the step's method.
397
Chapter 10 • Working in Function Library Windows
Example
Following are several examples showing when to use or not use parentheses.
The following example requires parentheses around the method arguments
for the ChildItem method because it returns a value to a variable:
Set WebEditObj = Browser("Mercury Tours").Page("Method of Payment").
WebTable("FirstName").ChildItem (8, 2, "WebEdit", 0)
WebEditObj.Set "Example"
The following example requires parentheses around the method arguments
because Call is being used:
Call MyFunction("Hello World")
...
...
The following example requires parentheses around the WaitProperty
method arguments because the method is used in an If statement:
If Browser("index").Page("index").Link("All kinds of").
WaitProperty("attribute/readyState", "complete", 4) Then
Browser("index").Page("index").Link("All kinds of").Click
End If
The following example does not require parentheses around the Click
method arguments because it does not return a value:
Browser("Mercury Tours").Page("Method of Payment").WebTable("FirstName").
Click 3,4
398
Chapter 10 • Working in Function Library Windows
Calculations in VBScript
You can write statements that perform simple calculations using
mathematical operators. For example, you can use a multiplication operator
to multiply the values displayed in two text boxes in your Web site. VBScript
supports the following mathematical operators:
Operator
Description
+
addition
–
subtraction
–
negation (a negative number)
*
multiplication
/
division
^
exponent
In the following example, the multiplication operator is used to calculate
the maximum luggage weight of the passengers at 100 pounds each:
'Retrieves the number of passengers from the edit box using the GetROProperty
method
passenger = Browser ("Mercury_Tours").Page ("Find_Flights").
WebEdit("numPassengers").GetROProperty("value")
'Multiplies the number of passengers by 100
weight = passenger * 100
'Inserts the maximum weight into a message box.
msgbox("The maximum weight for the party is "& weight &"pounds.")
399
Chapter 10 • Working in Function Library Windows
Variables in VBScript
You can specify variables to store test objects or simple values in your
function library. When using a variable for a test object, you can use the
variable instead of the entire object hierarchy in other statements. Using
variables in this way makes your statements easier to read and to maintain.
To specify a variable to store an object, use the Set statement, with the
following syntax:
Set ObjectVar = ObjectHierarchy
In the example below, the Set statement specifies the variable UserEditBox
to store the full Browser.Page.WebEdit object hierarchy for the username
edit box. The Set method then enters the value John into the username edit
box, using the UserEditBox variable:
Set UserEditBox = Browser("Mercury Tours").Page("Mercury Tours").
WebEdit("username")
UserEditBox.Set "John"
Note: Do not use the Set statement to specify a variable containing a simple
value (such as a string or a number).
You can also use the Dim statement to declare variables of other types,
including strings, integers, and arrays. This statement is not mandatory, but
you can use it to improve the structure of your function library. In the
following example, the Dim statement is used to declare the actual_value
variable, which can then be used in different statements within the current
function library:
Dim actual_value
' Get the actual property value
actual_value = obj.GetROProperty(PropertyName)
400
Chapter 10 • Working in Function Library Windows
Do...Loop Statement
The Do...Loop statement instructs QuickTest to perform a statement or series
of statements while a condition is true or until a condition becomes true. It
has the following syntax:
Do [{while} {until} condition]
statement
Loop
Item
Description
condition
A condition to be fulfilled.
statement
A statement or series of statements to be performed
during the loop.
In the following example, QuickTest calculates the factorial value of the
number of passengers using the Do...Loop:
passengers = Browser("Mercury Tours").Page("Find Flights").
WebEdit("numPassengers").GetROProperty("value")
total = 1
i=1
Do while i <= passengers
total = total * i
i=i+1
Loop
MsgBox "!" & passengers & "=" & total
For...Each Statement
A For...Each loop instructs QuickTest to perform one or more statements for
each element in an array or an object collection. It has the following syntax:
For Each item In array
statement
Next
Item
Description
item
A variable representing the element in the array.
401
Chapter 10 • Working in Function Library Windows
Item
Description
array
The name of the array.
statement
A statement, or series of statements, to be performed
during the loop.
The following example uses a For...Each loop to display each of the values in
an array:
MyArray = Array("one","two","three","four","five")
For Each element In MyArray
msgbox element
Next
Note: During a run session, if a For Each statement iterates on the
ParameterDefinitions collection, the run may fail if the collection was
retrieved directly before using the For Each statement. To prevent this, use
other VBScript loop statements, such as For or While.
For...Next Statement
A For...Next loop instructs QuickTest to perform one or more statements a
specified number of times. It has the following syntax:
For counter = start to end [Step step]
statement
Next
402
Item
Description
counter
The variable used as a counter for the number of
iterations.
start
The start number of the counter.
end
The last number of the counter.
Chapter 10 • Working in Function Library Windows
Item
step
Description
The number to increment at the end of each loop.
Default = 1.
Optional.
statement
A statement, or series of statements, to be performed
during the loop.
In the following example, QuickTest calculates the factorial value of the
number of passengers using the For statement:
passengers = Browser("Mercury Tours").Page("Find Flights").
WebEdit("numPassengers").GetROProperty("value")
total = 1
For i=1 To passengers
total = total * i
Next
MsgBox "!" & passengers & "=" & total
If...Then...Else Statement
The If...Then...Else statement instructs QuickTest to perform a statement or a
series of statements based on specified conditions. If a condition is not
fulfilled, the next Elseif condition or Else statement is examined. It has the
following syntax:
If condition Then
statement
ElseIf condition2 Then
statement
Else
statement
End If
Item
Description
condition
Condition to be fulfilled.
statement
Statement to be perform.
403
Chapter 10 • Working in Function Library Windows
Example
In the following example, if the number of passengers is fewer than four,
QuickTest closes the browser:
passengers = Browser("Mercury Tours").Page("Find Flights").
WebEdit("numpassengers").GetROProperty("value")
If (passengers < 4) Then
Browser("Mercury Tours").Close
Else
Browser("Mercury Tours").Page("Find Flights").Image("continue").Click 69,5
End If
The following example uses If, ElseIf, and Else statements to check whether a
value is equal to 1, 2, or a different value:
value = 2
If value = 1 Then
msgbox "one"
ElseIf value = 2 Then
msgbox "two"
Else
msgbox "not one or two"
End If
While...Wend Statement
A While...Wend statement instructs QuickTest to perform a statement or
series of statements while a condition is true. It has the following syntax:
While condition
statement
Wend
404
Item
Description
condition
A condition to be fulfilled.
statement
A statement or series of statements to be executed during
the loop.
Chapter 10 • Working in Function Library Windows
In the following example, QuickTest performs a loop using the While
statement while the number of passengers is fewer than ten. Within each
loop, QuickTest increments the number of passengers by one:
passengers = Browser("Mercury Tours").Page("Find Flights").
WebEdit("numpassengers").GetROProperty("value")
While passengers < 10
passengers = passengers + 1
Wend
msgbox("The number of passengers in the party is " & passengers)
Report Modes
For details on using report modes, see "Choosing Which Steps to Report
During the Run Session" on page 387.
The following report modes are available:
Mode
Description
0 or rfEnableAll
All events are displayed in the Run Results.
Default.
1 or
rfEnableErrorsAndWarning
s
Only events with a warning or fail status are
displayed in the Run Results.
2 or rfEnableErrorsOnly
Only events with a fail status are displayed in
the Run Results.
3 or rfDisableAll
No events are displayed in the Run Results.
➤
To disable reporting of subsequent steps, enter the following statement:
Reporter.Filter = rfDisableAll
➤
To re-enable reporting of subsequent steps, enter:
Reporter.Filter = rfEnableAll
405
Chapter 10 • Working in Function Library Windows
➤
To instruct QuickTest to include only subsequent failed steps in the Run
Results, enter:
Reporter.Filter = rfEnableErrorsOnly
➤
To instruct QuickTest to include only subsequent failed or warning steps
in the Run Results, enter:
Reporter.Filter = rfEnableErrorsAndWarnings
➤
To retrieve the current report mode, enter:
MyVar=Reporter.Filter
For more details, see the HP QuickTest Professional Object Model Reference.
Function Library Window User Interface
This section includes:
406
➤
Bookmarks Dialog Box on page 407
➤
Find Dialog Box (Function Libraries) on page 408
➤
Replace Dialog Box (Function Libraries) on page 410
➤
Regular Expressions in the Find and Replace Dialog Boxes on page 412
➤
Go To Dialog Box on page 414
➤
Select a Keyword Dialog Box on page 415
Chapter 10 • Working in Function Library Windows
Bookmarks Dialog Box
This page dialog box enables you to add, delete, and go to bookmarks in a
function library.
To access
1 Activate the function library, if needed.
2 Click in the line to which you want to assign a
bookmark.
3 Select Edit > Bookmarks.
Relevant tasks
"How to Navigate in Function Libraries" on page 388
See also
"Bookmarks in a Function Library" on page 369
User interface elements are described below (unlabeled elements are shown
in angle brackets):
UI Elements
Description
Bookmark
name
The name for a new bookmark. Enter a unique name for the
bookmark and click Add. The bookmark is added to the
Bookmarks dialog box, together with the line number at which it
is located and the textual content of the line. In addition, a
bookmark icon is added to the left of the selected line in the
function library.
<Bookmark
list>
The list of bookmarks to navigate to. Select a bookmark and click
the Go To button to jump to the bookmarked line.
407
Chapter 10 • Working in Function Library Windows
Find Dialog Box (Function Libraries)
This dialog box enables you to search for strings in a function library.
To access
In the function library, click the Find button
.
Relevant tasks
"How to Navigate in Function Libraries" on page 388
User interface elements are described below (unlabeled elements are shown
in angle brackets):
UI Elements
Description
Find what
The text string you want to locate. For information on
searching for a regular expression, see <Regular
Expression Arrow> below.
<Regular Expression Arrow>. If you want to use regular
expressions in the string you specify, click the arrow
button
and select a regular expression from the list.
This automatically inserts the regular expression in the
Find what box at the cursor location and selects the
Regular expression check box. For more information, see
"Regular Expressions in the Find and Replace Dialog
Boxes" on page 412.
408
Chapter 10 • Working in Function Library Windows
UI Elements
Description
Match case
Distinguishes between upper-case and lower-case
characters in the search. When Match case is selected,
QuickTest finds only those occurrences in which the
capitalization matches the text you entered in the Find
what box exactly.
Match whole word
Searches for occurrences that are only whole words and
not part of longer words.
Regular expression
Treats the specified text string as a regular expression.
This option is automatically selected when you select a
regular expression from the list.
Wrap at beginning/
end
Continues the search from the beginning or end of the
function library text when either the beginning or end is
reached, depending on the selected search direction.
Restrict to selection
Searches only within the selected part of the function
library text.
Place cursor at end
Places the cursor at the end of the highlighted occurrence
when the search string is located.
Direction
Up/Down. Specify the direction in which you want to
search, from the current cursor location in the function
library.
409
Chapter 10 • Working in Function Library Windows
Replace Dialog Box (Function Libraries)
This dialog box enables you to specify text strings to locate in the current
function library, and specify the text strings you want to use to replace
them. You can either find and replace literal text or use regular expressions
for a more advanced process. You can also use other options to further
fine-tune your find and replace process.
To access
In the function library, click the Replace button
.
Relevant tasks
"How to Navigate in Function Libraries" on page 388
User interface elements are described below:
410
UI Elements
Description
Find what
The text string you want to locate. For information on
searching for a regular expression, see <Regular
Expression Arrow> below.
Replace with
The text string you want to use to replace the found text.
For information on searching for a regular expression, see
<Regular Expression Arrow> below.
Chapter 10 • Working in Function Library Windows
UI Elements
Description
<Regular Expression Arrow>. If you want to use regular
expressions in the Find what or Replace with string, click
the arrow button
and select a regular expression from
the list. This automatically inserts the regular expression
in the Find what or Replace with box at the cursor
location and selects the Regular expression check box.
For more information, see "Regular Expressions in the
Find and Replace Dialog Boxes" on page 412.
Match case
Distinguishes between upper-case and lower-case
characters in the search. When Match case is selected,
QuickTest finds only those occurrences in which the
capitalization matches the text you entered in the Find
what box exactly.
Preserve case
Checks each occurrence of the Find what string for all
lowercase, all uppercase, sentence caps or mixed case.
The Replace with string is converted to the same case as
the occurrence found, except when the occurrence found
is mixed case. In this case, the Replace with string is used
without modification.
Match whole word
Searches for occurrences that are only whole words and
not part of longer words.
Regular expression
Treats the specified text string as a regular expression.
This option is automatically selected when you select a
regular expression from the list.
Wrap at beginning/
end
Continues the search from the beginning or end of the
function library text when either the beginning or end is
reached, depending on the selected search direction.
Restrict to selection
Searches only within the selected part of the function
library text.
Place cursor at end
Places the cursor at the end of the highlighted occurrence
when the search string is located.
Direction
Up/Down. Specify the direction in which you want to
search, from the current cursor location in the function
library.
411
Chapter 10 • Working in Function Library Windows
Regular Expressions in the Find and Replace Dialog Boxes
You can use regular expressions in the Find what and Replace with strings to
enhance your search. For a general understanding of regular expressions, see
"Regular Expressions Overview" on page 633. Note that there are differences
in the expressions supported by the Find and Replace dialog boxes and the
expressions supported in other parts of QuickTest.
412
To access
Click the arrow button
next to the Find what field in
the Find or Replace dialog box.
Relevant tasks
"How to Navigate in Function Libraries" on page 388
Chapter 10 • Working in Function Library Windows
You can select from a predefined list of regular expressions. You can also use
tagged expressions. When you use regular expressions to search for a string,
you may want the string to change depending on what was already found.
For example, you can search for (save\:n)\1, which will find any occurrence
of save followed by any number, immediately followed by save, as well as
the same number that was already found (meaning that it will find
save6save6 but not save6save7).
You can also use tagged expressions to insert parts of what is found into the
replace string. For example, you can search for save(\:n) and replace it with
open\1. This will find save followed by any number, and replace it with
open and the number that was found.
Select Tag an Expression from the regular expressions list to insert
parentheses "()" to indicate a tagged expression in the search string.
Select Match Tagged Expression and then select the specific tag group
number to specify the tagged expression you want to use, in the format '\'
followed by a tag group number 1-9. (Count the left parentheses '(' in the
search string to determine a tagged expression number. The first (left-most)
tagged expression is "\1" and the last is "\9".)
413
Chapter 10 • Working in Function Library Windows
Go To Dialog Box
This dialog box enables you to navigate to a specific line in a function
library.
To access
1 Activate the function library, if needed.
2 Select Edit > Go To.
Relevant tasks
"How to Navigate in Function Libraries" on page 388
User interface elements are described below:
414
UI Elements
Description
Line number
The line to which you want to navigate.
Chapter 10 • Working in Function Library Windows
Select a Keyword Dialog Box
This dialog box enables you to select a keyword from a list of keywords for
use with the Auto Expand VBScript syntax option.
To access
Enter two or more characters in the Expert View that are
the initial characters of multiple keywords.
Important
information
The Auto-expand VBScript syntax option (enabled by
default) must be enabled to use the Select a Keyword
dialog box. You can disable or enable this option in the
Editor Options dialog box. For more information, see
"General Tab (Editor Options Dialog Box)" on page 419.
See also
"Automatic Completion of VBScript Syntax" on page 368
User interface elements are described below (unlabeled elements are shown
in angle brackets):
UI Elements
Description
<Keyword list>
A list of the keywords whose first two characters match
the first two characters you entered in the Keyword View.
415
Chapter 10 • Working in Function Library Windows
416
11
Customizing Function Library Windows
This chapter includes:
Concepts
➤
Function Library Window Customization Options on page 418
Reference
➤
General Tab (Editor Options Dialog Box) on page 419
➤
Fonts and Colors Tab (Editor Options Dialog Box) on page 422
➤
Key Binding Tab (Editor Options Dialog Box) on page 424
417
Chapter 11 • Customizing Function Library Windows
Concepts
Function Library Window Customization Options
QuickTest includes a powerful editor for functions libraries in the Function
Library window. You can modify and customize many aspects of the editor
through the Editor Options dialog box. Any changes you make are applied
globally to all function library windows.
The Editor Options dialog box consists of three tabs:
➤
General. Customizes the way in which the function library windows
behave when you edit a function library. You can show or hide character
symbols, and choose to display line numbers. For more information on
working with function libraries, see Chapter 12, "User-Defined Functions
and Function Libraries."
➤
Fonts and Colors. Customizes function library element appearance.
Changes the color of different elements, including comments, strings,
QuickTest reserved words, operators, and numbers. Each element of
QuickTest function libraries can be displayed in a different color. You can
also specify the font style and size to use for all elements. You can create
your own personalized color scheme for each element.
➤
Key Binding. Personalizes default keyboard shortcuts you use for editing.
QuickTest includes keyboard shortcuts that let you move the cursor,
delete characters, and cut, copy, or paste information to and from the
Clipboard. You can replace these shortcuts with your preferred shortcuts.
You can also modify the way your function library is printed using options
in the Print dialog box. For more information, see "How to Manage
Function Libraries" on page 440. For more information on working with
function libraries, see Chapter 12, "User-Defined Functions and Function
Libraries."
418
Chapter 11 • Customizing Function Library Windows
Reference
General Tab (Editor Options Dialog Box)
This tab enables you to customize how function libraries are displayed in
function library windows.
To access
When a function library window is active, select Tools > View
Options > General tab.
See also
➤ "Function Library Window Customization Options" on page 418
➤ "Fonts and Colors Tab (Editor Options Dialog Box)" on page 422
➤ "Key Binding Tab (Editor Options Dialog Box)" on page 424
419
Chapter 11 • Customizing Function Library Windows
User interface elements are described below:
UI Elements
Description
Show line numbers
Displays a line number to the left of each line in the
function.
Auto-indent
Causes lines following an indented line to automatically
begin at the same point as the previous line. You can
press the HOME key on your keyboard to move the cursor
back to the left margin.
Indent selected text
when pressing Tab
key
Indents selected text when pressing the TAB key. When
this option is not enabled, pressing the Tab key replaces
the selected text with a single Tab character.
Statement
completion
Enables Intellisense, the statement completion feature
included with QuickTest. When you type in a function
library, IntelliSense enables you to select items for your
statement from a drop-down list and view the relevant
syntax.
For more information on using the statement
completion (IntelliSense) feature, see "Statement
Completion (IntelliSense)" on page 361.
420
Draw box around
current line
Displays a box around the line of the test in which the
cursor is currently located.
Dynamic surround
Surrounds existing lines of code with a block structure,
enabling you to dynamically expand (or collapse) block
statements. For example, when you add a surrounding
statement (such as if/while) before existing code, you can
use the arrow keys to expand the block to include
subsequent lines. These lines are then automatically
indented to the correct levels.
Show all characters
Displays all TAB, NEW LINE, and SPACE character symbols.
You can also select to display only some of these
characters by selecting or clearing the relevant check
boxes.
Chapter 11 • Customizing Function Library Windows
UI Elements
Description
Auto-expand
VBScript syntax
Automatically recognizes the first two characters of
keywords and adds the relevant VBScript syntax or blocks
to the script, when you type the relevant keyword.
For example, if you enter the letters if and then enter a
space at the beginning of a line, QuickTest automatically
enters:
If Then
End If
Use tab character/
Tab spacing
Inserts a TAB character when the TAB key on the keyboard
is used. When this option is not enabled, the specified
number of space characters is inserted when you press
the TAB key.
421
Chapter 11 • Customizing Function Library Windows
Fonts and Colors Tab (Editor Options Dialog Box)
This tab enables you to display the comments, strings, QuickTest and
VBScript reserved words, operators, and numbers in function libraries, in
different colors.
To access
When a function library window is active, select Tools >
View Options > Fonts and Colors tab.
See also
➤ "Function Library Window Customization Options"
on page 418
➤ "General Tab (Editor Options Dialog Box)" on page 419
➤ "Key Binding Tab (Editor Options Dialog Box)" on
page 424
422
Chapter 11 • Customizing Function Library Windows
User interface elements are described below:
UI Elements
Description
Fonts
Select the Font name and Size that you want to use to
display all elements. By default, the editor uses the
Microsoft Sans Serif font, which is a Unicode font.
Note: When testing in a Unicode environment, you must
select a Unicode-compatible font. Otherwise, elements in
your function library may not be correctly displayed in
the function library windows. However, the function
library will still run in the same way, regardless of the
font you choose. If you are working in an environment
that is not Unicode-compatible, you may prefer to
choose a fixed-width font, such as Courier, to ensure
better character alignment.
Syntax coloring
Select an Element whose appearance you want to
customize in QuickTest function libraries. Choose a
Foreground color and a Background color. Choose a font
Style for the element.
Preview
An example of your change.
423
Chapter 11 • Customizing Function Library Windows
Key Binding Tab (Editor Options Dialog Box)
This tab enables you to personalize the default keyboard shortcuts you use
for editing. QuickTest includes keyboard shortcuts that let you move the
cursor, delete characters, and cut, copy, or paste information to and from
the Clipboard. You can replace these shortcuts with your preferred
shortcuts.
424
Chapter 11 • Customizing Function Library Windows
To access
When a function library window is active, select Tools > View
Options > Key Binding tab.
Important
information
The default QuickTest menu shortcut keys override any key
bindings that you may define. For example, if you define the
Paste command key binding to be CTRL+P, it will be overridden by
the default QuickTest shortcut key for opening the Print dialog
box (corresponding to the File > Print option). For a list of
QuickTest menu shortcut keys, see the menu commands available
from "QuickTest Commands" on page 76.
See also
➤ "Function Library Window Customization Options" on
page 418
➤ "General Tab (Editor Options Dialog Box)" on page 419
➤ "Fonts and Colors Tab (Editor Options Dialog Box)" on page 422
User interface elements are described below:
UI Elements
Description
Command
The list of commands to which a keyboard shortcut can
be assigned.
Uses keys
The list of keyboard shortcuts for the selected command.
To delete a key sequence from the list, select the
command in the Command list, then highlight the keys
in the Uses keys list, and click Delete.
Press new shortcut
key
The new shortcut key for the selected command. Click in
the Press new shortcut key box and then press the keys
you want to use for the selected command and click Add.
If the key combination you specify is not supported, or if
it is already defined for another command, a message
displays below the shortcut key box.
425
Chapter 11 • Customizing Function Library Windows
426
12
User-Defined Functions and Function
Libraries
Note: The terms function, method, and operation are used interchangeably
in this chapter.
This chapter includes:
Concepts
➤
Function Library Overview on page 428
➤
Associated Function Libraries on page 430
➤
User-Defined Functions on page 431
➤
User-Defined Function Storage and Access on page 433
➤
User-Defined Function Registration on page 434
Tasks
➤
How to Manage Function Libraries on page 440
➤
How to Edit a Function Library on page 446
➤
How to Manage Function Library Associations on page 448
➤
How to Work with a User-Defined Function on page 450
➤
How to Create and Register a User-Defined Function Using the Function
Definition Generator on page 453
Reference
➤
Function Definition Generator Dialog Box on page 460
Troubleshooting and Limitations - Function Libraries on page 469
427
Chapter 12 • User-Defined Functions and Function Libraries
Concepts
Function Library Overview
In addition to the test objects, methods, and built-in functions supported by
the QuickTest Test Object Model, you can define your own function libraries
containing VBScript functions, subroutines, statement, and so on, and then
use their functions as operations in your component.
A function library is a separate QuickTest document that contains Visual
Basic script. Any text file written in standard VBScript syntax can be used as
a function library.
Your function libraries can contain:
➤
Function definitions (function signature and code). You can call these
functions from other functions or from your component after you
associate the function library with the component’s application area.
➤
VBScript statements. These are statements that are not contained within
function definitions (for example, RegisterUserFunc statements).
QuickTest runs all of these statements when it loads the function library.
Loading Function Libraries
At the beginning of a run session, QuickTest loads all of the function
libraries associated with your component (via its application area).
In addition, you can use the LoadFunctionLibrary statement to dynamically
load a function library during a run session.
Editing Function Libraries
When you edit function libraries you can do any of the following:
➤
428
Use QuickTest to modify and debug any existing function libraries (such
as .vbs, .txt, or .qfl files). For information on using VBScript, see
"Handling VBScript Syntax Errors" on page 394.
Chapter 12 • User-Defined Functions and Function Libraries
➤
Open and work on one or several function libraries at the same time, as
each function library opens in a separate window.
➤
Choose to open a function library in edit mode or read-only mode:
➤
➤
Edit mode. Enables you to view and modify the function library. While
the function library is open on your computer, other users can view
the file in read-only mode, but they cannot modify it.
➤
Read-only mode. Enables you to view the function library but not
modify it. By default, when you open a function library that is
currently open on another computer, it opens in read-only mode. You
can also choose to open a function library in read-only mode if you
want to review it, but you do not want to prevent another user from
modifying it.
Navigate directly from a function call in your document to its function
definition in the source document. The function definition can be located
either in the same function library or in another function library that is
associated with your component (via its application area).
If the document containing the function definition is already open,
QuickTest activates the window (brings the window into focus). If the
document is closed, QuickTest opens it in read-only mode. For task
details, see "Navigate to the definition of a specific function" on page 443.
➤
Close a function library after you finish editing it, leaving your QuickTest
session open.
➤
Save the function library to your Quality Center project. By default,
QuickTest saves a function library with a .qfl extension, unless you specify
a different extension, such as .vbs or .txt.
➤
Use the tools that QuickTest provides for editing and debugging any
function library, even if it was created using an external editor. For
example, QuickTest can check the syntax of your functions, and the
function library window provides the same editing features that are
available in the Expert View. For more information on the options
available in the Expert View, see the HP QuickTest Professional User Guide.
For task details, see "How to Manage Function Libraries" on page 440.
429
Chapter 12 • User-Defined Functions and Function Libraries
Associated Function Libraries
After you create your function libraries, you can associate them with your
application area. This enables you or a Subject Matter Expert to insert a call
to a public function or subroutine in the associated function library from
any component associated with that application area. (Public functions
stored in function libraries can be called from any associated component
(via its application area), whereas private functions can be called only from
within the same function library.)
You can:
➤
"Edit the list of associated function libraries for an existing application
area" on page 430
➤
"Load a function library dynamically during a run session" on page 430
Edit the list of associated function libraries for an existing
application area
You do this in the Function Libraries pane in an application area
(Application Area > Function Libraries sidebar button). For details, see
"Function Libraries Pane (Application Area Window)" on page 689.
Load a function library dynamically during a run session
You do this using the LoadFunctionLibrary statement. For details, see the
Utility section of the HP QuickTest Professional Object Model Reference.
For task details, see "How to Manage Function Library Associations" on
page 448.
430
Chapter 12 • User-Defined Functions and Function Libraries
Working with Associated Function Libraries in
Quality Center
When working with Quality Center and associated function libraries, you
must save the associated function library in the Test Resources module in
your Quality Center project before you specify the associated file in the
Function Libraries pane of the application area. You can add a new or
existing function library to your Quality Center project.
A component accesses the functions that are associated with its application
area. Therefore, any changes you make to a function library that is stored in
your Quality Center project and associated with an application area may
affect its associated components. When making changes to a function
library that is stored in your Quality Center project and associated with an
application area, consider the effect of the changes on the components that
use this application area. In Quality Center, you can view the list of
components using the application area in the Dependencies tab of the
Business Components module. For more information, see "Dependencies
Tab" on page 1067.
User-Defined Functions
You can create user-defined functions to provide additional functionality for
your components. You create the functions in VBScript. For details on using
VBScript, see "Handling VBScript Syntax Errors" on page 394.
A user-defined function encapsulates an activity (or a group of steps that
require programming) into a keyword (also called an operation). By using
user-defined functions, your components are easier to design, read, and
maintain. You or a Subject Matter Expert can then call user-defined
functions from a component by inserting the relevant keywords (or
operations) into that component.
431
Chapter 12 • User-Defined Functions and Function Libraries
A user-defined function is automatically defined as a global function. You
can call global functions by selecting them from the lists displayed in the
following locations:
➤
The Operation box, when the Functions category is selected in the Step
Generator (for function libraries)
➤
The Operation column, when the Operation item is selected from the
Item list in the Keyword View
➤
The Expert View, when using IntelliSense
You can also register a user-defined function as a method for a QuickTest test
object class. A registered method can either override the functionality of an
existing test object method for the duration of a run session, or be registered
as a new method for a test object class. You can call test object method by
selecting it from the list displayed in the following locations:
➤
The Operation box, when the relevant test object class is selected in the
Step Generator (for function libraries)
➤
The Operation column, when a test object of the relevant class is selected
from the Item list in the Keyword View
➤
The Expert View, when using IntelliSense and typing the name of a test
object of the relevant class
For more information on registering user-defined functions, see
"User-Defined Function Registration" on page 434 and "How to Create and
Register a User-Defined Function Using the Function Definition Generator"
on page 453.
Before you can call registered or global function from a component, you
must add it to a function library that is associated with the component’s
application area.
432
Chapter 12 • User-Defined Functions and Function Libraries
User-Defined Function Names
When deciding the name for your function, consider the following:
➤
QuickTest searches the function libraries in the order in which they are
listed in the Resources pane. If QuickTest finds more than one function
that matches the function name in a specific function library, it uses the
last function it finds in that function library. If QuickTest finds two
functions with the same name in two different function libraries, it uses
the function from the function library that has the higher priority. To
avoid confusion, it is recommended that you verify that within the
resources associated with an application area, each function has a unique
name.
➤
When you create a user-defined function, do not give it the same name as
a built-in function (for example, GetLastError, MsgBox, or Print). Built-in
functions take priority over user-defined functions, so if you call a
user-defined function that has the same name as a built-in function, the
built-in function is called instead. For a list of built-in functions, see the
Built-in functions list in the Step Generator (Insert > Step Generator).
User-Defined Function Storage and Access
Using QuickTest, you can define and store your user-defined functions in a
function library (saved as a .qfl file, by default). For details, see "How to
Manage Function Libraries" on page 440.
When you store a public function in a function library and associate the
function library with an application area, any component associated with
that application area can call the public functions in that function library.
For more information, see "Associated Function Libraries" on page 430.
You can access the functions that are stored in an associated function library
from the Step Generator (for function libraries), the Operation column in
the Keyword View, and the Available Keywords pane.
You can also define private functions and store them in a function library.
Private functions are functions that can be called only by other functions
within the same function library. This is useful if you need to reuse
segments of code in your public functions.
433
Chapter 12 • User-Defined Functions and Function Libraries
By implementing user-defined functions in function libraries and
associating them with your component via the application area, you enable
other users, such as Subject Matter Experts, to choose functions that
perform complex operations, such as adding if/then statements and loops to
component steps—without needing any programming knowledge. In
addition, you save time and resources by implementing and using reusable
functions.
User-Defined Function Registration
You can register a public user-defined function to a test object to instruct
QuickTest to use your user-defined function as a method of a specified test
object class for the duration of a component run, or until you unregister the
method.
When you register a function to a test object class, you can register the
function as a new operation for the test object class, or you can choose to
override the functionality of an existing operation. You can unregister the
function to disable new operations or to return existing operations to their
original QuickTest behavior.
A registered method applies only to the function library in which you
register it. In addition, QuickTest clears all function registrations at the
beginning of each run session.
After you register a function to a test object class, it can be called as a
method of that test object class (in addition to being available as a global
function). The function is displayed as an operation in the Keyword View
Operation list when a test object of that class is selected from the Item list,
as well as in IntelliSense and in the general Operation list in the Step
Generator (for function libraries).
When you register a function to a test object class, you can optionally define
it as the default operation for that test object class. This instructs QuickTest
to display the function in the Operation column in the Keyword View, by
default, when you or a Subject Matter Expert choose a test object from the
associated class in the Item list.
434
Chapter 12 • User-Defined Functions and Function Libraries
This section also includes:
➤
"Preparing the User-Defined Function for Registration" on page 435
➤
"Registering User-Defined Functions as Test Object Methods" on page 435
➤
"Unregistering User-Defined Test Object Methods" on page 436
➤
"Running an Overriding User-Defined Test Object Method" on page 437
Preparing the User-Defined Function for Registration
When you run a statement containing a registered method, QuickTest sends
the test object as the first argument. For this reason, your user-defined
function must have at least one argument. Your user-defined function can
have any number of arguments, or it can have only the test object
argument.
If you register a user-defined function to override an existing test object
method, then after the test object argument, the function must have the
same number of arguments as the method it overrides.
Tip: You can use the parent identification property to retrieve the parent of
the object represented by the first argument in your function. For example:
ParentObj = obj.GetROProperty("parent")
Registering User-Defined Functions as Test Object
Methods
To register a user-defined function as a test object method, you enter a
RegisterUserFunc statement in your function library. The RegisterUserFunc
statement specifies the test object class, the name of your function, and the
name of the test object method that should call your function.
In this statement, you can also instruct QuickTest to use the function as the
default operation for the test object class.
You can register the same function to more than one test object class, using
the same operation name for different test object classes, or different names.
435
Chapter 12 • User-Defined Functions and Function Libraries
After the RegisterUserFunc statement runs, your method becomes a
recognized method of the specified test object class while it is being used by
the component, or until you unregister the method.
When QuickTest loads a function library it runs all the statements in the
function library. Therefore, it is recommended to include the
RegisterUserFunc statement in the function library so that the method will
be immediately available for use in any component using that function
library.
For task details, see "Register the function to a test object class - optional" on
page 451.
Unregistering User-Defined Test Object Methods
When you register a method using a RegisterUserFunc statement, your
method becomes a recognized method of the specified test object class while
it is being used by the component, or until you unregister the method.
If your method overrides a QuickTest method, unregistering the method
resets the method to its normal behavior. Unregistering other methods
removes them from the list of methods supported by the test object class.
For task details, see "Unregister the function - optional" on page 452.
Unregistering Functions That Were Registered More Than Once
You can re-register the same method to use different user-defined functions
without first unregistering the method. However, when you do unregister
the method, it resets to its original QuickTest functionality (or is cleared
completely if it was a new method), and not to the previous registration.
Example:
Suppose you enter the following statements:
RegisterUserFunc "Link", "Click", "MyClick"
RegisterUserFunc "Link", "Click", "MyClick2"
UnRegisterUserFunc "Link", "Click"
436
Chapter 12 • User-Defined Functions and Function Libraries
After running the UnRegisterUserFunc statement, the Click method stops
using the functionality defined in the MyClick2 function, and returns to the
original QuickTest Click functionality, and not to the functionality defined
in the MyClick function.
Running an Overriding User-Defined Test Object
Method
You can register a user-defined function to (temporarily) override the
functionality of an existing test object method for a test object class.
When a user-defined function runs instead of the test object method it
overrides, if it calls any overridden test object methods, the standard
functionality of those methods is used.
When you call the user-defined function directly, if it calls any overridden
test object methods, their overriding user-defined functions are used.
437
Chapter 12 • User-Defined Functions and Function Libraries
Examples:
The following scenarios demonstrate different situations that are affected by
this functionality.
A Registered User Function That Calls the Test Object Method It Overrides
Suppose you want to report the current value of a Web edit box to the run
results before you set a new value for it. You can override the standard
QuickTest Set method with a function that retrieves the current value of an
edit box, reports that value to the run results, and then sets the new value of
the edit box using the standard Set method.
The function (and its registering line) would look something like this:
Function MySet (obj, x)
dim y
y = obj.GetROProperty("value")
Reporter.ReportEvent micDone, "previous value", y
obj.Set (x)
End Function
RegisterUserFunc "WebEdit", "Set", "MySet"
When a component step uses the WebEdit.Set method, the overriding
MySet function runs, and in turn, calls the original QuickTest WebEdit Set
method.
However, when a component step uses the MySet function, the function
runs and calls the overridden WebEdit.Set method, running the MySet
function once more. This time, MySet calls the original QuickTest WebEdit
Set method.
A Registered User Function That Calls a Test Object Method Overridden by
Another Function
Suppose you want to override the VbButton’s standard Click method to
always perform a double click. In addition, you want to override the
standard QuickTest DblClick method with a function that retrieves the text
of the button and reports it to the run results before double-clicking the
button.
438
Chapter 12 • User-Defined Functions and Function Libraries
The functions (and their registering lines) would look something like this:
Function MyDblClick (obj, x, y, button)
dim button_name
button_name = obj.GetROProperty("text")
Reporter.ReportEvent micDone, "Clicking", button_name
obj.DblClick x, y, button
End Function
RegisterUserFunc "VbButton", "DblClick", "MyDblClick"
Function MyClick (obj, x, y, button)
obj.DblClick x, y, button
End Function
RegisterUserFunc "VbButton", "Click", "MyClick"
When a component step uses the VbButton.Click method, the overriding
MyClick function runs. In this situation, MyClick will then run the original
QuickTest VbButton DblClick method.
When a component step uses the MyClick function, the function runs and
calls the overridden VbButton.DblClick method, running MyDblClick.
MyDblClick reports the button text to the run results and then calls the
original QuickTest VbButton DblClick method.
To ensure that the MyClick function always runs the overridden behavior for
DblClick method, you could call MyDblClick directly within MyClick.
439
Chapter 12 • User-Defined Functions and Function Libraries
Tasks
How to Manage Function Libraries
This task describes the different activities you can perform to manage
function libraries in QuickTest. If a function is stored in a function library,
you must associate the function library with a component’s application area
before you can call the function from the component.
This task includes the following steps:
➤
"Create a function library" on page 440
➤
"Open a function library" on page 441
➤
"Edit a function library" on page 442
➤
"Enable editing for a read only function library" on page 442
➤
"Debug a function library" on page 442
➤
"Navigate between open QuickTest documents" on page 443
➤
"Navigate to the definition of a specific function" on page 443
➤
"Associate a function library with an application area" on page 443
➤
"Save a function library" on page 444
➤
"Print a function library" on page 444
➤
"Close a function library" on page 445
Create a function library
Click the New button down arrow and select Function Library.
You can also:
➤
440
Create a new function library file from the Application Area window or
from the Test Resources module in Quality Center. For details, see
"Function Libraries Pane (Application Area Window)" on page 689 or the
Quality Center or HP ALM user guide.
Chapter 12 • User-Defined Functions and Function Libraries
➤
Create function libraries outside of QuickTest in any editor and save them
with a .qfl extension.
Open a function library
Click the Open button down arrow and select Function Library. The Open
Function Library dialog box opens, enabling you to open a function library
from the file system or from a Quality Center project.
You can choose to open a function library in edit mode or read-only mode.
For details, see "Open <Resource> Dialog Box for Application Area
Resources" on page 512.
Tips:
➤
You can open a function library only if you have read or read-write
permissions for the file.
➤
If the function library was recently created or opened, you can select it
from the recent files list in the File menu.
➤
If the function library is associated with the open component or
application area, you can also open it as follows:
- In the Resources pane, double-click the function library, or right-click
the function library and select Open Function Library.
- In the Available Keywords panes, double-click the function library, or
right-click the function library and select Open Resource.
- Select Resources > Associated Function Libraries.
441
Chapter 12 • User-Defined Functions and Function Libraries
Edit a function library
For details, see "How to Edit a Function Library" on page 446.
Enable editing for a read only function library
Select File > Enable Editing or click the Enable Editing button. You can now
edit the function library.
Note:
➤
You cannot enable editing if the function library is locked by another
user or checked in to a Quality Center project.
➤
During a debug session, all documents (such as components and
function libraries) are read-only. To edit a document during a debug
session, you must first stop the debug session.
Debug a function library
1 Associate the function library with a component (via its application area).
2 In your component, insert a call to at least one of the functions defined in
the function library.
3 Run the component, suspend the run session while in the context of your
function library and debug the function library.
For details, see "Debugging Components and Function Libraries" on
page 819.
Note: During a debug session, all documents are read-only and cannot be
edited. To edit a document during a debug session, you must first stop the
debug session.
442
Chapter 12 • User-Defined Functions and Function Libraries
Navigate between open QuickTest documents
You can open multiple function libraries while a component or application
area is open, and you can navigate between all of your open documents by
selecting the relevant tab.
Tips:
➤
If not all tabs are displayed due to lack of space, use the left and right
scroll arrows in the Document pane to display the required document’s
tab.
➤
To scroll between open QuickTest documents, Press CTRL+TAB on your
keyboard.
Navigate to the definition of a specific function
You can navigate directly from a function call to the function’s definition.
1 In the function library, click in the step containing the relevant function.
2 Perform one of the following:
➤
Select Edit > Advanced > Go to Function Definition.
➤
Right-click the step and select Go to Function Definition from the
context menu.
QuickTest activates the relevant document (if the function definition is
located in another function library) and positions the cursor at the
beginning of the function definition. If the document is closed, QuickTest
opens it in read-only mode.
Associate a function library with an application area
For details, see "How to Manage Function Library Associations" on page 448.
443
Chapter 12 • User-Defined Functions and Function Libraries
Save a function library
Make sure that the function library you want to save is the active document
(You can click the function library’s tab to bring it into focus), and click the
Save button.
If the function library was previously saved, QuickTest saves it with your
changes. Otherwise, if this is the first time you are saving this function
library, the Save Function Library dialog box opens.
Save the function library to your Quality Center project by selecting the
relevant location from the sidebar of the dialog box. For details, see "Save
<Resource> Dialog Box for Application Area Resources" on page 516.
Tips:
➤
When you modify a function library, an asterisk (*) is displayed in the
title bar until the function library is saved.
➤
You can right-click a function library document’s tab and select Save.
➤
To save multiple documents, select Window > Windows. In the Windows
Dialog Box (described on page 911), select the documents you want to
save and click the Save button. QuickTest prompts you for the save
location for any new files that have not yet been saved.
➤
To save all open documents, select File > Save All. QuickTest prompts you
to specify a location in which to save any new files that have not yet
been saved.
Print a function library
Click the Print button. The Print Dialog Box (described on page 428) opens,
enabling you to print the function library and optional additional
information.
444
Chapter 12 • User-Defined Functions and Function Libraries
Close a function library
Make sure that the function library you want to save is the active document
(you can click the function library’s tab to bring it into focus) and Click the
Close button in the top right corner of the function library window.
Tips:
➤
When you modify a function library, an asterisk (*) is displayed in the
title bar until the function library is saved.
➤
If you don’t want to save it, you can right-click a function library
document’s tab and select Close.
➤
To close multiple documents, select Window > Windows. In the Windows
Dialog Box (described on page 911), select the documents you want to
close and click the Close Window(s) button. QuickTest prompts you for
the save location for any new files that have not yet been saved.
➤
To close all open function libraries, File > Close All Function Libraries, or
Window > Close All Function Libraries.
445
Chapter 12 • User-Defined Functions and Function Libraries
How to Edit a Function Library
The following steps describe how to edit a function library using the
QuickTest editing features that are available in the Expert View:
➤
"Add steps manually" on page 446
➤
"Drag and drop a function" on page 447
➤
"Check the syntax of the code in your function library" on page 447
Note: This task is part of a higher-level task. For details, see "How to Manage
Function Libraries" on page 440.
Add steps manually
You can use standard VBScript statements as well as any QuickTest reserved
objects, methods, functions, and any method associated with the test object
specified in the first argument of the function.
QuickTest applies the same formatting to your function library as is does to
content in the Expert View. For details on modifying this formatting, see
"Customizing Function Library Windows" on page 417.
IntelliSense is available for all functions defined in your component or for
public functions defined in associated function libraries.
Note: In function libraries, IntelliSense does not enable you to view test
object names or collections because function libraries are not connected to
object repositories.
446
Chapter 12 • User-Defined Functions and Function Libraries
Drag and drop a function
You can drag and drop a function (or part of it) within the same document,
or from one document to another.
To drag and drop a function from one document to another:
1 Separate the tabbed documents into separate document panes by clicking
the Restore Down button (located below the QuickTest window’s Restore
Down / Maximize button).
2 Select the relevant lines and drag and drop them from one document to
another.
Check the syntax of the code in your function library
Click the Check Syntax button. QuickTest checks the syntax of all the code
in your function library. This may include function definitions and other
VBScript statements.
Tip: For information on using VBScript, see "Basic VBScript Syntax" on
page 392.
447
Chapter 12 • User-Defined Functions and Function Libraries
How to Manage Function Library Associations
The following steps describe the different ways that you can associate a
function library with an open application area or modify existing
associations:
➤
"Associate the currently active function library with an application area"
on page 448
➤
"Associate a function library with an application area in the Function
Libraries pane" on page 449
➤
"Modify the priority of an associated function library" on page 449
➤
"Remove an associated function library" on page 449
Note: This task is part of a higher-level task. For details, see "How to Manage
Function Libraries" on page 440.
Associate the currently active function library with an
application area
1 Make sure that the application area with which you want to associate the
function library is open in QuickTest.
2 Create or open a function library in QuickTest. (Before continuing to the
next step, make sure that the function library you want to associate with
the application area is the active document—you can click the function
library’s tab to bring it into focus.) For more information, see "How to
Manage Function Libraries" on page 440.
3 Save the function library in your Quality Center project. For more
information, see "Save a function library" on page 444.
4 In QuickTest, select File > Associate Library '<Function Library>' with
'<Application Area>', or right-click in the in the function library and select
Associate Library '<Function Library>' with '<Application Area>'.
QuickTest associates the function library with the open application area.
448
Chapter 12 • User-Defined Functions and Function Libraries
Associate a function library with an application area in the
Function Libraries pane
1 In QuickTest, open your application area and click the Function Libraries
button on the sidebar.
2 In the Associated function libraries list, click the Add button. QuickTest
displays a browse button enabling you to browse to a function library in
your Quality Center project.
3 Select the function library you want to associate with your application
area and click Open.
Modify the priority of an associated function library
In the list of associated function libraries in the Function Libraries pane,
select the function library you want to prioritize and use the Up and Down
arrows.
For more information, see "Associated Function Libraries" on page 678.
Remove an associated function library
Perform one of the following:
➤
In the Resources pane, right-click the function library and select Remove
Function Library, or select the function library and press the DELETE key.
➤
In the list of associated function libraries in the Function Libraries pane,
select the function library you want to remove and click the Remove
button.
For more information, see "Associated Function Libraries" on page 678.
449
Chapter 12 • User-Defined Functions and Function Libraries
How to Work with a User-Defined Function
This task describes how to create and work with a user-defined function that
you store in a function library and register to a test object class.
This task includes the following steps:
➤
"Prerequisites - Open the function library" on page 450
➤
"Create the function" on page 450
➤
"Register the function to a test object class - optional" on page 451
➤
"Associate the function library with an application area" on page 452
➤
"Call the function" on page 452
➤
"Unregister the function - optional" on page 452
1 Prerequisites - Open the function library
Create a new function library, open an existing one, or click on the tab of
an open function library to bring it into focus.
2 Create the function
You can define functions manually or using the Function Definition
Generator, which creates the basic function definition for you
automatically.
Even if you prefer to define functions manually, you may still want to use
the Function Definition Generator to view the syntax required to add
header information, register a function to a test object class, or set the
function as the default method for that test object class. For an in-depth
view of the required syntax, you can define a function using the Function
Definition Generator and experiment with the various options.
For details, see "Function Definition Generator Dialog Box" on page 460.
When writing the code for your function, consider the issues listed in
"Troubleshooting and Limitations - Function Libraries" on page 469. For
details on using VBScript, see the Microsoft VBScript Language Reference
(Help > QuickTest Professional Help > VBScript Reference > VBScript).
450
Chapter 12 • User-Defined Functions and Function Libraries
Note:
➤
If you want to register the function to a test object class, define it as a
public function, and make sure that it expects the test object as the
first argument.
➤
If you want to override an existing test object method, make sure that
after the test object argument, your function accepts the same number
of arguments as the method it overrides.
3 Register the function to a test object class - optional
You can register your function as a new method for the test object class,
or you can register it using an existing method name to (temporarily)
override the existing functionality of the specified method.
You can perform this step manually, or using the Function Definition
Generator Dialog Box (described on page 460):
➤
Add a RegisterUserFunc statement in your function library. The name
of the test object operation you register cannot contain spaces. In this
statement, you can also instruct QuickTest to use the function as the
default operation for the test object class.
Example:
RegisterUserFunc "WebEdit", "MySet", "MySetFunc", True
After this statement runs (in your function library), the MySet method
(operation) is added to the WebEdit test object class using the
MySetFunc user-defined function, and defined to be the default
operation (as specified in the last argument of the statement).
If you or the Subject Matter Expert choose the WebEdit test object
from the Item list in the Keyword View, the MySet operation will be
selected automatically in the Operation column. It will also be
displayed in the Operation list together with other registered and out
of the box operations for the WebEdit test object.
451
Chapter 12 • User-Defined Functions and Function Libraries
For syntax and other examples, see the Utility Statements section (in
the Utility Objects section) of the HP QuickTest Professional Object Model
Reference.
➤
If you use the Function Definition Generator dialog box to create your
function definition, a RegisterUserFunc statement is automatically
added immediately after the definition if you select the Register to a
test object option.
You can add additional RegisterUserFunc statements manually to register
the function to additional test object classes.
Tip: It is recommended to include the RegisterUserFunc statement in the
function library so that the method will be immediately available for use
in any component using that function library.
4 Associate the function library with an application area
Associate the function library with an application area to enable
components to access to the user-defined functions.
For details, see "Associate a function library with an application area" on
page 443.
5 Call the function
In your component or function library, create steps that call your
user-defined function as a global function, or run it by calling the test
object method to which it is registered.
6 Unregister the function - optional
If you do not want your function to remain registered until the end of the
run session, add an UnRegisterUserFunc statement in your function
library. For syntax and an example, see the Utility Statements section (in
the Utility Objects section) of the HP QuickTest Professional Object Model
Reference.
452
Chapter 12 • User-Defined Functions and Function Libraries
How to Create and Register a User-Defined Function
Using the Function Definition Generator
This task provides a general description of each step required to create a
user-defined function and register it to a test object class using the Function
Definition Generator Dialog Box (described on page 460). This task also
includes examples for some of the steps.
Note: This task is part of a higher-level task. For details, see "How to Work
with a User-Defined Function" on page 450.
This task includes the following steps:
➤
"Prerequisite - Open the function library" on page 454
➤
"Open the Function Definition Generator" on page 454
➤
"Specify the details for the function definition" on page 454
➤
"Register the function to a test object class - optional" on page 454
➤
"Add arguments to the function - optional" on page 455
➤
"Add documentation details to the function - optional" on page 456
➤
"Preview the function definition before finalizing it" on page 457
➤
"Insert the function in your active document" on page 457
➤
"Add the content (code) of the function" on page 458
➤
"Results" on page 459
453
Chapter 12 • User-Defined Functions and Function Libraries
1 Prerequisite - Open the function library
Make sure that the function library in which you want to insert the
function definition is the active document. (You can click the function
library’s tab to bring it into focus.) This is because the Function Definition
Generator inserts the function in the currently active document after you
finish defining it.
2 Open the Function Definition Generator
Select Insert > Function Definition Generator. The Function Definition
Generator dialog box opens.
3 Specify the details for the function definition
Specify the function’s name, type, and scope in the Function Definition
Area.
Example:
If you want to define a function that verifies the value of a specified
property, you might name it VerifyProperty and define it as a public
function so that it can be called from any associated component (as long
as the function library is associated with its application area). (If you
define it as private, the function can be called only from elsewhere in the
same function library. Private functions cannot be registered to a test
object class.)
4 Register the function to a test object class - optional
If you defined a public function and you want to register the function as a
test object operation, do the following in the Registration Area (described
on page 464):
a Select the Register to a test object check box.
b Select the test object from the list of available objects.
Example:
For the sample VerifyProperty function, you might want to register it
to the Link test object.
454
Chapter 12 • User-Defined Functions and Function Libraries
c Enter the name of a new operation that you want to add to the test
object class, or select an existing operation to specify the operation
that you want to override its standard functionality. The name of the
method cannot contain spaces.
Example:
For the sample VerifyProperty function, you might want to define a
new VerifyProperty operation.
d Optionally, specify that this operation is the default operation for test
objects of this type.
Tip: If you choose not to register your function at this time, you can
manually register it later by adding a RegisterUserFunc statement as
described in "Register the function to a test object class - optional" on
page 451. You can also add additional RegisterUserFunc statements, to
register the function to additional test object classes.
5 Add arguments to the function - optional
Specify any arguments that are required for your function to run
correctly. For details, see "Arguments Area" on page 465.
Example:
For the VerifyProperty function, registered to a test object class in the
example for the previous step, you may want to assign the arguments
prop_name (the name of the property to check) and expected_value (the
expected value of the property), in addition to the first argument,
test_object.
455
Chapter 12 • User-Defined Functions and Function Libraries
6 Add documentation details to the function - optional
Define Description and Documentation strings for the test object
operation. For details, see "Additional Information Area" on page 466.
Example:
➤
For the sample VerifyProperty function, you may want to provide the
following description: Checks whether a property value matches the
actual value.
➤
If you were checking a link to "HP" from a search engine, you might
define the following documentation using the Function Definition
Generator:
‘@Documentation Check if the <Test object name> <Test object type>
<prop_name> value matches the expected value: <expected_value>.
In the Keyword View, after you create a step that calls the
VerifyProperty operation and choose values for the arguments, the
above documentation might appear as follows: Check if the
"Management Software" link "text" value matches the expected value:
"Business Technology Optimization (BTO) Software".
456
Chapter 12 • User-Defined Functions and Function Libraries
7 Preview the function definition before finalizing it
As you add information to the Function Definition Generator, the
Preview area displays the emerging function definition. You can review
your function and make any changes, as needed, in the various areas of
the dialog box. For details, see "Bottom Area" on page 468.
Example:
After defining the VerifyProperty function as described in the previous
steps, the Preview area displays the following code:
‘@Description Checks whether a property matches its expected value
‘@Documentation Check whether the <Test object name> <Test object type>
<prop_name> value matches the expected value: <expected_value>.
Public Function VerifyProperty (test_object, prop_name, expected_value)
‘TODO: add function body here
End Function
RegisterUserFunc "Link", "VerifyProperty", "VerifyProperty"
8 Insert the function in your active document
a To generate an additional function definition after inserting this one,
select Insert another function definition.
b Click OK. QuickTest inserts the generated VBScript code in the active
document.
457
Chapter 12 • User-Defined Functions and Function Libraries
9 Add the content (code) of the function
To finalize the function, add content to the function code, as required,
replacing the TODO comment.
When writing the code for your function, consider the issues listed in
"Troubleshooting and Limitations - Function Libraries" on page 469. For
details on using VBScript, see the Microsoft VBScript Language Reference
(Help > QuickTest Professional Help > VBScript Reference > VBScript).
Example:
For example, if you want the function to verify whether the expected
value of a property matches the actual property value of a specific test
object, you might add the following to the body of the function:
Dim actual_value
' Get the actual property value
actual_value = obj.GetROProperty(prop_name)
' Compare the actual value to the expected value
If actual_value = expected_value Then
Reporter.ReportEvent micPass, "VerifyProperty Succeeded", "The " &
prop_name & " expected value: " & expected_value & " matches the actual value"
VerifyProperty = True
Else
Reporter.ReportEvent micFail, "VerifyProperty Failed", "The " & prop_name &
" expected value: " & expected_value & " does not match the actual value: " &
actual_value
VerifyProperty = False
End If
458
Chapter 12 • User-Defined Functions and Function Libraries
10 Results
➤
The function will now be accessible to any associated component (via
its application area).
To associate the function library with additional application areas, see
"How to Manage Function Library Associations" on page 448.
➤
If you registered the function to a test object, the function is displayed
as an operation in the Keyword View Operation list when a test object
of that class is selected from the Item list, as well as in IntelliSense and
in the general Operation list in the Step Generator (for function
libraries).
You can add additional RegisterUserFunc statements, to register the
function to additional test object classes. For details, see "Register the
function to a test object class - optional" on page 451.
➤
If you specified that the function is the default operation for the test
object class, it is displayed in the Operation column in the Keyword
View, by default, when you or a Subject Matter Expert choose a test
object from the associated class in the Item list.
➤
If you defined a description and a Documentation string for the test
object operation, they are displayed in the Keyword View and the Step
Generator.
459
Chapter 12 • User-Defined Functions and Function Libraries
Reference
Function Definition Generator Dialog Box
This dialog box enables you to:
➤
Generate definitions for new user-defined functions.
➤
Add header information to the function you create.
➤
Register the functions to a test object class, if needed.
You fill in the required information and the Function Definition Generator
creates the basic function definition for you. You complete the function by
adding its content (code).
460
Chapter 12 • User-Defined Functions and Function Libraries
For a task that describes the order of working with this dialog box and
provides examples, see "How to Create and Register a User-Defined Function
Using the Function Definition Generator" on page 453.
To access
Select Insert > Function Definition Generator
Tip: You can customize the Insert toolbar to display the Function
Definition Generator button
to access this dialog box more
directly.
461
Chapter 12 • User-Defined Functions and Function Libraries
Important
information
Before you open the dialog box, make sure that the function
library in which you want to insert the function definition is the
active document. (You can click the function library’s tab to bring
it into focus.) This is because the Function Definition Generator
inserts the function in the currently active document when you
click OK.
Relevant
tasks
➤ "How to Create and Register a User-Defined Function Using the
Function Definition Generator" on page 453
➤ "How to Work with a User-Defined Function" on page 450
See also
➤ "User-Defined Functions" on page 431
➤ "User-Defined Function Storage and Access" on page 433
➤ "User-Defined Function Registration" on page 434
This dialog box contains the following key areas:
➤
"Function Definition Area" on page 462
➤
"Registration Area" on page 464
➤
"Arguments Area" on page 465
➤
"Additional Information Area" on page 466
➤
"Bottom Area" on page 468
Function Definition Area
462
Chapter 12 • User-Defined Functions and Function Libraries
User interface elements are described below:
UI Elements
Description
Name
A name for the new function.
The name should clearly indicate what the operation does so
that it can be easily selected from the Step Generator (for
function libraries) or the Keyword View.
For a list of naming conventions, see "Naming Conventions" on
page 1121.
Note:
➤ Do not use any of the built-in function names (for example,
GetLastError, MsgBox, or Print). For a list of built-in
functions, see the Built-in functions list in the Step Generator
(Insert > Step Generator).
➤ Try to give each function a name that is unique within the
resources associated with a specific application area.
For more details, see "User-Defined Function Names" on
page 433.
Type
The type of function.
Possible values:
➤ Function
➤ Sub (subroutine)
Scope
The scope of the function.
Possible values:
➤ Public. The function can be called by any component whose
application area is associated with this function library.
➤ Private. The function can be called only from elsewhere in the
same function library.
Default value: Public
Notes:
➤ Only public functions can be registered to a test object class.
➤ If you create a user-defined function manually and do not
define the scope as Public or Private, it will be treated as a
public function, by default.
463
Chapter 12 • User-Defined Functions and Function Libraries
Registration Area
User interface elements are described below:
UI Elements
Description
Register to a
test object
Indicates whether to register this function as an operation for
a QuickTest test object class.
All user-defined functions are available as global operation. If
you register the function to a test object class, it can be also be
called by test objects of that class, and is displayed in the list of
available operations for such test objects. For more details, see
"User-Defined Function Registration" on page 434.
Note: If you select this option, then when the Function
Definition Generator creates your function definition, it also
automatically adds a RegisterUserFunc statement with the
correct argument values immediately after the definition.
Test object
The test object class (type) to which you want to register the
function.
Available: When Register to a test object is selected
Operation
The operation name to use for this function.
You can select an existing test object operation to override its
functionality, or enter a name for a new operation to add to
the test object class.
Do not include spaces in the test object operation name.
Available: When Register to a test object is selected
464
Chapter 12 • User-Defined Functions and Function Libraries
UI Elements
Description
Register as
default
operation
Indicates whether the function should be the default
operation for the test object class.
This instructs QuickTest to display the function in the
Operation column, by default, when you or the Subject Matter
Expert choose a test object of the associated class in the Item
list.
Note: If you select this option, then when the Function
Definition Generator creates your function definition, it
specifies the value True as the fourth argument of the
RegisterUserFunc statement.
Available: When Register to a test object is selected
Arguments Area
Important
information
When calling a function that is registered to a test object
class, QuickTest passes the test object as the first
argument. Therefore:
➤ If you select the Register to a test object check box,
the Function Definition Generator automatically adds
the argument, test_object, as the first argument in this
area.
➤ If you clear the Register to a test object check box, the
default test_object argument is automatically removed
from this area (unless you renamed it).
465
Chapter 12 • User-Defined Functions and Function Libraries
User interface elements are described below:
UI Elements
Description
A toolbar that enables you to add, remove, or re-arrange
arguments in the list. You can add as many arguments as
want to the list.
Caution:
➤ If you are registering the function to a test object class,
do not remove the test_object argument, change its
location in the list, or modify its Pass Mode.
➤ If you are registering the function to override an
existing test object method, then after the test object
argument, the function must have the same number
of arguments as the method it overrides.
Name
The argument name.
The name should clearly indicate the value that needs to
be entered for the argument. For a list of naming
conventions, see "Naming Conventions" on page 1121.
Pass Mode
Specifies whether the argument will be passed to the
function By value or By reference during run-time.
Additional Information Area
The Function Definition Generator can add header information to your
user-defined function definitions, based on the information you add in this
area.
466
Chapter 12 • User-Defined Functions and Function Libraries
User interface elements are described below:
UI Elements
Description
Description
The function’s description.
If you register the function as a test object operation, the
description is displayed as a tooltip in QuickTest when the
cursor is positioned over the operation in the Step Generator
(for function libraries), in the Keyword View, and when using
IntelliSense.
Keep the description text brief and clear.
Documentation
A sentence (in the imperative form) that specifies exactly what
a step using your function does.
If you register the function as a test object operation, the text
that you add here is displayed in the Documentation column
in the Keyword View. Therefore, the sentence must be clear
and understandable.
Insert Documentation Element. Displays a list that contains
the function’s arguments, and the items test object name and
test object type, enabling you to include these items in the
Documentation text.
If you use the argument or test object items in the
Documentation text, they are replaced dynamically by the
relevant test object names and types or argument values when
you create a step that uses the operation.
Note: The Test object name and Test object type items are
available in the list only if you selected the Register to a test
object check box.
467
Chapter 12 • User-Defined Functions and Function Libraries
Bottom Area
User interface elements are described below:
UI Elements
Description
Preview
Displays the VBScript code that the Function Definition
Generator will add to your active document, based on
the information that you enter in the dialog box.
The code is displayed in read-only format and includes:
➤ An empty function definition
➤ Header information for the function documentation
(if defined)
➤ A RegisterUserFunc statement (if you selected Register
to a test object)
The function definition is displayed dynamically, as you
enter the information. You can review your function and
make any changes, as needed, in the various areas of the
dialog box.
468
Insert another
function definition
Specifies whether the dialog box should remain open
after you click OK, enabling you to define an additional
function.
OK
Inserts the generated VBScript code in the active
document and clears the data from the dialog box.
Chapter 12 • User-Defined Functions and Function Libraries
Troubleshooting and Limitations - Function Libraries
This section describes troubleshooting and limitations for user-defined
functions and function libraries.
➤
If you define a VBScript class, it can be called only within the QuickTest
function library in which you defined it.
➤
You can use the RegisterUserFunc statement to register a user-defined
function that will override an existing test object method. You can also
register a user-defined function to override a test object method that was
created using a QuickTest Professional Extensibility SDK. If you override
this type of test object method, the user-defined function must not
(recursively) call the test object method that it overrides.
➤
By default, steps that use user-defined functions are not included in the
run results after a run session. If you want the function to appear in the
run results, you must add a Reporter.ReportEvent statement to the
function code. For example, you may want to provide additional
information or to modify the component or business process test status.
For details on the Reporter.ReportEvent statement, see the Utility Objects
section of the HP QuickTest Professional Object Model Reference.
If a step within your user-defined function calls a standard QuickTest test
object method, this step will appear in the run results after the run
session. However, you can still add a Reporter.ReportEvent statement to
the function code to provide additional information and to modify the
component or business process test status, if required.
➤
If you delete a function in use from an associated function library, the
component step using the function will display the
icon. In
subsequent run sessions for the component or business process test, an
error will occur when the step using the non-existent function is reached.
➤
To use an Option Explicit statement in a function library associated with
your component, you must include it in all of the function libraries
associated with the component. If you include an Option Explicit
statement in only some of the associated function libraries, QuickTest
ignores all of the Option Explicit statements in all function libraries.
469
Chapter 12 • User-Defined Functions and Function Libraries
470
➤
Each function library must have unique variables in its global scope. If
you have two associated function libraries that define the same variable
in the global scope using a Dim statement or define two constants with
the same name, the second definition causes a syntax error. If you need to
use more than one variable with the same name in the global scope,
include a Dim statement only in the last function library (since function
libraries are loaded in the reverse order).
➤
Function libraries that run in the same run session must not contain
different definitions for the same class. Make sure that each class is
defined in only one location.
➤
If another user modifies a function library that is referenced by a
component, or if you modify the function library using an external editor
(not QuickTest), the changes will take effect only after the component is
reopened.
Part IV
Working with Components and
Application Areas
472
13
Business Components
Note: Unless otherwise specified, references to Quality Center in this guide
apply to all currently supported versions of Quality Center and HP ALM.
Note that some features and options may not be supported in the specific
edition of Quality Center or HP ALM that you are using.
For a list of the supported versions of Quality Center or HP ALM, see the
HP QuickTest Professional Product Availability Matrix, available from the
Documentation Library Home page or the root folder of the
QuickTest Professional DVD.
For details on Quality Center or HP ALM editions, see the HP Quality Center
User Guide or the HP Application Lifecycle Management User Guide.
This chapter includes:
Concepts
➤
Business Components Overview on page 474
Tasks
➤
How to Manage Business Components on page 479
Reference
➤
New Business Component Dialog Box on page 487
➤
Open Business Component Dialog Box on page 489
➤
Save Business Component Dialog Box on page 492
➤
Change Application Area Dialog Box on page 494
Troubleshooting and Limitations - Business Components on page 495
473
Chapter 13 • Business Components
Concepts
Business Components Overview
You can use the Keyword View to create, view, modify, and debug a business
component in QuickTest.
In the Keyword View, business components are divided into steps in a
modular, keyword-driven, table format. Each step is a row that comprises
individual parts that you can easily modify. You create and modify steps by
selecting items and operations and entering additional information, as
required.
Each step in a business component is automatically documented as you
complete it. This enables you to view a description of the step in
understandable sentences. In addition, if you added a function library to the
application area associated with the business component, when you define a
step by selecting a user-defined operation (function), the documentation
that you added in the function library will be displayed for the step. For
details, see "How to Work with a User-Defined Function" on page 450.
Note: Subject Matter Experts can access components from the
Quality Center Business Components module. For details, see the
HP Business Process Testing User Guide.
474
Chapter 13 • Business Components
Business Component Resources
➤
Each business component is based on a specific application area, which is
stored in the Quality Center project in which you intend to save the
component.
➤
Each application area specifies the settings and resources for the business
component, including the location of shared object repositories, function
libraries, recovery scenarios, and other information.
➤
There may be one or more application areas from which to choose. You
select the application area that is best suited for your business
component. For details, see Chapter 14, "Application Areas."
Generally, business components are created and modified in Quality Center
by Subject Matter Experts. For details, see the HP Business Process Testing User
Guide.
This section also includes:
➤
"Converting Manual Components" on page 475
➤
"Tips and Guidelines for Selecting Application Areas for Your Component"
on page 478
Converting Manual Components
In QuickTest, you can open a manual component stored in your
Quality Center project and convert it to an automated business
(keyword-driven) component. This conversion process is irreversible.
(Although you can still view and run the manual steps in Quality Center, if
needed.)
When you open a manual component, QuickTest asks whether you want to
convert it to a business component. If you convert a manual component to
an automated component, each manual step from the manual component
is converted into a ManualStep operation in the Keyword View.
475
Chapter 13 • Business Components
The name, description, and expected result of each manual step are added as
argument values for each ManualStep operation. Any defined input and
output parameters are converted into local parameters.
After you convert a manual component to an automated business
component, you can still view its manual steps in Quality Center, and you
can run it as a manual component using the Quality Center Manual Runner.
In Quality Center, you can also modify or add additional steps to an
automated component in the Automation tab. These steps are then updated
automatically in the Component Steps tab, and in QuickTest.
Note: You can also convert a manual component to an automated
component from within Quality Center. For details, see the HP Business
Process Testing User Guide.
Add and modify manual steps for components
You can manually modify step names, step descriptions, and expected
results by changing the corresponding argument values in the relevant
ManualStep row of the Keyword View, for example:
All modifications you make in QuickTest to the component’s ManualStep
operations and regular keyword-driven steps are reflected in the Component
Steps tab and Automation tab of the component in Quality Center and vice
versa (after you save the changes). This means that you can update
components in either Quality Center or QuickTest and still continue to run
them manually using the Quality Center Manual Runner or
HP ALM Sprinter when needed. For more information on HP ALM Sprinter,
see "HP ALM Sprinter" on page 1115.
476
Chapter 13 • Business Components
Note:
➤
For general information on adding steps in the Keyword View, see
"Keyword View" on page 533. For details on the ManualStep operation,
see the Utility section of the HP QuickTest Professional Object Model
Reference.
➤
You can also use comments to add information about a step or to
separate sections of your business component. Each manual step and
comment appears as a separate row in the Keyword View. For details, see
"Comments in the Keyword View" on page 535.
➤
For details on adding steps in Quality Center, and on running manual
components using the Manual Runner in Quality Center, see the
HP Business Process Testing User Guide.
477
Chapter 13 • Business Components
Tips and Guidelines for Selecting Application Areas for
Your Component
478
➤
When you create a business component in QuickTest, you must select the
application area to which you want to associate the component. There
may be one or more application areas available from which to choose.
You should select the one that is best suited for the component.
➤
If changes are made to your application or to the resource files and
settings associated with the application area, the application area may
become unsuitable, and you may need to change the application area
associated with a specific component. For example, the object repository
could have been modified or removed from the application area.
➤
As your application develops, it may include additional or different
objects that are not contained in the currently associated object
repository. This could cause the component or business process test to run
incorrectly or to fail.
➤
If another application area contains the required resource files and
settings, you should change the application area associated with the
component.
➤
Each time you open a component, QuickTest verifies that the resources
specified for the component are available. If a component or application
area has resources that cannot be found, such as a missing shared object
repository, QuickTest indicates this in the Missing Resources pane. For
details, see Chapter , "Missing Resources Pane."
Chapter 13 • Business Components
Tasks
How to Manage Business Components
This task describes the different operations you can perform to manage
business components, and contains general considerations and guidelines.
This task includes:
➤
"Prerequisites" on page 480
➤
"Guidelines for users of previous QuickTest versions" on page 480
➤
"Create a new business component" on page 481
➤
"Open a business or scripted component" on page 482
➤
"Open and convert a manual component to an automated business
component" on page 483
➤
"Save a business or scripted component" on page 484
➤
"Change the application area associated with your component" on
page 485
➤
"Print a component" on page 486
➤
"Delete a component" on page 486
479
Chapter 13 • Business Components
Prerequisites
➤
You must connect QuickTest to a Quality Center project, which is where
business components and application area resources and settings are
stored. Connecting to your Quality Center project enables QuickTest to
create or open the business component. This also enables the business
component to access all of the resources defined in the application area
on which the component is based. For details, see "HP ALM Connection
Dialog Box" on page 1041.
➤
Make sure you have the required Quality Center permissions before
working with business components and application areas. For details on
setting user group permissions in the Business Components module, see
the HP Business Process Testing User Guide and the Quality Center or
HP ALM administrator guide.
➤
Components that are currently open in Quality Center or another
QuickTest session are locked and can be opened only in read-only format.
To work with these components, they must be closed everywhere else.
Additionally, if the resources used by a component are locked, these
resource files open in read-only mode. For information on working with
locked resources, see the section describing locked resources in the
HP QuickTest Professional User Guide Help.
Guidelines for users of previous QuickTest versions
480
➤
To modify a component created using QuickTest version 9.x, it must be
upgraded to the current version format using the QuickTest Asset Upgrade
Tool for Quality Center. Before it is upgraded, though, you can view it in
read-only format, and you can run it. (To work with a component created
using QuickTest version 8.x, it must first be upgraded to QuickTest
version 9.x.)
➤
After you save a converted component, it cannot be used with earlier
versions of QuickTest.
➤
You cannot open a component that was created with a later version of
QuickTest on a computer running an earlier version of QuickTest.
For example, you cannot open a component created in QuickTest 11.00
on a computer running QuickTest 9.2.
Chapter 13 • Business Components
Create a new business component
1 Open the New Business Component dialog box by selecting File > New >
Business Component. The New Business Component Dialog Box opens.
2 In the Application Area name area of the New Business Component
dialog box, select a suitable application area and click OK. For details, see
"New Business Component Dialog Box" on page 487.
Results: A new, untitled business component opens in the Keyword View.
3 (Optional) Add steps and comments to your business component. For
details, see "How to Add a Step to Your Component" on page 537 and
"Comments in the Keyword View" on page 535.
Note:
➤
Although the business component does not yet contain content, it
does contain all of the required settings and resources that were
defined in the application area on which it is based. You can view
these settings in read-only format by choosing File > Settings. If you
later need to change these settings, you can do so in the associated
application area.
➤
If you have not yet defined an application area, a new, untitled
business component opens using the default settings that are supplied
with Business Process Testing. Later, after you define an application
area, you can base the business component on it. For details, see
Chapter 14, "Application Areas."
481
Chapter 13 • Business Components
Open a business or scripted component
Do one of the following:
➤
Select the component in the Open Business Component dialog box,
which you open by selecting File > Open > Business/Scripted Component.
For details, see "Open Business Component Dialog Box" on page 489.
➤
Select the component from the list of recent files list in the File menu.
Note:
➤
If you select a component located in a Quality Center project, but
QuickTest is currently not connected either to Quality Center or to the
correct project, the Connect to Quality Center Project dialog box
opens and displays the correct server, project, and the name of the user
who most recently opened the component on this computer.
This dialog box also opens if you choose to open a component that
was last edited on your computer using a different Quality Center user
name. You can either log in using the displayed name or you can click
Cancel to stay logged in with your current user name.
482
➤
When you open a component, if the component’s associated
application area cannot be found, you are prompted to associate a
different application area with it.
➤
You open business components and scripted components in the same
way. For details on scripted components, see "Scripted Components"
on page 521.
Chapter 13 • Business Components
Open and convert a manual component to an automated
business component
Caution: Converting manual components to automated business
components cannot be undone.
1 Open the Open Business Components dialog box. For details, see "Open
Business Component Dialog Box" on page 489.
2 Select a manual component. Manual components are represented by a
component icon with an M in the left corner of the icon. The component
name is displayed in the read-only Component Name box.
Tip: You can filter the list of components to display only manual
components. For details, see "Open Business Component Dialog Box" on
page 489.
3 Click OK to open the component. QuickTest asks whether you want to
convert the manual component to a business component.
4 Click Yes to continue with the conversion (cannot be undone).
483
Chapter 13 • Business Components
5 In the New Business Component dialog box that opens, select an
application area for your business component and click OK. As QuickTest
downloads, opens, and converts the component, the operations it
performs are displayed in the status bar. For details on the New Business
Component dialog box, see "New Business Component Dialog Box" on
page 487. For details on application areas, see Chapter 14, "Application
Areas".
Results: Each manual step from the manual component is converted into
a ManualStep operation in the Keyword View. You can now work with the
component like any other component.
Note: If the application area you select does not yet contain all of the
required resources and settings, you can still add steps using the
ManualStep function or the Comment option. This enables you to type in
manual steps as you would in Quality Center or in another application,
such as Microsoft Excel or Microsoft Word.
Save a business or scripted component
➤
To save a modified component, select File > Save. The component is saved
with the changes.
➤
To save a new component or to save an existing component with a new
name, select File > Save As, and save the component as described in "Save
Business Component Dialog Box" on page 492.
Tip: To enable all users to differentiate between the various components,
you may want to rename a copy of a component, even if you save it to a
different folder.
484
Chapter 13 • Business Components
Results: The component is saved to the component tree in the
Quality Center project (Business Components module). As QuickTest
saves the component, the operations that it performs are displayed in the
status bar.
Note:
➤
You save business components and scripted components in the same
way. For details on scripted components, see "Scripted Components"
on page 521.
➤
You can convert a business component to a scripted component. For
details, see "How to Convert a Business Component to a Scripted
Component" on page 527.
➤
The data sheet name in the data table is identical to the scripted
component name. If you save a scripted component with a new name
(File > Save As), the data sheet is automatically renamed. If you have a
step that references the data sheet by name, the step will fail during
the run session because it references the former data sheet name. If
you save a scripted component with a new name, you must find any
references to the former data sheet name in the Expert View and
replace them with the new data sheet name.
Change the application area associated with your component
In the Change Application Area dialog box, you select a different
application area and click OK to change the application area associated with
a component. For details, see "Change Application Area Dialog Box" on
page 494.
485
Chapter 13 • Business Components
Print a component
1 Click the Print button or select File > Print. A standard Print dialog box
opens.
2 Click OK to print the content of the Keyword View to your default
Windows printer.
Tip: You can select File > Print Preview to display the Keyword View on
screen as it will look when printed.
Delete a component
You can delete a component only in Quality Center, regardless of whether it
was created in QuickTest or in Quality Center. For details, see the
HP Business Process Testing User Guide.
486
Chapter 13 • Business Components
Reference
New Business Component Dialog Box
This dialog box enables you to create a new business component in your
Quality Center project.
To access
Connect to your Quality Center project. For details, see
"HP ALM Connection Dialog Box" on page 1041.
Then do one of the following:
➤ Select the File > New > Business Component menu
command.
➤ Press CTRL+SHIFT+N.
Tip: If a business component is already open, clicking the New
button opens a new application area.
487
Chapter 13 • Business Components
Important
information
The New Business Component dialog box lists all available
application areas. You can click on an application area to view
its description.
Relevant tasks
"How to Manage Business Components" on page 479
See also
➤ "Business Components Overview" on page 474
➤ "Save Business Component Dialog Box" on page 492
➤ "Change Application Area Dialog Box" on page 494
User interface elements are described below:
UI Elements
Description
Application
area name
Available application areas to which you can associate a
component.
Select an application area and click OK to create a new
component.
Description
The description of the selected application area. This is the
same description that Subject Matter Experts see in
Quality Center.
These are the descriptions that Subject Matter Experts use to
determine which application area to choose when they create
a new business component in Quality Center.
Note: The application area description is defined in the
General tab of the application area window. For details, see
"General Pane (Application Area Window)" on page 686.
488
Chapter 13 • Business Components
Open Business Component Dialog Box
This dialog box enables you to open an existing business component from
your Quality Center project.
To access
Connect to your Quality Center project. For details, see
"HP ALM Connection Dialog Box" on page 1041.
Then do one of the following:
➤ Select the File > Open > Business/Scripted Component menu
command.
➤ Click the Open toolbar button down arrow and select
Business/Scripted Component.
489
Chapter 13 • Business Components
Important
information
➤ When the component opens, the QuickTest title bar displays
Components, the full path and the component name. For
example, the title bar for a flight_login component may be:
[Components\Flight\flight_login]
➤ The component opens in read-only mode if:
➤ You select Open in read-only mode.
➤ You open a component that is currently checked in to the
Quality Center version control database (for projects that
support version control).
➤ You open a component that is currently checked out to
another user (for projects that support version control).
➤ You can also open a recently used component by selecting it
from the recent files list in the File menu. If you select a
component when you are not connected to the
Quality Center project, or if you select a component that is
stored in a different Quality Center project, QuickTest
displays a message asking you if you want to connect to that
project.
Relevant tasks
"How to Manage Business Components" on page 479
See also
➤ "New Business Component Dialog Box" on page 487
➤ "Save Business Component Dialog Box" on page 492
➤ "Change Application Area Dialog Box" on page 494
User interface elements are described below (unlabeled elements are shown
in angle brackets):
490
UI Elements
Description
<sidebar>
Displays the location in which the component or other asset,
such as a function library, is stored. For business components,
only ALM/QC Components is displayed.
Look in
Lists the Quality Center path in the ALM/QC Business
Components module. You can use the down arrow to navigate
to the required folder, or you can double-click a folder in the
components list area to navigate to the required folder.
Chapter 13 • Business Components
UI Elements
Description
<component
list area>
Displays the folders and/or components stored in the current
path.
Note: If the component is stored in a Quality Center project
with version control support, you can view version control
information for the component by clicking the Views down
arrow and selecting Details.
➤ The Name column lists the names of the components that
belong to the selected subject.
➤ The Modified By column indicates the Quality Center user
that created or last modified the component.
➤ The Checked Out To column indicates the Quality Center
user to whom the component is currently checked out. If
the test is checked in, this is blank.
File name
Displays the name of the component selected in the
components list area.
Files of type
Enables you to filter the list of displayed assets by selecting the
file type you want to open. You can select one of the following
component types:
➤ QuickTest Components. Displays components that were
automated using QuickTest Professional or Quality Center.
➤ Manual Components. Displays components that were
created in Quality Center and have not yet been converted
to automated components. For details, see "Converting
Manual Components" on page 475.
➤ All Components. Displays all QuickTest automated
components and manual components.
Open in
read-only mode
Select to open the component in read-only mode. This option
enables you to view the component but not modify it.
Open
Opens the selected component.
Note: If the component is checked into a
version-control-enabled Quality Center project, the Open
button contains a down arrow with an Open and Check out
option, enabling you to open the component and immediately
check it out. For details, see "Checking Assets Out of the
Version Control Database" on page 1100.
491
Chapter 13 • Business Components
Save Business Component Dialog Box
This dialog box enables you to save a new component, or to save an existing
component with another name.
To access
To save a new component do one of the following:
➤ Select the File > Save menu command.
➤ Press CTRL+S.
To save an existing component with another name:
Select the File > Save As menu command.
Relevant
tasks
"How to Manage Business Components" on page 479
See also
➤ "Business Components Overview" on page 474
➤ "New Business Component Dialog Box" on page 487
➤ "Open Business Component Dialog Box" on page 489
➤ "Change Application Area Dialog Box" on page 494
492
Chapter 13 • Business Components
User interface elements are described below:
UI Elements
Description
<sidebar>
Displays the location in which the component or other asset,
such as a function library, is stored. For business components,
only ALM/QC Components is displayed.
Look in
Lists the path in the ALM/QC Business Components module. You
can use the down arrow to navigate to the required folder, or you
can double-click a folder in the components list area to navigate
to the required folder.
<component
list area>
Displays the folders and/or components stored in the current
path.
Note: If the component is stored in a Quality Center project with
version control support, you can view version control
information for the component by clicking the Views down arrow
and selecting Details.
➤ The Name column lists the names of the components that
belong to the selected subject.
➤ The Modified By column indicates the Quality Center user that
created or last modified the component.
➤ The Checked Out To column indicates the Quality Center user
to whom the component is currently checked out. If the test is
checked in, this is blank.
File Name
Enables you to name the component.
Enter a name for the component and click OK. Use a descriptive
name that will help you and others identify the component
easily. For naming conventions, see
Files of Type
Lists the types of components that you can save.
493
Chapter 13 • Business Components
Change Application Area Dialog Box
This dialog box enables you to associate an existing component with another
application area.
To access
1 Open the component as described in "Open Business
Component Dialog Box" on page 489.
2 Select the File > Change Application Area menu command.
Relevant tasks
"How to Manage Business Components" on page 479
See also
➤ "Business Components Overview" on page 474
➤ "New Business Component Dialog Box" on page 487
➤ "Open Business Component Dialog Box" on page 489
➤ "Save Business Component Dialog Box" on page 492
494
Chapter 13 • Business Components
User interface elements are described below:
UI Elements
Description
Application
area name
Available application areas to which you can associate a
component.
Select an application area and click OK to change the
associated application area.
Description
The description of the selected application area, as defined in
the General tab of the application area window. For details, see
"General Pane (Application Area Window)" on page 686.
Troubleshooting and Limitations - Business Components
This section describes troubleshooting and limitations for working with
business components.
➤
For troubleshooting and limitations for learning objects, and recording
and running steps, see "Learning objects and running steps" on page 744.
➤
Dual monitor support. QuickTest records only on the primary monitor.
Therefore, if you are working with dual monitors, make sure that your
application is visible on the primary monitor during a recording session.
➤
Start menu / Quick Launch Panel. On Windows Vista, Windows 7,
Windows Server 2008, and Windows Server 2008 R2, if you begin a
recording session after installing QuickTest (or upgrading from an earlier
version) without restarting your computer, QuickTest cannot record
operations on the Windows Start menu or Quick Launch Panel.
Workaround: Restart your computer and start a new recording session.
495
Chapter 13 • Business Components
➤
Start menu. QuickTest does not record launching Windows Help from the
Start menu.
➤
Start menu. QuickTest does not record the selection of Start menu items
that are customized as menus, such as My Computer, Control Panel, or
Recent Documents.
Workaround: Customize the Start menu items as links so that QuickTest
can record operations on them or record the activation of these items
another way (and not through the Start menu).
➤
Renaming a QuickTest component from Quality Center may cause the
test or component to behave unexpectedly.
Workaround: To rename a test or component, open it in QuickTest and
rename it using the Save As option. If the test or component has already
been renamed from Quality Center, use the rename option again to
restore the old name, and then use the Save As option in QuickTest.
Renaming a QuickTest test parameter from QuickTest will cause any
run-time parameter values already set for this parameter in Quality Center
to be lost.
➤
496
Multilingual Support. Names and paths of components, application areas,
and resources (for example, function libraries, object repositories, and
recovery scenarios) are not Unicode compliant and therefore should be
specified either in English or in the language of the operating system.
14
Application Areas
Note: Unless otherwise specified, references to Quality Center in this guide
apply to all currently supported versions of Quality Center and HP ALM.
Note that some features and options may not be supported in the specific
edition of Quality Center or HP ALM that you are using.
For a list of the supported versions of Quality Center or HP ALM, see the
HP QuickTest Professional Product Availability Matrix, available from the
Documentation Library Home page or the root folder of the
QuickTest Professional DVD.
For details on Quality Center or HP ALM editions, see the HP Quality Center
User Guide or the HP Application Lifecycle Management User Guide.
This chapter includes:
Concepts
➤
Application Areas - Overview on page 498
Tasks
➤
How to Create and Maintain an Application Area on page 500
Reference
➤
Application Area Window on page 505
➤
Open Application Area Dialog Box on page 508
➤
Save Application Area Dialog Box on page 510
➤
Open <Resource> Dialog Box for Application Area Resources on page 512
➤
Save <Resource> Dialog Box for Application Area Resources on page 516
Troubleshooting and Limitations - Application Areas on page 520
497
Chapter 14 • Application Areas
Concepts
Application Areas - Overview
What is an application area?
When you create a set of components to test a particular area of your
application, you generally need to work with many of the same test objects,
keywords, testing preferences, and other testing resources, such as function
libraries and recovery scenarios. You define these files and settings in an
application area, which provides a single point of maintenance for all
elements associated with the testing of a specific part of your application.
An application area is a collection of settings and resources that are required
to create the content of a business component. Resources may include
shared object repositories containing the test objects in the application
tested by the component, function libraries containing user-defined
operations performed on that application by the component, and so forth.
Components are automatically linked to all of the resources and settings
defined in the associated application area.
For example, to enable a Subject Matter Expert to select test objects when
implementing steps for a component, the test objects must be stored in a
shared object repository associated with the component’s application area.
Associating function libraries with your application area enables a Subject
Matter Expert to access the functions defined in these function libraries as
keywords.
You can create as many application areas as needed. For example, you may
decide to create an application area for each Web page, module, window, or
dialog box in your application. Alternatively, for a small application, one
application area may be all that is needed. Each component can have only
one associated application area.
498
Chapter 14 • Application Areas
Application area settings and associated resources
Application area settings and any changes you make to these settings are
automatically applied to any business component with which the
application area is associated.
The resources associated with your application areas are the resources that
are available to the components associated with your application area.
If resources are referenced in component steps, and you later modify the
resources associated with its application area, your component may not run
correctly. For example, if a component uses test objects from the
MyRepository.tsr shared object repository, and you remove this object
repository from the application area, the component will not be able to
access the required test objects because the object repository is no longer
included in the application area.
499
Chapter 14 • Application Areas
Tasks
How to Create and Maintain an Application Area
This task includes the following steps:
➤
"Prerequisites" on page 500
➤
"Make sure all required resources are stored in Quality Center" on
page 501
➤
"Create the application area" on page 502
➤
"Configure application area settings" on page 502
➤
"Maintain the application area" on page 504
➤
"Results" on page 504
1 Prerequisites
a Make sure you have permissions in Quality Center for modifying
components, adding steps, modifying steps, and deleting steps. (If you
do not have all of these permissions, you can open application areas
only in read-only format.) For details on setting permissions for the
Business Components module, see the HP Business Process Testing User
Guide.
b Evaluate the purpose of your application area and determine the
resources required for the business components that will use it. For
example:
500
➤
What test objects will they need?
➤
What user-defined functions can you add to ensure that all required
operations are available?
➤
Which keyword operations do you want to make available for each
test object type?
Chapter 14 • Application Areas
2 Make sure all required resources are stored in Quality Center
To create an application area, you must associate the required function
library, shared object repository, and recovery scenario resources with it.
Some of the required resources may already exist.
If necessary, create new resources and store them in the Test Resources
module in Quality Center.
a Verify the existence of or create required function library resources. For
details, see "How to Manage Function Libraries" on page 440.
Note: Business Process Testing provides a set of predefined function
libraries that you can use. Some of these are associated with all new
application areas by default. These files are located in the Test
Resources module of your Quality Center project under Resources/BPT
Resources.
b Verify the existence of or create required shared object repository
resources. For details, see "How to Manage Shared Object Repositories"
on page 240 and "How to Manage Objects in Shared Object
Repositories" on page 245.
c Verify the existence of or create required recovery scenario resources.
For details, see "How to Create and Manage Recovery Scenarios" on
page 972.
501
Chapter 14 • Application Areas
3 Create the application area
a Connect to the Quality Center project in which you want to save the
application area. For details, see "HP ALM Connection Dialog Box" on
page 1041.
b Select File > New > Application Area. The Application Area window
opens, displaying several panes in which you specify the settings and
resource files that you want business components associated with the
application area to use.
For details, see "Application Area Window" on page 505.
c Click Save or select File > Save. The Save Application Area dialog box
opens. Assign the application area a unique and descriptive name and
descriptive text of the application area purpose and contents. This
name and description enables Subject Matter Experts to select the
correct application area for a component.
For details, see "Save Application Area Dialog Box" on page 510.
4 Configure application area settings
a Provide a full description of the application area, as described in
"General Pane (Application Area Window)" on page 686.
b Specify associations to the required QuickTest Professional add-ins, as
described in "General Pane (Application Area Window)" on page 686.
When a business process test runs, the add-ins associated with the
application area for the first component in the test are loaded in
QuickTest. Therefore, if this application area is likely to be associated
with components that may be first in a business process test, ensure
that you include all add-ins that any of the components in the test
may need. However, to ensure expected functionality and optimum
performance, do not include add-ins that are not necessary.
c If necessary, associate function libraries as described in "Function
Libraries Pane (Application Area Window)" on page 689.
d If necessary, associate shared object repositories as described in "Object
Repositories Pane (Application Area Window)" on page 693.
502
Chapter 14 • Application Areas
e If necessary, associate recovery scenarios and define their settings as
described in "Recovery Pane (Business Component and Application
Area Settings Dialog Box)" on page 718.
Note: In general, you should create all necessary resources for your
application area before you begin creating the application area itself. If
you realize the need for another resource while you are in the process
of creating the application area, it is possible to create new, empty
resource files directly from the application area window and associate
them with your application area (and then create the content for those
files at a later time).
For details, see "Function Libraries Pane (Application Area Window)"
on page 689, "Object Repositories Pane (Application Area Window)" on
page 693, and "Recovery Pane (Business Component and Application
Area Settings Dialog Box)" on page 718.
f Specify which keywords will be available for use by Subject Matter
Experts when creating component steps, as described in "Keywords
Pane (Application Area Window)" on page 695.
g Specify the Windows-based applications on which components
associated with the application area can record and run, as described
in "Applications Pane (Business Component and Application Area
Settings)" on page 705.
h Save your changes.
503
Chapter 14 • Application Areas
5 Maintain the application area
After you create an application area, you can use the options described
below to maintain it:
➤
Open an existing application area for viewing or modification. For
details, see "Open Application Area Dialog Box" on page 508.
➤
In Quality Center, you can view all components that are dependent
on a particular application area. To view this list, display the
Dependencies tab for your Application Area (located in the BPT
Resources\Application Areas folder of the Test Resources module). For
details on Quality Center dependencies, see the Quality Center or
HP ALM user guide.
➤
If an application area is no longer needed, you can delete it. Before you
delete an application area, make sure that:
➤
The application area is not associated with any component.
➤
The application area is not currently open on any computer.
You delete application areas using the Open Application Area dialog
box. For details, see "Open Application Area Dialog Box" on page 508.
Alternatively, you can delete an application area from the Test
Resources module in Quality Center. For details, see the HP Business
Process Testing User Guide.
6 Results
504
➤
When you save an application area, it is stored in the BPT
Resources\Application Areas folder in the Quality Center Test Resources
module.
➤
When a new component is created in Quality Center or QuickTest, your
application area is included in the list of available application areas.
Chapter 14 • Application Areas
Reference
Application Area Window
This window enables you to define and view application area settings and
associate required resource files.
To access
Connect to your Quality Center project. Then click the
down arrow next to the New button on the toolbar and
select Application Area.
Relevant tasks
"How to Create and Maintain an Application Area" on
page 500
See also
Chapter 24, "Business Component and Application Area
Settings"
505
Chapter 14 • Application Areas
User interface elements are described below:
UI Elements
Description
General. Displays the General pane, which enables you
to define the description and specify the associated
add-ins for your application area.
From the General pane, you can also open the
Application Area Settings dialog box, which enables you
to:
➤ Specify the Windows-based applications with which a
component associated with your application area can
work.
➤ Define recovery scenarios that specify how a
component associated with the application area
recovers from unexpected events and errors during a
run session.
➤ Set other add-in specific options.
For details, see "General Pane (Application Area
Window)" on page 686
Function Libraries. Displays the Function Libraries pane,
which enables you to associate function libraries with
your application area and to prioritize them. It also
enables you to create and modify associated function
libraries. For details, see "Function Libraries Pane
(Application Area Window)" on page 689.
506
Chapter 14 • Application Areas
UI Elements
Description
Object Repositories. Displays the Object Repositories
pane, which enables you to associate shared object
repositories with your application area and to prioritize
them. It also enables you to create and modify associated
object repositories. For details, see "Object Repositories
Pane (Application Area Window)" on page 693.
Keywords. Displays the Keywords pane, which enables
you to determine which built-in and user-defined
keywords (operations) are available to Subject Matter
Experts when creating components. For details, see
"Keywords Pane (Application Area Window)" on
page 695.
507
Chapter 14 • Application Areas
Open Application Area Dialog Box
This dialog box displays a list of the defined application areas in your
Quality Center project and enables you to open an existing application area.
You can also use it to delete existing application areas.
To access
In QuickTest:
1 Connect to your Quality Center project.
2 Click the down arrow next to the Open button on the
toolbar and select Application Area.
In Quality Center:
1 In the Test Resources module, select an application
area in the Resources tree.
2 Click the Application Area Viewer tab.
3 Click Launch QTP.
508
Relevant tasks
"How to Create and Maintain an Application Area" on
page 500
See also
"Application Areas - Overview" on page 498
Chapter 14 • Application Areas
User interface elements are described below:
UI Elements
Description
Delete. Deletes the selected application area.
Notes:
➤ You cannot delete the currently open application area,
an application area that is currently being used by
another Automation Engineer, or an application area
that is associated with a component.
➤ In Quality Center, you can view all components that
are dependent on a particular application area. To
view this list, display the Dependencies tab for your
Application Area (located in the BPT
Resources\Application Areas folder of the Test
Resources module). For more information on
dependencies, see the Quality Center or HP ALM user
guide.
Application area
name
The full Quality Center path of all defined application
areas in the Quality Center project.
Description
The description of the selected application area. You can
modify the description in the General pane of the
Application Area window. For details, see "General Pane
(Application Area Window)" on page 686.
509
Chapter 14 • Application Areas
Save Application Area Dialog Box
This dialog box enables you to save an open application area.
To access
➤ For a new application area, click the Save toolbar
button
.
➤ To save a copy of an existing application area, select
File > Save As.
Important
information
➤ When saving an application area from QuickTest, the
application area is always saved to the root
Resources\BPT Resources\Application Areas folder.
➤ From Quality Center, you can move application areas
to subfolders of the Application Areas folder.
Relevant tasks
510
Chapter 14, "How to Create and Maintain an Application
Area"
Chapter 14 • Application Areas
User interface elements are described below:
UI Elements
Description
Existing application
areas
The full Quality Center path of all defined application
areas in the Quality Center project. This enables you to
see the names of the existing application areas so that
you can specify a unique name for the application area
that you want to save.
Name
The name of the application area. Enter a descriptive
name that will enable Subject Matter Experts to quickly
identify the application area that is suitable for their
component.
For details on application area naming guidelines and
restrictions, see Appendix A, "Naming Conventions".
Description
The description you entered in the General pane of the
Application Area window when you created the
application area.
If you did not enter a description when you created the
application area, you must enter one now. You cannot
save an application area without a description.
You can also modify the existing description. The
description you provide enables Subject Matter Experts to
easily differentiate between the various application areas
and choose the one that is best suited for their
component.
511
Chapter 14 • Application Areas
Open <Resource> Dialog Box for Application Area
Resources
This section describes the following dialog boxes:
➤
Open Function Library
➤
Open Recovery Scenario
➤
Open Shared Object Repository
This dialog box enables you to open an existing resource file from the file
system or your Quality Center project.
If you want to associate a resource file with an application area, the resource
file must be stored in a Quality Center project.
The images in this section show the Open <Resource> dialog box, when
opened from an application area.
Open Function Library
512
Chapter 14 • Application Areas
Open Recovery Scenario
Open Shared Object Repository
513
Chapter 14 • Application Areas
To access:
Prerequisite
Make sure you are connected to your Quality Center project.
For details see, "HP ALM Connection Dialog Box" on
page 1041.
Open Function
Library dialog
box
Use one of the following:
From the QuickTest main window:
Select File > Open > Function Library.
From the application area:
1 In the application area sidebar, click Function Libraries.
2 In the Associated Function Libraries list, click Add Function
Library
Open Recovery
Scenario dialog
box
.
Use one of the following:
From the QuickTest main window:
Select File > Settings > Recovery tab > Add Recovery Scenario
button.
From the application area:
1 In the application area sidebar, click General.
2 In the General pane, select Additional Settings > Recovery
node, and click Add
.
3 In the Add Recovery Scenario dialog box, click the browse
button.
For details on recovery scenarios, see "Recovery Scenarios
Overview" on page 968.
Open Shared
Object
Repository
dialog box
Use one of the following:
From the QuickTest main window:
1 Select Resources > Object Repository Manager.
2 In the Object Repository Manager window, select File >
Open or click Open
.
From the application area:
1 In the application area sidebar, click Object Repositories.
2 In the Associated Object Repositories list, click Add Object
Repository
.
For details on the Object Repository Manager, see "Object
Repository Manager Main Window" on page 247.
514
Chapter 14 • Application Areas
Important
Information
If the resource is checked into a version-control-enabled
Quality Center project, the Open button contains a down arrow
with an Open and Check out option, enabling you to open the
resource and immediately check it out. For details, see "Checking
Assets Out of the Version Control Database" on page 1100.
See also
For details on a specific type of resource, see the relevant section in
this guide.
User interface elements are described below:
UI Elements
Description
<sidebar>
The location in which the resource file is stored, for example, File
System and ALM/QC Test Resources.
Note: You may need to select a different location before browsing
to your file.
Look in
The path for the resource file. You can use the down arrow to
navigate to the required folder, or you can double-click a folder in
the resource list area to navigate to the required folder.
<resource
list area>
The folders and/or resource files stored in the current path.
File name
The name of the resource file selected in the resource list area.
Files of type
Filters the list of displayed assets to show only the file types for
the resource. If the current folder contains other file types, they
are hidden. To display all file types, select All files.
Open in
read-only
mode
Opens the resource in read-only mode. This option enables you to
view and associate the resource but not to modify it. Available for
function libraries and shared object repositories only.
Note: If the file is stored in a Quality Center project with version
control support, you can view version control information for the
file by clicking the Views down arrow and selecting Details. For
details, see "Checking Assets Out of the Version Control Database"
on page 1100.
515
Chapter 14 • Application Areas
Save <Resource> Dialog Box for Application Area
Resources
This section describes the following dialog boxes:
➤
Save Function Library
➤
Save Recovery Scenario
➤
Save Shared Object Repository
This dialog box enables you to save an existing resource file to the file
system or your Quality Center project.
If you want to associate a resource file with an application area, it is
recommended to save the resource file to the Quality Center Test Resources
module in a Quality Center project.
The images in this section show the Save <Resource> dialog box, when
opened from an application area.
Save Function Library
516
Chapter 14 • Application Areas
Save Recovery Scenario
Save Shared Object Repository
517
Chapter 14 • Application Areas
To access:
Prerequisite
Make sure you are connected to your Quality Center project.
For details see, "HP ALM Connection Dialog Box" on
page 1041.
Save Function
Library dialog
box
Use one of the following:
From the QuickTest main window:
1 Make sure that the function library is the active document.
2 Select File > Save As > Function Library.
From the application area:
1 In the application area sidebar, click Function Libraries.
2 In the Associated Function Libraries list, select a function
library and click Create Function Library
.
Save Recovery
Scenario dialog
box
From the QuickTest main window:
Select Resources > Recovery Scenario Manager > Save button.
Save Shared
Object
Repository
dialog box
Use one of the following:
From the Object Repository Manager window:
Select File > Save As.
From the application area:
1 In the application area sidebar, click Object Repositories.
2 In the Associated Object Repositories list, click Create
Object Repository
.
For details on the Object Repository Manager, see "Object
Repository Manager Main Window" on page 247.
518
Chapter 14 • Application Areas
Important
information
➤ If the resource is checked out of a version-control-enabled
Quality Center project, the Save button contains a down
arrow with an Save and Check in option, enabling you to
save the resource and immediately check it in. For details,
see "Checking Assets into the Version Control Database" on
page 1100.
➤ To take advantage of the Resources and Dependencies
model, save your resource files in the ALM/QC Test
Resources module. For details, see "Resources and
Dependencies Model Overview" on page 1060.
➤ If you save a resource file to the ALM/QC Test Plan, it is
saved as an attachment to a test. To display a test’s
attachments, double-click the test file or folder.
See also
For details on a specific type of resource, see the relevant
section in this guide.
User interface elements are described below:
UI Elements
Description
<sidebar>
The location in which the resource file is stored, for example,
ALM/QC Test Resources.
Note: You may need to select a different location before browsing
to your file.
Look in
The path for the resource file. You can use the down arrow to
navigate to the required folder, or you can double-click a folder in
the resource list area to navigate to the required folder.
<resource
list area>
The folders and/or resource files stored in the current path.
File name
The name of the resource file selected in the resource list area.
Files of type
Filters the list of displayed assets to show only the file types for
the specified resource. If the current folder contains other file
types, they are hidden.
Note: If the file is stored in a Quality Center project with version
control support, you can view version control information for the
file by clicking the Views down arrow and selecting Details. For
details, see "Checking Assets Out of the Version Control Database"
on page 1100.
519
Chapter 14 • Application Areas
Troubleshooting and Limitations - Application Areas
This section describes troubleshooting and limitations for application areas.
Renaming a QuickTestcomponent from Quality Center may cause the test or
component to behave unexpectedly.
Workaround: To rename a component, open it in QuickTest and rename it
using the Save As option. If the component has already been renamed from
Quality Center, use the rename option again to restore the old name, and
then use the Save As option in QuickTest. Renaming a QuickTest test
parameter from QuickTest will cause any run-time parameter values already
set for this parameter in Quality Center to be lost. For a list of naming
conventions, see "Naming Conventions" on page 1121.
520
15
Scripted Components
Note: Unless otherwise specified, references to Quality Center in this guide
apply to all currently supported versions of Quality Center and HP ALM.
Note that some features and options may not be supported in the specific
edition of Quality Center or HP ALM that you are using.
For a list of the supported versions of Quality Center or HP ALM, see the
HP QuickTest Professional Product Availability Matrix, available from the
Documentation Library Home page or the root folder of the
QuickTest Professional DVD.
For details on Quality Center or HP ALM editions, see the HP Quality Center
User Guide or the HP Application Lifecycle Management User Guide.
This chapter includes:
Concepts
➤
Scripted Components Overview on page 522
Tasks
➤
How to Create a Scripted Component on page 525
➤
How to Convert a Business Component to a Scripted Component
on page 527
Reference
➤
Scripted Component User Interface on page 528
Troubleshooting and Limitations - Scripted Components on page 530
521
Chapter 15 • Scripted Components
Concepts
Scripted Components Overview
Scripted components are maintainable, reusable scripts that perform a
specific task.
Using scripted components enables you to utilize the full power of both the
Keyword View and the Expert View, as well as other QuickTest tools and
options to create, view, modify, and debug scripted components in
QuickTest. For example, you can:
➤
Use the Step Generator to guide you through the process of adding
methods and functions to your scripted component.
➤
Use the Expert View to enhance the scripted component flow by
manually entering standard VBScript statements and other programming
statements using QuickTest objects and methods.
➤
Incorporate user-defined functions in your scripted component steps,
parameterize selected items, and add checkpoints and output values.
Use Scripted Components for Complex Functionality
You can create scripted components for Subject Matter Experts if they need
components that contain more complex functionality, such as loops or
conditional statements. Subject Matter Experts working in Quality Center
can then include these scripted components in business process tests to
check that the application behaves as expected.
522
Chapter 15 • Scripted Components
Note: In the Component Steps tab of the Quality Center Business
Components module, Subject Matter Experts can view and work only with
the manual steps defined for a scripted component (if any). They cannot
view or modify the automated steps unless they open the scripted
component in QuickTest by clicking the Launch button in the Automation
tab (provided that QuickTest is installed on the Quality Center client). For
more information, see the HP Business Process Testing User Guide.
Similarities Between Scripted Components and Tests
Scripted components contain much of the same functionality as QuickTest
actions and tests. For example, you can:
➤
Work with programmatic statements in the Expert View (see Chapter 10,
"Working in Function Library Windows.")
➤
Create the same types of checkpoints and output values that are
supported for tests.
➤
View the hierarchical Keyword View display.
➤
Create and work with virtual objects.
➤
Use the data table to run multiple iterations.
➤
Use the Active Screen to view a snapshot of your application as it
appeared when you performed a certain step during a recording session,
and to parameterize object values and insert checkpoints, methods, and
output values for any object in the page, even if your application is not
available or you do not have a step in your test corresponding to the
selected object.
➤
Use random and environment parameters.
➤
Set applications to open at the start of a record or run session.
For general information on all of the functionality available for scripted
components, see the HP QuickTest Professional User Guide.
523
Chapter 15 • Scripted Components
Similarities Between Scripted Components and Business
Components
Both scripted and business components are:
➤
Associated with a specific application area. Therefore, all of the resources
must be stored in the Quality Center project and not in the file system.
➤
Standalone modular units that can be incorporated in a business process
test.
➤
Linear within a business process test (not hierarchical).
➤
Not nested, meaning they cannot call another component.
Differences Between Scripted Components and Business
Components
After you create a scripted component, Subject Matter Experts can run the
scripted component and add it to their business process tests, but you
remain responsible for maintaining the scripted component in QuickTest, if
any changes are needed. Scripted components cannot be modified in
Quality Center.
Converting Business Components to Scripted Components
You can convert business components to scripted components, when
required. When using Business Process Testing, it is generally preferable to
create new business components in Quality Center rather than convert
existing business components to scripted components, as this enables
Subject Matter Experts working in Quality Center to maintain the
components over time.
In addition, because scripted components can be modified only in
QuickTest (and not in Quality Center), Subject Matter Experts cannot view
the automated steps in Quality Center. The conversion process is not
reversible, meaning you cannot convert the scripted component back to a
business component.
524
Chapter 15 • Scripted Components
Tasks
How to Create a Scripted Component
This task describes how to create a scripted component based on a specific
application area, which contains the resources and settings used by the
component, such as the location of the shared object repository and
function libraries.
Note: If you have not yet created an application area, the scripted
component is based on the default application area settings provided with
Business Process Testing.
This task includes the following steps:
➤
"Prerequisites" on page 525
➤
"Create a scripted component" on page 526
➤
"Results" on page 526
➤
"Optional additional steps" on page 526
➤
"Save your scripted component" on page 526
1 Prerequisites
QuickTest must be connected to a Quality Center project. For details, see
"HP ALM Connection Dialog Box" on page 1041.
525
Chapter 15 • Scripted Components
2 Create a scripted component
a Select File > New > Scripted Component. (You create business
components and scripted components using the same dialog box.) For
details, see "New Business Component Dialog Box" on page 487.
b Select a suitable application area from the Application Area name box
and click OK.
For example, if you want to create a scripted component for a Flight
Reservation module, select the application area that is defined for it.
3 Results
A new, untitled scripted component opens. Although the scripted
component does not yet contain content, it does contain all of the
required settings and resources that were defined in the application area
on which it is based. For an image, see "Scripted Component User
Interface" on page 528.
4 Optional additional steps
Add content to your scripted component using the functionality and
options provided by QuickTest. For example:
➤
In the Expert View, manually enter standard VBScript statements, as
well as add statements using QuickTest objects and methods.
➤
Use the Step Generator to add steps containing programming logic.
➤
Add checkpoints and output values to your scripted component.
For details on the functionality that can be used when creating a scripted
component, see the HP QuickTest Professional User Guide.
5 Save your scripted component
You save a scripted component in the same way as you save a business
component. For details, see "Save Business Component Dialog Box" on
page 492.
526
Chapter 15 • Scripted Components
How to Convert a Business Component to a Scripted
Component
This task describes how to convert a single business component to a scripted
component.
Caution: This replaces the existing business component with a scripted
component, and cannot be undone.
This task includes the following steps:
➤
"Prerequisites" on page 527
➤
"Convert the business component to a scripted component" on page 527
➤
"Results" on page 527
1 Prerequisites
➤
QuickTest must be connected to a Quality Center project. For details,
see "HP ALM Connection Dialog Box" on page 1041.
➤
The business component must be editable (meaning it must not be in
read-only mode or locked by another user). For example, it you are
working with version control, the component must be checked out.
2 Convert the business component to a scripted component
a Open the business component you want to convert. For details, see
"Open Business Component Dialog Box" on page 489.
b Select File > Convert to Scripted Component. When prompted, click
OK to proceed with the conversion.
3 Results
After the conversion is complete, QuickTest automatically opens the new
scripted component.
527
Chapter 15 • Scripted Components
Reference
Scripted Component User Interface
This window enables you to create and modify your scripted components.
The example below illustrates a newly created scripted component with the
data table and Active Screen panes displayed.
528
Chapter 15 • Scripted Components
To access
Connect to your Quality Center project. Then do one of
the following:
➤ Select the File > Open > Business/Scripted Component
menu command.
➤ Select the component from the list of recent files list
in the File menu.
Important
information
➤ The data sheet name in the data table is identical to
the scripted component name. If you save a scripted
component with a new name (File > Save As), the data
sheet is automatically renamed. If you have a step that
references the data sheet by name, the step will fail
during the run session because it references the former
data sheet name. If you save a scripted component
with a new name, you must find any references to the
former data sheet name in the Expert View and replace
them with the new data sheet name.
➤ You save business components and scripted
components in the same way. For details, see "Save
Business Component Dialog Box" on page 492.
Relevant tasks
➤ "How to Create a Scripted Component" on page 525
➤ "How to Convert a Business Component to a Scripted
Component" on page 527
See also
"Scripted Components Overview" on page 522
Note: For an overview of the various user interface elements, see "QuickTest
Main Window - User Interface" on page 72.
529
Chapter 15 • Scripted Components
Troubleshooting and Limitations - Scripted Components
This section describes troubleshooting and limitations for working with
scripted components.
➤
For troubleshooting and limitations for learning objects, and recording
and running steps, see "Learning objects and running steps" on page 744.
➤
Dual monitor support. QuickTest records only on the primary monitor.
Therefore, if you are working with dual monitors, make sure that your
application is visible on the primary monitor during a recording session.
➤
Start menu / Quick Launch Panel. On Windows Vista, Windows 7,
Windows Server 2008, and Windows Server 2008 R2, if you begin a
recording session after installing QuickTest (or upgrading from an earlier
version) without restarting your computer, QuickTest cannot record
operations on the Windows Start menu or Quick Launch Panel.
Workaround: Restart your computer and start a new recording session.
➤
Start menu. QuickTest does not record launching Windows Help from the
Start menu.
➤
Start menu. QuickTest does not record the selection of Start menu items
that are customized as menus, such as My Computer, Control Panel, or
Recent Documents.
Workaround: Customize the Start menu items as links so that QuickTest
can record operations on them or record the activation of these items
another way (and not through the Start menu).
530
Chapter 15 • Scripted Components
➤
Renaming a QuickTest component from Quality Center may cause the
test or component to behave unexpectedly.
Workaround: To rename a test or component, open it in QuickTest and
rename it using the Save As option. If the test or component has already
been renamed from Quality Center, use the rename option again to
restore the old name, and then use the Save As option in QuickTest.
Renaming a QuickTest test parameter from QuickTest will cause any
run-time parameter values already set for this parameter in Quality Center
to be lost.
➤
Multilingual Support. Names and paths of components, application areas,
and resources (for example, function libraries, object repositories, and
recovery scenarios) are not Unicode compliant and therefore should be
specified either in English or in the language of the operating system.
531
Chapter 15 • Scripted Components
532
16
Keyword View
This chapter includes:
Concepts
➤
Keyword View Overview on page 534
➤
Comments in the Keyword View on page 535
➤
Output Value for Your Step - Output Column on page 536
Tasks
➤
How to Add a Step to Your Component on page 537
➤
How to Move a Component Step on page 544
➤
How to Delete a Step on page 545
➤
How to Navigate in the Keyword View and Other Tips on page 546
➤
How to Insert and Remove Breakpoints in the Keyword View on page 549
Reference
➤
Keyboard Shortcuts in the Keyword View on page 550
➤
Keyword View User Interface on page 551
➤
Columns Tab (Keyword View Options Dialog Box) on page 556
➤
Fonts and Colors Tab (Keyword View Options Dialog Box) on page 558
➤
Select Test Object Dialog Box on page 560
➤
Password Encoder Tool on page 565
Troubleshooting and Limitations - Keyword View on page 566
533
Chapter 16 • Keyword View
Concepts
Keyword View Overview
The Business Component Keyword View enables you to create and view the
steps of a component in a modular, table-like format. Each step is displayed
as a row in the Keyword View, and is comprised of individual, modifiable
parts. You can create and modify steps by selecting items and operations in
the Keyword View and entering information as required. Each step is
automatically documented as you complete it, enabling you to view a
description of your component in understandable sentences. You can also
use these descriptions as instructions for manual testing, if required.
You can use the Keyword View to add new steps to a component and to
view, modify, and debug existing component steps. When you add or
modify a step, you select the test object or other step type you want for the
step, select the method operation you want to perform, and define any
necessary values for the selected operation or statement.
In general, the Subject Matter Expert uses the Automation tab in the
Quality Center Business Components module to add content to and modify
component steps. However, this can also be done in QuickTest. The Business
Component Keyword View that you see in QuickTest is the same as the
Automation tab that the Subject Matter Expert uses in Quality Center.
The Business Component Keyword View differs from the QuickTest Test
Keyword View in that it provides component-specific options that are
specially designed to facilitate the creation of business components. This
makes it easy and intuitive for Subject Matter Experts to create business
components in Quality Center.
The Business Component Keyword View can include comments, which
enable you to enter manual steps and informational separators in a business
component. All items (test objects and operations) in the Keyword View are
displayed at the same hierarchical level, even if they are child objects of the
previous step or operations to be performed. This makes it easier for Subject
Matter Experts to manage their business component steps.
534
Chapter 16 • Keyword View
To work with the Business Component Keyword View, QuickTest must be
connected to a Quality Center project with Business Process Testing support.
Types of Steps to Add to Your Component
You can insert the following types of steps using the relevant options from
the Insert menu.
➤
A standard step. For details, see "How to Add a Step to Your Component"
on page 537.
➤
A checkpoint step. For details, see "Checkpoints Overview" on page 567.
➤
An output value step. For details, see "Output Values" on page 603.
➤
Comments in steps to separate parts of a component to add details about
a specific part. For details, see "Comments in the Keyword View" on
page 535.
Comments in the Keyword View
A Comment is a free text entry that can be entered in a business component.
The
icon indicates a comment in the Keyword View. You can use
comments for several purposes. For example, you may want to plan steps to
be included in a business component before your application is ready to be
tested. Then, when your application is ready to be tested, you can use your
plan to verify that every item that needs to be tested is included in the
component steps.
You may want to add comments to a component to improve readability and
make it easier to update. For example, you may want to add a comment
before each section of a component to specify what that component
includes.
After you add a comment, it is always visible in your component, as long as
one or more columns are displayed. For information on selecting columns
to display, see "Columns Tab (Keyword View Options Dialog Box)" on
page 556. In addition, as you scroll from side to side across the grid, the
comment can always be seen.
535
Chapter 16 • Keyword View
Output Value for Your Step - Output Column
You define the output type and settings for the output value in the Output
cell. These determine where the output value is stored and how it is used
during the component run session. When the output value step is reached,
QuickTest retrieves each value selected for output and stores it in the
specified location for use later in the run session.
When you create a new output value step, QuickTest assigns a default
definition to each value selected for output. When you output a value for a
step in a business component:
➤
If at least one output component parameter is defined in the component,
the default output type is Component parameter and the default output
name is the first output parameter displayed in the Parameters pane of
the Business Component Settings dialog box.
➤
If no output component parameter is defined in the component, the
default output type is Local parameter and the default name is p_Local.
You modify the output parameter, as required. If you select a local
parameter, you can modify it directly in the Output Options dialog box. If
you select a component parameter, the details for the output parameter are
read-only. You can modify the parameter details in the Parameters pane of
the Business Component Settings dialog box. For details, see "Parameters
Pane (Business Component Settings Dialog Box)" on page 712.
If, after you specify an output value, you choose not to save the output
value, you can cancel it. For details, see "How to Navigate in the Keyword
View and Other Tips" on page 546.
536
Chapter 16 • Keyword View
Tasks
How to Add a Step to Your Component
This task includes the following steps:
➤
"Insert a new step" on page 537
➤
"Define the step" on page 538
1 Insert a new step
Do one of the following:
➤
Click anywhere in the Keyword View (below the existing steps, if any)
to add a step at the end of the component. If no steps are defined yet,
this adds the first step to the component.
➤
Select Insert > New Step to add a new step after the existing steps (if
any). If the component does not contain any steps, this adds the first
step to the component.
➤
Select an existing step and select Insert > New Step to add a new step
between existing steps. (If you select the last step, QuickTest adds a
step at the end of the component.)
➤
Right-click an existing step and select Insert New Step from the
shortcut menu.
➤
Drag and drop a test object from the Available Keywords pane to the
Keyword or Expert view.
A new step is added to the Keyword View below the selected step.
537
Chapter 16 • Keyword View
2 Define the step
Click in the cell for the part of the step you want to modify and specify its
contents, as described below. Each cell in the step row represents a
different part of the step. For each step, you can define the following:
➤
Item (described on page 552) - For task details, see "How to Select an
Item for Your Step" on page 539.
➤
Operation (described on page 553) - For task details, see "How to Select
an Operation for Your Step" on page 540.
➤
Value (described on page 554) - For task details, see "How to Define
Values for Your Step Arguments" on page 541.
➤
Output (described on page 555) - For additional details, see "Output
Value for Your Step - Output Column" on page 536.
Tip: You can use the standard editing commands (Cut, Copy, Paste, and
Delete) in the Edit menu or in the shortcut menu to make it easier to
define or modify your steps. You can also drag and drop steps to move
them to a different location within your component. For details, see
"Keyboard Shortcuts in the Keyword View" on page 550.
538
Chapter 16 • Keyword View
How to Select an Item for Your Step
This task describes how to select an item for your step and includes the
following steps:
➤
"Select an item from the displayed list" on page 539
➤
"Drag and drop an item from the Available Keywords pane" on page 539
➤
"Select a test object from an associated object repository or from your
application" on page 539
Do one of the following:
Select an item from the displayed list
1 Click in the Item cell.
2 Click the down arrow and select the item on which you want to perform
the step from the displayed list. When you insert a new step, the list is
displayed automatically.
Tip: To specify a function for the step (instead of selecting a test object).
select Operation. Then specify an operation for the step. For details, see
"How to Select an Operation for Your Step" on page 540.
Drag and drop an item from the Available Keywords pane
Drag and drop an object from the Available Keywords pane to your
component. For details, see "Available Keywords Pane Overview" on
page 914.
Select a test object from an associated object repository or
from your application
1 Click in the Item cell to activate it.
2 Click the down arrow and select Select another object to open the Select
Test Object dialog box.
For details, see "Select Test Object Dialog Box" on page 560.
539
Chapter 16 • Keyword View
How to Select an Operation for Your Step
This task describes how to specify the operation to be performed on the item
listed in the Item column.
This task includes the following steps:
➤
"Prerequisite" on page 540
➤
"Select an operation" on page 540
1 Prerequisite
Select an item in the Item cell. For details, see "How to Select an Item for
Your Step" on page 539.
➤
If you selected a test object in the Item column, all selected operations
for the test object item (as defined in the Keywords pane in the
application area) are automatically displayed in the Operation
column. The Operation list for that test object can include
out-of-the-box operations and any user-defined functions that were
registered to that specific test object type.
➤
If you selected Operation in the Item column, QuickTest displays the
functions that you defined in the function library, alphabetically. (You
manage the function libraries for components in the Function
Libraries pane of the Application Area. For details, see "Function
Libraries Pane (Application Area Window)" on page 689.)
2 Select an operation
a Click in the Operation cell to activate it.
b Click the down arrow and select the operation to be performed on the
item. The operation can be either a standard operation or a userdefined function. For details on user-defined functions, see "UserDefined Functions and Function Libraries" on page 427.
540
Chapter 16 • Keyword View
Note: When you position the cursor over an operation in the list, a
tooltip describes what this operation performs. For user-defined
functions, the tooltip is taken from the description that you provided in
the associated function library. For details, see "Add documentation
details to the function - optional" on page 456.
How to Define Values for Your Step Arguments
This task describes how to specify the arguments for the operation to be
performed on the item listed in the Item column.
This task includes the following steps:
➤
"Define or modify a value" on page 541
➤
"Add multi-line arguments" on page 542
➤
"Parameterize the value for an argument using a local or component
parameter" on page 543
➤
"Encode a password" on page 543
Define or modify a value
1 Click in the Value cell to activate it.
2 Click in each partition of the Value cell and enter the argument values for
the selected operation. As you click in the Value cell, a tooltip displays
information for each argument. In the tooltip, the argument for the
partition that is currently highlighted is displayed in bold, and any
optional arguments are enclosed in square brackets.
You can enter constant or parameterized values. For details on
parameterizing values, see "Parameterize the value for an argument using
a local or component parameter" on page 543.
541
Chapter 16 • Keyword View
Add multi-line arguments
In a Value cell, press SHIFT+ENTER to add line breaks to your argument value.
After you enter a multi-line argument value, QuickTest automatically
converts it to a string, and displays only the first line of the argument,
followed by an ellipsis (...). This format for multi-line argument values is
also displayed in the Documentation column of the Keyword View.
Note:
542
➤
You can select the cell to display the entire argument value to be used in
the step.
➤
The argument value is used during the run session exactly as it appears in
the step. For example, if you enter quotation marks as part of the
argument value, they are included in the argument value used during the
run session.
➤
QuickTest automatically interprets a multi-line value as a string, so you
do not need to add quotation marks for this purpose.
Chapter 16 • Keyword View
Parameterize the value for an argument using a local or
component parameter
Click the
button in the required Value cell. You define:
➤
Local input parameters in the Business Component Keyword View using
the "Value Configuration Options Dialog Box" on page 641.
➤
Local output parameters in the Output Options dialog box. For details,
see "Output Options Dialog Box" on page 615.
Note: You cannot delete local parameters, but you can cancel the input or
output to them. For details on parameterizing a component value, see
"Parameters Pane (Business Component Settings Dialog Box)" on page 712.
Encode a password
HP ALM. If your component is in an HP ALM project, see the HP Business
Process Testing User Guide. Do not encode passwords in QuickTest. When
business component tests run from Quality Center, all values are treated as
strings. Therefore, if you encode a password in QuickTest using the Password
Encoder dialog box, the resulting string, for example,
4b8a4a999d0d0e2c9b6cce8bb8e3, will be used instead of the password it
represents.
Quality Center 10.00. If your component is in a Quality Center project, see
"Password Encoder Tool" on page 565. You can use the password encoder to
insert passwords in QuickTest. (When your components are later upgraded
to HP ALM, the upgrade process automatically converts existing encoded
strings to a format recognized by Quality Center.)
543
Chapter 16 • Keyword View
How to Move a Component Step
This task describes how to move a step to a different location within a
component, as needed.
This task includes the following steps:
Drag and drop a step
In the Item column, drag the step up or down and drop it at the required
location. When you drag a selected step, a line is displayed, enabling you to
see the location to which the step will be moved.
Copy/cut and paste a step
Copy or cut the step to the Clipboard and then paste it in the required
location.
544
➤
Copy. Use Edit > Copy or CTRL + C.
➤
Cut. Use Edit > Cut or CTRL + X.
➤
Paste. Use Edit > Paste or CTRL + V.
Chapter 16 • Keyword View
How to Delete a Step
Note: You cannot delete a step if one of its cells is in edit mode.
1 Prerequisites
Make sure that removing the step will not prevent the component from
running correctly.
2 Delete the step.
a Select the step that you want to delete.
b Select Edit > Delete, press the DELETE key, or right-click the step and
select Delete from the shortcut menu. A confirmation message opens.
c
Click Delete Step to confirm. The step is deleted from the component.
545
Chapter 16 • Keyword View
How to Navigate in the Keyword View and Other Tips
This task includes the following steps:
➤
"General Tips" on page 546
➤
"Display or Hide Columns" on page 547
➤
"Item Column" on page 547
➤
"Value Column" on page 547
➤
"Comment Step" on page 548
➤
"Output Column" on page 548
➤
"Documentation Column" on page 549
Note: For a list of menu shortcuts for the tips described in this section, see
"QuickTest Commands" on page 76.
General Tips
➤
546
Use the left and right arrow keys to move the focus one cell to the left or
right, with the following exceptions:
➤
In the Item column, the left and right arrow keys collapse or expand
the item (if possible). If not possible, the arrow keys behave as in any
other column.
➤
When a cell is in edit mode (for example, when modifying a value or
comment), the left and right arrow keys move the cursor within the
edited cell.
➤
Use the standard editing commands (Cut, Copy, Paste, and Delete) in the
Edit menu or in the context menu to define or modify your steps. For
details, see "Keyboard Shortcuts in the Keyword View" on page 550.
➤
Drag and drop steps to move them to a different location within your
component. For details, see "How to Navigate in the Keyword View and
Other Tips" on page 546.
Chapter 16 • Keyword View
Display or Hide Columns
➤
Use the Keyword View Options dialog box. For details, see "Columns Tab
(Keyword View Options Dialog Box)" on page 556.
➤
Right-click a column header row in the Keyword View. Then select or
clear the required column name from the shortcut menu.
➤
Rearrange columns by dragging a column header to its new location in
the Keyword View. Red arrows are displayed when the column header is
dragged to an available location.
Item Column
When a row is selected (not a specific cell), you can type a letter to jump to
the next row that starts with that letter.
Value Column
When a Value cell is selected, press CTRL+F11 to open the Value
Configuration Options dialog box. For details, see "Value Configuration
Options Dialog Box" on page 641.
547
Chapter 16 • Keyword View
Comment Step
➤
To add a comment to your component, do one of the following:
➤
Select Insert > Comment.
➤
Click in the Item cell and select Comment from the displayed list.
➤
Right-click a component step and select Insert Comment. A comment
row is added below the selected step.
Enter text in the Comment row. If you do not enter text, QuickTest
deletes the comment when the cursor focus is removed.
➤
➤
To modify an existing comment, do one of the following:
➤
Double-click the comment in the Comment column. The text box
becomes a free text field.
➤
Click the
icon, which acts as a toggle, making the comment either
editable or read-only.
To delete a comment, do one of the following:
➤
Select the comment and select Edit > Delete.
➤
Press the DELETE key on your keyboard.
➤
Right-click and select Delete from the context menu.
Click Delete Comment to confirm. The comment is permanently
removed from the business component.
Output Column
To cancel output to the parameter, click in the Output cell. Then click the
Cancel button
or press the DELETE key.
548
Chapter 16 • Keyword View
Documentation Column
➤
To display only the Documentation column of a component, right-click
the column header row and choose Documentation Only from the
displayed menu.
➤
To copy the documentation, do one of the following:
➤
Select Edit > Copy Documentation to Clipboard.
➤
Right-click the column header row and choose Copy Documentation
to Clipboard from the displayed menu.
Paste the documentation into a different application, as required.
How to Insert and Remove Breakpoints in the
Keyword View
This task describes how to insert and remove breakpoints in the Keyword
View. For details on breakpoints, see "How to Use Breakpoints" on page 832.
Insert a breakpoint in the Keyword View
Do any of the following:
➤
Click in the left margin at the point where you want to insert the
breakpoint.
➤
Select a step and press F9.
➤
Select Debug > Insert/Remove Breakpoint.
A red breakpoint icon
is displayed.
Remove a breakpoint from the Keyword View
Do any of the following:
➤
Click the breakpoint icon.
➤
Select a step and press F9.
➤
Select Debug > Insert/Remove Breakpoint.
549
Chapter 16 • Keyword View
Reference
Keyboard Shortcuts in the Keyword View
If you prefer to use your keyboard to edit a component, you can use the
following keyboard shortcuts to navigate within the Keyword View:
550
➤
Press F8 to add a new step below the currently selected step.
➤
Use the TAB and SHIFT+TAB keys to move the focus left or right within a
single row, unless you are in a cell that is in edit mode. If so, press ENTER
to exit edit mode, and then you can use the TAB keys.
➤
When a cell containing a list is selected, you can:
➤
Press SHIFT+F4 to open the list for that cell.
➤
Change the selected item by using the up and down arrow keys. In the
Item column, the list must be open before you can use the arrow keys.
➤
Type a letter or sequence of letters to move to a value that starts with
the typed letters. The typed sequence is highlighted in white.
Chapter 16 • Keyword View
Keyword View User Interface
The Keyword View enables you to create and view the steps of your
component in a keyword-driven, modular, table format. The Business
Component Keyword View is comprised of a table-like view, in which each
step is a separate row in the table, and each column represents the different
parts of the steps. The columns displayed vary according to your selection.
For details, see "Columns Tab (Keyword View Options Dialog Box)" on
page 556.
To access
In QuickTest, open a component. For details, see "Open
Business Component Dialog Box" on page 489.
551
Chapter 16 • Keyword View
User interface elements are described below:
UI Elements
Description
Item
The item on which you want to perform the step. An item can
be any of the following:
➤ a test object from the object repository
➤ a user-defined function (Operation), for example, a function
that opens an application at the start of a business
component or checks the value of a specific property.
Available only if user-defined functions were added to a
function library that is associated with the component’s
application area. For details, see "Associated Function
Libraries" on page 678 and "User-Defined Functions and
Function Libraries" on page 427.)
➤ Comment. Free text cell that spans the entire row. After a step
is converted into a Comment step it cannot be restored to
another type of step. You use the Comment option to enter
manual steps or to provide information on adjacent steps. For
details, see "Comments in the Keyword View" on page 535.
You must select an option from the Item column before you can
add additional content to a step.
Example of Item list
The test objects available in the Item list are the sibling and
child test objects of the previous step’s test object, as defined in
the object repository. The example below shows the objects
available for the step following a userName test object.
For task details, see "How to Select an Item for Your Step" on
page 539.
552
Chapter 16 • Keyword View
UI Elements
Description
Operation
The operation to be performed on the item. This column
contains a list of all available operations (methods, functions,
properties, or sub-procedures) that can be performed on the
item selected in the Item column, for example, Click and Select.
The Operation column displays the most commonly used
operation for the item, by default.
Note: If the application area used by a component is associated
with at least one function library, the functions from that
function library are accessible from this column. You specify
function libraries in the Function Libraries pane of the
Application Area. For details, see "Function Libraries Pane
(Application Area Window)" on page 689.
For task details, see "How to Select an Operation for Your Step"
on page 540.
553
Chapter 16 • Keyword View
UI Elements
Description
Value
The argument values for the selected operation. The Value cell is
partitioned according to the number of arguments of the
selected option in the Operation column.
If an argument has a predefined list of values, QuickTest
provides a drop-down list of possible values. If a list of values is
provided, you cannot manually type a value in this box. An
argument value can be a constant, a local parameter, or a
component parameter, depending on the selected option.
➤ Local parameter. A local parameter is specific to the business
component and can only be accessed by that component. It
is intended for use in a single step or between component
steps, for example, as an output parameter for one step and
an input parameter for a later step. For details, see "How to
Define Values for Your Step Arguments" on page 541.
➤ Component parameter. A component parameter is a
parameter that can be accessed by any component in your
Quality Center project. For details, see "Parameters Pane
(Business Component Settings Dialog Box)" on page 712.
If you click in the Value cell after you specify an parameter for it,
an icon specifying the type of parameter is displayed in the cell:
Indicates a component parameter.
Indicates a local parameter.
For task details, see "How to Define Values for Your Step
Arguments" on page 541.
Comment
(If relevant) A manual step or other free textual notes between
steps. A comment is displayed as an entire row. For details, see
"Comments in the Keyword View" on page 535.
Note:
➤ QuickTest does not process comments when it runs a
component.
➤ After you insert a comment, you cannot change it to a step.
554
Chapter 16 • Keyword View
UI Elements
Description
Output
The parameter in which output values for the step are stored.
For details, see "Output Value for Your Step - Output
Column" on page 536.
Example: If you select an output parameter named cCols, the
output value of the current step would be stored in the cCols
parameter. You can then use the value stored in the output
parameter later in the component as an input parameter. As in
the Value column, you can use two types of parameters when
specifying an output parameter—a local parameter or a
component parameter.
If you click in the Output cell after you specify an output
parameter for it, an icon specifying the type of parameter is
displayed in the cell:
Indicates a component parameter.
Indicates a local parameter.
Documentation
Read-only auto-documentation of what the step does in an
easy-to-understand sentence, for example, Click the "Sign-in"
image. or Select "San Francisco" in the "toPort" list.
Tips:
➤ Displaying only this column (and hiding the other columns)
is useful if you want to print or view manual testing
instructions. For details, see "How to Navigate in the Keyword
View and Other Tips" on page 546.
➤ If you created a function library and added (associated) it to
the associated application area, QuickTest can display
documentation for it only if you defined the relevant text in
the function library. For details, see "Add documentation
details to the function - optional" on page 456 and "UserDefined Functions and Function Libraries" on page 427.
555
Chapter 16 • Keyword View
Columns Tab (Keyword View Options Dialog Box)
This tab enables you to specify the columns you want to display in the Keyword
View. You can also specify the order in which the columns are displayed.
To access
From the Keyword View: Tools menu > View Options item >
Columns tab
Important
Information
➤ You can use standard SHIFT and CTRL key behaviors to select
multiple column names in the Available columns or Visible
columns list.
➤ As an alternative to using this dialog box tab, you can:
➤ Select which Keyword View columns to display by right-
clicking the column header row in the Keyword View and
selecting the columns to display or hide.
➤ Select the Documentation Only item in the displayed menu.
This is useful if you want to print the documentation column
information for use as instructions for manual testing. For
details on printing from the Keyword View, see "How to
Manage Business Components" on page 479.
556
Chapter 16 • Keyword View
See also
➤ "Keyword View User Interface" on page 551
➤ "Fonts and Colors Tab (Keyword View Options Dialog Box)" on
page 558
User interface elements are described below:
UI Elements
Description
Available columns
Columns not currently displayed in the Keyword
View.
Visible columns
Columns currently displayed in the Keyword View.
>
Display Selected Columns. Moves the selected
columns from the Available columns list to the
Visible columns list. Alternatively, you can doubleclick an item to move it to the other list.
>>
Display All Columns. Moves all columns from the
Available columns list to the Visible columns list.
>
Hide Selected Columns. Moves the selected
columns from the Visible columns list to the
Available columns list. Alternatively, you can
double-click an item to move it to the other list.
>>
Hide All Columns. Moves all columns from the
Visible columns list to the Available columns list.
Move Up / Move Down. Adjusts the order in which
the selected columns appear in the Keyword View.
Note: The order of the columns in the Keyword
View does not affect the order in which the cells
need to be completed for each step. For example, if
you choose to display the Operation column to the
left of the Item column, you must still select the
item first. Only then is the Operation column list
refreshed to match the selection you made in the
Item column.
557
Chapter 16 • Keyword View
Fonts and Colors Tab (Keyword View Options Dialog Box)
This tab enables you to specify text and color display options for different
elements in the Keyword View.
To access
From the Keyword View, select Tools > View Options > Columns tab.
See also
➤ "Keyword View User Interface" on page 551
➤ "Columns Tab (Keyword View Options Dialog Box)" on page 556
558
Chapter 16 • Keyword View
User interface elements are described below:
UI Elements
Description
Element
You can specify different font and color options for each of these
Keyword View elements. Select one of the following elements to
see the current definitions and modify them:
➤ Alternate Rows. The background color of every other row. The
font and text color for the alternate rows is the same as the
font and text color defined for the Default element.
➤ Comment. The row and text of comment lines. Note that all of
the available formatting options apply to entire comment
rows, not to comments within a regular step row. For
comments within a step row, only the specified Foreground
color applies (all other settings are taken from the Alternate
Rows, Default, or Selected Row settings, as appropriate).
➤ Default. All rows and text in the Keyword View (except for the
elements listed below).
➤ Selected Row. The row and text currently selected
(highlighted).
Font Name
Enables you to modify the font used for text in the selected
element. You cannot change the font for Alternate Rows or
Selected Row elements.
Note: When testing in a Unicode environment, you must select a
Unicode-compatible font. Otherwise, elements in your
component may not be correctly displayed in the Keyword View.
However, the component will still run in the same way, regardless
of the font you choose.
Size
Enables you to modify the font size used for text in the selected
element. You cannot change the font size for Alternate Rows or
Selected Row elements.
Style
Enables you to modify the font style used for text in the selected
element. You can select Regular, Bold, Italic, or Underline font
styles. You cannot change the font style for Alternate Rows or
Selected Row elements.
Foreground
Enables you to modify the text color for the selected element.
You cannot change the foreground color for Alternate Rows.
559
Chapter 16 • Keyword View
UI Elements
Description
Background
Enables you to modify the row color for the selected element.
Foreground
for read-only
Enables you to modify the text color for rows that are read-only.
This option cannot be changed for Alternate Rows.
Reset all
Resets all Fonts and Colors tab options to the default settings.
Select Test Object Dialog Box
This dialog box displays the object repository tree and enables you to:
560
➤
Select an object in the object repository tree for your step.
➤
Select an object from your application for your step. This adds a test
object to the local object repository.
➤
Select a related object to use in a visual relation identifier. This adds a test
object to the same object repository as the test object you want to
identify. For details on visual relation identifiers, see "Visual Relation
Identifiers" on page 165.
Chapter 16 • Keyword View
The following image shows an example of this dialog box:
To access
Use one of the following:
➤ In the Item cell of the Keyword View, click the arrow button to
display the Item list and then select Object from repository.
➤ In the Visual Relation Identifier dialog box, click the Add
button.
561
Chapter 16 • Keyword View
Important
information
➤ Subject Matter Experts working in Quality Center can select
only objects that are stored in the shared object repositories (in
the component’s application area).
➤ If you select an object in your application that is not in an
associated shared object repository, a test object is added to the
local object repository when you insert the new step. After you
add a new test object to the local object repository, it is
recommended to rename it, if its name does not clearly indicate
its use. For example, you may want to rename a test object
named Edit (that is used for entering a username) to UserName.
This will enable Subject Matter Experts to select the appropriate
test object when adding steps using test objects located in this
shared object repository.
➤ After you add the required objects to the local object repository,
you can use the Object Repository Merge Tool to update the
associated shared object repository and make the new test
objects available to other components. For details, see "When
to Update a Shared Object Repository from Local Object
Repositories" on page 317.
➤ If you are adding a container test object, it is also recommended
to specify its context, for example, if you are adding a
confirmation message box from a Login page, you may want to
name it Login > Confirm. For details, see "Renaming Test
Objects" on page 161.
Relevant
tasks
➤ "How to Select an Item for Your Step" on page 539
See also
➤ "Managing Test Objects in Object Repositories" on page 151
➤ "Native Properties and Operations" on page 385
➤ "Visual Relation Identifier Dialog Box" on page 198
562
Chapter 16 • Keyword View
User interface elements are described below (unlabeled elements are shown
in angle brackets):
UI Elements
Description
Find Next. Searches from the currently selected node, displaying
all objects that match your criteria. The first object in the list that
matches your criteria is highlighted.
You can click the Find Next button to navigate through all the
objects that match your search criteria. The search continues to
the end of the tree, then wraps to the beginning of the tree, and
continues.
Tip: Press F3 to find the next object that matches your search
criteria, or SHIFT+F3 to find the previous match.
<Pointing hand>. Enables you to select an object from your
application and add it to the shared object repository so that you
can use it in your component steps. This is useful if the shared
object repository does not include the test object that you need
for a particular step.
Click on the required object in your application to add it to the
shared object repository tree. In some environments, as you
move the pointer over your application, the available test objects
are highlighted. For details, see "Tips for Using the Pointing
Hand" on page 148.
Name
The full or partial name of the object to find.
This option is useful if the object repository is very large. If you
leave the box empty, all objects that match the selected object
Type are displayed.
Example: Enter p to search for all object names containing the
letter p.
563
Chapter 16 • Keyword View
UI Elements
Description
Type
The type of object for which to search. Specify a type or select
<All> to search for the object in all the object types.
The object types in this list are a generic grouping of objects
according to the general object characteristics. For example, the
List type contains list and list view objects, as well as combo
boxes; the Table type contains both tables and grids; and the
Miscellaneous type contains a variety of other objects, such as
WebElement and WinObject.
Example: Suppose you want to add a password object that you
know is an Edit box. You can search all the Edit Type objects for
one called password, or even one containing the letter p.
<object
repository
tree>
564
List of objects in the object repositories associated with the
current component. You can select a test object from this tree to
insert into a step.
Chapter 16 • Keyword View
Password Encoder Tool
This tool enables you to encode passwords so that you can use the resulting
strings as operation arguments. 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 ensure the
integrity of the passwords.
To access
From the Windows menu, select Start > Programs >
HP QuickTest Professional > Tools > Password Encoder.
Important
information for
Business Process
Testing
Use only if you are working with Quality Center 10.00.
If you are working with HP ALM, you must encode
passwords in HP ALM. Otherwise, during a run session,
encoded strings are treated as plain text. For details on
encoding, see the HP Business Process Testing User Guide.
User interface elements are described below:
UI Elements
Description
Password
The password to encrypt.
Encoded string
The encrypted string that is generated when you click
Generate.
Generate
Encrypts the string you entered in the Password box.
Copy
Copies the encrypted password to the Clipboard. You can
then paste it as value for a operation.
565
Chapter 16 • Keyword View
Troubleshooting and Limitations - Keyword View
This section describes troubleshooting and limitations for the Keyword
View.
When working with the Object property in the Keyword View, it may take a
long time for QuickTest to retrieve IntelliSense information for the step.
Workaround: Use the Expert View when working with the Object property.
566
17
Checkpoints Overview
This chapter includes:
Concepts
➤
Checkpoints Overview on page 568
➤
Checkpoint Types on page 569
Tasks
➤
How to Insert a Checkpoint Step in a Component on page 570
Troubleshooting and Limitations - Creating Checkpoints on page 572
567
Chapter 17 • Checkpoints Overview
Concepts
Checkpoints Overview
QuickTest enables you to add checks to your component. A checkpoint is a
verification that compares the current value for specified properties or
current state of other characteristics of an object with the expected value or
characteristics. This helps you to identify whether your application is
functioning correctly. For example, you can perform standard checkpoints
to check that the actual object property values conform to the expected
values, and you can perform bitmap checkpoints to check that the visible
parts of your application are displayed correctly.
When you add a checkpoint, QuickTest inserts a checkpoint step to the
current row in the Keyword View. By default, QuickTest names the
checkpoint using the name of the test object on which the checkpoint was
created. You can choose to specify a different name for the checkpoint or
accept the default name.
When you run the component, QuickTest compares the expected results of
the checkpoint to the current results. If the results do not match, the
checkpoint fails. You can view the results of the checkpoint in the Run
Results Viewer.
Simple and Advanced Mode
QuickTest provides two modes of checkpoints that you can insert using the
relevant Checkpoint Properties dialog box—Simple Mode and Advanced
Mode. Simple Mode enables you to check a basic set of properties and
values. This type of checkpoint is visible and editable in both QuickTest and
Quality Center, enabling Automation Engineers working in QuickTest to
define or edit checkpoints that can be viewed or edited by Subject Matter
Experts working in Quality Center. For more information on the
Checkpoint Properties dialog box, see "Checkpoint Properties Dialog Box"
on page 576.
568
Chapter 17 • Checkpoints Overview
In QuickTest, you can also view or edit advanced checkpoint properties that
are not visible to users in Quality Center. You do this by inserting a
checkpoint using Advanced Mode. If a checkpoint contains advanced
properties, and a Quality Center user views its properties in Quality Center,
a disclaimer opens indicating that some properties are checked but are not
shown.
Checkpoint Types
You can insert the following checkpoint types to check objects in an
application:
Checkpoint Type
Description
Standard Checkpoint
Checks property values of an object in your
application. For example, you can check that a
radio button is activated after it is selected or you
can check the value of an edit box.
Standard checkpoints are supported for all add-in
environment.
For more information on standard checkpoints, see
Chapter 18, "Standard Checkpoints."
Bitmap Checkpoint
Checks an area of your application as a bitmap. For
example, suppose you have a Web site that can
display a map of a city the user specifies. The map
has control keys for zooming. Using the bitmap
checkpoint, you can check that the map zooms in
correctly.
You can create a bitmap checkpoint for any area in
your application.
Bitmap checkpoints are supported for all add-in
environments.
For more information on bitmap checkpoints, see
Chapter 19, "Bitmap Checkpoints."
569
Chapter 17 • Checkpoints Overview
Tasks
How to Insert a Checkpoint Step in a Component
This task describes how to insert a checkpoint step while recording or
editing your component. It is generally more convenient to define
checkpoints after creating the initial component.
Note: This task describes the general process of inserting a new checkpoint
step to your component. However, certain checkpoint types may require
additional prerequisites or steps.
This task includes the following steps:
➤
"Prerequisites" on page 570
➤
"Insert a new checkpoint step while recording your component" on
page 571
➤
"Move checkpoint objects from the local object repository to a shared
object repository - Optional" on page 571
Prerequisites
570
➤
Make sure to review and note all relevant information and prerequisites
for the type of checkpoint you are adding. For details, see the
prerequisites for the relevant checkpoint type.
➤
To insert a checkpoint while recording, start a recording session before
proceeding to the next step.
➤
To insert or modify an existing checkpoint step while editing, you may
need to open the application and display the relevant object before
proceeding to the next step. This depends on the environment and the
object type you are checking. For details, see the prerequisites for the
checkpoint type.
Chapter 17 • Checkpoints Overview
Insert a new checkpoint step while recording your component
1 Select Insert > Checkpoint menu, or click the Insert Checkpoint or Output
Value button in the toolbar. This displays a menu of checkpoint options
that are relevant to the selected step.
2 Select the type of checkpoint. QuickTest is hidden, and the pointer
changes to a pointing hand. In your application, click the object that you
want to check.
For details on using the pointing hand, see "Tips for Using the Pointing
Hand" on page 148.
Note: If the object in your application is associated with more than one
location, The Object Selection dialog box opens. This dialog box enables
you to select an object to check from the object tree. The objects in the
tree are displayed in hierarchical order, based on the location you clicked
in the Active Screen or application. For more information, see "Object
Selection Dialog Box" on page 147.
3 Define the properties and expected values of the checkpoint. For details,
refer to the user-interface description in the relevant checkpoint chapter.
Move checkpoint objects from the local object repository to a
shared object repository - Optional
After you insert a checkpoint step, the checkpoint object is added to the
local object repository. If you are using shared object repositories, you can
move the new checkpoint/output value object to your shared object
repository. For details, see "How to Export Local Objects to a Shared Object
Repository" on page 213, and "How to Update a Shared Object Repository
From a Local Object Repository" on page 325.
571
Chapter 17 • Checkpoints Overview
Troubleshooting and Limitations - Creating Checkpoints
This section describes troubleshooting and limitations for creating
checkpoints.
Checkpoints that contain more than 64K of data may run slowly.
For more troubleshooting and limitations, see the section for the relevant
add-in environment.
572
18
Standard Checkpoints
This chapter includes:
Concepts
➤
Standard Checkpoints Overview on page 573
Tasks
➤
How to Create or Modify a Standard Checkpoint Step on page 574
Reference
➤
Checkpoint Properties Dialog Box on page 576
Concepts
Standard Checkpoints Overview
You can check the object property values in your application using standard
checkpoints. Standard checkpoints compare the expected values of object
properties to the object’s current values during a run session. You can create
standard checkpoints for all supported testing environments (as long as the
appropriate add-ins are loaded).
You can check that a specified object in your application has the property
values you expect, by adding a standard checkpoint step to your component
while recording or editing the component. To set the options for a standard
checkpoint, you use the Checkpoint Properties dialog box.
573
Chapter 18 • Standard Checkpoints
Tasks
How to Create or Modify a Standard Checkpoint Step
If you are modifying an existing standard checkpoint step, see the
"Checkpoint Properties Dialog Box" on page 576.
This task includes the following steps:
➤
"Prerequisites and considerations for inserting a new standard checkpoint
step" on page 574
➤
"Insert a new standard checkpoint step" on page 575
➤
"Set the options for the standard checkpoint object" on page 575
Prerequisites and considerations for inserting a new standard
checkpoint step
Before inserting a new standard checkpoint step, make sure to review all
relevant information and perform all prerequisites:
Prerequisites
Object visibility
in application
During an editing session, make sure the object is visible in
your application before inserting a standard checkpoint on it.
Considerations
Availability
➤ Recording sessions
➤ Editing sessions
Supported
environments
"Supported Checkpoints and Output Values Per Add-in" on
page 1783
Simple Mode /
Advanced Mode
The following modes are available:
➤ Simple Mode. Displays only the basic properties and
expected values of the checkpoint.
➤ Advanced Mode. Displays all supported properties and
expected values of the checkpoint.
574
Chapter 18 • Standard Checkpoints
Working with
Quality Center
In Quality Center, you cannot create, edit, or rename
checkpoints in components.
Checking image,
table or Web
page objects
You cannot create image, table, or (Web) page checkpoints in
a business component. These special checkpoint types are
only available for tests. However, if you select a Web page or
any table object when creating a standard checkpoint for
your component, you will be able to check their object
properties just like any other object.
Insert a new standard checkpoint step
Insert a new checkpoint step, as described in "How to Insert a Checkpoint
Step in a Component" on page 570. The Standard Checkpoint Properties
dialog box opens.
Set the options for the standard checkpoint object
In the Standard Checkpoint Properties dialog box, specify the settings for
the checkpoint object. For details, see "Checkpoint Properties Dialog Box"
on page 576.
575
Chapter 18 • Standard Checkpoints
Reference
Checkpoint Properties Dialog Box
This dialog box enables you to specify which properties of the object to
check, and edit the values of these properties. The Checkpoint Properties
dialog box has two modes, Simple Mode and Advanced Mode. The mode
that opens is dependent on whether any advanced properties are selected in
the checkpoint.
Simple Mode
The following image shows the Checkpoint Properties Dialog Box when in
Simple mode. Advanced checkpoint properties are not shown.
This image shows the dialog box that opens when adding a checkpoint to
an existing test during an editing session.
576
Chapter 18 • Standard Checkpoints
Advanced Mode
The following image shows the Checkpoint Properties dialog box when a
WebEdit object is selected. This image shows the dialog box that opens
when adding a checkpoint to an existing test during an editing session.
The specific elements differ slightly depending on the type of object you are
checking, and when adding a checkpoint during a recording session or
editing an existing checkpoint.
The image shows the Checkpoint Properties dialog box in Advanced mode.
This mode is not available when opening this dialog box from
Quality Center.
577
Chapter 18 • Standard Checkpoints
To access
Do one of the following:
➤ Insert a new checkpoint step and select an object from
your application. For details, see "How to Create or
Modify a Standard Checkpoint Step" on page 574.
➤ In the Keyword View, right-click an existing
checkpoint step and select Checkpoint Properties.
➤ In the local or shared object repository, click an
existing checkpoint object. The Checkpoint details
are displayed on the right side of the object repository
dialog box, in the Object Details area.
Simple Mode/
Advanced Mode
➤ Simple Mode. Displays only the basic properties and
expected values for the selected standard checkpoint
object. The dialog box displays in this mode when
you:
➤ Insert a new standard checkpoint step
➤ Open the dialog for an existing standard
checkpoint object in which no advanced properties
or options are selected.
➤ Advanced Mode. Displays all of the supported
properties and expected values for the selected
standard checkpoint object. The dialog box displays in
this mode when you:
➤ Click the Advanced Mode button.
➤ Open the dialog for an existing standard
checkpoint object in which advanced properties or
options are selected.
➤ Note: The advanced properties of standard checkpoint
objects cannot be viewed or edited in Quality Center.
Therefore, if one or more advanced properties are
selected in a standard checkpoint object, and a
Quality Center user views its properties in
Quality Center, the dialog box displays text indicating
that some properties are not shown.
578
Relevant tasks
"How to Create or Modify a Standard Checkpoint Step"
on page 574
See also
"Checkpoint Types" on page 569
Chapter 18 • Standard Checkpoints
This dialog box contains the following key areas:
➤
"Object Details Area" on page 579
➤
"Properties Grid Area" on page 580
➤
"Configure Value Area" on page 581
➤
"Checkpoint Timeout and Statement Location Area" on page 581
Object Details Area
The following image shows the Object Details area when a WebEdit object is
selected for verification.
User interface elements are described below:
UI Element
Description
Name
The name that QuickTest assigns to the checkpoint object. By
default, the name is the same as the name of the object on
which the checkpoint step is being performed. You can specify
a different name for the checkpoint object or accept the default
name.
For a list of naming conventions, see "Naming Conventions" on
page 1121.
Class
The type of object (read-only). The class of the object is not
displayed in Quality Center for business components.
Find in Repository. Displays the checkpoint object in its object
repository. Available only when editing an existing checkpoint
step. It is not available when creating a new checkpoint step.
Note: This option is available only in Advanced Mode.
Advanced Mode / Simple Mode. Toggles the dialog box
between Advanced Mode and Simple Mode. Advanced Mode
expands the dialog box and enables you to view or edit
advanced properties.
579
Chapter 18 • Standard Checkpoints
Properties Grid Area
The following image shows the Properties Grid area when a WebEdit object
is selected for verification. Specific properties may vary depending on the
type of object you are checking.
User interface elements are described below:
UI Elements
Description
Check box
For each object class, QuickTest recommends default
property checks. You can accept the default checks or
modify them accordingly.
To check a property, select the corresponding check box.
To exclude a property check, clear the corresponding
check box.
Type
The
icon indicates that the value of the property is
currently a constant.
The
icon indicates that the value of the property is
currently a parameter.
580
Property
The name of the property.
Value
The expected value of the property. For more information
on modifying the value of a property, see
"Parameterization / Properties Dialog Box (Checkpoints)"
on page 583.
Chapter 18 • Standard Checkpoints
Configure Value Area
The following image shows the Configure Value area when a data table
parameter is used in the checkpoint.
For a user interface description of this area, see "Configure Value Area" on
page 639.
Checkpoint Timeout and Statement Location Area
Important
information
This option is available only in Advanced mode.
The following image shows the timeout and statement location area when
inserting a new checkpoint step during an editing session. When inserting a
new checkpoint step during a recording session, the Insert statement option
is not available.
581
Chapter 18 • Standard Checkpoints
User interface elements are described below:
UI Element
Description
Checkpoint
timeout
Specifies the time interval (in seconds) during which QuickTest
attempts to perform the checkpoint successfully. QuickTest
continues to perform the checkpoint until it passes or until the
timeout occurs. If the checkpoint does not pass before the
timeout occurs, the checkpoint fails.
Example: Suppose it takes some time for an object to achieve an
expected state. Increasing the checkpoint timeout value in this
case can help ensure that the object has sufficient time to
achieve that state, enabling the checkpoint to pass (if the data
matches) before the maximum timeout is reached.
If you specify a checkpoint timeout other than 0, and the
checkpoint fails, the Run Results Viewer displays information
on the checkpoint timeout.
Insert
statement
Specifies whether to insert the checkpoint step before or after
the currently selected step. The default value is Before current
step.
Note: Available only when inserting a new checkpoint step
during an editing session. During a recording session, the
checkpoint step is always inserted as the next step.
582
Chapter 18 • Standard Checkpoints
Parameterization / Properties Dialog Box
(Checkpoints)
This dialog box enables you to set the checkpoint property value as a
Constant or a Parameter.
The following image shows this dialog box when a Constant property value
is selected.
To access
In the Checkpoint Properties dialog box (Simple mode),
click the browse button
for a property.
Important
information
This dialog box opens only from Simple Mode. (In
Advanced Mode, the options in this dialog box are
available in the Configure value area of the Checkpoint
Properties dialog box.)
Relevant tasks
"How to Create or Modify a Standard Checkpoint Step"
on page 574
See also
"Checkpoint Properties Dialog Box" on page 576
For a description of user interface elements, see "Configure Value Area" on
page 639.
583
Chapter 18 • Standard Checkpoints
Parameter Options Dialog Box (Local and Component
Input Parameters for Checkpoints)
This dialog box enables you to set the parameter value for a checkpoint
property value.
To access
➤ In the Checkpoint Properties dialog box, click the
Parameter Options button
.
➤ In the Parameterization / Properties dialog box, select
the Parameter radio button. If a parameter is already
defined, you must then click the Parameter Options
button
to open this dialog box.
Relevant tasks
➤ "How to Create or Modify a Standard Checkpoint Step"
on page 574
➤ "How to Parameterize Input Values" on page 637
See also
➤ "Checkpoint Properties Dialog Box" on page 576
➤ "Value Configuration Options Dialog Box" on
page 641
For a description of user interface elements, see "Configure Value Area" on
page 639.
584
19
Bitmap Checkpoints
This chapter includes:
Concepts
➤
Bitmap Checkpoints Overview on page 586
➤
Fine-Tuning the Bitmap Comparison on page 587
Tasks
➤
How to Create or Modify a Bitmap Checkpoint Step on page 590
Reference
➤
Bitmap Checkpoint Properties Dialog Box on page 592
585
Chapter 19 • Bitmap Checkpoints
Concepts
Bitmap Checkpoints Overview
QuickTest enables you to check that the visible parts of your application are
displayed correctly by comparing bitmaps of objects in your application to
bitmaps captured previously and stored with the component.
You can check an entire object or any area within an object. For example,
suppose you have a Web site that can display a map of a city the user
specifies. The map has control keys for zooming. You can record the new
map that is displayed after one click on the control key that zooms in the
map. Using the bitmap checkpoint, you can check that the map zooms in
correctly.
You can create bitmap checkpoints for all supported testing environments
(as long as the appropriate add-ins are loaded).
The results of bitmap checkpoints may be affected by factors such as
operating system, screen resolution, and color settings.
How QuickTest Checks Bitmaps
When you create a bitmap checkpoint, QuickTest captures the visible part of
the specified object as a bitmap and inserts a checkpoint in the component.
(QuickTest does not capture any part that is scrolled off the screen, or
hidden by another object, for example.)
When you run the component, QuickTest captures a bitmap of the actual
object in the application and compares this bitmap (or a selected area
within it) with the bitmap stored in the checkpoint.
If there are differences, QuickTest saves the bitmap of the actual object and
displays it next to the expected bitmap in the details pane of the Run Results
Viewer. In the Run Results Viewer you can also view a bitmap that reflects
the difference between the two bitmaps, to assist you in identifying the
nature of the discrepancy.
586
Chapter 19 • Bitmap Checkpoints
You can use the Save still image captures to results option in the Run >
Screen Capture pane in the Options dialog box to configure when
QuickTest saves the bitmaps in the run results. For details, see "Screen
Capture Pane (Options Dialog Box)" on page 669.
For details on run results of a checkpoint, see "Checkpoint and Output Value
Results" on page 811.
Tip: By default, QuickTest displays expected, actual, and difference bitmaps
in the Run Results only for checkpoints that fail. If a bitmap checkpoint is
configured such that the checkpoint may pass even if the expected and
actual bitmaps are not identical, you might want to see the captured actual,
expected and difference bitmaps in the run results even for bitmap
checkpoints that pass. To do this, set the Save still image captures to results
option to Always.
Fine-Tuning the Bitmap Comparison
When running a bitmap checkpoint, QuickTest compares the area that you
are checking in the application with the bitmap stored in the checkpoint,
pixel by pixel. By default, if any pixels are different, the checkpoint fails.
The Bitmap Checkpoint Properties dialog box (described on page 592)
provides options for fine-tuning the bitmap comparison.
You can adjust the comparison to enable the checkpoint to pass even if the
bitmaps are not identical by setting the RGB tolerance and Pixel tolerance
options described below.
In addition, QuickTest enables you to use custom comparers for bitmap
checkpoints. A custom comparer is a COM object that you or a third party
can develop to run the bitmap comparison in the checkpoint according to a
more specific algorithm. For details on using the Comparer option, see
"Custom Comparers" on page 589.
587
Chapter 19 • Bitmap Checkpoints
RGB tolerance
The RGB (Red, Green, Blue) tolerance determines the percent by which the
RGB values of the pixels in the actual bitmap can differ from those of the
expected bitmap and allow the checkpoint to pass. (The RGB tolerance
option is limited to bitmaps with a color depth of 24 bits.)
For example, a bitmap checkpoint on identical bitmaps could fail if different
display drivers are used when you create your checkpoint and when you run
your test. Suppose one display driver displays the color white as RGB (255,
255, 255) and another driver displays the color white as RGB (231, 231,
231). The difference between these two values is about 9.4%. By setting the
RGB tolerance to 10%, your checkpoint will pass when running your test
with either of these drivers.
Note: QuickTest applies the RGB tolerance settings when comparing each
pixel in the actual and expected bitmaps. The Red, Green, and Blue values
for each pixel are compared separately. If any of the values differs more than
the tolerance allows, the pixel fails the comparison.
Pixel tolerance
The pixel tolerance determines the number or percentage of pixels in the
actual bitmap that can differ from those in the expected bitmap and allow
the checkpoint to pass.
For example, suppose the expected bitmap has 4000 pixels. If you define the
pixel tolerance to be 50 and select the Pixels radio button, up to 50 pixels in
the actual bitmap can be different from those in the expected bitmap and
the checkpoint passes. If you define the pixel tolerance to be 5 and select the
Percent radio button, up to 200 pixels (5 percent of 4000) in the actual
bitmap can be different from those in the expected bitmap and the
checkpoint passes.
588
Chapter 19 • Bitmap Checkpoints
Using both RGB and Pixel Tolerances
If you define both RGB and pixel tolerances, the RGB tolerance is calculated
first. The pixel tolerance then defines the maximum number of pixels that
can fail the RGB criteria and allow the checkpoint to pass.
For example, suppose you define an RGB tolerance of 10 percent and a pixel
tolerance of 5 percent for a bitmap that has 4000 pixels.
For the checkpoint to pass, each pixel in the actual bitmap must have RGB
values that are no greater than or no less than 10 percent of the RGB values
of the expected bitmap. If that criterion fails, QuickTest checks that the
number of pixels that failed are less than 200. If that criterion passes, the
checkpoint passes.
Custom Comparers
A custom comparer is a COM object that you or a third party can develop to
run the bitmap comparison in the checkpoint according to a more specific
algorithm. If one or more custom comparers are installed and registered on
the QuickTest computer, the Bitmap Checkpoint Properties dialog box
includes a Comparer option.
The Comparer option enables you to select the QuickTest default comparer
or a custom comparer that performs the bitmap comparison according to
your testing requirements. For an example of when it can be useful to create
a custom comparer, see "Custom Comparer for Images Whose Location
Changes in the Application - Use-Case Scenario" on page 1147. For details
on developing or installing custom comparers, see Appendix D, "Bitmap
Checkpoint Customization."
If you select a custom comparer, some of the options in the Bitmap
Checkpoint Properties dialog box are different. For details, see "Bitmap
Checkpoint Properties Dialog Box" on page 592.
589
Chapter 19 • Bitmap Checkpoints
Tasks
How to Create or Modify a Bitmap Checkpoint Step
If you are modifying an existing bitmap checkpoint step proceed to the Set
the options for the bitmap checkpoint object step.
This task includes the following steps:
➤
"Considerations for inserting a new bitmap checkpoint step" on page 590
➤
"Insert a new bitmap checkpoint step" on page 591
➤
"Set the options for the bitmap checkpoint object" on page 591
Considerations for inserting a new bitmap checkpoint step
Before inserting a new bitmap checkpoint step, make sure to review all
relevant information:
Availability
Recording sessions only
Simple Mode /
Advanced Mode
The following modes are available:
➤ Simple Mode. Displays only the basic properties
and expected values of the checkpoint.
➤ Advanced Mode. Displays all supported
properties and expected values of the
checkpoint.
General considerations
590
If you want to create a bitmap checkpoint that
contains multiple objects, you should select the
highest level object that includes all the objects to
include in the bitmap checkpoint.
Chapter 19 • Bitmap Checkpoints
Insert a new bitmap checkpoint step
Insert a new bitmap checkpoint step, as described in "How to Insert a
Checkpoint Step in a Component" on page 570. The Bitmap Checkpoint
Properties dialog box opens in Simple Mode.
Set the options for the bitmap checkpoint object
In the Bitmap Checkpoint Properties dialog box, specify the settings for the
checkpoint object. For details, see "Bitmap Checkpoint Properties Dialog
Box" on page 592.
591
Chapter 19 • Bitmap Checkpoints
Reference
Bitmap Checkpoint Properties Dialog Box
This dialog box enables you to define and modify properties for a bitmap
checkpoint. It has two modes, Simple Mode and Advanced Mode. The mode
that opens is dependent on whether any advanced properties are selected in
the checkpoint.
Simple Mode
The following image shows an example of the Bitmap Checkpoint
Properties dialog box in Simple Mode. Advanced checkpoint properties are
not shown.
This image shows the dialog box that opens when adding a checkpoint to
an existing test. The dialog box options differ slightly when editing an
existing checkpoint.
592
Chapter 19 • Bitmap Checkpoints
Advanced Mode
The following image shows an example of the Bitmap Checkpoint
Properties dialog box when editing an existing checkpoint. The dialog box
options differ slightly when inserting a new checkpoint.
The image shows the dialog box in Advanced Mode. This mode is not
available when opening this dialog box from Quality Center.
593
Chapter 19 • Bitmap Checkpoints
Custom Comparer
The following image shows the Bitmap Checkpoint Properties dialog box
when a custom comparer is selected from the Comparer list. (The Comparer
option is available because a custom comparer is installed and registered on
the QuickTest computer.)
To access
Use one of the following:
➤ Insert a new checkpoint step and select a bitmap object
from your application. For details, see "How to Create
or Modify a Bitmap Checkpoint Step" on page 590.
➤ In the Keyword View, right-click an existing bitmap
checkpoint step and select Checkpoint Properties.
➤ In the local or shared object repository, click an
existing bitmap checkpoint object. The checkpoint
details are displayed on the right side of the object
repository dialog box, in the Object Details area.
594
Chapter 19 • Bitmap Checkpoints
Important
information
➤ If one or more custom comparers are installed and
registered on the QuickTest computer, the Bitmap
Checkpoint Properties dialog box includes a Comparer
option.
A custom comparer is a COM object that you or a third
party develop to run the bitmap comparison in the
checkpoint according to a more specific algorithm.
➤ If you select a custom comparer from the Comparer
list, this dialog box may display different areas or
options.
Simple Mode /
Advanced Mode
➤ Simple Mode. Displays only the basic properties and
expected values for the selected checkpoint object. The
dialog box displays in this mode when you:
➤ Insert a new checkpoint step.
➤ Open the dialog for an existing checkpoint object in
which no advanced properties or options are
selected.
➤ Advanced Mode. Displays all of the supported
properties and expected values for the selected
checkpoint object. The dialog box displays in this
mode when you:
➤ Click the Advanced Mode button.
➤ Open the dialog for an existing checkpoint object in
which advanced properties or options are selected.
Note: The advanced properties of checkpoint objects
cannot be viewed or edited in Quality Center.
Therefore, if one or more advanced properties are
selected in a bitmap checkpoint object, and a
Quality Center user views its properties in
Quality Center, the dialog box displays text indicating
that some properties are not shown.
Relevant tasks
"How to Create or Modify a Bitmap Checkpoint Step" on
page 590
See also
"Fine-Tuning the Bitmap Comparison" on page 587
595
Chapter 19 • Bitmap Checkpoints
Object Details Area
User interface elements are described below:
UI Element
Description
Name
The name that QuickTest assigns to the checkpoint object. By
default, the name is the same as the name of the object on
which the checkpoint step is being performed. You can specify
a different name for the checkpoint object or accept the default
name.
For a list of naming conventions, see "Naming Conventions" on
page 1121.
Class
The type of object (read-only). The class of the object is not
displayed in Quality Center for business components.
Find in Repository. Displays the checkpoint object in its object
repository. Available only when editing an existing checkpoint
step. It is not available when creating a new checkpoint step.
Note: This option is available only in Advanced Mode.
Advanced Mode / Simple Mode. Toggles the dialog box
between Advanced Mode and Simple Mode. Advanced Mode
expands the dialog box and enables you to view or edit
advanced properties.
596
Chapter 19 • Bitmap Checkpoints
Bitmap Comparison Area
The following image shows an example of the Bitmap Comparison area
when only a part of the bitmap is selected for verification. (The Comparer
option is available because a custom comparer is installed and registered on
the QuickTest computer.)
User interface elements are described below (unlabeled elements are shown
in angle brackets):
UI Element
Description
Comparer
Enables you to select the comparer for QuickTest to use to run
the checkpoint. You can select the QuickTest default comparer
or a custom comparer.
Available only:
➤ In Advanced Mode.
➤ If one or more custom comparers are installed and registered
on the QuickTest computer. For details, see "Fine-Tuning the
Bitmap Comparison" on page 587.
<Bitmap
display area>
Displays a bitmap of the object you selected.
Selection Options Area
Important
information
Available only in Advanced Mode.
597
Chapter 19 • Bitmap Checkpoints
The following image shows an example of the Selection Options area when
only a part of the bitmap is selected for verification.
User interface elements are described below (unlabeled elements are shown
in angle brackets):
UI Element
Description
Check entire
bitmap /
Check only
selected area
Enables you to specify whether the checkpoint compares the
entire bitmap or only a specific area of the bitmap.
Save only
selected area
Enables you to save only the selected area of the object with
your test (to save disk space). Available only after you select
Check only selected area and draw the rectangle that specifies
the area.
Note: If you select Check only selected area, the cursor turns
into a crosshairs pointer when you hover over the bitmap
display area. Use the crosshairs pointer to draw a rectangle
specifying the area that you want to select. To remove the
rectangle, click again.
Note:
➤ The bitmap stored in the checkpoint is cropped when you
click OK. The Run Results Viewer displays only the selected
area of the bitmap.
➤ If you select the Save only selected area check box, you can
later modify the checkpoint by selecting a smaller area
within the selected area, but you cannot return the bitmap to
its former size. The Update Run Mode option (Automation >
Update Run Mode) only updates the saved area of the
bitmap. It does not update the original, full size object. To
include more of the object in the checkpoint, create a new
checkpoint.
598
Chapter 19 • Bitmap Checkpoints
UI Element
Description
<pointer
position>
Displays the coordinates of the pointer’s current position
(relative to the top left corner of the bitmap). Available only
while the crosshairs pointer is visible.
Note: As you draw the rectangle using the crosshairs, QuickTest
displays a tooltip with the current selected area size near the
crosshairs pointer.
Tolerance Options Area
Important
information
Available only in Advanced Mode.
See also
"Fine-Tuning the Bitmap Comparison" on page 587
The following image shows an example of the Tolerance Options area when
no checkboxes are selected.
User interface elements are described below:
UI Element
Description
RGB tolerance
Enables you to define the percent by which the RGB values of
the pixels in the actual bitmap can differ from those of the
expected bitmap and allow the checkpoint to pass. Available
only for bitmaps with a color depth of 24 bits.
You can modify the percentage manually or by using the up
and down arrows.
599
Chapter 19 • Bitmap Checkpoints
UI Element
Description
Pixel tolerance
Enables you to define the number or percentage of pixels in the
actual bitmap that can differ from those in the expected bitmap
and allow the checkpoint to pass.
You can select either the Percent or Pixels radio button, and
modify the value manually or by using the up and down
arrows. If you switch between the Percent and Pixels radio
buttons after entering the tolerance value, the value is
recalculated based on your selection. (100% is the total number
of pixels in the expected bitmap or selected area.)
Custom Comparer Area
Important
information
If you select a custom comparer to run the bitmap
comparison, the options in this area are displayed instead
of the options for selecting an area of the bitmap and for
setting tolerance levels.
Available only:
➤ In Advanced Mode.
➤ If one or more custom comparers are installed and
registered on the QuickTest computer. For details, see
"Fine-Tuning the Bitmap Comparison" on page 587.
See also
"Fine-Tuning the Bitmap Comparison" on page 587
The following image shows an example of the Custom Comparer area when
a custom comparer is selected in the Comparer list.
600
Chapter 19 • Bitmap Checkpoints
User interface elements are described below:
UI Element
Description
Configuration
options
Enables you to provide input (in string format) to the custom
comparer, for any configuration options it supports. By default,
this box displays a configuration string provided by the custom
comparer (if available).
Example: You might be able to specify tolerance levels, an
acceptable deviation in size or location of the bitmap, and so
on.
Details
Opens help information provided by the custom comparer (if
available). This help can include instructions for providing
configuration input to the comparer, information about the
algorithm that the custom comparer uses to compare the
bitmaps, an explanation about when to use this custom
comparer, and so on.
Checkpoint Timeout Area
The following image shows the Checkpoint Timeout area when inserting a
new checkpoint step during an editing session. The Insert statement option
is not available for components.
601
Chapter 19 • Bitmap Checkpoints
User interface elements are described below:
UI Element
Description
Checkpoint
timeout
Specifies the time interval (in seconds) during which QuickTest
attempts to perform the checkpoint successfully. QuickTest
continues to perform the checkpoint until it passes or until the
timeout occurs. If the checkpoint does not pass before the
timeout occurs, the checkpoint fails.
Example: Suppose it takes some time for an object to achieve an
expected state. Increasing the checkpoint timeout value in this
case can help ensure that the object has sufficient time to
achieve that state, enabling the checkpoint to pass (if the data
matches) before the maximum timeout is reached.
If you specify a checkpoint timeout other than 0, and the
checkpoint fails, the Run Results Viewer displays information
on the checkpoint timeout.
602
20
Output Values
This chapter includes:
Concepts
➤
Output Values Overview on page 604
Tasks
➤
How to Create or Modify a Standard Output Value Step on page 606
Reference
➤
Output Value Properties Dialog Box on page 609
603
Chapter 20 • Output Values
Concepts
Output Values Overview
QuickTest enables you to retrieve values in your component and store them
in output value objects. You can subsequently retrieve these values and use
them as input at a different stage in the run session.
An output value step is a step in which one or more values are captured at a
specific point in your component and stored for the duration of the run
session. The values can later be used as input at a different point in the run
session.
When you create output value steps, you can determine where the values
are stored during the run session and how they can be used. During the run
session, QuickTest retrieves each value at the specified point and stores it in
the specified location. When the value is needed later in the run session,
QuickTest retrieves it from this location and uses it as required.
Output values are stored only for the duration of the run session. When the
run session is repeated, the output values are reset.
Note: After the run session, you can view the output values retrieved during
the session as part of the session results. For details, see "Parameterized
Values in the Run Results" on page 815.
This section also includes:
604
➤
"Standard Output Value" on page 605
➤
"Output Types and Settings" on page 605
➤
"Viewing and Editing Output Values" on page 605
Chapter 20 • Output Values
Standard Output Value
You can use standard output values to output the property values of most
objects. For example, you can use standard output values to output text
strings by specifying the text property of the object as an output value.
For task details, see "How to Create or Modify a Standard Output Value Step"
on page 606.
Output Types and Settings
In the Output Options dialog box you can set the output settings for each
value, to determine where it is stored and how it can be used during the run
session. When the output value step is reached, QuickTest retrieves each
value selected for output and stores it in the specified location for use later
in the run session. For details, see "Output Value Properties Dialog Box" on
page 609.
Viewing and Editing Output Values
When you insert an output value step in your test, the Keyword View shows
the step with Output displayed in the Operation column and CheckPoint
displayed in the Value column, followed by the name assigned to the output
value.
605
Chapter 20 • Output Values
Tasks
How to Create or Modify a Standard Output Value Step
If you are modifying an existing output value step proceed to the Set the
options for the output value object step.
Note: You cannot create image, table or (Web) page output values in a
component. These special output value types are only available for tests.
However, if you select a Web page or any table object when creating a
standard output value step for your component, you will be able to check
their object properties just like any other object.
This task includes the following steps:
606
➤
"Considerations for inserting a new output value step" on page 607
➤
"Insert a new standard output value step while recording your
component" on page 607
➤
"Set the options for the output value object" on page 608
Chapter 20 • Output Values
Considerations for inserting a new output value step
Before inserting a new output value step, make sure to review all relevant
information:
Availability
➤ Recording sessions
➤ Editing sessions
Simple Mode /
Advanced Mode
The following modes are available:
➤ Simple Mode. Displays only the basic properties
and expected values of the output value.
➤ Advanced Mode. Displays all supported
properties and expected values of the output
value step.
Insert a new standard output value step while recording your
component
1 Start a recording session.
2 Do one of the following:
➤
Select Insert > Output Value > Standard Output Value.
➤
Click Insert Checkpoint or Output Value down arrow and select
Standard Output Value.
The pointer changes into a pointing hand. For details on using the
pointing hand, see "Tips for Using the Pointing Hand" on page 148.
3 In your application, click the object for which you want to specify an
output value. The Output Value Properties dialog box opens for most
objects.
607
Chapter 20 • Output Values
Note: If the location you clicked is associated with more than one object,
the Object Selection dialog box opens, enabling you to select the object
for which you want to specify an output value. For details, see "Object
Selection Dialog Box" on page 147.
Set the options for the output value object
Specify the settings in the Output Value Properties dialog box. For details,
see "Output Value Properties Dialog Box" on page 609.
608
Chapter 20 • Output Values
Reference
Output Value Properties Dialog Box
This dialog box enables you to define and modify properties for a standard
output value. It has two modes, Simple Mode and Advanced Mode. The
mode that opens is dependent on whether any advanced properties are
selected for output.
Simple Mode
The following image shows an example of the Output Value Properties
dialog box in Simple Mode.
609
Chapter 20 • Output Values
Advanced Mode
The following image shows an example of the Output Value Properties
dialog box in Advanced Mode. This mode is not available when opening
this dialog box from Quality Center.
To access
Use one of the following:
➤ Insert a new output value step and select an object from
your application. For details, see "How to Create or Modify
a Standard Output Value Step" on page 606.
➤ In the Keyword View, right-click an existing output value
step and select Output Value Properties.
➤ In the local or shared object repository, click an existing
output value object. The output value details are displayed
on the right side of the object repository dialog box, in the
Object Details area.
610
Chapter 20 • Output Values
Simple Mode/
Advanced Mode
➤ Simple Mode. Displays only the basic properties and
expected values for the selected output value object. The
dialog box displays in this mode when you:
➤ Insert a new output value step.
➤ Open the dialog for an existing output value object in
which no advanced properties or options are selected.
➤ Advanced Mode. Displays all of the supported properties
and expected values for the selected output value object.
The dialog box displays in this mode when you:
➤ Click the Advanced Mode button.
➤ Open the dialog for an existing output value object in
which advanced properties or options are selected.
Note: The advanced properties of output value objects cannot
be viewed or edited in Quality Center. Therefore, if one or
more advanced properties are selected in a standard output
value object, and a Quality Center user views its properties in
Quality Center, the dialog box displays text indicating that
some properties are not shown.
Relevant tasks
"How to Create or Modify a Standard Output Value Step" on
page 606
Object Details Area
User interface elements are described below:
UI Elements
Description
Name
The name that QuickTest assigns to the output value object. By
default, the name is the same as the name of the object on which
the output value step is being performed. You can specify a
different name for the output value object or accept the default
name.
For a list of naming conventions, see "Naming Conventions" on
page 1121.
611
Chapter 20 • Output Values
UI Elements
Description
Class
The type of object (read-only). The class of the object is not
displayed in Quality Center for business components.
Find in Repository. Displays the output value object in its object
repository. Available only in Advanced Mode.
Advanced Mode / Simple Mode. Toggles the dialog box between
Advanced Mode and Simple Mode. Advanced Mode expands the
dialog box and enables you to view or edit advanced properties.
Properties Grid Area
The following image shows the Properties Grid area when only some of the
properties are selected. Specific properties may vary depending on the type
of object for which you are defining output values.
User interface elements are described below:
UI Elements
Description
Check box
Enables you to select one or more property for the object, and
specify the output options for each property value you select.
Type
The
icon indicates that the value of the property is currently a
constant.
The
icon indicates that the value of the property is currently a
parameter.
Property
612
The name of the property.
Chapter 20 • Output Values
UI Elements
Description
Value
The expected value of the property. For more information on
modifying the value of a property, see "Parameterization /
Properties Dialog Box (Checkpoints)" on page 583.
Configure Value Area
The following image shows the Configure Value area when the data table is
used to store the output value.
Important
information
➤ This area is available only in Advanced Mode.
➤ In Simple Mode, when you click the Browse button for
a selected property
in the Properties grid, the
Parameterization / Properties dialog box opens, in
which the output definition for the selected property
value is displayed. For user interface details, see
"Parameterization / Properties Dialog Box (Output
Values)" on page 617.
User interface elements are described below:
UI Elements
Description
Configure
value
The output definition for the selected property, in read-only
mode.
Modify
Opens the Output Options dialog box, enabling you to change
the output type and/or settings for the selected value.
For details, see "Output Options Dialog Box" on page 615.
613
Chapter 20 • Output Values
Statement Location Area
Important
information
This area is available only in Advanced Mode.
The following image shows the statement location area when inserting a
new output value step during an editing session. When inserting a new
output value step during a recording session, the Insert statement option is
not available.
User interface elements are described below:
UI Elements
Description
Insert
statement
Specifies whether to insert the output value step before or after
the currently selected step. The default value is Before current
step.
Note: Available only when inserting a new output value step
during an editing session. During a recording session, the
output value step is always inserted as the next step.
614
Chapter 20 • Output Values
Output Options Dialog Box
This dialog box enables you to parameterize output values in the step’s
Output cell using a local parameter or a component parameter.
To access
Use one of the following:
➤
➤
Important
information
In the Output cell, click the output value button
Press CTRL + F11.
.
➤ If at least one output component parameter is defined in the
component, the default output type is Component parameter
and the default output name is the first output parameter
displayed in the Parameters pane of the Business Component
Settings dialog box.
➤ After you define an output parameter, you can use its value as
an input value in a later step in the component (local and
component parameters), or in a later component in the
business process test (component parameters only).
➤ If you click in the Output cell after you specify an output
parameter for it, an icon specifying the type of parameter is
displayed in the cell:
Indicates a component parameter.
Indicates a local parameter.
615
Chapter 20 • Output Values
User interface elements are described below:
UI Elements
Description
Output Types
The type of output parameter. Possible values:
➤ Component parameter
➤ Local parameter
Parameter
The component parameter in which to store the output
value. (Displayed only if Component parameter is
Output Type.)
The names and full descriptions of the available
component parameters are displayed as read-only. You
can resize the display, as needed, and, if the list of
parameters is long, you can scroll through the list.
Name
The name of the parameter. (Displayed only if Local
parameter is the Output Type)
Enter a meaningful name for the parameter or choose
one from the list. If no local parameter is defined, then
the default parameter name, p_Local, is displayed.
Description
616
A brief description for the parameter. (Displayed only if
Local parameter is Output Type.)
Chapter 20 • Output Values
Parameterization / Properties Dialog Box (Output
Values)
This dialog box displays output property value as a Constant or a Parameter,
in read-only mode.
To access
In the Output Value Properties dialog box (Simple mode),
click the Browse button for a property
.
Important
information
➤ This option is available only in Simple mode. When in
Advanced mode, the options in this dialog box are
available in the Configure value area of the Output
Value Properties dialog box.
➤ You edit the output definition for output values in the
Output Options dialog box. For details, see "Output
Options Dialog Box" on page 615.
Relevant tasks
"How to Create or Modify a Standard Output Value Step"
on page 606
See also
➤ "Output Value Properties Dialog Box" on page 609
➤ "Output Values Overview" on page 604
For a description of user interface elements, see "Configure Value Area" on
page 639.
617
Chapter 20 • Output Values
618
21
Text Recognition for Windows-Based
Objects
This chapter includes:
Concepts
➤
Text Recognition for Windows-Based Objects Overview on page 620
➤
Checking Text in an Image - Use-Case Scenario on page 620
Tasks
➤
How to Configure Text Recognition Settings on page 624
Reference
➤
Guidelines for Text Recognition on page 626
➤
Text Recognition and Development Environments on page 628
619
Chapter 21 • Text Recognition for Windows-Based Objects
Concepts
Text Recognition for Windows-Based Objects Overview
You can use the testobject.GetText (for Terminal Emulator objects),
testobject.GetVisibleText, or testobject.GetTextLocation test object methods,
or the TextUtil.GetText or TextUtil.GetTextLocation reserved object methods
to capture the text you need.
When you use one of these options, QuickTest identifies text in your
application using either a Windows API-based mechanism or an OCR
(optical character recognition) mechanism.
By default, QuickTest tries to retrieve the text directly from the object using
a Windows API-based mechanism. If QuickTest cannot capture the text this
way (for example, because the text is part of a picture), it tries to capture the
text using an OCR (optical character recognition) mechanism.
When QuickTest uses the OCR mechanism, a number of factors can affect
the text it retrieves. Depending on the characteristics of the text you want to
retrieve, you can adjust several OCR configuration options to optimize the
way the text is captured.
You use the Text Recognition Pane (Options Dialog Box) (described on
page 659) to specify the preferred text recognition mechanism and
OCR-specific settings.
Checking Text in an Image - Use-Case Scenario
Ben and George are quality assurance engineers who are experienced
QuickTest users. George is also familiar with text recognition and has a basic
understanding of how text recognition mechanisms work.
Ben often uses bitmap checkpoints to test the appearance of different icons
or pictures in the user interface he is testing.
620
Chapter 21 • Text Recognition for Windows-Based Objects
For one of his projects, Ben also needed to verify the text in the graphics, so
he decided to use text checkpoints.
Ben decided to begin the verification process by inserting a text checkpoint
to check that the text Welcome ! was displayed correctly in the following
graphic.
Before inserting the text checkpoint, Ben opened the Text Recognition pane
and configured the text recognition settings. Ben set the text recognition
mechanism to Use Only OCR because the text was part of a graphic. Ben also
knew that single text block mode usually works best, so he selected the
Single text block mode option.
Ben then inserted a text checkpoint on the entire area shown above and
received the following results in the Text Checkpoint Properties dialog box:
Ben noticed that there were extra characters in the Checkpoint Summary
area of the text checkpoint, but he did not know why.
Ben asked his colleague, George, for help. George explained to him that the
text recognition mechanism sometimes adds extra characters to the text
checkpoint when it does not recognize the text correctly.
621
Chapter 21 • Text Recognition for Windows-Based Objects
George also pointed out that the area Ben defined for the text checkpoint
consisted of multiple text blocks because the text was not uniform in font
size, color, or background. The title area consisted of white characters on a
blue-gray background, while the remaining text was smaller and consisted
of blue text on a white background.
Ben remembered that he had selected the Single text block mode option in
the General > Text Recognition pane and understood that if he wanted to
use single text block mode, he would have to create a text checkpoint only
on the Welcome ! area of the graphic, and not on the entire graphic. Ben
tried this, and the OCR mechanism correctly identified the text, as shown
below:
622
Chapter 21 • Text Recognition for Windows-Based Objects
Ben was pleased with the results, but he wanted to explore other
possibilities, so he inserted another text checkpoint—this time on the entire
graphic. He selected the Multiple text block mode option in the Text
Recognition pane, which resulted in the following:
Ben was pleased that the OCR mechanism correctly recognized all of the
text in the graphic. But he needed to test only the title, Welcome !, so he
finalized this checkpoint by marking all of the text after Welcome ! as Text
After.
Even though both checkpoints passed, Ben needed only one text
checkpoint. He decided to keep the first checkpoint (that used Single text
block mode), and he deleted the second one. He selected the Single text
block mode option in the Text Recognition pane to help ensure that the
checkpoint would pass in future test runs.
623
Chapter 21 • Text Recognition for Windows-Based Objects
Tasks
How to Configure Text Recognition Settings
This task describes a suggested workflow for configuring QuickTest text
recognition settings.
This task includes the following steps:
➤
"Prerequisites" on page 624
➤
"Analyze the characteristics of the text" on page 624
➤
"Set the appropriate options in the Text Recognition Pane" on page 625
➤
"Test the text recognition settings" on page 625
➤
"Adjust the settings as necessary" on page 625
➤
"Results" on page 625
1 Prerequisites
In your application, display the text you want to capture.
2 Analyze the characteristics of the text
Determine whether you can capture the text using a text (or text-like)
property instead of using a text recognition mechanism.
If it must use text-recognition, analyze whether the Windows API or OCR
mechanisms are more likely to meet your needs.
For details, see "Text Recognition for Windows-Based Objects Overview"
on page 620 and "Guidelines for Text Recognition" on page 626.
624
Chapter 21 • Text Recognition for Windows-Based Objects
3 Set the appropriate options in the Text Recognition Pane
For details, see "Text Recognition Pane (Options Dialog Box)" on
page 659.
4 Test the text recognition settings
Insert a function that calls a GetText/GetVisibleText method and run the
step.
For details, see the HP QuickTest Professional Object Model Reference.
5 Adjust the settings as necessary
If the captured text is not as expected, analyze the problems and adjust
the Text Recognition options to fine tune the way QuickTest captures
your text.
For more details, see "Text Recognition Pane (Options Dialog Box)" on
page 659 and "Guidelines for Text Recognition" on page 626.
6 Results
You can now use GetText/GetVisibleText steps in your function libraries
to capture this text from your application.
625
Chapter 21 • Text Recognition for Windows-Based Objects
Reference
Guidelines for Text Recognition
➤
The Windows API text recognition mechanism is provided as is. If it does
not work as you expect, change the option to use OCR.
However, although QuickTest uses a market-leading OCR mechanism and
the accuracy is usually very high, keep in mind that as with all OCR
technologies, these engines are non-deterministic in the way they are
built and interpret text and therefore accuracy of recognition for some
text patterns may be better than others. The OCR mechanism does not
guarantee 100% accuracy.
Additionally, text-capturing steps may behave differently in different run
sessions depending on the operating system version you are using, the
installed service packs, other installed toolkits, the APIs used in your
application, and so on.
➤
When using the OCR mechanism, the larger the text, the better the text
recognition.
➤
When working with text area checkpoints or specifying the text area in
methods such as GetTextLocation, try to keep the dimensions of the
selected text area as small as possible, as this helps prevent additional
unwanted characters in recognized text.
At the same time, consider the potential movement (change of
coordinates) of the object within the window. For example, the screen
resolution is often different on different computers, and this can affect
the coordinates of the object in the application. Also, during the design
and development stages of an application, an object may be moved to
make room for other objects or for aesthetic purposes.
Consider that the operating system, installed service packs, installed
toolkits, and so on, can all affect the size and location of an object in an
application. Make sure that the dimensions of the selected text area are
large enough for different system configurations.
626
Chapter 21 • Text Recognition for Windows-Based Objects
The dimensions of the selected text area need to be large enough to take
these issues into account.
➤
If you are not sure which text block mode to use, first use the single text
block mode, as text captures performed on single text blocks are generally
more accurate than text captures on multiple text blocks. If the results are
not what you expect, then try using the multiple text block mode. For an
example of when to use different text block modes, see "Checking Text in
an Image - Use-Case Scenario" on page 620.
Tip: If you want to use the text recognition mechanism for a large area
containing different fonts and backgrounds, it is recommended to create
several steps to capture the text for each single text block instead of
creating one step to capture a multiple text block.
➤
Windows provides various themes. When working with text recognition,
try to apply themes in the following order:
➤
Windows Vista theme (for best results)
➤
Windows XP theme
➤
Windows Classic theme
For example, this may be useful if the default OCR settings result in
additional unexpected characters in the captured text.
➤
On Windows Vista 32-bit or any 64-bit operating system, QuickTest text
recognition features (such as text checkpoints and output values,
GetVisibleText and GetTextLocation test object methods, and
TextUtil.GetText and TextUtil.GetTextLocation reserved object methods)
are limited and are not always reliable.
Workaround: On Windows Vista, you can improve text recognition by
applying the Windows Vista theme.
627
Chapter 21 • Text Recognition for Windows-Based Objects
➤
If the text recognition mechanism retrieves unwanted text information
(such as hidden text and shadowed text that appears as multiple copies of
the same string) when using the multiple text block mode, use the single
text block mode option. To do this, in the General > Text Recognition
pane of the Options dialog box, select Single text block mode.
➤
If your text recognition options are set to use the Windows API
mechanism, then, when running a step that uses text recognition, the
Windows API may cause a "blinking effect" in your application as it
captures the text. If your test contains consecutive steps that utilize the
text recognition mechanism, the "blinking effect" in one step may cause
the subsequent text recognition step (or other step that relies on the
appearance of the application, such as a bitmap checkpoint) to fail.
To address this, you can insert a Wait statement prior to each such step.
This enables you to delay the performance of the next text recognition
step until the Windows API capture of the previous step is complete.
➤
It is highly recommended to check text from your application window by
inserting a standard checkpoint for the object containing the desired text,
using its text (or similar) property.
Text Recognition and Development Environments
The following table lists the development environments supported by
QuickTest (via its add-ins) and specifies what is supported for text
recognition.
Text Recognition
Development
Environment
Supported
Not Supported
ActiveX
Full text recognition support
N/A
Delphi
Full text recognition support
N/A
Java
➤ Text checkpoints
➤ GetTextLocation method
➤ Text output values
➤ GetVisibleText method
➤ Text area checkpoints
➤ Text area output values
628
Chapter 21 • Text Recognition for Windows-Based Objects
Text Recognition
Development
Environment
Supported
Not Supported
.NET WebForms
➤ Text checkpoints for Page
➤ Text checkpoints for all
object only
➤ Text output values for
Page object only
other objects
➤ Text output values for all
other objects
➤ Text area checkpoints for
all objects
➤ Text area output values for
all objects
➤ GetTextLocation method
➤ GetVisibleText method
.NET WinForms
Full text recognition support
N/A
Oracle
N/A
No text recognition support
PeopleSoft
➤ Text checkpoints for
➤ Text checkpoints for all
PSFrame object only
➤ Text output values for
PSFrame object only
other objects
➤ Text output values for all
other objects
➤ Text area checkpoints for
all objects
➤ Text area output values for
all objects
➤ GetTextLocation method
➤ GetVisibleText method
PowerBuilder
Full text recognition support
N/A
SAP Gui for
Windows
N/A
No text recognition support
SAP Web
➤ Text checkpoints
➤ Text area checkpoints
➤ Text output values
➤ Text area output values
➤ GetTextLocation method
➤ GetVisibleText method
Siebel
N/A
No text recognition support
629
Chapter 21 • Text Recognition for Windows-Based Objects
Text Recognition
Development
Environment
Supported
Not Supported
Silverlight
Full support except as listed
in the Not Supported
column.
➤ GetTextLocation method
Standard
Windows
Full text recognition support
N/A
Stingray
Full text recognition support
N/A
Terminal
Emulators
Text output values for
TeScreen and TeTextScreen
objects only
➤ Other text checkpoints
➤ Other text output values
➤ Text area checkpoints
➤ Text area output values
➤ GetTextLocation method
➤ GetVisibleText method
VisualAge
Full text recognition support
N/A
Visual Basic
Full text recognition support
N/A
Web
➤ Text checkpoints for Page
➤ Text checkpoints for all
object only
➤ Text output values for
Page object only
other objects
➤ Text output values for all
other objects
➤ Text area checkpoints for
all objects
➤ Text area output values for
all objects
➤ GetTextLocation method
➤ GetVisibleText method
630
Web Services
N/A
No text recognition support
WPF
Full support except as listed
in the Not Supported
column.
➤ GetTextLocation method
22
Parameterization and Regular
Expressions
This chapter includes:
Concepts
➤
Working with Local and Component Parameters on page 632
➤
Regular Expressions Overview on page 633
Tasks
➤
How to Configure Constant and Parameter Values on page 636
➤
How to Parameterize Input Values on page 637
Reference
➤
Configure Value Area on page 639
➤
Value Configuration Options Dialog Box on page 641
➤
Regular Expression Characters and Usage Options on page 643
631
Chapter 22 • Parameterization and Regular Expressions
Concepts
Working with Local and Component Parameters
You can define input parameters that pass values into your business
component, and output parameters that pass values from your component
to external sources or from one step to another step. You can then use these
parameters to parameterize input and output values in steps.
You can define two types of parameters—local parameters and component
parameters.
Local parameter. Variable values defined within a component for use within
the same component.
Local input parameter values can be received and used by a later
parameterized step in the same component. You define local input
parameters in the Business Component Keyword View using the Value
Configuration Options dialog box and the Parameter Options dialog box.
For details, see "Value Configuration Options Dialog Box" on page 641 and
"Parameter Options Dialog Box (Local and Component Input Parameters for
Checkpoints)" on page 584.
Local output parameters can be returned by an operation or component step
for use within the same component. Local output parameter values can be
viewed in the business process run results. You define local output
parameters using the Output Options dialog box.
You cannot delete local parameters, but you can cancel the input or output
to them.
Component parameter. Variable values defined within a component for use
in the same component or later components in the business process test.
Component input parameter values can be received and used as the values
for specific, parameterized steps in the component.
632
Chapter 22 • Parameterization and Regular Expressions
Component output parameter values can be returned as input parameters in
components that are used later in the test. These values can also be viewed
in the business process run results.
You define component input and output parameters in the Parameters pane
of the Business Component Settings dialog box or in the Quality Center
Business Components module. For details, see "Parameters Pane (Business
Component Settings Dialog Box)" on page 712 or the HP Business Process
Testing User Guide.
After you define a parameter you can use it to parameterize a value.
Alternatively, you can apply a constant value to the parameter by typing it
directly in the Value cell.
For instructions on how to parameterize input values, see "How to
Parameterize Input Values" on page 637.
For instructions on how to parameterize output values, see "How to Create
or Modify a Standard Output Value Step" on page 606.
Regular Expressions Overview
A regular expression is a string that specifies a complex search phrase. By
using special characters, such as a period (.), asterisk (*), caret (^), and
brackets ([ ]), you can define the conditions of a search.
Regular expressions are used to identify objects and text strings with varying
values. You can use regular expressions to instruct QuickTest to find a value
that matches a particular pattern or condition instead of a specific
hard-coded value.
Use case examples:
➤
Suppose the name of a window’s title bar changes according to a file
name. You can use a regular expression in a test object description to
identify a window whose title bar has the specified product name,
followed by a hyphen, and then any other text. When the relevant step
runs, QuickTest compares the regular expression that you provide with
the corresponding value in your application.
633
Chapter 22 • Parameterization and Regular Expressions
➤
Suppose the text property of an object is a date value, but the displayed
date changes according to the current date. You can define a regular
expression for the date, so that QuickTest can identify the object that
contains text with the expected date format, rather than the exact date
value.
The following are some examples of situations in which you can use regular
expressions:
➤
When defining the property values of an object in dialog boxes or in
programmatic descriptions used within a function library
➤
When defining pop-up window conditions in a recovery scenario
You can use regular expressions only for values of type string.
For details on defining regular expressions, including regular expression
syntax, see "Regular Expression Characters and Usage Options" on page 643.
This section also includes:
➤
"Regular Expressions for Property Values" on page 634
➤
"Regular Expressions in Checkpoints" on page 635
Regular Expressions for Property Values
If you expect the value of an object property in your application to change
in a predictable way during each run session, you can use regular
expressions when defining identification property values, for example, in
the Object Repository window, or in programmatic descriptions. For more
information on programmatic descriptions, see "Programmatic
Descriptions" on page 370.
For example, your Web site may include a form in which the user inputs
data and clicks the Send button to submit the form. When a required field is
not completed, the form is displayed again for the user to complete. When
resubmitting the form, the user clicks the Resend button. You can define the
value of the button’s name property as a regular expression, so that
QuickTest ignores this variation in the button name when identifying the
button in your application.
634
Chapter 22 • Parameterization and Regular Expressions
Regular Expressions in Checkpoints
When creating a standard checkpoint to verify the property values of an
object, you can set the expected value of an object’s property as a regular
expression so that an object with a varying value can be verified.
For example, suppose you want to check that every window and dialog box
in your application contains the name of your application followed by a
hyphen (-) and a descriptive title. You can add a checkpoint for each dialog
box object in your test to check that the first part of the title contains the
name of your application followed by a hyphen.
635
Chapter 22 • Parameterization and Regular Expressions
Tasks
How to Configure Constant and Parameter Values
This task describes how to define a value as a constant or a parameter:
➤
In the Value Configuration Options dialog box (available from the
Keyword View or Object Repository window, and so on), click the
parameterization button
for a selected value and define the value. For
example:
For details, see "Value Configuration Options Dialog Box" on page 641.
➤
Above the Configure value area of a dialog box, select a property or
argument, for example:
Then, in the Configure value area, select the Constant or Parameter radio
button and click the Constant Value Options or Parameter Options
button
. For details, see "Configure Value Area" on page 639 or
"Parameter Options Dialog Box (Local and Component Input Parameters
for Checkpoints)" on page 584, respectively.
636
Chapter 22 • Parameterization and Regular Expressions
How to Parameterize Input Values
This task describes to parameterize input values for a step using a local
parameter or a component parameter.
This task includes the following steps:
➤
"Open the Value Configuration Options dialog box or Parameter Options
dialog box" on page 637
➤
"Select the type of parameter and define its details" on page 637
➤
"Results" on page 639
1 Open the Value Configuration Options dialog box or
Parameter Options dialog box
For details, see:
➤
"Value Configuration Options Dialog Box" on page 641
➤
"Parameter Options Dialog Box (Local and Component Input
Parameters for Checkpoints)" on page 584
2 Select the type of parameter and define its details
In the Parameter box, select one of the following:
➤
Component parameter. Select the component parameter you want to
use for the parameterized value. The names and full descriptions of the
available component parameters are displayed as read-only. You can
resize the display, as needed, and, if the list of parameters is long, you
can scroll through the list.
637
Chapter 22 • Parameterization and Regular Expressions
➤
Local parameter. The details for the local parameter type are displayed.
Specify the property details for the local parameter:
➤
Name. Enter a meaningful name (case-sensitive) for the parameter
or choose one from the list.
➤
Value. Enter an input value for the parameter. For details, see
"Parameters Pane (Business Component Settings Dialog Box)" on
page 712.
➤
Description. Enter a brief description for the parameter.
Tip:
638
➤
You can cancel the parameterization of a value by selecting the
Constant option in the Value Configuration Options dialog box and
entering a constant value. The Constant box offers the same editing
options as the Value cell in which you clicked the parameterization
button
to open this dialog box.
➤
If you click in the Value cell after you define a component parameter
for it, the
icon is displayed in each part of the cell for which a
component parameter is defined.
➤
If you click in the Value cell after you define a local parameter for it,
the
icon is displayed in each part of the cell for which a local
parameter is defined.
Chapter 22 • Parameterization and Regular Expressions
3 Results
The local or component parameter is displayed in the Value cell of your
step. When the component runs, it will use the value specified in the
parameter for the step.
Reference
Configure Value Area
This area enables you to configure object property values or the values of the
operation arguments defined for the step.
The following examples illustrate various value definitions:
Single-line constant
Parameter
639
Chapter 22 • Parameterization and Regular Expressions
To access
This area is available in many dialog boxes, for example,
the various Checkpoint Properties and Output Value
dialog boxes, the various Parameter Options dialog
boxes, the Parameterization / Properties dialog box, and
so on.
User interface elements are described below:
UI Elements
Description
Constant
A manually defined value that remains unchanged for the
duration of the run.
This is the default option.
You can edit a value directly in the Constant box.
Parameter
A value that is defined or generated externally and is retrieved
during a run session. For example, a parameter value may be
defined in an external file or generated by QuickTest.
The Parameter box displays:
➤ The current parameter definition for a value that is already
parameterized
➤ The default parameter definition for a value that is not yet
parameterized.
For more information on default parameter definitions, see "Value
Configuration Options Dialog Box" on page 641.
You can click the Parameter Options button
to open the
Parameter Options dialog box that enables you to select a
different parameter type or modify the parameter settings for the
value. For details, see "Value Configuration Options Dialog Box"
on page 641, which describes component parameters and local
parameters.
640
Chapter 22 • Parameterization and Regular Expressions
Value Configuration Options Dialog Box
This dialog box enables you to define a selected value as a constant or a
parameter. In some situations, you can also define the constant or parameter
using a regular expression.
The following examples illustrate the Value Configuration Options dialog
box when either Constant and Parameter value type is selected. The options
shown in this dialog box change according to the value type.
To access
In the Keyword View, click the parameterization button
for a selected value.
Important
information
If at least one input component parameter is defined in
the component, the default input type is Component
parameter and the default input name is the first output
parameter displayed in the Parameters pane of the
Business Component Settings dialog box.
641
Chapter 22 • Parameterization and Regular Expressions
User interface elements are described below:
UI Elements
Description
Constant
A manually defined value that remains unchanged for the
duration of the run.
You can edit the value directly in the Constant box. This box
offers the same editing options as the Value cell in which you
clicked the parameterization button
to open this dialog box.
For details, see "How to Define Values for Your Step Arguments"
on page 541.
Parameter
A value that is defined or generated externally and is retrieved
during a run session. The parameter section displays:
➤ The current parameter type and details for the value if a value
is already parameterized.
➤ The default parameter type and details for the value if a value
is not yet parameterized. You can change the default
definition by selecting a different parameter type or
modifying the parameter settings for the value. For details,
see "Working with Local and Component Parameters" on
page 632.
Options include:
➤ Component parameter. Variable values defined within a
component for use in the same component or later
components in a business process test.
➤ Local parameter. Variable values defined within a component
for use exclusively within the same component.
For details about component parameters and local parameters,
see "Working with Local and Component Parameters" on
page 632, "How to Parameterize Input Values" on page 637, and
"Parameters Pane (Business Component Settings Dialog Box)" on
page 712.
642
Chapter 22 • Parameterization and Regular Expressions
Regular Expression Characters and Usage Options
By default, QuickTest treats all characters in a regular expression literally,
except for the period (.), hyphen (-), asterisk (*), caret (^), brackets ([ ]),
parentheses (()), dollar sign ($), vertical line (|), plus sign (+), question mark
(?), and backslash (\). When one of these special characters is preceded by a
backslash (\), QuickTest treats it as a literal character.
If you enter a special character in the value box of any dialog box that
contains the Regular Expression check box, and then you select the Regular
Expression check box, QuickTest asks you if you want to add a backslash (\)
before each special character. If you click Yes, a backslash (\) is added before
the special character to instruct QuickTest to treat the character literally. If
you click No, QuickTest treats the special character as a regular expression
character.
All programmatic description property values are automatically treated as
regular expressions. For more information on programmatic descriptions,
see "Programmatic Descriptions" on page 370.
This section describes some of the more common options that can be used
to create regular expressions:
Using the Backslash Character ( \ )
A backslash (\) can serve two purposes. It can be used in conjunction with a
special character to indicate that the next character be treated as a literal
character. For example, \. would be treated as period (.) instead of a wildcard.
Alternatively, if the backslash (\) is used in conjunction with some
characters that would otherwise be treated as literal characters, such as the
letters n, t, w, or d, the combination indicates a special character. For
example, \n stands for the newline character.
If the backslash character is not used for either of these purposes, it is
ignored.
643
Chapter 22 • Parameterization and Regular Expressions
For example:
➤
w matches the character w
➤
\w is a special character that matches any word character including
underscore
➤
\\ matches the literal character \
➤
\( matches the literal character (
➤
one\two matches the string onetwo
For example, if you were looking for a Web site called:
newtours.demoaut.com
the period would be mistaken as an indication of a regular expression. To
indicate that the period is not part of a regular expression, you would enter
it as follows:
newtours\.demoaut\.com
Matching Any Single Character ( . )
A period (.) instructs QuickTest to search for any single character (except for
\n). For example:
welcome.
matches welcomes, welcomed, or welcome followed by a space or any other
single character. A series of periods indicates the same number of
unspecified characters.
To match any single character including \n, enter:
(.|\n)
For more information on the ( ) regular expression characters, see "Grouping
Regular Expressions ( ( ) )" on page 646. For more information on the |
regular expression character, see "Matching One of Several Regular
Expressions ( | )" on page 647.
644
Chapter 22 • Parameterization and Regular Expressions
Matching Any Single Character in a List ( [xy] )
Square brackets instruct QuickTest to search for any single character within
a list of characters. For example, to search for the date 1967, 1968, or 1969,
enter:
196[789]
Matching Any Single Character Not in a List ( [^xy] )
When a caret (^) is the first character inside square brackets, it instructs
QuickTest to match any character in the list except for the ones specified in
the string. For example:
[^ab]
matches any character except a or b
Note: The caret has this special meaning only when it is displayed first
within the brackets.
Matching Any Single Character within a Range ( [x-y] )
To match a single character within a range, you can use square brackets ([ ])
with the hyphen (-) character. For instance, to match any year in the 1960s,
enter:
196[0-9]
A hyphen does not signify a range if it is displayed as the first or last
character within brackets, or after a caret (^).
For example, [-a-z] matches a hyphen or any lowercase letter.
Note: Within brackets, the characters ".", "*", "[" and "\" are literal. For
example, [.*] matches . or *. If the right bracket is the first character in the
range, it is also literal.
645
Chapter 22 • Parameterization and Regular Expressions
Matching Zero or More Specific Characters ( * )
An asterisk (*) instructs QuickTest to match zero or more occurrences of the
preceding character. For example:
ca*r
matches car, caaaaaar, and cr
Matching One or More Specific Characters ( + )
A plus sign (+) instructs QuickTest to match one or more occurrences of the
preceding character. For example:
ca+r
matches car and caaaaaar, but not cr
Matching Zero or One Specific Character ( ? )
A question mark (?) instructs QuickTest to match zero or one occurrences of
the preceding character. For example:
ca?r
matches car and cr, but nothing else
Grouping Regular Expressions ( ( ) )
Parentheses (()) instruct QuickTest to treat the contained sequence as a unit,
just as in mathematics and programming languages.
Using groups is especially useful for delimiting the arguments to an
alternation operator ( | ) or a repetition operator: ( * , + , ? , { } )
646
Chapter 22 • Parameterization and Regular Expressions
Matching One of Several Regular Expressions ( | )
A vertical line (|) instructs QuickTest to match one of a choice of
expressions. For example:
foo|bar
causes QuickTest to match either foo or bar
fo(o|b)ar
causes QuickTest to match either fooar or fobar
Matching the Beginning of a Line ( ^ )
A caret (^) instructs QuickTest to match the expression only at the start of a
line, or after a newline character.
For example:
book
matches book within the lines—book, my book, and book list, while
^book
matches book only in the lines—book and book list
Matching the End of a Line ( $ )
A dollar sign ($) instructs QuickTest to match the expression only at the end
of a line, or before a newline character. For example:
book
matches book within the lines—my book, and book list, while a string that is
followed by ($), matches only lines ending in that string. For example:
book$
matches book only in the line—my book
647
Chapter 22 • Parameterization and Regular Expressions
Matching Any AlphaNumeric Character Including the
Underscore ( \w )
\w instructs QuickTest to match any alphanumeric character and the
underscore (A-Z, a-z, 0-9, _).
For example:
\w* causes QuickTest to match zero or more occurrences of the alphanumeric
characters—A-Z, a-z, 0-9, and the underscore (_). It matches Ab, r9Cj, or
12_uYLgeu_435.
For example:
\w{3} causes QuickTest to match 3 occurrences of the alphanumeric
characters A-Z, a-z, 0-9, and the underscore (_). It matches Ab4, r9_, or z_M.
Matching Any Non-AlphaNumeric Character ( \W )
\W instructs QuickTest to match any character other than alphanumeric
characters and underscores.
For example:
\W
matches &, *, ^, %, $, and #
Combining Regular Expression Operators
You can combine regular expression operators in a single expression to
achieve the exact search criteria you need.
For example, you can combine the ‘.’ and ‘*’ characters to find zero or more
occurrences of any character (except \n).
For example,
start.*
matches start, started, starting, starter
648
Chapter 22 • Parameterization and Regular Expressions
You can use a combination of brackets and an asterisk to limit the search to
a combination of non-numeric characters. For example:
[a-zA-Z]*
To match any number between 0 and 1200, you need to match numbers
with 1 digit, 2 digits, 3 digits, or 4 digits between 1000-1200.
The regular expression below matches any number between 0 and 1200.
([0-9]?[0-9]?[0-9]|1[01][0-9][0-9]|1200)
Note: For a complete list and explanation of supported regular expressions
characters, see the Regular Expressions section in the Microsoft VBScript
documentation (select Help > QuickTest Professional Help to open the
QuickTest Professional Help. Then select VBScript Reference > VBScript >
VBScript User’s Guide > Introduction to Regular Expressions).
649
Chapter 22 • Parameterization and Regular Expressions
650
Part V
Configuring Settings
652
23
Global Testing Options
This chapter includes:
Concepts
➤
Global Testing Options Overview on page 654
Reference
➤
Options Dialog Box on page 654
➤
General Pane (Options Dialog Box) on page 656
➤
Folders Pane (Options Dialog Box) on page 663
➤
Run Pane (Options Dialog Box) on page 665
653
Chapter 23 • Global Testing Options
Concepts
Global Testing Options Overview
Global testing options affect both how you work with components and the
general appearance of QuickTest. For example, you can choose not to
display the Start Page when QuickTest starts, or you can set the
timing-related settings used by QuickTest when running a component. The
values you set remain in effect for all components and for subsequent
testing sessions. You can set global testing options using the Options dialog
box (described on page 654) or by inserting statements in the Expert View.
You can also set testing options that affect only the component currently
open in QuickTest. For more information, see Chapter 24, "Business
Component and Application Area Settings."
Reference
Options Dialog Box
This dialog box enables you to modify your global testing options. It
contains key nodes, which enable you to navigate to the options you want
to view or modify. The values you set remain in effect for all subsequent
QuickTest sessions.
To access
Do one of the following:
➤ Select Tools > Options.
➤ Click the Options toolbar button
654
.
Chapter 23 • Global Testing Options
The Options dialog box contains the following key nodes:
Node
Options
General
Options for general component settings. For more information,
see "General Pane (Options Dialog Box)" on page 656.
The General node also contains the Text Recognition sub-node.
For more information, see "Text Recognition Pane (Options Dialog
Box)" on page 659.
Folders
Options for entering the folders (search paths) in which QuickTest
searches for components or files that are specified as relative paths
in dialog boxes and statements. For components and application
areas, all files must be stored in the Quality Center subject path.
For more information, see "Folders Pane (Options Dialog Box)" on
page 663.
Run
Options for running components. For more information, see "Run
Pane (Options Dialog Box)" on page 665.
The Run node also contains the Screen Capture node. For more
information, see "Screen Capture Pane (Options Dialog Box)" on
page 669.
Windows
Applications
Options for configuring how QuickTest components interface with
Windows applications. The Windows Applications node also
includes the Advanced node. For more information, see the
section on testing Windows-based applications in the HP QuickTest
Professional Add-ins Guide.
The navigation tree may contain additional nodes, depending on the
add-ins that are currently loaded. For more information, see the relevant
section in the HP QuickTest Professional Add-ins Guide.
655
Chapter 23 • Global Testing Options
General Pane (Options Dialog Box)
The options set in this pane affect the general appearance of QuickTest and
other general testing options.
656
To access
Select Tools > Options > General node.
See also
"Text Recognition Pane (Options Dialog Box)" on
page 659
Chapter 23 • Global Testing Options
User interface elements are described below:
UI Element
Description
Display Add-in Manager on
startup
Determines whether the Add-in Manager is
displayed when starting QuickTest. For information
on working with the Add-in Manager, see the
section on loading QuickTest add-ins in the
HP QuickTest Professional Add-ins Guide.
Display Start Page on
startup
Determines whether the Start Page is displayed
when starting QuickTest.
Display warning if
associated add-ins are not
loaded
Determines whether a warning message is
displayed if you open a component that requires
add-ins that are not currently loaded.
Automatically update test
and component steps
when you rename test
objects
Determines whether to automatically update test
and component steps when you rename test
objects in the local or shared object repository. For
more information, see "Renaming Test Objects" on
page 161.
Note: Applicable only if there are no syntax errors
in the component when you rename the test
object.
When pointing at a
window, activate it after __
tenths of a second
Specifies the time (in tenths of a second) that
QuickTest waits before it sets the focus on an
application window when using the pointing hand
to point to an object in the application (for Object
Spy, Recovery Scenario Wizard, and so forth).
Default = 5
657
Chapter 23 • Global Testing Options
UI Element
Description
Restore Layout
Restores the layout of the QuickTest window so
that it displays the panes and toolbars in their
default sizes and positions.
Tip: For details on restoring default items in
customized menus and toolbars, see "Toolbars Tab
(Customize Dialog Box)" on page 907.
Note: QuickTest recalls your most recent window
layout for each of its operating modes: view/edit,
record, and run. For more information, see
"QuickTest Window Layout Customization in
Different Modes" on page 888.
Generate Script
Generates a QuickTest automation script
containing the current global testing options.
When you click the Generate Script button, a Save
As dialog box opens, enabling you to specify the
name and file system location to store the
generated file.
You can use some or all of the script lines from this
generated script in an automation script. This can
be useful, for example, if you want to create an
initialization script that will open QuickTest with a
pre-defined set of options applied.
For more information, see "QuickTest Automation
Scripts" on page 1015 and the QuickTest Professional
Automation Object Model Reference (Help >
QuickTest Professional Help > HP QuickTest
Professional Advanced References > HP QuickTest
Professional Automation Object Model).
658
Chapter 23 • Global Testing Options
Text Recognition Pane (Options Dialog Box)
This pane enables you to configure how QuickTest identifies text in your
application. You can use this pane to modify the default text capture
mechanism, OCR (optical character recognition) mechanism mode, and the
language dictionaries the OCR mechanism uses to identify text.
To access
Select Tools > Options > General node > Text Recognition node.
Important
information
The General > Text Recognition options are relevant only for
Windows-based objects, such as Standard Windows, .NET
WinForms, WPF, SAP Gui for Windows, Visual Basic, and ActiveX.
Related
tasks
➤ "How to Configure Text Recognition Settings" on page 624
659
Chapter 23 • Global Testing Options
See also
➤ "Text Recognition for Windows-Based Objects" on page 619
➤ "Guidelines for Text Recognition" on page 626
➤ "Checking Text in an Image - Use-Case Scenario" on page 620
User interface elements are described below:
UI Element
Description
Use text
recognition
mechanisms
in this order
Specifies the text recognition mechanism that QuickTest uses
when capturing text.
Possible values:
First Windows API then OCR. (Default) Instructs QuickTest to first
try to retrieve text directly from the object using the Windows
API-based mechanism. If no text can be retrieved (for example,
because the text is part of a picture), QuickTest tries to retrieve text
using the OCR (optical character recognition) mechanism. (This
setting is highly recommended when working with CJK (Chinese,
Japanese, Korean) languages.)
First OCR then Windows API. Instructs QuickTest to first try to
retrieve text from the object using the OCR mechanism. If no text
can be retrieved, then QuickTest uses its Windows API-based
mechanism to retrieve text from the object.
Use Only Windows API. Instructs QuickTest to use only the
Windows API-based mechanism (and not the OCR mechanism) to
retrieve text from the object.
Use Only OCR. Instructs QuickTest to use only the OCR
mechanism (and not the Windows API-based mechanism) to
retrieve text from the object. (Required when working with
Windows Vista; the only option available when working with
Windows 7 and Windows Server 2008 R2.)
For more information, see "Notes and Guidelines" on page 662.
660
Chapter 23 • Global Testing Options
UI Element
Description
Single text
block mode
Select this radio button if the text on the object is uniform in font,
size, color, and background. For example:
The single text block mode instructs the OCR mechanism to focus
on the area and treat it as a single text block. This is especially
useful when trying to capture text on small objects or in a small
text area.
Multiple
text block
mode
Select this radio button only if the text on the object comprises
different fonts, font sizes, colors, and/or backgrounds. For
example:
The multiple text block mode instructs the OCR mechanism to
handle each text area in the object that has a different background
font and size. The OCR mechanism decides where to divide the
text blocks according to an internal algorithm.
Available
languages
Lists all of the language dictionaries that the OCR mechanism can
potentially use when retrieving text from the object.
To specify the language dictionaries used by the OCR mechanism:
Move a language to the Supported languages list box by selecting
a language and clicking the right arrow button (>).
Supported
languages
Lists the language dictionaries that the OCR mechanism uses
when capturing text. The Supported languages list box can
contain either:
➤ One CJK (Chinese, Japanese, Korean) language.
(Note: By default, English is also supported when capturing text
in CJK languages.)
➤ One or more non-CJK languages.
To remove a language dictionary from the Supported languages
list: Select the language and click the left arrow button (<).
661
Chapter 23 • Global Testing Options
Notes and Guidelines
➤
The Windows API text recognition mechanism is provided as is. If it does
not work as you expect, change the option to use OCR.
However, although OCR accuracy is usually very high, keep in mind that
as with all OCR technologies, the OCR mechanism does not guarantee
100% accuracy.
For more information, see "Guidelines for Text Recognition" on page 626
➤
Guidelines for Windows Vista, Windows 7, Server 2008, and Server 2008
R2 Users:
Windows Vista, Windows 7, Windows Server 2008, and Windows Server
2008 R2 do not support the Windows API test recognition mechanism.
Therefore, only the Use only OCR option is available when QuickTest is
installed on these operating systems.
662
Chapter 23 • Global Testing Options
Folders Pane (Options Dialog Box)
This pane enables you to enter the folders (search paths) in which QuickTest
searches for components or resource files.
All files must be stored in the Quality Center path.
To access
Select Tools > Options > Folders node.
Important
information
➤ The current component is listed in the Search list by default. It
cannot be deleted.
➤ QuickTest searches for the specified component or file in the
order in which the folders are displayed in the search list. If the
same file name exists in more than one folder, QuickTest uses
the first instance it finds.
663
Chapter 23 • Global Testing Options
See also
➤ For more information on relative or absolute paths, see the
section on using relative paths in the HP QuickTest Professional
User Guide.
User interface elements are described below:
UI Element
Description
Search list
Indicates the folders in which QuickTest searches for
components or files. If you define folders here, you do not need
to designate the full path of a component or file in other dialog
boxes. The order of the search paths in the list determines the
order in which QuickTest searches for a specified file.
Adds a new folder to the search list.
Tips:
➤ To add an ALM/QC path when connected to Quality Center,
click this button. QuickTest adds [QualityCenter], and displays
a browse button so that you can locate the Quality Center
path.
➤ When not connected to Quality Center, hold the SHIFT key
and click this button. QuickTest adds [QualityCenter], and you
enter the path. You can also type the entire Quality Center
path manually. If you do, you must add a space after
[QualityCenter]. For example: [QualityCenter] Subject\Tests.
➤ Note that QuickTest searches Quality Center project folders
only when you are connected to the corresponding
Quality Center project.
Deletes the selected folder from the search list.
Moves the selected folder up in the list.
Moves the selected folder down in the list.
Remind me to
use relative
paths when
specifying a
path to a
resource
664
When saving a resource, you can choose to be prompted to use a
relative path. For more information, see the section on using
relative paths in the HP QuickTest Professional User Guide.
Note: When QuickTest is connected to a Quality Center 10.00 or
HP ALM project, a reminder is displayed only if you select a path
in the file system or in a Quality Center 9.2 project.
Chapter 23 • Global Testing Options
Run Pane (Options Dialog Box)
This pane enables you to determine how QuickTest runs components.
To access
Select Tools > Options > Run node.
See also
"Screen Capture Pane (Options Dialog Box)" on page 669
665
Chapter 23 • Global Testing Options
User interface elements are described below:
UI Element
Description
Run mode
Instructs QuickTest how to run your component:
➤ Normal (displays execution marker). Runs your
component with the execution arrow to the left of the
Keyword View, marking each step as it is performed.
Delay each step execution by. You can specify the time in
milliseconds that QuickTest should wait before running
each consecutive step (up to a maximum of 10000 ms.)
The Normal run mode option requires more system
resources than the Fast option, described below.
Note: You must have Microsoft Script Debugger installed
to enable this mode. For more information, see the
HP QuickTest Professional Installation Guide.
➤ Fast. Runs your component without the execution arrow
to the left of the Keyword View. This option requires
fewer system resources.
Note: When running a test set from Quality Center,
components and function libraries are automatically run
in Fast mode, even if Normal mode is selected.
666
Submit a defect to
ALM/QC for each
failed step
Relevant only for tests.
View results when
run session ends
Instructs QuickTest to display the results automatically
following the run session.
Chapter 23 • Global Testing Options
UI Element
Description
Allow other HP
products to run
tests and
components
Enables other HP products such as Quality Center to run
QuickTest components on this computer.
Notes:
➤ This option is not required to enable WinRunner and
Service Test to run QuickTest components.
➤ If the Windows Firewall is turned on on your computer,
and you want to enable business process tests to be run
on your computer from a remote Quality Center client,
then you must also manually create a firewall exception
for the bp_exec_agent.exe remote agent. For more
information, see "Enabling the Business Process Testing
Remote Agent" on page 668
Stop command
shortcut key
Enables you to define a shortcut key or key combination
that stops the current QuickTest record or run operation,
even if QuickTest is not in focus or is in hidden mode.
Click in the field and then press the required key or key
combination on the keyboard.
The default key combination is Ctrl+Alt+F5.
Note: It is important to define a shortcut that is not already
defined for some other operation by the application being
tested. If this is the case and:
➤ you open the application manually before you click
Record or Run, the shortcut defined in the application
will apply for its original purpose.
➤ you start a record or run session and QuickTest opens the
application for you, the shortcut you define in the Run
pane will stop the session.
667
Chapter 23 • Global Testing Options
Enabling the Business Process Testing Remote Agent
If the Windows Firewall is turned on on your computer, and you want to
enable business process tests to be run on your computer from a remote
Quality Center client, then you must manually create a firewall exception
for the bp_exec_agent.exe remote agent.
To create the firewall exception for the Business Process Testing remote
agent:
1 Make sure you have opened the Quality Center client at least once on
your computer.
2 Run Firewall.cpl from the command line. The Windows Firewall dialog
box opens.
Note: The remaining steps in this procedure may be slightly different in
different operating systems.
3 Click the Exceptions tab.
4 Click the Add Program button.
5 In the Add a Program dialog box, browse to the location where the
Quality Center client is installed and select bp_exec_agent.exe. By
default, it is located in: C:\Program Files\Common Files\Mercury
Interactive\Quality Center.
6 Click OK in the browse dialog box and again in the Add a Program dialog
box. The bp_exec_agent.exe item is added to the Programs and Services
list in the Windows Firewall dialog box.
7 Click OK to close the Windows Firewall dialog box.
For more information about Windows Firewall exceptions, see your
Windows documentation or contact a systems administrator in your
organization.
668
Chapter 23 • Global Testing Options
Screen Capture Pane (Options Dialog Box)
This pane enables you to control when and how QuickTest captures screens
of the application being tested.
To access
Select Tools > Options > Run node > Screen Capture node.
Important
information
Vista users: In addition to the options described below, if your
Vista Windows color scheme is set to Aero, QuickTest
automatically sets it to Vista Basic while capturing movies of a run
session to maximize performance. The color scheme is returned to
its previous settings when the run session ends.
For movies, see Save movie to results under General, below.
See also
"How to Play a Screen Recorder Movie in the HP Micro Player" on
page 760
669
Chapter 23 • Global Testing Options
This dialog box contains the following key elements:
General
UI Element
Description
Save still
image
captures to
results
Instructs QuickTest when to capture still images of the
application during the run session and save them in the run
results. When images are available in the run results, QuickTest
displays them in the Captured Data pane in the Run Results
Viewer.
Clear the check box to disable this option, or select an option
from the list:
➤ Always. Captures images for all steps in the run.
➤ For errors. Captures images only for failed steps. This is the
default setting.
➤ For errors and warnings. Captures images only for steps that
return a failed or warning status.
Note: This setting also affects the availability of other
information displayed in the bottom pane of the run result
details, such as:
➤ XML checkpoint and output value result details
➤ Bitmap checkpoint images (expected, actual, and difference)
670
Chapter 23 • Global Testing Options
UI Element
Description
Save movie
to results
Instructs QuickTest when to capture a movie of the application
during the run session and save it in the run results. When
movies are available in the run results, QuickTest displays them in
the Screen Recorder tab in the Run Results Viewer.
This option is disabled by default.
Select the check box to enable this option and then select an
option from the list:
➤ Always. Captures a movie of all steps in the run.
➤ For errors. Captures movies only for failed steps.
➤ For errors and warnings. Captures movies only for steps that
return a failed or warning status.
Important:
➤ Records only on primary monitor: The Screen Recorder records
a movie of the operations performed on your primary monitor.
Therefore, if you are working with multiple monitors, make
sure that your application is fully visible on your primary
monitor when recording or running a component.
For more information, see "Save Movie to Results" on page 672.
➤ Records entire desktop. The Screen Recorder saves a movie of
your entire desktop. You can prevent the QuickTest window
from partially obscuring your application while capturing the
movie by minimizing QuickTest during the run session. For
information on how to minimize QuickTest during run
sessions, see "QuickTest Window Layout Customization in
Different Modes" on page 888.
➤ Vista Users. For best results when working with Microsoft
Windows Vista, set the Window’s display settings to the Classic
Windows theme.
➤ Unicode Characters in Component Names. The HP Screen
Recorder does not support Unicode. When you save a
component using a name containing Unicode characters, and
the run results contain a Screen Recorder movie, the movie is
not saved.
671
Chapter 23 • Global Testing Options
Save Movie to Results
UI Element
Description
Save movie
segment up to __
KB prior to each
error and warning
When selected, QuickTest saves movie segments for each
error (or warning). Each segment contains the specified
number of kilobytes of the movie prior to the failed (or
warning) step. You can enter any value from 400 (0.4 MB)
to 2097152 (2 GB). If more than one segment is captured
for a run session, QuickTest stores a single movie comprised
of all the relevant movie segments.
Note: This option is enabled only when For errors or For
errors and warnings is selected in the Save movie to results
option.
Save movie of
entire run
When selected, QuickTest saves a movie of the entire run if
at least one error (or warning) occurs.
Note: This option is enabled only when For errors or For
errors and warnings is selected in the Save movie to results
option.
Record sound
Instructs QuickTest to save sound with the movie of your
application.
Set plain
wallpaper
Sets the wallpaper of your desktop to a solid blue color for
the duration of the run session.
Do not show
window contents
when dragging
windows
Instructs Windows to display only the outline of a window,
without its contents, whenever the window is dragged
during the run session.
Capture Driver Area
UI
Element
Description
Install/
Uninstall
button
Installs or uninstalls the Screen Recorder Capture Driver. The Screen
Recorder Capture Driver improves the performance of the Screen
Recorder during movie recording.
Note: The Screen Recorder Capture Driver cannot be installed or
uninstalled when running QuickTest via a remote connection.
672
24
Business Component and Application
Area Settings
This chapter includes:
Concepts
➤
Business Component and Application Area Settings Overview
on page 675
➤
Add-in Associations in Your Component on page 677
➤
Associated Function Libraries on page 678
➤
Understanding Component Statuses on page 678
➤
Local System Monitor on page 679
➤
Log Tracking on page 680
Tasks
➤
How to Manually Configure Log Tracking Settings on page 682
Reference
➤
General Pane (Application Area Window) on page 686
➤
Function Libraries Pane (Application Area Window) on page 689
➤
Object Repositories Pane (Application Area Window) on page 693
➤
Keywords Pane (Application Area Window) on page 695
➤
Properties Pane (Business Component Settings Dialog Box) on page 699
➤
Snapshot Pane (Business Component Settings) on page 704
➤
Applications Pane (Business Component and Application Area Settings)
on page 705
673
Chapter 24 • Business Component and Application Area Settings
674
➤
Resources Pane (Business Component Settings Dialog Box) on page 710
➤
Parameters Pane (Business Component Settings Dialog Box) on page 712
➤
Recovery Pane (Business Component and Application Area Settings
Dialog Box) on page 718
➤
Local System Monitor Pane (Application Area Settings Dialog Box)
on page 722
➤
Log Tracking Pane (Business Component and Application Area Settings
Dialog Box) on page 725
Chapter 24 • Business Component and Application Area Settings
Concepts
Business Component and Application Area Settings
Overview
Application Area Window
You configure most of the settings for an application area in the application
area window. This includes, for example, defining general settings,
associating recovery scenarios, associating add-ins, associating resource files,
such as function libraries and shared object repositories, and specifying the
keywords (operations) that are available for use in an associated component.
For details on working with application areas, see Chapter 14, "Application
Areas."
Application Area Settings Dialog Box
You define the settings and resources needed for a business component in its
associated application area. The settings include recovery scenario settings,
add-in-specific settings, local system monitor, and log tracking settings, and
definitions indicating on which Windows-based applications the
components can record and run.
The following application area settings are used only if the application area
is associated with the first business component in a business process test:
➤
Associated Add-ins
➤
Local System Monitor
➤
Log Tracking
If you need a particular add-in or you want the local system monitor or log
tracking options to be active for your business process test, you must make
sure that the required settings are applied in the application area for the first
component in that test. If these settings are active for application areas
associated with later components in the test, they are ignored.
675
Chapter 24 • Business Component and Application Area Settings
Business Component Settings Dialog Box
Business components are automatically linked to the settings defined in
their associated application area. The Business Component Settings dialog
box displays most of these settings in read-only format.
You can also define some additional component-specific settings, such as
input and output parameters, component snapshots, and the component
status, in the Business Component Settings dialog box.
Note: You can also set testing options that affect all components. For details,
see Chapter 23, "Global Testing Options."
The Business Component Settings dialog box contains the following panes:
676
Pane
Description
Properties
The properties of the business component, for
example, its description and associated add-ins. You
can also set the status of the component.
Snapshot
Options for capturing or loading a snapshot image to
be saved with the component for display in
Quality Center.
Applications
The Windows-based applications on which the
component can record and run.
Resources
The resources associated with the component,
including the location of any function libraries and
the shared object repository.
Parameters
Options for specifying input and output parameters
for the component.
Recovery
How the component recovers from unexpected events
and errors that occur in your testing environment
during a run session.
Chapter 24 • Business Component and Application Area Settings
In addition to these panes, the Business Component Settings dialog box
may contain additional panes for scripted components. For information on
these panes, see the HP QuickTest Professional User Guide. There may also be
other panes depending on the add-ins that are currently loaded, for
example, SAP or Web Services. For information on tabs related to add-ins,
see the relevant section of the HP QuickTest Professional Add-ins Guide.
Add-in Associations in Your Component
When you open QuickTest, you can select the add-ins to load from the
Add-in Manager dialog box. You can record on any environment for which
the necessary add-in is loaded.
Choosing to associate an add-in with an application area instructs QuickTest
to check that the associated add-in is loaded each time you open a
component that is associated with that application area. When you create a
new component, its associated add-ins are those defined in the component’s
application area. For details, see "Add-in Manager Dialog Box" on page 106.
When you open a component, QuickTest notifies you if an associated add-in
is not currently loaded, or if you have loaded add-ins that are not currently
associated with your component (via its application area). This process
reminds you to add the required add-ins to the associated add-ins list if you
plan to use them with the currently open component, thereby helping you
to ensure that your run session will not fail due to unloaded add-ins.
When a Subject Matter Expert opens a business process test in
Quality Center, the QuickTest Professional add-ins that are associated with
the first component in the business process test are loaded automatically.
Add-ins associated with other components in the business process test are
not loaded. Therefore, it is important to ensure that all required QuickTest
add-ins are associated with the application area of the first component in
the business process test.
677
Chapter 24 • Business Component and Application Area Settings
Associated Function Libraries
The Associated function libraries area of the Resources pane in the Business
Component and Application Area Settings dialog box indicates the list of
function libraries associated with your component via its application area.
QuickTest searches these files for the VBScript functions, subroutines, and so
forth that are specified in the component.
The order of the function libraries in the list determines the order in which
QuickTest searches for a function or subroutine that is called from a step in
your component. If there are two functions or subroutines with the same
name, QuickTest uses the first one it finds.
Understanding Component Statuses
Business components can be assigned statuses either in QuickTest or in
Quality Center. A business component status may be manually specified, or
in certain cases may be automatically assigned by Quality Center. For
example, you can use a Ready status to indicate that a business component
is ready to be run in a business process test, or an Error status may be
automatically assigned to a component that has errors that prevent it being
successfully run in a business process test.
Knowing the status of a business component is important because it affects
the status of any business process tests of which it is a part. In general, the
component with the most severe status determines the status of the entire
business process test. For example, a component with an Error status causes
every business process test of which it is a part to have an Error status.
A component can be assigned one of the following statuses:
678
➤
Error. The component contains errors that need to be fixed. For example,
this may occur due to a change in the application. When a business
process test contains a component with this status, the status of the entire
business process test is also Error.
➤
Maintenance. The component is currently being developed and tested
and is not yet ready to run, or it was previously implemented and is now
being modified to adapt it for changes that have been made in the
application.
Chapter 24 • Business Component and Application Area Settings
➤
Ready. The component is fully implemented and ready to be run. It
answers the requirements specified for it and has been tested according to
the criteria defined for your specific system.
➤
Under Development. The component is currently under development.
This status is automatically assigned to:
➤
➤
New components created in the Business Components module of
Quality Center with Business Process Testing support.
➤
Component requests dragged into the component tree in
Quality Center with Business Process Testing support.
Not Implemented. The component has been requested in the Test Plan
module of Quality Center. The status changes automatically from Not
Implemented to Under Development when the request is moved from the
Component Requests folder in the component tree in the Business
Components module.
For details on setting component statuses, see "Properties Pane (Business
Component Settings Dialog Box)" on page 699.
Local System Monitor
You can use the Local System Monitor pane of the Application Area Settings
dialog box (General pane > Additional Settings button for application areas)
to activate and set preferences for tracking system counters during a run
session.
The local system monitor tracking options enable you to track application
performance counters during a run session. These counters enable you to
monitor the resources used by your application.
The system counters that can be monitored are the process counters that are
accessible through the performance console (select Start > Run > and then
enter Perfmon). For information on these process counters, see the
performance console’s Help.
679
Chapter 24 • Business Component and Application Area Settings
You can also define limits for the counters. If the specified counters exceed
these limits, the run session will fail. The results of the system counters are
viewed in the Run Results Viewer. For details, see "Run Results Viewer" on
page 745.
For information on enabling system monitoring, see "Local System Monitor
Pane (Application Area Settings Dialog Box)" on page 722.
Note:
When running a business process test:
➤
Local system monitoring is performed only if the application area
associated with the first business component in the business process test
is configured to do so.
➤
Local system monitoring is performed only on the application defined in
the Local System Monitor pane of the application area settings for the
first component in the business process test.
This means that if a component running later in the test is associated with a
different application area, local system monitor settings from that
application area are ignored and local system monitoring is not performed
on that application’s process.
Log Tracking
If the Windows-based application you are testing uses a supported Java or
.NET log framework that includes a UDP appender, you can enable
QuickTest to receive log messages from that framework and send them to
the run results.
680
Chapter 24 • Business Component and Application Area Settings
You do this by configuring your application’s log configuration file. You can
configure this file using QuickTest, or you can configure the file manually.
To configure this file using QuickTest, you define the settings in the Log
Tracking pane in the Application Area Settings dialog box described on
page 680. For details on configuring the log configuration file manually, see
"How to Manually Configure Log Tracking Settings" on page 682.
When you configure your application’s log configuration file (via QuickTest
or manually), you specify the minimum log message level that you want
QuickTest to receive, the log message source and port, and so on. During a
run session, QuickTest receives the relevant log messages that are generated
for your application and sends them to the run results. In the Run Results
Viewer, these log messages are displayed in the Log Tracking Results pane. In
the Run Results Viewer, log messages are associated with steps according to
their timestamp. For details, see "Log Tracking Pane (Run Results Viewer)" on
page 780.
Analyzing the log messages that were generated as a result of a particular
step can help you pinpoint the causes of unexpected behavior in your
application, such as application crashes during automated runs.
For more details, see:
➤
"How to Manually Configure Log Tracking Settings" on page 682
➤
"Log Tracking Pane (Business Component and Application Area Settings
Dialog Box)" on page 725
681
Chapter 24 • Business Component and Application Area Settings
Tasks
How to Manually Configure Log Tracking Settings
You can specify your log tracking and collection preferences manually. This
is useful, for example, if your component is validating more than one
application, and you need to configure a file for each application being
tested.
Note: If you want to instruct QuickTest to automatically configure your
application’s log configuration file, use the Log Tracking Pane (Business
Component and Application Area Settings Dialog Box) described on
page 725.
The following steps describe how to manually specify your log tracking and
collection preferences.
682
➤
"Prerequisites" on page 683
➤
"Open the relevant log configuration file and specify your preferences" on
page 683
➤
"Configure the settings in the Log Tracking pane so that QuickTest will
use the same settings that you defined in the previous step" on page 685
➤
"Results" on page 685
Chapter 24 • Business Component and Application Area Settings
1 Prerequisites
a Your Windows-based application must use a Java or .NET log
framework that includes a UDP appender.
b Verify the following:
➤
Which log framework version is used with your application? Make
sure that it includes a UDP appender and that the specific version is
supported when working with QuickTest.
➤
Make sure that logging is enabled on your application. Find out how
to enable and disable logging. (You may want to enable logging for
some run sessions and disable logging for others.) Do you need to
define an XML parameter or modify a registry key?
➤
Where is the log configuration file located? Make sure that it is
writable.
2 Open the relevant log configuration file and specify your
preferences
This step describes how to manually configure a log configuration file so
that QuickTest will be able to receive log messages during a run session.
For a list of supported log frameworks, see the HP QuickTest Professional
Product Availability Matrix, available from the Documentation Library
Home page or the root folder of the QuickTest Professional DVD.
a Do the following:
1. Add an appender-ref ref attribute with the value of QtpUdpAppender
to the root element.
683
Chapter 24 • Business Component and Application Area Settings
2. Specify the minimum log message level that you want QuickTest to
include in the run results.
Example:
...
<root>
<root>
<level value="DEBUG" />
...
<appender-ref ref="QtpUdpAppender" />
</root>
b Add an appender element and its attributes, as shown in the following
example.
Example:
<appender name="QtpUdpAppender"
type="log4net.Appender.UdpAppender">
<remoteAddress value="1.1.1.1" />
<remotePort value="18081" />
<encoding value="utf-16" />
<layout type="log4net.Layout.XmlLayoutSchemaLog4j">
<prefix value="" />
</layout>
</appender>
684
Chapter 24 • Business Component and Application Area Settings
Note: To enable QuickTest to receive log messages, the Add log messages
to run results area of the Log Tracking pane of the Application Area
Settings dialog box must also be configured, as described below.
3 Configure the settings in the Log Tracking pane so that
QuickTest will use the same settings that you defined in the
previous step
This step enables QuickTest to receive log messages during a run session.
In the Log Tracking pane of the Application Area Settings dialog box:
➤
Select the Add log messages to run results check box.
➤
Specify the settings in the upper half of the pane:
➤
Log message source
➤
Port
➤
Minimum level to add node to results tree
For details on these fields, see "Log Tracking Pane (Business
Component and Application Area Settings Dialog Box)" on page 725.
➤
Clear the Auto-configure log mechanism check box. This prevents
QuickTest from modifying the configuration file.
4 Results
During a run session, QuickTest receives any log messages that match or
exceed the minimum log message level that you specified in step on
page 684 and displays them in the run results.
In the run results tree, QuickTest also inserts a node for the first message
that matches or exceeds the Minimum level to add node to results tree.
This node is inserted directly after the step that triggered (or preceded) the
relevant log message (according to its timestamp).
685
Chapter 24 • Business Component and Application Area Settings
Reference
General Pane (Application Area Window)
This pane enables you to view and define general information about your
application area, including its description and any add-ins associated with
it.
686
To access
In the application area sidebar, click General.
Important
information
If you do not see the entire General pane when opening an
application area, you can resize the panes. For example, if the
Information pane covers the area below the associated add-ins,
you can resize the Information pane.
Chapter 24 • Business Component and Application Area Settings
Relevant
tasks
"How to Create and Maintain an Application Area" on page 500
See also
➤ "Application Area Window" on page 505
➤ "Function Libraries Pane (Application Area Window)" on
page 689
➤ "Object Repositories Pane (Application Area Window)" on
page 693
➤ "Keywords Pane (Application Area Window)" on page 695
User interface elements are described below:
UI Element
Description
Name
The name of the application area. You assign a name to the
application area when you save it. For details, see "Save
Application Area Dialog Box" on page 510.
Author
The Windows user name of the person who created the
application area.
Location
The Quality Center path and file name of the application area. If
the application area is not yet saved, the location indicates Not
saved, and the Application Area dialog box title bar contains an
asterisk.
Description
The description specified for your application area.
It is important that this mandatory field includes a clear
description of the application area. This is because the Subject
Matter Expert decides which application area to choose when
creating a new component in Quality Center based on the Name
and Description of the application area. For details, see the
HP Business Process Testing User Guide.
You can update the description, as needed. For example, if you
created an application area but have not finished defining it, you
can note this in the Description area. Later, after you finalize the
application area, you can update the Description.
Note: If you do not enter a description here in the General pane,
you are prompted to do so when saving the application area. For
details, see "Save Application Area Dialog Box" on page 510.
687
Chapter 24 • Business Component and Application Area Settings
UI Element
Description
Associated
add-ins
The add-ins associated with the application area. The associated
add-ins are those loaded by QuickTest when business components
are accessed.
Note: When a business process test runs, QuickTest loads the
add-ins associated with the first component in the test. Therefore,
it is important to ensure that all required QuickTest add-ins are
associated with the application area for the first component in
the business process test.
For details on associating add-ins, see "Add-in Associations in
Your Component" on page 677.
For details on QuickTest add-in environments, see the
HP QuickTest Professional Add-ins Guide.
Additional
Settings
Opens the Application Area Settings dialog box, enabling you to
specify the following:
➤ Applications. Enables you to specify the Windows-based
applications on which a component associated with the
application area can record and run.
➤ Recovery. Enables you to define how a component associated
with the application area recovers from unexpected events and
errors that occur in your testing environment during a run
session.
The navigation tree may also contain additional nodes
corresponding to any QuickTest add-ins that are loaded, for
example, Web, Java, or SAP. For information on nodes related to
add-ins, see the HP QuickTest Professional Add-ins Guide.
Modify
688
Opens the Modify Associated Add-ins dialog box, enabling you to
associate add-ins with components or remove associations. You
may be required to restart QuickTest for the changes to take effect.
Chapter 24 • Business Component and Application Area Settings
Function Libraries Pane (Application Area Window)
This pane enables you to associate function library files, such as QuickTest
function libraries, VBScript function libraries, or text files, with your
application area. You associate function libraries with your application areas
to provide additional functionality in the form of user-defined keywords
that can be used when creating business components. You can also create
new function library files directly from this pane.
689
Chapter 24 • Business Component and Application Area Settings
To access
In the application area sidebar, click Function Libraries.
Important
information
➤ All associated function libraries must be saved in your
Quality Center project.
➤ To rename a function library, you can click it twice, or select it
and press F2.
➤ QuickTest provides you with sample function libraries
containing predefined functions. By default, these files are
associated with all new application areas. The default function
libraries are located in the Test Resources module of your
Quality Center project under Resources/BPT Resources. For
information on creating user-defined functions in function
libraries, see Chapter 12, "User-Defined Functions and
Function Libraries."
See also
➤ "General Pane (Application Area Window)" on page 686
➤ "Object Repositories Pane (Application Area Window)" on
page 693
➤ "Keywords Pane (Application Area Window)" on page 695
690
Chapter 24 • Business Component and Application Area Settings
User interface elements are described below:
UI Element
Description
Associated
function
libraries
The list of function libraries currently associated with your
application area. You can associate additional function libraries,
and to modify, delete, and prioritize these files. You can add
existing function libraries or create new ones, as long as the
function libraries are stored in your Quality Center project.
Note:
➤ You can right-click an associated function library and select
Open to open it, or Remove to remove its association with the
application area.
➤ If an associated function library cannot be found, for example, if
it was removed from the Quality Center project, QuickTest
indicates this by displaying the Missing Function Library
icon
to the left of the function library in the list. To handle the
missing function library, right-click it and select Locate to
browse to the required function library, or Remove to remove
the association to the missing function library.
Enables you to create a new, blank function library, save it to your
Quality Center project, and add it to the list.
By default, new function libraries are created as .qfl files if no suffix
is specified. You can also specify a .txt or .vbs file extension.
Opens the selected function library for viewing or editing in a
function library window. You can also double-click a file in the list
to open it. The file opens in a function library window and can be
edited as required. To save your changes, close the file and click Yes
when prompted.
Function libraries that are currently in use by another QuickTest or
Quality Center user are locked and can be opened only in read-only
mode. For details, see Chapter 12, "User-Defined Functions and
Function Libraries."
691
Chapter 24 • Business Component and Application Area Settings
UI Element
Description
Enables you to browse to your Quality Center project and select an
existing function library to associate with the application area. For
details, see "How to Create and Maintain an Application Area" on
page 500.
If the function library you select contains syntax errors, a message
box informs you that components using this function library may
fail because of these syntax errors.
Removes the selected function library from the application area.
Moves the selected function library up in the list, giving it a higher
priority during the component run session.
Moves the selected function library down in the list, giving it a
lower priority during the component run session.
692
Chapter 24 • Business Component and Application Area Settings
Object Repositories Pane (Application Area Window)
This pane displays the list of shared object repositories currently associated
with your application area and enables you to associate additional object
repositories, and to modify, delete, and prioritize these files. You can also
create new shared object repositories directly from this pane
To access
In the application area sidebar, click Object Repositories.
Relevant
tasks
➤ "How to Manage Shared Object Repositories" on page 240
➤ "How to Manage Objects in Shared Object Repositories" on
page 245
See also
➤ "General Pane (Application Area Window)" on page 686
➤ "Keywords Pane (Application Area Window)" on page 695
➤ "Shared Object Repositories" on page 231
➤ "Renaming Test Objects" on page 161
693
Chapter 24 • Business Component and Application Area Settings
User interface elements are described below:
UI Element
Description
Associate object
repositories
The list of object repositories that are currently associated with
your application area. You can add existing object repositories
or create new ones, as long as the object repositories are stored
in your Quality Center project.
All business components associated with an application area
that refers to these shared object repositories will then access
these shared object repository files.
Note:
➤ You can right-click a shared object repository and select
Open to open it in the Object Repository Manager, or
Remove to remove its association with the application area.
➤ If a shared object repository cannot be found, QuickTest
displays its name and path in the Missing Resources pane
when you open the application area. To handle the missing
shared object repository, right-click it in the list of
associated object repositories and select Locate to browse to
the required shared object repository, or Remove to remove
the association to the shared object repository.
Enables you to create a new object repository, save it to
Quality Center, and then add it to the list. For details, see
"How to Create and Maintain an Application Area" on
page 500.
Opens the selected object repository for viewing or editing in
the Object Repository Manager. You can also double-click an
object repository in the list to open it. Object repositories that
are currently locked are opened in read-only format. For more
information on the Object Repository Manager, see Chapter 6,
"Shared Object Repositories."
Enables you to browse to the test plan tree of your
Quality Center project and select an existing object repository
to associate with the application area. For details, see "How to
Create and Maintain an Application Area" on page 500.
Removes the selected object repository from the application
area.
694
Chapter 24 • Business Component and Application Area Settings
UI Element
Description
Moves the selected object repository up in the list, giving it a
higher priority during the component run session.
Moves the selected object repository down in the list, giving it
a lower priority during the component run session.
Keywords Pane (Application Area Window)
This pane enables you to manage keywords and select which of them should
be available to Subject Matter Experts when creating business components.
Only selected built-in keywords are available by default. However, all
user-defined keywords are available to Subject Matter Experts.
To access
In the application area sidebar, click Keywords.
695
Chapter 24 • Business Component and Application Area Settings
Important
information
➤ All of the built-in methods and properties, plus all of the
functions in user-defined function libraries, are displayed as
keywords in the Keywords pane. In addition, the Keywords
pane displays methods and properties of any test object classes
that you or a third party developed using QuickTest Add-in
Extensibility.
➤ The Keywords pane is not relevant for scripted components.
➤ You can also filter and sort columns. For details, see "Filtering
and Sorting Options" on page 697.
See also
➤ "General Pane (Application Area Window)" on page 686
➤ "Function Libraries Pane (Application Area Window)" on
page 689
➤ "Object Repositories Pane (Application Area Window)" on
page 693
User interface elements are described below:
Column
Description
Environment
The name of the add-in for which the keyword is provided, for
example, Web or Visual Basic. The keywords available for all
currently loaded add-ins are displayed in the pane. (Including
keywords and add-ins that you or a third party developed using
QuickTest Add-in Extensibility.)
➤ Keywords in user-defined functions that are registered to a
test object are displayed under the environment and object
class to which they are registered.
➤ Keywords in user-defined functions that are not registered to
a test object, plus built-in VBScript functions, are all
displayed under the Global environment.
696
Class
The object class, for example, Image or Winbutton.
Keyword
The displayed operation name, for example, Click or
VerifyProperty.
Type
Indicates whether the operation is Built-in (provided by
QuickTest) or User-Defined (contained in a function library).
Chapter 24 • Business Component and Application Area Settings
Column
Description
Available
Indicates whether the keyword is available to Subject Matter
Experts for use in business component steps. You can select or
clear each check box as required.
Properties
Textual description of what the keyword does, and the name
and path of its function library (for user-defined keywords). The
location of a built-in keyword is defined as Internal.
Filter. Displays a list of the unique items contained in the
selected column. You can filter the data in the column to
display only those keywords with which you want to work. You
can filter the data in a single column only, or filter additional
columns to further reduce the number of displayed items.
For example, you may want to view only Web Add-in keywords
that are currently not available to Subject Matter Experts. You
would filter the Environment column to display only keywords
from the Web Add-in, and then filter the Available column to
display only keywords whose check box is cleared (select
Unchecked from the Available column filter list).
For details, see "Filtering and Sorting Options" on page 697.
Filtering and Sorting Options
➤
Click an item in the list. You can use the CTRL key to select multiple items
from a filter list. The Keywords pane refreshes to show the data for
keywords with that item name only.
You can then click the arrow in another column header and select an item
in that list. The filtered data is filtered again to show only the keywords
that match all selected filter criteria.
697
Chapter 24 • Business Component and Application Area Settings
698
➤
In the Filter For box at the bottom of the filter list, you can enter a filter
pattern that includes wildcards such as ?, *, and #. Press ENTER to filter the
data according to the pattern. You can use ? to represent any single
character, * to represent zero or more occurrences of any character, and #
to represent any digit. You can also use | to specify items that match only
one of the options in the pattern. For example, Verify*|Check* shows all
keywords that start with Verify or Check.
➤
You can apply a multiple filters simultaneously. For example, if you want
to view keywords for only the Standard Windows and ActiveX
environments, and you want to display only built-in keywords (as
opposed to user-defined keywords), you can apply three filters: one filter
for StandardWindows; another filter for ActiveX; and a third filter for the
type, Built-in.
➤
Click the
keywords.
➤
You can rearrange the order that columns are displayed in the Keywords
pane by dragging a column header to a new location. Red arrows are
displayed when the column is dragged to an available location.
➤
If the data in a column is partially hidden because the column is too
narrow, you can resize the column using the mouse. Drag a column
header divider to adjust the width.
➤
You can arrange the data in a column into ascending or descending
alphabetical order by clicking the column header. The Available column is
sorted according to selected and cleared check boxes.
➤
The sort direction is indicated by an arrow in the column header. Click
the column header again to sort the data in the other direction.
to the left of the filter criteria to clear the filter and show all
Chapter 24 • Business Component and Application Area Settings
Properties Pane (Business Component Settings Dialog
Box)
This pane enables you to view general information about your component,
including its description and any add-ins associated with it. You can also set
or modify its status.
To access
Select File > Settings > Properties.
See also
"Modify Associated Add-ins Dialog Box" on page 701
699
Chapter 24 • Business Component and Application Area Settings
User interface elements are described below:
UI Element
Description
Name
Indicates the name of the component. You assign a name to
the component when you save it. If the component is saved
in a version controlled project in Quality Center, the
version number is also shown.
Author
Indicates the Windows user name of the person who
created the component.
Application Area
Indicates the name of the application area which is
associated with the component. For details, see "How to
Manage Business Components" on page 479.
Note: If the component was created in Quality Center and
no application area was selected, this is indicated by Not
selected. Before business component steps can be
implemented, an application area must be selected.
Created in version
Indicates the version of QuickTest used to create the
component.
Modified in
version
Indicates the version of QuickTest last used to modify the
component.
Created on date
Indicates the date and time the component was created.
Modified on date
Indicates the date and time the component was last
modified.
Location
Indicates the Quality Center path and filename of the
component.
Note: If the component is not yet saved, the location
indicates Not saved.
Description
700
Displays the description specified for your component. This
field can be entered or modified only in Quality Center.
Chapter 24 • Business Component and Application Area Settings
UI Element
Description
Associated add-ins
Lists the add-ins associated with the component (via its
associated application area). The associated add-ins are
loaded by business components when they are accessed.
Business
Component Status
Specifies the status of the component. You can change the
status of the component by selecting a different option
from the list. For details on status options, see
"Understanding Component Statuses" on page 678.
Modify Associated Add-ins Dialog Box
This dialog box lists all the add-ins currently associated with your
application area, as well as any other add-ins that are currently loaded in
QuickTest, and enables you to associate or disassociate add-ins with your
application area (and its associated components).
To access
In the General Pane (Application Area Window), click Modify.
701
Chapter 24 • Business Component and Application Area Settings
Important
information
➤ If this dialog box contains a child add-in, and you select it, the
parent add-in is selected automatically.
➤ If you clear the check box for a parent add-in, the check boxes
for its children are also cleared.
➤ If a specific add-in is not currently loaded, but you want to
associate it with your application area, reopen QuickTest and
load the add-in from the Add-in Manager. If the Add-in
Manager dialog box is not displayed when you open QuickTest,
you can choose to display it the next time you open QuickTest.
To do so, select Display Add-in Manager on startup from the
General pane of the Options dialog box. For details, see "Global
Testing Options" on page 653.
See also
➤ "Add-in Associations in Your Component" on page 677
➤ For details on the Add-in Manager, see the section on working
with QuickTest add-ins in the HP QuickTest Professional Add-ins
Guide.
702
Chapter 24 • Business Component and Application Area Settings
User interface elements are described below (unlabeled elements are shown
in angle brackets):
UI Elements
Description
<Add-ins list>
The list of the add-ins that are currently loaded in QuickTest. You
can select the check boxes for add-ins that you want to associate
with your application area, or clear the check boxes for add-ins
that you do not want to associate with your application area.
In the image above:
➤ Web is loaded and associated with the application area.
➤ ActiveX is loaded, but not associated with the application
area.
➤ Visual Basic is associated with the application area, but is not
loaded.
Note:
➤ Add-ins that are associated with your application area but not
currently loaded are shown dimmed.
➤ This list might also include child nodes representing add-ins
that you or a third party developed to support additional
environments or controls using add-in extensibility.
Description
The description of the selected add-in.
703
Chapter 24 • Business Component and Application Area Settings
Snapshot Pane (Business Component Settings)
This pane enables you to capture or load an image and save it with the
component. The image provides a visual indication of the component’s
main purpose. The Subject Matter Expert can view the image in
Quality Center, in the component and in any business process test in which
the component is included.
704
To access
Select File > Settings > Snapshot.
Important
information
The snapshot image can also be captured and saved with
the component from the Snapshot tab in Quality Center
when installed with Business Process Testing support. For
information on capturing a snapshot for a component in
Quality Center, see the HP Business Process Testing User
Guide.
Chapter 24 • Business Component and Application Area Settings
User interface elements are described below:
UI Elements
Description
Capture snapshot from
application
Enables you to define the image to be captured by
clicking the Capture Snapshot button. You can then
drag the crosshairs pointer to select the area to be
captured. When you release the mouse button, the
captured area is displayed in the Snapshot pane.
Load from file
Specifies the .png or .bmp file containing the
required image. You can enter the path and
filename or use the browse button to locate the file.
Applications Pane (Business Component and Application
Area Settings)
Application Areas: This pane enables you to specify the Windows-based
applications on which the components associated with the application area
can record and run. It also displays the environments on which the
component can currently record (based on the currently loaded add-ins).
Business Components: When viewing this pane from the Business
Component Settings dialog box, the options are read-only.
705
Chapter 24 • Business Component and Application Area Settings
The following image is an example of the Applications pane in the
Applications Area Settings dialog box.
To access
For components and application areas: Select File > Settings >
Applications.
For application areas: In the application area window, click
Additional Settings and select Applications.
706
Chapter 24 • Business Component and Application Area Settings
Important
information
➤ You can use the Applications pane to set or modify your
application preferences in the following scenarios:
➤ You have already recorded one or more steps in an associated
component and you want to modify the settings before you
continue recording.
➤ You want to record and run the component on a different
application than the one you previously used.
➤ You can record component steps only on the specified
applications.
➤ If you are recording a new component, set your application
settings in the Applications pane of the Application Area
Settings dialog box using the Applications dialog box. This
dialog box opens when you start to record, and contains the
same options as the Applications pane, described in this
section.
➤ The Applications dialog box and Applications pane may also
contain options applicable to any QuickTest add-ins installed
on your computer. For information regarding these options, see
the documentation provided for the specific add-in.
See also
"Select Application Dialog Box" on page 708
User interface elements are described below:
UI Element
Description
Windows
applications
Lists the details of the Windows-based applications on which to
record and run components associated with this application
area. For details on the details displayed, see "Select Application
Dialog Box" on page 708.
If you do not want to record or run on Windows-based
applications, leave the application list blank. (This is the default
setting.)
Adds an application to the application list. You can add up to
ten applications. For details, see "Select Application Dialog Box"
on page 708.
Removes the selected application from the Application list.
707
Chapter 24 • Business Component and Application Area Settings
UI Element
Description
Record and run
on any
applications
opened by
QuickTest
Records and runs on any applications invoked by QuickTest (as
child processes of QuickTest), for example, applications opened
during a record or run session using an OpenApp function.
Other
Displays the environments on which the application area’s
associated components can currently record (based on the
currently loaded add-ins).
Select Application Dialog Box
This dialog box enables you to select applications for use in your application
area.
To access
In the Applications Pane (Business Component and
Application Area Settings), click the Add
button.
Important
information
➤ You can add up to ten applications to the application
list displayed in the Applications pane, and you can
edit an existing application in the list. You can also
select whether to record and run on the application’s
descendant processes.
➤ The details entered in the Select Application dialog
box are displayed as a single line for each application
in the Windows-based applications area of the
Applications pane.
708
Chapter 24 • Business Component and Application Area Settings
User interface elements are described below:
UI Element
Description
Executable file
Instructs QuickTest to record and run on the specified
executable file.
Include
descendant
processes
Instructs QuickTest to record and run on processes created by
the specified application during the record and run session.
For example, a process that is used only as a launcher may
create another process that actually provides the application
functionality. This descendant process must therefore be
included when recording or running components on this
application, otherwise the functionality will not be recorded,
or the run session will fail.
Default value: Selected.
709
Chapter 24 • Business Component and Application Area Settings
Resources Pane (Business Component Settings Dialog
Box)
This pane displays a read-only list of the function libraries and object
repositories associated with your component (via its associated application
area).
710
To access
Select File > Settings > Resources.
Important
information
The information in this pane is read-only. You define the
settings for this pane using the Function Libraries Pane
(Application Area Window) and the Object Repositories Pane
(Application Area Window).
Chapter 24 • Business Component and Application Area Settings
See also
➤ "Associated Function Libraries" on page 430
➤ "Function Libraries Pane (Application Area Window)" on
page 689
User interface elements are described below:
UI Element
Description
Associated
function
libraries
The list of function libraries associated with your component
(via its associated application area). You can add, delete, and
prioritize the files. You can also set the default function
libraries for new components.
Associated
object
Repositories
The list of shared object repositories currently associated with
your component via its associated application area (in addition
to the local object repository). Components use shared object
repository files stored in Quality Center. For details on
associating object repositories with application areas, see
"Object Repositories Pane (Application Area Window)" on
page 693.
711
Chapter 24 • Business Component and Application Area Settings
Parameters Pane (Business Component Settings Dialog
Box)
This pane enables you to define input parameters that pass values into your
component and output parameters that pass values from your component
to external sources. You can also use the Parameters pane to modify or delete
existing component parameters.
The following image shows an example of the Parameters pane for a
component stored in HP ALM.
712
Chapter 24 • Business Component and Application Area Settings
The following image shows an example of the Parameters pane for a
component stored in Quality Center 10.00 or earlier.
To access
Select File > Settings > Parameters.
713
Chapter 24 • Business Component and Application Area Settings
Important
information
➤ You can edit an existing parameter by selecting it in
the appropriate list and modifying its details.
➤ If, during a component run, a value is not supplied by
QuickTest or Quality Center for one or more input
parameters, QuickTest uses the default value for the
parameter.
➤ After you define component parameters, you can use
them to parameterize values in the steps of your
component by selecting input component parameters
in the Value Configuration Options dialog box, or by
selecting output component parameters in the Output
Options dialog box. You can also use local parameters
in steps. For details on using component and local
parameters in steps, see "Value Configuration Options
Dialog Box" on page 641.
See also
For information on using parameter values in steps,
see "Parameterization and Regular Expressions" on
page 631.
This pane contains the following key areas:
➤
"General User Interface Elements" on page 714
➤
"Input Parameters Area" on page 715
➤
"Output Parameters Area" on page 717
General User Interface Elements
UI Elements
Description
Adds a row to the table, enabling you to specify a new parameter.
Removes the selected parameter from the component.
714
Chapter 24 • Business Component and Application Area Settings
Input Parameters Area
This area displays the component parameters for which values can be received from
the source that runs or calls this component.
UI Elements
Description
Name
The parameter name (case-sensitive).
Type
The parameter type. (Relevant only for components stored
in Quality Center 10.00 or earlier)
The following types are available:
➤ String
➤ Boolean
➤ Date
➤ Number
➤ Password
Note: In HP ALM, this column is not displayed because all
component parameter values defined in this dialog box are
inserted as strings. In the Parameters tab of the
Quality Center Business Components module, you can
encrypt a parameter value or enter a dynamic date, if
needed. For details, see HP Business Process Testing User
Guide.
715
Chapter 24 • Business Component and Application Area Settings
UI Elements
Description
Default Value
An empty string. (Relevant only for components stored in
HP ALM)
For components stored in a Quality Center 10.00 or earlier
project,QuickTest assigns a default value as follows:
➤ String: Empty string
➤ Boolean: True
➤ Date: The current date
➤ Number: 0
➤ Password: Empty string
When a component runs, the actual values used for
parameters are generally those sent by the application
(QuickTest or Quality Center) calling the component, as
described below:
➤ QuickTest: Input Parameters tab of the Run dialog box.
For details, see "Run Dialog Box: Input Parameters Tab"
on page 742.
➤ Quality Center: Iterations dialog box (Test Plan
module). For details, see the HP Business Process Testing
User Guide.
Description
716
A meaningful description for the parameter, for example,
the purpose of the parameter.
Chapter 24 • Business Component and Application Area Settings
Output Parameters Area
Lists the parameters that the component can pass to the source that runs or calls it.
UI Elements
Description
Name
The parameter name (case-sensitive).
Type
The parameter type. (Relevant only for components stored
in Quality Center 10.00 or earlier)
The following types are available:
➤ String
➤ Boolean
➤ Date
➤ Number
➤ Password
Note: In HP ALM, this column is not displayed because all
component parameter values defined in this dialog box are
inserted as strings. In the Parameters tab of the
Quality Center Business Components module, you can
encrypt a parameter value or enter a dynamic date, if
needed. For details, see HP Business Process Testing User
Guide.
Description
A meaningful description for the parameter, for example,
the purpose of the parameter.
717
Chapter 24 • Business Component and Application Area Settings
Recovery Pane (Business Component and Application
Area Settings Dialog Box)
This pane displays a list of all recovery scenarios associated with the current
application area. Recovery scenario settings enable you to specify how a
business component recovers from unexpected events and errors during a
run session.
This pane also enables you to associate additional recovery scenarios with
the application area, create recovery scenarios, remove scenarios from the
application area, change the order in which they are applied to the run
session, and view a read-only summary of each scenario.
The following image illustrates the Recovery pane in the Application Area
Settings dialog box. The Business Component Settings dialog box displays
the same information in read-only mode.
718
Chapter 24 • Business Component and Application Area Settings
To access
For components: Select File > Settings > Recovery.
For application areas: In the application area window,
click Additional Settings and select Recovery.
Important
information
➤ For components, the options in this pane are
read-only. You define the recovery scenario settings for
a component in its associated application area.
➤ QuickTest provides you with a sample recovery file for
Web-related testing. The file is located in the Test
Resources module of your Quality Center project
under Resources\BPT Resources\Recovery
Scenarios\DefaultWeb.qrs.
See also
"Recovery Scenarios" on page 967
This pane includes the following key elements:
➤
"Scenarios Area" on page 719
➤
"Scenario Description and General Options Area" on page 720
➤
"Scenario Type Icons" on page 721
Scenarios Area
UI Element
Description
Opens the Add Recovery Scenario dialog box, which enables
you to associate one or more recovery scenarios with the
application area.
Removes the selected recovery scenario from the application
area.
Moves the selected scenario up in the list, giving it a higher
priority.
Moves the selected scenario down in the list, giving it a lower
priority.
Displays summary properties for the selected recovery scenario
in read-only format. For details, see "Recovery Scenario
Properties Dialog Box" on page 981.
719
Chapter 24 • Business Component and Application Area Settings
UI Element
Description
Scenario Name
The name of each recovery scenario associated with your
application area. You can add, delete, and prioritize the
scenarios in the list.
File
The file path for each recovery scenario associated with your
application area. You can edit the recovery scenario file path by
clicking the path once to highlight it, and then clicking it again
to enter edit mode. For details on scenario type icons, see
"Scenario Type Icons" on page 721.
For example, you may want to modify an absolute file path to
be a relative file path.
If you modify a recovery scenario file path, ensure that the
recovery scenario exists in the new path location before
running your component.
Scenario Description and General Options Area
UI Elements
Description
Scenario
description
Displays the textual description of the scenario selected in the
Scenarios box. You can select or clear the check box next to
each scenario to enable or disable it for the current application
area.
Activate
recovery
scenarios
Indicates how often QuickTest should activate the recovery
mechanism:
➤ On every step. The recovery mechanism is activated after
every step.
➤ On error. The recovery mechanism is activated only after
steps that return an error return value.
➤ Never. The recovery mechanism is disabled.
Note: Choosing On every step may result in slower
performance during the run session.
720
Chapter 24 • Business Component and Application Area Settings
Scenario Type Icons
Icon
Description
Indicates that the recovery scenario is triggered by a specific pop-up
window in an open application during the run session.
Indicates that the recovery scenario is triggered when the property values
of an object in an application match specified values.
Indicates that the recovery scenario is triggered when a step in the
component does not run successfully.
Indicates that the recovery scenario is triggered when a specified
application fails during the run session.
Indicates that the recovery scenario is no longer available for the
component—possibly because the recovery file has been renamed or
moved, or can no longer be accessed by QuickTest. When an associated
recovery file is not available during a run session, a message is displayed
in the run results.
721
Chapter 24 • Business Component and Application Area Settings
Local System Monitor Pane (Application Area Settings
Dialog Box)
This pane enables you to activate system monitoring, and define the system
counters you want to track during a run session. These counters enable you
to monitor the resources used by your application.
To access
Use one of the following:
➤ Select File > Settings > Local System Monitor.
➤ Click the Settings
toolbar button.
➤ In an application area, select General pane > Additional
Settings button > Local System Monitor node.
722
Chapter 24 • Business Component and Application Area Settings
Important
information
➤ The Local System Monitor data that is captured during a run
session is displayed in the Run Results Viewer. For details, see
"System Monitor Pane (Run Results Viewer)" on page 785.
➤ If more than one process with the same name runs during a
run session, and you monitor a counter for that process (for
example, you select to monitor a counter for the iexplorer.exe
process, and more than one Internet Explorer browser is open
on your desktop during the run session), the counter is
sampled from the application that contains at least one test
object from the component. If more than one application
meets this criterion, only one application is monitored.
➤ For business process tests: Local system monitoring runs only
if the application area associated with the first component in
the business process test is set to run local system monitoring,
and only on the application defined in the Local System
Monitor pane. This means that if another component that runs
later in the business process test is associated with a different
application area, local system monitor settings from that
application area are ignored.
See also
"Local System Monitor" on page 679
User interface elements are described below:
UI Element
Description
Enable local
system
monitoring
every: __
seconds
The frequency in seconds, by which the system counters for this
application will be checked.
Use the up and down arrows or enter a value in the edit box to
change the number of seconds.
Minimum value: One second.
723
Chapter 24 • Business Component and Application Area Settings
UI Element
Description
Application to
monitor
The application whose system counters you want to monitor.
You can define the application in any of the following ways:
➤ Enter the name of the application’s executable file (without
file extension) in the edit box.
➤ Click the down arrow in the edit box for a list of applications
previously run in QuickTest, currently running applications,
and applications currently specified in the Applications pane.
➤ Click the browse button
and browse to the application’s
executable file.
➤ Make sure that your application is currently running. Then
click the pointing hand
your desktop.
and point to the application on
Note: Sometimes a process is used only as a launcher that creates
another process that provides the application functionality.
Make sure to select the executable file that actually provides the
application functionality.
System
Counter
The system counter you want to track for the selected
application. Click inside a cell and then click the down arrow.
Select the counter from the list. Click the expand button
when displayed to show more counters.
You can monitor the process counters, which are accessible
through the performance console (select Start > Run > and then
enter Perfmon). For information these process counters, see the
performance console’s Help.
Limit
The upper limit of the counter selected in the System Counter
column. If the selected counter exceeds this value during the
run session, the run fails.
The Limit value is optional. If you do not supply a value, the
counter is tracked and the results are displayed in the Run
Results Viewer.
Removes the system counter definition from your application
area.
Description
724
The description of the counter selected in the System Counter
column, as provided by the performance console application.
Chapter 24 • Business Component and Application Area Settings
Log Tracking Pane (Business Component and Application
Area Settings Dialog Box)
This pane enables you to configure your log tracking and collection
preferences.
This pane is divided into two sections:
➤
The settings in the top half are QuickTest-specific, enabling it to receive
log messages during a run session.
➤
The settings in the bottom half are specific to the log configuration file
used by your application.
When configured, these settings are used during a run session if your
Windows-based application uses a Java or .NET log framework that includes
a UDP appender. The log messages generated by your application are
displayed in the run results. You can use this information to detect
unexpected behavior in your application.
725
Chapter 24 • Business Component and Application Area Settings
The following image illustrates the Log Tracking pane in the Application
Area Settings dialog box. The Business Component Settings dialog box
displays the same information in read-only mode.
726
Chapter 24 • Business Component and Application Area Settings
To access
Select File > Settings > Log Tracking.
Important
information
Prerequisites:
➤ Make sure that the firewall does not block the UDP port.
➤ The log framework must use an XML-based configuration file.
(This enables you to configure it to send log messages to
QuickTest.)
➤ QuickTest uses timestamps to associate log messages with the
relevant component step. Therefore, if your logging application
is located on a remote computer, make sure that the system
clocks on your application’s computer (where QuickTest is
installed) and the remote computer are synchronized.
➤ Some applications may need to be restarted after modifying the
log configuration file.
Limitations:
➤ These settings cannot be modified during a run session.
➤ If external events affect your application while it is being
tested, messages about these events may also be sent to the run
results.
➤ Log tracking runs only if the application area associated with
the first component in the business process test enables it. This
means that if another component that runs later in the
business process test is associated with a different application
area, log tracking settings from that application area are
ignored.
Relevant
tasks
"How to Manually Configure Log Tracking Settings" on page 682
See also
➤ "Log Tracking" on page 680
➤ "Log Tracking Pane (Run Results Viewer)" on page 780
727
Chapter 24 • Business Component and Application Area Settings
User interface elements are described below:
UI Elements
Description
Add log messages to
run results
Enables QuickTest to receive log messages from the log
framework used by your application and to include these
messages in the run results.
In the Run Results viewer, these messages are displayed in
the Log Tracking Results pane. You can click a log
message to locate the step in the run results tree at which
the event that preceded/triggered the message occurred
(according to its timestamp). For details, see "Log
Tracking Pane (Run Results Viewer)" on page 780.
Log message source
➤ Network (0.0.0.0). (Default) Enables QuickTest to
receive log messages from the log framework wherever
it is located—either on a remote computer on the
network or on the local computer.
➤ Local (127.0.0.1). Enables QuickTest to receive log
messages only from the log framework on the local
computer.
Port
728
The port that QuickTest listens to on the computer on
which the log framework runs. You can select any UDP
port that is not in use.
Chapter 24 • Business Component and Application Area Settings
UI Elements
Description
Minimum level to
add node to results
tree
The minimum log message level for which a node is
added to the run results.
QuickTest inserts a node in the run results tree directly
following each step that triggers a log message that
matches or exceeds the value you select in this option.
You can view details for these message in the Result
Details pane.
You can also view the generated messages in the
Results.xml file in the <Result Name>\Report folder.
Possible values in order of severity:
➤ TRACE (maps to micDone)
➤ DEBUG (maps to micDone)
➤ INFO (maps to micPass)
➤ WARN (maps to micWarning)
➤ ERROR (maps to micFail)
➤ FATAL (maps to micFail)
Default: ERROR
729
Chapter 24 • Business Component and Application Area Settings
UI Elements
Description
Auto-configure log
mechanism
Instructs QuickTest to configure the log framework (via
its log configuration file) at the beginning of every run
session according to the settings in this pane.
If you clear this check box, QuickTest receives log
messages only if you modify the log configuration file
accordingly. For details, see "How to Manually Configure
Log Tracking Settings" on page 682.
When using the Auto-configure log mechanism option,
make sure that:
➤ All logging prerequisites are met, for example, you
may need to set registry values that are specific to your
application.
➤ The log framework's configuration file is writable and
is in a location that QuickTest can access.
➤ Your application's log framework is configured to use
the same file you specified in the Configuration file
edit box.
➤ Your application's log framework can monitor changes
in the configuration file. If not, then you must always
start your application after the run session begins so
that QuickTest can modify the configuration file. For
details on starting your application, see the
SystemUtil.Run topic in the HP QuickTest Professional
Object Model Reference. You can also use any standard
VB Script command that starts an application.
Note: If your application's log framework monitors
your configuration file infrequently (for example,
once per minute), start your application immediately
after the run session begins. This enables QuickTest to
modify the configuration file in time to receive the log
messages generated during the run session.
730
Chapter 24 • Business Component and Application Area Settings
UI Elements
Description
Configuration file
The root path of the configuration file used by the log
mechanism. The configuration file can be stored in any
accessible location.
Possible configuration file types:
➤ *.XML (Java and .NET)
➤ *.CONFIG (.NET)
➤ *.LOG4NET (.NET)
Note: QuickTest can update only one file per run session,
so if there are multiple configuration files (for example, if
the component is validating more than one application each with its own configuration file), QuickTest modifies
only the file specified in this text box. If you need to
configure multiple files, do so manually. QuickTest can
receive log messages from multiple applications, but can
auto-configure only one of them.
Minimum level to log
The minimum log message level that QuickTest receives
from the log framework and sends to the run results.
These log messages are displayed in the Log Tracking
Pane (Run Results Viewer) and can also be viewed in the
LogMessage.xml file in the <Result Name>\Report
folder.
Possible values in order of severity:
➤ TRACE (maps to micDone)
➤ DEBUG (maps to micDone)
➤ INFO (maps to micPass)
➤ WARN (maps to micWarning)
➤ ERROR (maps to micFail)
➤ FATAL (maps to micFail)
Default: WARN
Recover original
configuration file
after run session
Restores the configuration file that existed prior to the
beginning of the run session (instead of keeping the
configuration file that QuickTest modified at the
beginning of the run session).
731
Chapter 24 • Business Component and Application Area Settings
732
Part VI
Running and Analyzing Components
734
25
QuickTest Run Sessions
This chapter includes:
Concepts
➤
Run Sessions - Overview on page 736
Tasks
➤
How to Run Your Component on page 737
Reference
➤
Run Dialog Box: Results Location Tab on page 740
➤
Run Dialog Box: Input Parameters Tab on page 742
Troubleshooting and Limitations - Run Sessions on page 743
735
Chapter 25 • QuickTest Run Sessions
Concepts
Run Sessions - Overview
When you run a component, QuickTest performs the steps it contains. If
you have defined component parameters, QuickTest prompts you to enter
values for them. When the run session is complete, QuickTest displays a
report detailing the results. For details on viewing run results, see "Run
Results Viewer" on page 745.
Run Preferences
QuickTest always runs a component from the first step, unless you specify
otherwise. You can:
736
➤
Run the entire component from the beginning.
➤
Run only a part of a component using the Run from Step or Run to Step
options. These features are useful if you want to check a specific section of
the component or to confirm that a certain part of your component runs
smoothly, without running the component from the beginning or to the
end. The Run to Step option is also useful if you want to open your
application to a specific location to add steps or debug your component.
➤
Debug a section of a component using the Debug from step option.
(Make sure that the application is open to the relevant location before
using this option.) For details, see "Running to a Step and Debugging from
a Step" on page 823.
➤
Update your component to change the test object descriptions. For
details, see "Maintaining and Updating Components" on page 851.
➤
Run components on objects with dynamic descriptions. For details, see
Chapter 4, "Managing Test Objects in Object Repositories."
Chapter 25 • QuickTest Run Sessions
Tasks
How to Run Your Component
This task describes the various ways in which you can run a component.
This task includes the following steps:
➤
"Prerequisites" on page 737
➤
"Run an entire component" on page 737
➤
"Run to a selected step" on page 738c
➤
"Run a component from a selected step" on page 738
➤
"Interrupt a run session" on page 738
➤
"Results" on page 739
Prerequisites
1 Ensure that any required QuickTest add-ins are loaded. For details, see
"How to Start QuickTest" on page 71.
2 Open the component you want to run. For details, see "Open Business
Component Dialog Box" on page 489.
Run an entire component
1 Open the Run dialog box in one of the following ways:
➤
Click Run.
➤
Select Automation > Run.
The Run dialog box opens.
2 In the Run dialog box, choose where to save the run session results, and
define any input parameters you want to use, as described in "Run Dialog
Box: Results Location Tab" on page 740, and "Run Dialog Box: Input
Parameters Tab" on page 742.
3 Click OK. The Run dialog box closes and the run session starts.
737
Chapter 25 • QuickTest Run Sessions
Run to a selected step
1 Select Debug > Run to Step.
2 In the Run dialog box, choose where to save the run session results, and
define any input parameters you want to use, as described in "Run Dialog
Box: Results Location Tab" on page 740, and "Run Dialog Box: Input
Parameters Tab" on page 742.
QuickTest runs from the beginning of the component and pauses at the
selected step.
Run a component from a selected step
1 Make sure your application is in a state matching the step you want to
run.
2 Select the step where you want to start running the component.
Make sure that the step you choose is not dependent on previous steps,
such as a retrieved value or a parameter defined in a previous step.
3 Select Automation > Run from Step.
The Run dialog box opens.
4 In the Run dialog box, choose where to save the run session results, and
define any input parameters you want to use, as described in "Run Dialog
Box: Results Location Tab" on page 740, and "Run Dialog Box: Input
Parameters Tab" on page 742.
Interrupt a run session
Do one of the following:
738
➤
Click the Pause button in the Debug toolbar or select Debug > Pause. The
run pauses. (To resume running a paused run session, click the Run
button or select Automation > Run.)
➤
Click the Stop button, select Automation > Stop, or press the STOP
command shortcut key. (To define a Stop command shortcut key, see
"Run Pane (Options Dialog Box)" on page 665.)
➤
Perform a file operation (for example, open a different component or
create a new component).
Chapter 25 • QuickTest Run Sessions
Results
By default, when the run session ends, the Run Results Viewer opens. For
details, see "Run Results Viewer Overview" on page 746. If you run part of a
component, the Run Results summary displays a note indicating that the
component was run using the Run from Step option.
Note: If you cleared the View results when run session ends check box in
the Run pane of the Options dialog box, the Run Results Viewer does not
open at the end of the run session. For details, see "Run Pane (Options
Dialog Box)" on page 665.
739
Chapter 25 • QuickTest Run Sessions
Reference
Run Dialog Box: Results Location Tab
This tab enables you to specify the location in which you want to save your
run session results.
To access
Start a run session in any mode.
Relevant tasks
➤ "How to Run Your Component" on page 737
➤ "How to Use Maintenance Run Mode to Update Your
Component When Your Application Changes" on
page 859
➤ "Running to a Step and Debugging from a Step" on
page 823
See also
740
"Run Dialog Box: Input Parameters Tab" on page 742
Chapter 25 • QuickTest Run Sessions
User interface elements are described below:
UI Elements
Description
New run results
folder
Displays the default path and folder name in which the
results are saved. A new folder is created for each run. By
default, the results for components are stored in a
Quality Center cache folder on your computer.
You can accept the default settings, or enter a new path
by typing it in the text box or clicking the browse button
to locate a different folder. The folder must be new,
empty, or contain only QuickTest component files.
Temporary run
results folder
Saves the run results in a temporary folder. This option
overwrites any results previously saved in this folder.
Note:
➤ QuickTest stores temporary results for all components
in %TMP%\TempResults (which is usually <System
Drive>\Documents and Settings\<user name>\Local
Settings\Temp\ TempResults).
➤ The path in the text box of the Temporary run results
folder option cannot be changed. Additionally, if you
save results to an existing results folder, the contents
of the folder are deleted when the run session starts.
741
Chapter 25 • QuickTest Run Sessions
Run Dialog Box: Input Parameters Tab
This tab enables you to specify to specify the run-time values of input
parameters to be used during the run session.
To access
Start a run session in any mode.
Important
information
The Input Parameters tab displays the input parameters
that were defined for the component (using the File >
Settings > Parameters node).
Relevant tasks
➤ "How to Run Your Component" on page 737
➤ "How to Use Maintenance Run Mode to Update Your
Component When Your Application Changes" on
page 859
➤ "Running to a Step and Debugging from a Step" on
page 823
See also
742
➤ "Run Dialog Box: Results Location Tab" on page 740
Chapter 25 • QuickTest Run Sessions
User interface elements are described below:
UI Elements
Description
Input parameters
The input parameters that were defined for the
component (using the File > Settings > Parameters
node).
To set the value of a parameter to be used during the run
session:
Click in the Value field for the specific parameter and
enter the value, or select a value from the list. If you do
not enter a value, QuickTest uses the default value from
the Business Component Settings dialog box during the
run session.
Troubleshooting and Limitations - Run Sessions
This section describes troubleshooting and limitations for:
QuickTest run sessions
➤
If you want to run QuickTest in a minimized RDP (remote desktop
protocol) session, and you are using an RDP 6.0 or later client, you can
enable it by setting a registry value on the remote computer:
a If it does not exist, create the
RemoteDesktop_SuppressWhenMinimized registry value (DWORD
type) in one of the following registry paths on the remote computer:
HKEY_CURRENT_USER\Software\Microsoft\Terminal Server
Client\RemoteDesktop_SuppressWhenMinimized
or
HKEY_LOCAL_MACHINE\Software\Microsoft\Terminal Server
Client\RemoteDesktop_SuppressWhenMinimized
b Set the data for this value to 2.
743
Chapter 25 • QuickTest Run Sessions
➤
When running QuickTest on a remote machine using a Remote Desktop
Connection session (RDC) or using Citrix, if the computer on which the
application is being tested is logged off or locked, the following problems
may occur:
➤
The component run session may fail
➤
Steps that contain keyboard or focus operations may fail
➤
The Run Results still image capture and/or the Screen Recorder may
display a black screen
➤
Steps for which the device level replay is configured to use the mouse
(instead of browser events) to run mouse operations may fail. (You set
the device level replay using a Setting.WebPackage("ReplayType")
statement or by setting the Replay type option in the Advanced Web
Options dialog box.)
Workaround: If you are using Citrix or a Remote Desktop Connection
session to run a component, make sure that the computer on which the
application is being tested is not logged off or locked.
Learning objects and running steps
➤
QuickTest cannot record or run steps if it has limited access to the
processes of the application you are testing.
Workarounds:
➤
➤
Make sure that the application you are testing is started by the same
Windows user as QuickTest.
➤
Make sure that neither you nor the tested application actively prevent
QuickTest from accessing the application’s processes.
When the title of a window changes during recording, QuickTest may fail
to recognize objects within that window while running the component.
Workaround: Remove the text property from the window’s test object
description in the Object Repository dialog box.
744
26
Run Results Viewer
This chapter includes:
Concepts
➤
Run Results Viewer Overview on page 746
➤
Run Results File Location on page 751
Tasks
➤
How to Install the Run Results Viewer as a Standalone Application
on page 752
➤
How to Open Run Results on page 752
➤
How to Navigate the Run Results Tree on page 754
➤
How to Customize the Run Results Viewer on page 755
➤
How to Manually Submit Defects to Quality Center on page 756
➤
How to Export Run Results on page 758
➤
How to Play a Screen Recorder Movie in the HP Micro Player on page 760
Reference
➤
Run Results Viewer User Interface on page 761
➤
Run Results Viewer Commands on page 764
➤
Run Results Viewer Panes on page 768
➤
Run Results Viewer Dialog Boxes on page 788
Troubleshooting and Limitations - Viewing Run Results on page 806
745
Chapter 26 • Run Results Viewer
Concepts
Run Results Viewer Overview
After running a component, you can view the run results in the HP Run
Results Viewer. The Run Results Viewer contains multiple panes, each of
which displays specific types of information. The run results tree pane
displays a hierarchical representation of the run results. The remaining
panes provide details about a selected node or step, the data used for a
particular step, optional screen captures or images, optional system
information, and so on. For an overview of the various panes, see "Run
Results Viewer User Interface" on page 761.
By default, the Run Results Viewer opens automatically at the end of a run
session. If you want to change this behavior, clear the View results when run
session ends check box in the Run pane of the Options dialog box.
Note: You cannot view business process test run results when you open the
Run Results Viewer from QuickTest. To view run results for a business
process test, select the results for the iteration you want to view and open
them from within Quality Center.
The Run Results Viewer contains a description of the steps performed during
the run session. It displays a single run iteration.
746
Chapter 26 • Run Results Viewer
Viewing Partial Results
In addition to viewing the results for a run session after a run is complete
(including runs that crash prior to completion), you can view the results
during a run session by opening the results.xml file for that run. This enables
you to view partial results (up to the step for which the results are opened).
For example, you may want to view the results for a specific iteration before
the run continues to the next iteration. One way to do this is to insert a step
that opens a message box, as this stops the run until you close the message
box.
Example: MsgBox "Open the following file:" & Reporter.ReportPath
Note: To view the partial results in the Run Results Viewer, you need to open
the results file from another computer.
Installing the Run Results Viewer
The Run Results Viewer is installed automatically together with QuickTest.
You can also install the Run Results Viewer as a standalone application. This
enables you to share the results of your tests with business analysts and
developers who do not have QuickTest installed on their computers. For
details, see "How to Install the Run Results Viewer as a Standalone
Application" on page 752.
This section also includes: "Run Results XML File" on page 748
747
Chapter 26 • Run Results Viewer
Run Results XML File
The results of each run session are saved in a single .xml file (called
results.xml). This .xml file stores information on each of the run result nodes
in the display. The information in these nodes is used to dynamically create
.htm files that are shown in the Result Details pane in the Run Results
Viewer.
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 run results. You can take run 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 Run
Results Viewer, when displaying run results in your own customized results
viewer, or when exporting the run results to an HTML file).
748
Chapter 26 • Run Results Viewer
The diagram below for QuickTest, shows the correlation between some of
the elements in the .xml file and the items they represent in the run results.
XSL provides you with the tools to describe exactly which run result
information to display and exactly where and how to display, print or
export it. You can also modify the .css file referenced by the .xsl file, to
change the appearance of the report (for example, fonts, colors, and so
forth).
749
Chapter 26 • Run Results Viewer
For example, in the results.xml file, one element tag contains the name of a
component, and another element tag contains information on the time at
which the run session is performed. Using XSL, you could tell your
customized run results viewer that the component 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.
You may find it easier to modify the existing .xsl and .css files provided with
the Run Results Viewer application, instead of creating your own
customized files from scratch. The files are located in the HP\Run Results
Viewer\dat folder, and are named as follows:
➤
PShort.xsl. Specifies the content of the run results report printed, or
exported to an HTML file, when you select the Short option in the Print
or Export to HTML File dialog boxes.
➤
PDetails.xsl. Specifies the content of the run results report printed, or
exported to an HTML file, when you select the Detailed option in the
Print or Export to HTML File dialog boxes.
➤
PResults.css. Specifies the appearance of the run results print preview.
This file is referenced by the above .xsl files.
For more information on printing run results using a customized .xsl file, see
"Print Dialog Box (Run Results Viewer)" on page 796.
For more information on exporting the run results to a file using a
customized .xsl file, see "Export Run Results Dialog Box (Run Results
Viewer)" on page 788.
For information on the structure of the XML schema, and a description of
the elements and attributes you can use to customize the run results reports,
see the XML Report Help (Help > QuickTest Professional Help > QuickTest
Advanced References > QuickTest Run Results Schema).
750
Chapter 26 • Run Results Viewer
Run Results File Location
By default, the results of a component run are stored in are stored in a
Quality Center cache folder on your computer.
When you run your test, you can specify a different location to store the
results, using the Results Location tab of the Run dialog box. Specifying your
own location for the results file can make it easier for you to locate the
results file in the file system.
For details, see "Run Dialog Box: Results Location Tab" on page 740.
751
Chapter 26 • Run Results Viewer
Tasks
How to Install the Run Results Viewer as a Standalone
Application
The Run Results Viewer is installed by default together with QuickTest and
Service Test. This task describes how to install the Run Results Viewer as a
standalone application. For example, business analysts and developers that
do not have QuickTest installed on their computers can install the Run
Results Viewer locally as a standalone application. You can then share the
results of your tests with them.
1 Install the prerequisite applications, if any.
Insert the QuickTest Professional installation DVD into a DVD drive and
browse to and double-click RunResultsViewer\EN\setup.exe. Setup
checks your computer for the required prerequisites, and enables you to
install them, if needed. Follow the on-screen instructions. After the
prerequisites are installed, you may need to restart the computer.
2 Install the HP Run Results Viewer.
Insert the QuickTest Professional installation DVD into a DVD drive and
browse to and double-click RunResultsViewer\EN\setup.exe. Follow the
on-screen instructions.
The Run Results Viewer is installed and can be opened from Start >
Programs > HP Run Results Viewer > HP Run Results Viewer.
How to Open Run Results
The following steps describe how to open specific run results in the Run
Results Viewer.
752
➤
"Open the Run Results Viewer" on page 753
➤
"Connect to your Quality Center project - optional" on page 753
➤
"View saved results" on page 753
Chapter 26 • Run Results Viewer
Open the Run Results Viewer
Open the Run Results Viewer in one of the following ways:
➤
In QuickTest, select Automation > Results or click the Results button
➤
From the Start menu, select Program Files > HP Run Results Viewer >
HP Run Results Viewer.
➤
Run a component. By default, the results are displayed in the Run Results
Viewer at the end of the run session. (You can change the default setting
in the Options dialog box. For details, see "Run Pane (Options Dialog
Box)" on page 665.)
.
Note: This section describes how to open components run in QuickTest. For
other types of tests, see your testing product’s documentation.
Connect to your Quality Center project - optional
If your run results are saved in Quality Center, connect to your
Quality Center project before opening the results file. For details, see "HP
ALM Connection Dialog Box (Run Results Viewer)" on page 800.
View saved results
When you open the Run Results Viewer manually, the Open Run Results
dialog box opens automatically, enabling you to select results to display.
If the Run Results Viewer opened automatically, click the Open button or
select File > Open. Browse to the relevant results. For details, see "Open Run
Results Dialog Box" on page 795.
Note: You cannot view business process test run results when you open the
Run Results Viewer from QuickTest. To view run results for a business
process test, select the results for the iteration you want to view and open
them from within Quality Center.
753
Chapter 26 • Run Results Viewer
How to Navigate the Run Results Tree
This task describes how to collapse or expand a branch in the run results tree
to select the level of detail that the tree displays.
When you open run results in the Run Results Viewer for the first time, the
tree expands one level at a time. If the child branches under a parent branch
were previously expanded, that state is maintained when you expand or
collapse the parent branch.
To expand a specific branch, do any of the following:
➤
Double-click the branch.
➤
Select the branch and click the arrow to the left of the branch icon.
➤
Press the plus key (+) on your keyboard number pad.
The tree displays the details for the branch, and the expand sign changes to
collapse.
To expand a branch and all branches below it:
➤
Select the branch and press the asterisk (*) key on your keyboard number
pad.
➤
Right-click a branch and select Expand All.
To expand all of the branches in the run results tree, do any of the
following:
➤
Right-click the top level branch and select Expand All.
➤
Select View > Expand All.
➤
Click the Expand All button.
➤
Select the top level of the tree and press the asterisk (*) key on your
keyboard number pad.
To collapse a specific node, do any of the following:
754
➤
Double-click the node.
➤
Right-click a node and select Collapse All.
➤
Select it and click the arrow to the left of the node icon.
➤
Press the minus key (–) on your keyboard number pad.
Chapter 26 • Run Results Viewer
The node’s child nodes disappear from the tree.
To collapse all of the nodes in the tree:
➤
Right-click the top level branch and select Collapse All.
➤
Select View > Collapse All.
➤
Click the Collapse All button.
To move between previously selected nodes within the run results tree:
Click the Go to Previous Node or Go to Next Node buttons.
To find specific steps within the Run Results:
Use the Search box (located above the run results tree), for example:
You can search for text, status, and/or types of nodes. For details, see "Run
Results Tree Pane and Search Box" on page 769.
To filter the tree to display only nodes that match certain criteria:
Use the Filter dialog box (View > Filters). For details, see "Filter Dialog Box
(Run Results Viewer)" on page 793.
How to Customize the Run Results Viewer
The following steps describe how to customize the layout of the Run Results
Viewer.
➤
"Move, float, and dock panes" on page 756
➤
"Show and hide panes" on page 756
➤
"Restore the default layout of the panes" on page 756
755
Chapter 26 • Run Results Viewer
Move, float, and dock panes
You can move the panes to suit your personal preferences by dragging the
title bar or tab of the pane you want to move and dropping it in the required
location.
Docked panes are fixed in a set position relative to the rest of the
application. 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. They can be
dragged to any position on your screen, even outside of the Run Results
Viewer.
Show and hide panes
➤
To close panes that are not needed: Click the X in the top-right corner of
a pane.
➤
To show panes that are closed: Select View > <Name of pane>.
Restore the default layout of the panes
Select View > Restore Layout.
How to Manually Submit Defects to Quality Center
This task describes how to manually add defects to a Quality Center project.
This task includes the following steps:
756
➤
"Prerequisites" on page 757
➤
"Connect to a Quality Center project" on page 757
➤
"Open the New Defect dialog box" on page 757
➤
"Modify the defect information if needed and submit it" on page 757
➤
"Results" on page 757
Chapter 26 • Run Results Viewer
1 Prerequisites
Ensure that the Quality Center client is installed on your computer. (Enter
the Quality Center Server URL in a browser and ensure that the Login
screen is displayed.)
2 Connect to a Quality Center project
Select Tools > ALM/QC Connection or click the ALM/QC Connection
button and connect to a Quality Center project. For details, see "HP ALM
Connection Dialog Box (Run Results Viewer)" on page 800.
Note: If you do not connect to a Quality Center project before proceeding
to the next step, you are prompted to connect before continuing.
3 Open the New Defect dialog box
Select Tools > Add Defect or click the Add Defect button to open the New
Defect dialog box in the specified Quality Center project. The New Defect
dialog box opens.
4 Modify the defect information if needed and submit it
Basic information on the component is included in the description, but
you can modify the defect if needed:
Tip: You can attach movies (.fbr files) to defects in Quality Center.
Quality Center users who have the QuickTest Add-in for ALM/QC
installed can view the movies from Quality Center.
5 Results
The defect is added to the Quality Center project’s defect database.
757
Chapter 26 • Run Results Viewer
How to Export Run Results
This task describes how to export run results to a file. For details on what is
included when you export run results, see "Export Run Results Dialog Box
(Run Results Viewer)" on page 788.
This task includes the following steps:
➤
"Open the results in the Run Results Viewer" on page 758
➤
"Specify the export settings" on page 758
➤
"Save the file" on page 758
➤
"Results" on page 759
1 Open the results in the Run Results Viewer
For details, see "Open Run Results Dialog Box" on page 795.
2 Specify the export settings
Select File > Export To File. The Export Run Results dialog box opens. For
details on the various settings, see "Export Run Results Dialog Box (Run
Results Viewer)" on page 788.
3 Save the file
Click Export. The Save As dialog box opens. Specify the file name and
path, and select the required file type.
Report type
Save as type
Step details
➤ HTML (*.htm, *.html) (default)
➤ PDF (*.pdf)
➤ DOC (*.doc) (Available if Microsoft Word is installed)
758
Data Table
Excel (*.xls)
Log Tracking
XML (*.xml)
Chapter 26 • Run Results Viewer
Report type
Save as type
Screen Recorder
FlashBack (*.fbr)
System Monitor
➤ Text (*.csv, *.txt) (default)
➤ Excel (*.xls)
➤ XML (*.xml)
➤ HTML (*.htm, *.html)
Note: Only the system monitor data is exported, not the
graph.
4 Results
When you click Save, the file is exported in the specified format to the
designated location.
Note: You can view .fbr files in the HP Micro Recorder (as described in
"Viewing Screen Recorder Movie Files in the HP Micro Player" on page 784).
You can also attach .fbr files to defects in Quality Center. Quality Center
users who have the QuickTest Add-in for ALM/QC installed can view the
movies from Quality Center.
759
Chapter 26 • Run Results Viewer
How to Play a Screen Recorder Movie in the HP Micro
Player
Note: QuickTest must be installed on the computer on which you want to
use the HP Micro Player.
1 Perform one of the following:
➤
Double-click any .fbr file in Windows Explorer.
➤
Select Start > Programs > HP QuickTest Professional > Tools > HP Micro
Player and then select File > Open in the Micro Player to select any .fbr
file.
The movie opens in the HP Micro Player and begins playing.
2 Use the controls at the top of the window to access a particular location
in the movie or to modify the volume settings.
760
Chapter 26 • Run Results Viewer
Reference
Run Results Viewer User Interface
This window enables you to view the results of a run session.
QuickTest Component. Below is an example of the run results for a
component:
761
Chapter 26 • Run Results Viewer
Note: In this example, the component failed due to a run error in an
associated function library. If the run error had not occurred, the Result
would indicate Done.
To access
Open the Run Results Viewer, as described in "How to
Open Run Results" on page 752.
By default, the left pane (dockable) contains the run results tree. The right
side of the window contains two rows of additional dockable panes. These
user interface elements are described below (unlabeled elements are shown
in angle brackets):
UI Elements
Description
<Run Results Viewer
menu bar and
toolbar>
See "Run Results Viewer Commands" on page 764.
Executive Summary
pane
➤ A high-level results overview report (general
information, pass/fail status, statistics, link to previous
run results (if any), notes, and so on) displayed in the
Result Details pane when the topmost node is selected.
For details, see "Executive Summary" on page 776.
➤ Quality Center information for your test (if the
component was run from Quality Center)
Run Results Tree
pane
➤ A graphical representation of the results in an
expandable tree
➤ A search box
➤ Displays the component steps, specifying exactly
where application failures occurred
Result Details pane
762
Detailed explanations of each step pass or failure, at each
stage of the component
Chapter 26 • Run Results Viewer
UI Elements
Description
Captured Data pane
➤ A still image of the state of your application at a
particular step
➤ For Quick Test, additional information, such as a
bitmap checkpoint image.
For details, see "Captured Data Pane (Run Results
Viewer)" on page 778.
Data Table pane
The data used in all iterations
Screen Recorder
pane
A movie clip of the state of your application at a
particular step or of the entire component
System Monitor pane
Any system counters that were monitored for your
component
Log Tracking pane
Any log messages that were received for your component
<status bar>
Displays:
➤ A description of any highlighted menu command
(Available only if the menu command is enabled)
➤ The status of the currently selected command
➤ Connection information (when connected to a
Quality Center project)
➤ A filter indication icon (when the results are filtered)
763
Chapter 26 • Run Results Viewer
Run Results Viewer Commands
The Run Results Viewer menu bar and toolbar contain commands to help
you view run session results.
Button
Command
Shortcut
Key
File > Open
CTRL+O
Description
Opens the Open Run Results dialog box,
enabling you to open saved run results from
the file system or from Quality Center.
For details, see "How to Open Run Results"
on page 752.
File > Print
CTRL+P
Opens the Print dialog box, enabling you to
print the results of the run session.
For details, see "Print Dialog Box (Run
Results Viewer)" on page 796.
--
File > Print
Preview
CTRL+F2
Opens the Print Preview dialog box,
enabling you to preview the results of the
run session prior to printing.
For details, see "Print Preview Dialog Box
(Run Results Viewer)" on page 798.
--
File >
Export To
File
--
Opens the Export Run Results dialog box,
enabling you to save various parts of the
results as external files.
For details, see "Export Run Results Dialog
Box (Run Results Viewer)" on page 788.
764
--
File >
Remove
Movie from
Results
--
Enables you to remove a stored movie from
the results of a component. This reduces the
size of the run results file.
--
File >
Recent
Files
--
Lists the recently viewed files.
--
File > Exit
--
Closes the Run Results Viewer session.
Chapter 26 • Run Results Viewer
Shortcut
Key
Button
Command
Description
--
View > Run
Results
Viewer
Toolbar
--
Shows or hides the Run Results Viewer
toolbar.
--
View >
Status Bar
--
Shows or hides the status bar, which
indicates:
➤ A hint about the currently selected
command
➤ The status of the Run Results Viewer
➤ The Quality Center server name and
project to which the Run Results Viewer
is connected
➤ Whether the results are currently filtered
(displays a Filter icon when a filter is
applied)
--
View >
Result
Details
--
Opens the Results Details pane if it is closed
or brings it into focus. For details, see
"Result Details Pane (Run Results Viewer)"
on page 774.
--
View >
Screen
Recorder
--
Opens the Screen Recorder pane if it is
closed or brings it into focus. For details, see
"Screen Recorder Pane (Run Results Viewer)"
on page 782.
--
View >
System
Monitor
--
Opens the System Monitor pane if it is
closed or brings it into focus. For details, see
"System Monitor Pane (Run Results Viewer)"
on page 785.
--
View >
Captured
Data
--
Opens the Captured Data pane if it is closed
or brings it into focus. For details, see
"Captured Data Pane (Run Results Viewer)"
on page 778.
765
Chapter 26 • Run Results Viewer
Shortcut
Key
Button
Command
Description
--
View >
Data Table
--
Opens the Data Table pane if it is closed or
brings it into focus. For details, see "Data
Table Pane (Run Results Viewer)" on
page 779.
--
View > Log
Tracking
--
Opens the Log Tracking pane if it is closed
or brings it into focus. For details, see "Log
Tracking Pane (Run Results Viewer)" on
page 780.
--
View >
Restore
Layout
--
Restores the default layout of the Run
Results Viewer.
View >
Filters
CTRL+T
Opens the Filters dialog box, enabling you
to filter the information displayed. For more
information, see "Filter Dialog Box (Run
Results Viewer)" on page 793.
View >
Collapse All
--
Collapses all of the branches in the run
results tree.
Also available as a context-menu option to
collapse all of the nodes under the selected
node.
View >
Collapse All
--
Collapses all of the branches in the run
results tree.
Also available as a context-menu option to
collapse all of the nodes under the selected
node.
766
View > Go
to Previous
Node
--
Moves the cursor to the previously selected
node in the tree.
View > Go
to Next
Node
--
Moves the cursor to the node you selected
in the tree prior to clicking the Go to
Previous Node button.
Chapter 26 • Run Results Viewer
Button
Command
Description
Tools > Add
Defect
--
Enables you to add a defect to your
Quality Center project. If you are not
currently connected to Quality Center,
opens the HP ALM Connection dialog box.
For more information, see "How to
Manually Submit Defects to Quality Center"
on page 756.
Tools >
ALM/QC
Connection
--
Opens the HP ALM Connection dialog box,
enabling you to connect to a Quality Center
project. For more information, see "HP ALM
Connection Dialog Box (Run Results
Viewer)" on page 800.
Go to
Previous
Node
BACKSPACE
Moves the cursor to the previously selected
node in the run results tree. For more
information, see "How to Navigate the Run
Results Tree" on page 754.
ALT+RIGHT
Moves the cursor to the node you selected
in the run results tree prior to clicking the
Go to Previous Node button. For more
information, see "How to Navigate the Run
Results Tree" on page 754.
Go to Next
Node
--
Shortcut
Key
ARROW
Help > Help
Topics
--
Opens the HP Run Results Viewer Help.
Help >
About Run
Results
Viewer
--
Displays version information about the
HP Run Results Viewer.
767
Chapter 26 • Run Results Viewer
Run Results Viewer Panes
This section includes:
768
➤
"Run Results Tree Pane and Search Box" on page 769
➤
"Result Details Pane (Run Results Viewer)" on page 774
➤
"Captured Data Pane (Run Results Viewer)" on page 778
➤
"Data Table Pane (Run Results Viewer)" on page 779
➤
"Log Tracking Pane (Run Results Viewer)" on page 780
➤
"Screen Recorder Pane (Run Results Viewer)" on page 782
➤
"System Monitor Pane (Run Results Viewer)" on page 785
Chapter 26 • Run Results Viewer
Run Results Tree Pane and Search Box
This pane displays the run results tree—a graphical representation of the
run session results. The Search box is located above the tree.
The following image shows an example of the run results tree with a
collapsed Search box. (Similar results would be displayed for a component.)
769
Chapter 26 • Run Results Viewer
The following image shows an example of an expanded Search box. Six
instances of the searched for text, Welcome, were found.
To access
Open the Run Results Viewer, as described in "How to
Open Run Results" on page 752.
The Run Results Tree pane is displayed by default on the
left side of the Run Results Viewer. It cannot be hidden.
The Search box is located directly above the tree and can
be expanded by clicking the Expand
button.
Important
information
Click a node in the tree to view its details in the Result
Details pane. Other panes also display information for
the component or highlighted step, if available.
You can collapse or expand a node in the run results tree
to change the level of detail that the tree displays.
You can also use the Filter commands to control what is
displayed in the run results tree. For details, see "Filter
Dialog Box (Run Results Viewer)" on page 793.
770
Chapter 26 • Run Results Viewer
Run Results Tree
Some of the Run Results Tree icons are described below:
UI Elements
Description
Indicates a step that succeeded.
This icon is displayed only if the component step
contains one of the following:
➤ Verify operations (functions), such as
VerifyProperty
➤ AddToRunResults (or its equivalent) with a micPass
status
Indicates a step that failed. Note that this causes all
parent steps (up to the root component) to fail as well.
Indicates a warning, meaning that the step did not
succeed, but it did not cause the component to fail.
Indicates a step that failed unexpectedly, such as when
an object is not found for a checkpoint.
Indicates that the Smart Identification mechanism
successfully found the object.
Indicates that a recovery scenario was activated.
Indicates that the run session was stopped before it
ended.
771
Chapter 26 • Run Results Viewer
UI Elements
Description
Square brackets around a test object name indicate
that the test object was created dynamically during the
run session. A dynamic test object is created either
using programmatic descriptions or by using an object
returned by a ChildObjects method, and is not saved
in the object repository.
Displays the Maintenance Mode Update Result, which
is a table that describes the Action taken by
Maintenance Run Wizard on a failed step and its
Details. Displayed only for components run in
Maintenance Run Mode. For more information on
Maintenance Run Mode, see "Maintenance Run Mode"
on page 854.
Search Box
The Search box user interface elements are described below:
UI Elements
Description
Text box in which you can optionally enter text for which to
search.
If the specified text is found in one or more tree nodes, the
text area indicates this, as shown below:
In this example, 1 of 6 indicates that there are six nodes
displaying the text, Welcome, and the first matching node is
highlighted in the tree.
Search. Finds the next instance that matches the criteria you
specified in the Search box. Click this button to jump to each
node that matches your search criteria.
Cancel. Clears the Search for text box.
Expand or Collapse. Shows or hides the lower part of the
Search box.
772
Chapter 26 • Run Results Viewer
UI Elements
Description
Status
The status to search for. (Optional)
Possible values:
➤ Passed. Searches for steps that passed and match your
other selection criteria.
➤ Failed. Searches for steps that failed and match your other
selection criteria.
➤ Done. Searches for steps with the status Done (steps that
were performed successfully but did not receive a pass, fail,
or warning status) that match your other selection criteria.
➤ Warning. Searches for steps with the status Warning (steps
that did not pass, but did not cause the test to fail) that
match your other selection criteria.
Note: If the tree does not contain any steps that match a
particular status, that option is grayed out in the Search box.
Node type
The type of node to search for (together with your other
search criteria). (Optional)
Possible values:
➤ Iteration. Searches for Iteration nodes that match your
other selection criteria.
➤ Step. Searches for steps that match your other selection
criteria.
➤ Reporter. Searches for Reporter steps that match your other
selection criteria.
Note: This is not relevant for Reporter.ReportNote steps,
which are displayed in the Executive Summary page and
not in the run results tree.
➤ Checkpoint/Output Value. Searches for checkpoint and
output value steps that match your other selection criteria.
Note: If the tree does not contain a particular node type, that
option is grayed out in the Search box.
Direction
The direction to search in the tree. Possible values:
➤ Up
➤ Down
773
Chapter 26 • Run Results Viewer
Result Details Pane (Run Results Viewer)
This pane displays the details for an iteration or a step that is currently
selected in the run results tree.
Example of Executive Summary:
The Executive Summary is displayed when the topmost node in the run
results tree is selected.
774
Chapter 26 • Run Results Viewer
Example of Result Details:
Result details are displayed when any node (other than the topmost node) is
selected in the run results tree.
To access
Open the Run Results Viewer, as described in "How to Open Run
Results" on page 752, and do the following:
1 Select a node in the run results tree:
➤ To open the Executive Summary page, select the topmost
node in the tree.
➤ To open the Result Details for a step, select the relevant node
in the tree.
2 Select the Result Details tab. (This assumes that the default
layout is displayed.)
Tip: If the Result Details pane is hidden, select View > Result
Details to show it.
Important
information
By default, when the Run Results Viewer opens after a run session,
an Executive Summary is displayed in the Result Details pane.
This summary displays run session information about the
component. It also includes run Statistics and Notes (if any were
included).
For any other node, the details in the Result Details pane are
specific for the step selected in the run results tree. For example,
the details may include input or output parameters, or may
indicate that the session ran in Update Run Mode.
775
Chapter 26 • Run Results Viewer
User interface elements are described below (unlabeled elements are shown
in angle brackets):
Executive Summary Page
UI Elements
Description
Executive
Summary
Includes:
➤ the component name and result details, and configuration
details, if any
➤ time-related information for the run
➤ the product from which the component was run
➤ Quality Center server and project
Note: If a component that is stored in Quality Center is run
from QuickTest, but you choose to store the results in a
temporary location, the Test set and Test instance fields are
not displayed in the results.
➤ input and output parameters, if any
➤ additional information (for example, if the test ran in update
mode)
776
Statistics
Provides graphical, status-related statistics for the current run
and the previous run (if any). If the component was run
previously, you can click Open to open the previous run results
in a new Run Results Viewer window.
Notes
Displays any component-related notes, if any were added to the
test using the Reporter.ReportNote Utility statement. For details,
see the Utility section of the HP QuickTest Professional Object Model
Reference.
Parameters
Displays any component input and/or output parameters. For
details, see "Parameterized Values in the Run Results" on
page 815.
Chapter 26 • Run Results Viewer
Result Details for Step
UI Elements
Description
<step name>
The name of the step.
<step status>
The status of the step. Possible values:
➤ Done. Relevant for steps that ran successfully, but do not
contain checkpoints.
➤ Failed. Relevant for steps that contain checkpoints.
➤ Passed. Relevant for steps that contain checkpoints.
➤ Warning. Relevant for steps that were not successful, but did
not cause the component to stop running.
Note: A component containing a step marked Warning may still
be labeled Passed or Done.
<step details>
Details about the step, such as the object on which the step was
performed, the timestamp, the step results, and so on. The
information in this area changes according to the type of step.
Example 1: Step performed on a Page test object
Example 2: Output value step
777
Chapter 26 • Run Results Viewer
Captured Data Pane (Run Results Viewer)
This pane may display a still image of your application for the highlighted
step, a bitmap checkpoint image, or other data.
The following image shows an example of the Captured Data pane with a
still image of an application taken during a run session.
To access
Open the Run Results Viewer, as described in "Run Results
Viewer User Interface" on page 761.
Select View > Captured Data or click the Captured Data tab.
Important
information
➤ Screen captures for QuickTest steps. By default, QuickTest
saves a still image of your application for failed steps. When
you select a failed step in the run results tree and select the
Captured Data pane, the pane displays a screen capture of
your application corresponding to the highlighted step in the
run results tree. If the highlighted step does not contain an
error, no screen capture is displayed.
You instruct QuickTest to include still images of your
application in the run results by setting the Save still image
captures to results option in the Run > Screen Capture pane
of the Options dialog box described on page 665.
➤ Programmatically adding information to the results: You can
also programmatically add an image to the Captured Data
pane using the ReportEvent method of the Reporter utility
object. For details, see the Utility section of the HP QuickTest
Professional Object Model Reference.
778
Chapter 26 • Run Results Viewer
Relevant tasks
"How to Navigate the Run Results Tree" on page 754
Data Table Pane (Run Results Viewer)
This pane contains the runtime version of the data table associated with
your HP ALM configuration (relevant only for business process tests run
from Quality Center). It displays the values used to run a test or
configuration that contains Data Table parameters, as well as any output
values retrieved from an HP ALM configuration during a run session.
If you select a node in the run results tree that represents a step using data
table values, the relevant row is highlighted in this pane. In the following
example, the data table contains parameterized flight departure and arrival
values.
To access
Open the Run Results Viewer, as described in "How to Open Run
Results" on page 752.
Select View > Data Table or click the Data Table tab.
See also
For details on the run-time data table,
User interface elements are described below (unlabeled elements are shown
in angle brackets):
UI Elements
Description
<Row>
Represents the set of values that QuickTest submitted for the
parameterized arguments during a single iteration of the
configuration.
<Column>
Represents the list of values for a single parameterized argument.
The column header is the parameter name.
779
Chapter 26 • Run Results Viewer
Log Tracking Pane (Run Results Viewer)
This pane displays a complete list of log messages that QuickTest received
from your application during the run session.
In addition to viewing the log messages, when you select a message, you can
see its details in the Result Details pane (described on page 774).
Tip: You can print or export the log tracking details to a file to show to a
developer, or you can provide the developer with the standalone Run
Results Viewer installation so that the developer can view and analyze the
results directly on his or her own computer. For details, see "How to Install
the Run Results Viewer as a Standalone Application" on page 752.
To access
Open the Run Results Viewer, as described in "How to Open Run
Results" on page 752.
Select View > Log Tracking.
Important
information
780
Japanese characters - known Log4Net issue. If a log message
contains Japanese characters, these characters are displayed as
question marks (?) in the Message column of the Run Results
Viewer's Log Tracking pane. This is due to a known bug in
log4net.Layout.XmlLayoutSchemaLog4j - version 1.2.10. For
details, see https://issues.apache.org/jira/browse/LOG4NET-229.
Chapter 26 • Run Results Viewer
See also
➤ "Find Dialog Box (Log Tracking Pane - Run Results Viewer)" on
page 791
➤ "Log Tracking" on page 680
User interface elements are described below:
UI Elements
Description
Find
Opens the Find dialog box, enabling you to search the
log messages by message, level, and character case.
ID
The message number.
Timestamp
The date and time (in milliseconds).
Level
The severity level for the log message. Possible level
values:
➤ TRACE
➤ DEBUG
➤ INFO
➤ WARN
➤ ERROR
➤ FATAL
Logger
The name of the logger.
Thread
The thread that initiated the log request.
Message
The text of the log message.
781
Chapter 26 • Run Results Viewer
Screen Recorder Pane (Run Results Viewer)
This pane enables you to view a movie of a run session. You can view the
entire movie, or you can view a frame for particular segment (by selecting a
node in the run results tree or by clicking on a specific point in the slider).
To access
Open the Run Results Viewer, as described in "How to Open Run
Results" on page 752.
Select View > Screen Recorder or click the Screen Recorder tab.
782
Chapter 26 • Run Results Viewer
Important
information
➤ Use of multiple monitors: The Screen Recorder records a movie
of the operations performed on your primary monitor.
Therefore, if you are working with multiple monitors, make
sure that your application is fully visible on your primary
monitor when recording or running a component.
➤ Prevent QuickTest from obscuring your application. The Screen
Recorder saves a movie of your entire desktop. You can prevent
the QuickTest window from partially obscuring your
application while capturing the movie by minimizing
QuickTest during the run session. For information on how to
minimize QuickTest during run sessions, see "QuickTest
Window Layout Customization in Different Modes" on
page 888.
➤ View full screen. You can double-click the Screen Recorder
pane to display the Screen Recorder in full-screen mode and
hide the run results tree. Double-clicking again restores the
Screen Recorder to its previous size and displays the run results
tree. When the Screen Recorder is expanded, the playback
controls at the top of the Screen Recorder automatically hide
after approximately three seconds with no mouse activity, or
when you click anywhere on the Screen Recorder. They
reappear when you move the mouse again.
User interface elements are described below:
UI Elements
Description
First Frame. Click to view the first frame in the movie.
Play/Pause. Click to play or pause the movie. When you
click Pause, the relevant tree node is highlighted.
Stop. Click to stop the movie.
Last Frame. Click to view the last frame in the movie.
783
Chapter 26 • Run Results Viewer
UI Elements
Description
Slider. Drag the bar to view a particular frame in the
movie. When you click on the bar, the relevant node is
highlighted in the tree. When you play the movie, the
slider automatically moves to the position of the
currently displayed frame.
Volume Control. Drag the bar to the right or left to
control the movie sound.
Mute. Click to turn off the movie sound, if any.
Setting Movie Recording Options
You can customize the whether QuickTest captures movies and the criteria
used to save them, using the Save movies to results option in the Run >
Screen Capture pane of the Options dialog box. For details, see "Run Pane
(Options Dialog Box)" on page 665.
Exporting Movies of Your Run Session
You can export a captured Screen Recorder movie as an .fbr file. You can
view .fbr files in the HP Micro Recorder (as described in "Viewing Screen
Recorder Movie Files in the HP Micro Player" on page 784).
You can also attach .fbr files to defects in Quality Center. Quality Center
users who have the QuickTest Add-in for ALM/QC installed can view the
movies from Quality Center.
Viewing Screen Recorder Movie Files in the HP Micro Player
When you capture a movie of your run session using the Screen Recorder,
the movie is saved as an .fbr file in your run results folder. You can also view
these .fbr files without opening the Run Results Viewer, using the HP Micro
Player. For details, see "How to Play a Screen Recorder Movie in the HP Micro
Player" on page 760.
784
Chapter 26 • Run Results Viewer
System Monitor Pane (Run Results Viewer)
This pane enables you to view the system counters that you monitored for a
run session in a line graph.
To access
Open the Run Results Viewer, as described in "How to
Open Run Results" on page 752.
Select View > System Monitor or click the System
Monitor tab.
785
Chapter 26 • Run Results Viewer
Important
information
You can export the data from the System Monitor tab to
the following file types: text (.csv or .txt), Excel, XML, or
HTML. (Graphs are not exported.)
For details, see "Export Run Results Dialog Box (Run
Results Viewer)" on page 788.
See also
➤ For information on enabling local system monitoring,
see "Local System Monitor" on page 679.
➤ "Troubleshooting and Limitations - Viewing Run
Results" on page 806
User interface elements are described below:
UI Elements
Description
Zoom In. Click this button and click anywhere on the
graph to zoom in. You can also click and drag over an
area of the graph to zoom in on that area.
Zoom Out. Click this button and click anywhere on the
graph to zoom out.
View Full Graph. Click this button to zoom out and view
the entire graph. This button is disabled when the graph
is not zoomed in.
Move. Click this button and then click and drag on the
graph to scroll right and left. This button is disabled
when the graph is not zoomed in.
Arrow. Click this button and double-click anywhere on
the graph to select that point as the current step. The
Current Step indicator moves to the new location and
the step is highlighted in the Run Results tree. You can
also hover over any point on a Counter Line in the graph
to see the value for the Counter Line at that point.
786
Application Name
The name of the application for which system counters
were monitored.
System Counters List
The list of system counters monitored for the
application.
Chapter 26 • Run Results Viewer
UI Elements
Description
Currently Displayed
Counters
The list of counters currently displayed in the line graph.
The System Monitor tab displays a maximum of two
counters at one time. To change the counters being
displayed, clear the check box for one or both of the
currently selected counters, and select the check box for
the desired counters.
Counter Scale
The scale of measurement for the performance of that
counter.
Maximum Counter
Value
The maximum value the counter achieved during the run
session.
Current Step
The point in the graph representing the step that is
currently highlighted in the Run Results tree.
Counter Limit Line
A visual representation of the limit, if set, for that
counter, as defined in the Local System Monitor pane of
the Application Area Settings dialog box. If set, a counter
that exceeds this limit causes the step to fail. Only the
first step that exceeds the counter limit fails. Subsequent
steps that exceed the counter limit are not affected.
Counter Limit Value
The numeric value of the limit, if set, for that counter, as
defined in the Local System Monitor pane of the
Application Area Settings dialog box. If set, a counter that
exceeds this limit causes the step to fail. Only the first
step that exceeds the counter limit fails. Subsequent steps
that exceed the counter limit are not affected.
Time Scale
The scale of time in seconds, for the run session.
787
Chapter 26 • Run Results Viewer
Run Results Viewer Dialog Boxes
This section includes (in alphabetical order):
➤
Export Run Results Dialog Box (Run Results Viewer) on page 788
➤
Find Dialog Box (Log Tracking Pane - Run Results Viewer) on page 791
➤
Filter Dialog Box (Run Results Viewer) on page 793
➤
Open Run Results Dialog Box on page 795
➤
Print Dialog Box (Run Results Viewer) on page 796
➤
Print Preview Dialog Box (Run Results Viewer) on page 798
➤
HP ALM Connection Dialog Box (Run Results Viewer) on page 800
Export Run Results Dialog Box (Run Results Viewer)
This dialog box enables you to export run results to a file so that you can
view them even if the Run Results Viewer is unavailable. For example, you
can send the file containing the run results in an e-mail to a third-party who
does not have the Run Results Viewer installed.
788
Chapter 26 • Run Results Viewer
To access
Open the Run Results Viewer, as described in "How to Open
Run Results" on page 752.
Select File > Export to File.
Important
information
➤ The export time varies according to the size of the results
file and the file type you select. When selecting the file type,
consider the length of time it will take to generate different
document types, especially for a report with many images.
HTML files generate the fastest, followed by PDF and DOC.
When exporting a report with 100 or more images to a DOC
file, a dialog box is displayed reminding you that it may take
a long time to generate the file. The dialog box gives you the
option to continue exporting with images, continue
exporting without images, or to export to PDF.
➤ Screen capture images are not exported for steps on
Web-based applications. When you export run results
containing steps on a Web application, any screen capture
images for those steps are not exported to the file. This is
because for Web-based applications, the Run Results Viewer
displays the HTML corresponding to the relevant Web page
(with downloaded images) rather than a captured image and
thus no image is saved with the report.
➤ Exporting to a DOC file. Requires that a supported version of
Microsoft Word be installed on the Run Results Viewer
computer. For details, see the HP QuickTest Professional
Product Availability Matrix, available from the Documentation
Library Home page or the root folder of the
QuickTest Professional DVD.
Relevant tasks
"How to Export Run Results" on page 758
See also
"Troubleshooting and Limitations - Viewing Run Results" on
page 806
789
Chapter 26 • Run Results Viewer
User interface elements are described below:
UI Elements
Description
Report type
The type of report you want to export, for example, Step
Details or System Monitor.
Export range
Relevant only for Step Details report type.
➤ All nodes. Exports the results for the entire
component.
➤ Selected node. Exports run result information for the
selected branch in the run results tree.
Export format
Relevant only for Step Details report type.
➤ Short. Exports a summary line (when available) for
each item in the run results tree. The short report does
not include still images associated with the steps in
your run results. This option is only available if you
selected All nodes in Export range.
➤ Detailed. Exports all available information for each
item in the run results tree, or for the selected branch,
according to your Export range selection. The detailed
report includes still images associated with the steps in
your run results. (In the Run Results Viewer, these
images are displayed in the Captured Data pane.) If a
bitmap checkpoint step displays expected, actual, and
difference bitmaps, these are also included in the
printed report.
➤ 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
exported report, and the way it should appear. For
more information, see "Run Results XML File" on
page 748.
Note: The Export format options are available only for
run results created with QuickTest 8.0 and later.
790
Chapter 26 • Run Results Viewer
Find Dialog Box (Log Tracking Pane - Run Results Viewer)
This dialog box enables you to search for a log message by message text,
level, and case (upper-case/lower-case characters).
To access
Open the Run Results Viewer, as described in "How to
Open Run Results" on page 752.
Display the Log Tracking pane, as described in "Log
Tracking Pane (Run Results Viewer)" on page 780.
In the Log Tracking pane title bar, click Find.
Important
information
This dialog box is relevant only for the Log Tracking
pane. To perform a search in the run results tree, use the
Search box described on page 769.
To stop a search, press the Esc key on your keyboard.
User interface elements are described below:
UI Elements
Description
Find
Enter the text to find. This can be message text or a
severity level.
Message
Searches the Message column for the text specified in the
Find box.
791
Chapter 26 • Run Results Viewer
UI Elements
Description
Level
Searches the Level column for the text specified in the
Find box. Possible level values:
➤ TRACE
➤ DEBUG
➤ INFO
➤ WARN
➤ ERROR
➤ FATAL
792
Match case
Displays only those occurrences that match the
capitalization (upper-case and lower-case characters) you
specified for the text in the Find box.
Next
Jumps to the next instance that matches the selected
criteria.
Previous
Jumps to the previous instance that matches the selected
criteria.
Chapter 26 • Run Results Viewer
Filter Dialog Box (Run Results Viewer)
This dialog box enables you to filter the results tree of the Run Results
Viewer to display only those nodes that match the conditions that you
specify.
To access
Open the Run Results Viewer, as described in "How to Open Run
Results" on page 752.
Select View > Filters or click the Filter button
Important
information
.
When you apply a filter, a filter icon is displayed on the status bar,
and (Filtered) is appended to the Search box title bar. These visual
changes indicate that the run results tree is currently displaying
only those nodes that match your filter criteria.
793
Chapter 26 • Run Results Viewer
User interface elements are described below:
UI Elements
Description
Filter what
A text box in which you enter the text by which you want to
filter. (Optional)
Status
The status of the node by which to filter. (Optional)
Possible values:
➤ Passed. Displays the run results for the steps that passed and
match your filter criteria.
➤ Failed. Displays the run results for the steps that failed and
match your filter criteria.
➤ Done. Displays the run results for the steps with the status
Done (steps that were performed successfully but did not
receive a pass, fail, or warning status) that match your filter
criteria.
➤ Warning. Displays the run results for the steps with the status
Warning (steps that did not pass, but did not cause the test to
fail) that match your filter criteria.
Node type
Displays all results that match your selection criteria based on:
(Optional)
➤ Iteration. Displays the run results in the run results tree for the
iterations specified in the Iterations area.
➤ Action. Not relevant for components.
➤ Step. Displays the run results for all steps in the run results
tree that match your other selection criteria.
➤ Reporter. Displays the run results for all Reporter steps in the
run results tree that match your other selection criteria.
Note: This is not relevant for Reporter.ReportNote steps,
which are displayed in the Notes area of the Executive
Summary page and not in the run results tree.
➤ Checkpoint/Output Value. Displays the run results for all
checkpoint and output value steps in the run results tree that
match your other selection criteria.
Iterations
794
(This option is available only for tests.)
Chapter 26 • Run Results Viewer
Open Run Results Dialog Box
This dialog box enables you to open run results in the Run Results Viewer.
To access
Open the Run Results Viewer, as described in "How to
Open Run Results" on page 752.
Select File > Open or click the Open button
Relevant tasks
.
"How to Open Run Results" on page 752
User interface elements are described below:
UI Elements
Description
Test name
The name of the test for which you want to view results.
The test can be located in the file system or in a
Quality Center project. If you select this option, you
must also specify the Run name.
Run name
The results for a particular run.
The results are listed in the order of execution, with the
most recent results at the top of the drop-down list.
Results XML file
The actual XML results file. The file must be located in
the file system.
795
Chapter 26 • Run Results Viewer
Print Dialog Box (Run Results Viewer)
This dialog box enables you to print run results from the Run Results Viewer.
You can select the type of report you want to print, and you can also create
and print a customized report.
To access
Open the Run Results Viewer, as described in "How to
Open Run Results" on page 752.
Use one of the following:
➤ Select File > Print.
➤ Click the Print button
796
.
Chapter 26 • Run Results Viewer
User interface elements are described below:
UI Elements
Description
Print range
➤ All. Prints the run results for the entire component.
➤ Selection. Prints the run results information for the
selected branch in the run results tree.
Print format
➤ Short. Prints a summary line (when available) for each
item in the run results tree. This option is only
available if you selected All in Print range.
➤ Detailed. Prints all available information for each item
in the run results tree, or for the selected branch,
according to your selection in Print range. The printed
report includes still images associated with the steps in
your run results. If a bitmap checkpoint step displays
expected, actual, and difference bitmaps, these are also
included.
➤ 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 "Run Results XML File" on page 748.
Note: The Print format options are available only for run
results created with QuickTest version 8.0 and later.
Print
Opens the standard Windows Print dialog box, enabling
you to send the selected run results any installed printer.
797
Chapter 26 • Run Results Viewer
Print Preview Dialog Box (Run Results Viewer)
This dialog box enables you to preview run results on screen before you
print them. You can select the type and quantity of information you want to
view, and you can also display the information in a customized format.
To access
Open the Run Results Viewer, as described in "How to
Open Run Results" on page 752.
Select File > Print Preview.
Important
information
798
The Print Preview option is available only for run results
created with QuickTest version 8.0 and later.
Chapter 26 • Run Results Viewer
User interface elements are described below:
UI Elements
Description
Print range
➤ All. Previews the run results for the entire component.
➤ Selection. Previews run results information for the
selected branch in the run results tree.
Print format
➤ Short. Previews a summary line (when available) for
each item in the run results tree. This option is only
available if you selected All in Print range.
➤ Detailed. Previews all available information for each
item in the run results tree, or for the selected branch,
according to your selection in Print range. The
preview includes still images associated with the steps
in your run results. If a bitmap checkpoint step
displays expected, actual, and difference bitmaps,
these are also included.
➤ 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
preview, and the way it should appear. For more
information, see "Run Results XML File" on page 748.
Preview
Displays the run results on screen as they will appear
when printed.
Tip: 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.
799
Chapter 26 • Run Results Viewer
HP ALM Connection Dialog Box (Run Results Viewer)
This dialog box enables you to connect or disconnect the Run Results
Viewer to or from a project in any supported version of HP ALM or
Quality Center.
After you perform step 1, the dialog box expands to include the remaining
connection fields.
800
Chapter 26 • Run Results Viewer
To access
Use one of the following:
➤ Select Tools > ALM/QC Connection.
➤ Click the ALM/QC Connection toolbar button
Important
information
.
➤ 1st time connection. The first time you connect your
computer to an HP ALM or Quality Center server, you must
connect as a user with administrator privileges.
➤ Connecting to different HP ALM or Quality Center servers.
You can simultaneously connect your Web browser to
multiple HP ALM clients and one Quality Center 9.2 or 10.00
client simultaneously. While these clients are open, you can
connect the Run Results Viewer to the Quality Center 9.2
or 10.00 client that is currently open on your computer.
However, if you want to connect the Run Results Viewer to an
HP ALM client, you must first close the Quality Center 9.2
or 10.00 client.
➤ Windows Vista, Windows 7, Windows Server 2008, and
Windows Server 2008 R2 Users. See "Guidelines for Windows
Vista, Windows 7, Server 2008, and Server 2008 R2 Users" on
page 804.
➤ Connect. The connection process has two stages. First, you
connect the Run Results Viewer to a local or remote HP ALM
or Quality Center server. This server handles the connections
between the Run Results Viewer and the HP ALM or
Quality Center project.
Next, you log in and choose the project you want QuickTest to
access. The project stores tests and run session information for
the application you are testing.
Projects are password protected, so you must provide a user
name and a password.
➤ Disconnect. You can disconnect the Run Results Viewer from
an HP ALM or Quality Center project or from an HP ALM or
Quality Center server at any time.
If you disconnect the Run Results Viewer from an HP ALM or
Quality Center server without first disconnecting from a
project, the Run Results Viewer connection to that project
database is automatically disconnected.
801
Chapter 26 • Run Results Viewer
Important
information
➤ Business Process Testing. The first time you connect QuickTest
to an HP ALM or Quality Center server and project, QuickTest
sets up default Business Process Testing folders and files in
your project. This enables you to prepare the resources and
settings needed for business components, as well as create,
work with, and debug business components using the
intuitive, keyword-driven Keyword View.
(continued)
Relevant
tasks
To view the current connection, look at the ALM/QC icon in the
status bar.
User interface elements are described below:
UI Elements (A-Z)
Description
Authenticate /
Change User
Authenticates your user information against the HP ALM or
Quality Center server.
Note: After your user information has been authenticated,
the edit boxes in the Authenticate user information area are
displayed in read-only format. The Authenticate button
changes to a Change User button.
Tip: You can log in to the same HP ALM or Quality Center
server using a different user name by clicking Change User,
and then entering a new user name and password and
clicking Authenticate again.
Authenticate on
Startup
Instructs the Run Results Viewer to automatically
authenticate your user information against the HP ALM or
Quality Center server every time you open the Run Results
Viewer.
Close
Closes the HP ALM Connection dialog box.
Note: The dialog box does not close automatically. You
must click this button to close the dialog box.
Connect /
Disconnect
802
Connects or disconnects the Run Results Viewer to or from
the selected HP ALM or Quality Center server. (After you
successfully connect to a server, the button changes to
Disconnect.)
Chapter 26 • Run Results Viewer
UI Elements (A-Z)
Description
Domain
The domain that contains the HP ALM or Quality Center
project.
Note: Only those domains to which you have permission
to connect are displayed.
Login / Logout
➤ Login. Logs into the selected domain and project using
the current user information. (After you successfully log
into a project, the button changes to Logout.)
➤ Logout. Logs out of the selected domain and project.
Note: You must click Close to close the dialog box after
logging into or out of a project.
Login to project on
startup
Instructs the Run Results Viewer to automatically log into
the selected project every time you open QuickTest.
Password
Your HP ALM or Quality Center password.
Note: To enter a password in any CJK (Chinese, Japanese,
Korean) language, copy/paste the password into the edit
box. (Windows does not support typed CJK characters in
password fields.)
Project
The HP ALM or Quality Center project with which you
want to work.
Note: Only those projects for which you are a defined user
are displayed.
Reconnect to
Server on startup
Instructs the Run Results Viewer to automatically reconnect
to the HP ALM or Quality Center server every time you
open the Run Results Viewer.
803
Chapter 26 • Run Results Viewer
UI Elements (A-Z)
Description
Server URL
The URL address of the Web server where HP ALM or
Quality Center is installed.
You can choose a server that is accessible via a Local Area
Network (LAN) or a Wide Area Network (WAN).
Note for Business Process Testing: When working with
business process testing, you must connect QuickTest to the
HP ALM or Quality Center server on which your project is
stored. This server handles the connections between
QuickTest and your HP ALM or Quality Center project.
Your project stores component and run session information
for the application you are testing, including all of the
resource files and settings needed to create and run
business process tests.
User name
Your HP ALM or Quality Center user name.
Guidelines for Windows Vista, Windows 7, Server 2008, and
Server 2008 R2 Users
The security settings in the following operating systems may prevent you
from connecting to an HP ALM or Quality Center project:
➤
Windows Vista
➤
Windows 7
➤
Windows Server 2008
➤
Windows Server 2008 R2
This can occur when the UAC (User Account Control) option is set to ON,
and you have never connected to an HP ALM or Quality Center project.
To connect to HP ALM or Quality Center for the first time, you must disable
the UAC option. After you successfully connect to HP ALM or
Quality Center, you can turn the UAC option on again. Thereafter, you
should be able to connect to HP ALM or Quality Center, as needed.
804
Chapter 26 • Run Results Viewer
To enable QuickTest to connect to an HP ALM or Quality Center project:
For Microsoft Windows Vista and Windows Server 2008:
1 Log in as an administrator.
2 From the Control Panel, select User Accounts > Change Security Settings,
and clear the Use User Account Control (UAC) to help protect your
computer check box.
3 Connect to HP ALM or Quality Center, as described above.
4 Select the Use User Account Control (UAC) to help protect your computer
check box and click OK to turn the UAC option on again.
For Microsoft Windows 7 and Windows Server 2008 R2:
1 Log in as an administrator.
2 From the Control Panel, select User Accounts > User Accounts > Change
User Account Settings.
3 In the User Account Control Settings window, move the slider to Never
notify.
4 Connect to HP ALM or Quality Center, as described above.
5 Return to the User Account Control Settings window, and restore the
slider to its previous position to turn the UAC option on again.
805
Chapter 26 • Run Results Viewer
Troubleshooting and Limitations - Viewing Run Results
This section describes troubleshooting and limitations for viewing run
results.
➤
Local system monitor. After you run a component with the local system
monitoring option activated when the component is either very short, or
the number of seconds entered for the Enable local system monitoring
every: __ seconds option is high (a high percentage relative to the length
of your entire test run), then when you select one of the last steps in the
Run Results tree, the Current Step indicator in the System Monitor pane
may jump to a position outside (to the right) of the graph.
Workaround: Add a Wait statement to the end of the test or reduce the
number of seconds entered in the Enable local system monitoring every:
__ seconds option.
806
➤
Run session errors. Errors during the run session produce more than one
error node in the run results.
➤
Exporting run results. When UAC is set to ON and you select to export
the Run Results to a system folder, the exported file is stored under Virtual
Storage rather than under the specified folder. (Relevant for Microsoft
Windows Vista, Windows 7, Windows Server 2008, and Windows
Server 2008 R2)
27
Run Results - Understanding Step Results
This chapter includes:
Concepts
➤
Smart Identification in the Run Results on page 808
➤
Checkpoint and Output Value Results on page 811
➤
Parameterized Values in the Run Results on page 815
807
Chapter 27 • Run Results - Understanding Step Results
Concepts
Smart Identification in the Run Results
If the learned description does not enable QuickTest to identify the specified
object in a step, and a Smart Identification definition is defined (and
enabled) for the object, then QuickTest tries to identify the object using the
Smart Identification mechanism. The following examples illustrate two
possible scenarios.
➤
"Smart Identification - No Object Matches the Learned Description" on
page 808
➤
"Smart Identification - Multiple Objects Match the Learned Description"
on page 810
Smart Identification - No Object Matches the Learned
Description
If QuickTest successfully uses Smart Identification to find an object after no
object matches the learned description, the Run Results display a warning
status and include the following information:
808
In the results tree
In the Result Details pane
A description mismatch icon for the
missing object. For example:
An indication that the object (for example,
the userName WebEdit object) was not
found.
A Smart Identification icon for the
missing object. For example:
An indication that the Smart Identification
mechanism successfully found the object,
and information on the properties used to
find the object. You can use this
information to modify the learned test
object description, so that QuickTest can
find the object using the description in
future run sessions.
Chapter 27 • Run Results - Understanding Step Results
In the results tree
In the Result Details pane
The actual step performed. For
example:
Normal result details for the performed
step.
For more information on the Smart Identification mechanism, see
Chapter 7, "Configuring Object Identification."
The image below shows the results for a component in which Smart
Identification was used to identify the userName WebEdit object after one of
the learned description property values changed. Similar results would be
displayed for a component.
809
Chapter 27 • Run Results - Understanding Step Results
Smart Identification - Multiple Objects Match the
Learned Description
If QuickTest successfully uses Smart Identification to find an object after
multiple objects are found that match the learned description, QuickTest
shows the Smart Identification information in the Run Results Viewer. The
step still receives a passed status, because in most cases, if Smart
Identification was not used, the test object description plus the ordinal
identifier could have potentially identified the object.
In such a situation, the Run Results show the following information:
In the results tree
In the Result Details pane
A Smart Identification icon for the
missing object. For example:
An indication that the Smart Identification
mechanism successfully found the object,
and information on the properties used to
find the object. You can use this
information to create a unique object
description for the object, so that
QuickTest can find the object using the
description in future run sessions.
The actual step performed. For
example:
Normal result details for the performed
step.
The image below shows the results for a component in which Smart
Identification was used to uniquely identify the Home object after the
learned description resulted in multiple matches. Similar results would be
displayed for a component.
If the Smart Identification mechanism cannot successfully identify the
object, the component fails and a normal failed step is displayed in the Run
Results.
810
Chapter 27 • Run Results - Understanding Step Results
Checkpoint and Output Value Results
The information displayed in the Run Results Viewer and the available
options are determined by the type of checkpoint or output value step you
select.
This section includes:
➤
"Bitmap Checkpoint Results" on page 811
➤
"Standard Checkpoint Results" on page 812
➤
"Output Value Results" on page 814
Bitmap Checkpoint Results
The Result Details pane displays the checkpoint step results, including its
status (Passed or Failed), the date and time the checkpoint was run and the
portion of the checkpoint timeout interval that was used (if any).
The Captured Data pane shows the expected and actual bitmaps that were
compared during the run session, and a View Difference button. When you
click the View Difference button, QuickTest opens the Bitmap Checkpoint
Results window, displaying an image that represents the difference between
the expected and actual bitmaps. This image is a black-and-white bitmap
that contains a black pixel for every pixel that is different in the two images.
Similar results would be displayed for a component.
Note: By default, the information in the Captured Data pane is available
only if the bitmap checkpoint fails. You can change the conditions for when
bitmaps are saved in the run results, using the Save still image captures to
results option in the Run > Screen Capture pane of the Options dialog box.
For more information, see "Screen Capture Pane (Options Dialog Box)" on
page 669.
811
Chapter 27 • Run Results - Understanding Step Results
Considerations for Reviewing Bitmap Checkpoint Results
➤
If the checkpoint is defined to compare only a specific area of the bitmap,
the run results display the actual and expected bitmaps with the selected
area highlighted.
➤
When the dimensions of the actual and expected bitmaps are different,
QuickTest fails the checkpoint without comparing the bitmaps. In this
case the View Difference functionality is not available in the results.
➤
The View Difference functionality is not available when viewing results
generated in a version of QuickTest earlier than 10.00.
➤
If the bitmap checkpoint is performed by a custom comparer:
➤
QuickTest passes the bitmaps to the custom comparer for comparison
even if their dimensions are different.
➤
The Result Details pane also displays the name of the custom comparer
(as it appears in the Comparer box in the Bitmap Checkpoint
Properties dialog box), and any additional information provided by
the custom comparer.
➤
The difference bitmap is provided by the custom comparer.
For more information on using custom comparers for bitmap checkpoints,
see "Fine-Tuning the Bitmap Comparison" on page 587.
For more information on bitmap checkpoints, see Chapter 19, "Bitmap
Checkpoints."
Standard Checkpoint Results
The Result Details pane displays detailed results of the selected checkpoint,
including its status (Passed or Failed), the date and time the checkpoint was
run, and the portion of the checkpoint timeout interval that was used (if
any). It also displays the values of the object properties that are checked,
and any differences between the expected and actual property values.
The Captured Data pane displays the image capture for the checkpoint step
(if available).
812
Chapter 27 • Run Results - Understanding Step Results
In the following example, the details of the failed checkpoint indicate that
the expected results and the current results do not match. The expected
value of the agent name is Agent2, but the actual value is Agent1.
For more information on standard checkpoints, see "Standard Checkpoints"
on page 573.
813
Chapter 27 • Run Results - Understanding Step Results
Output Value Results
The Result Details pane displays detailed results of the selected output value
step, including its status, and the date and time the output value step was
run. It also displays the details of the output value, including the value that
was captured during the run session, its type, and its name, as shown in the
following example. Similar results would be displayed for a component.
For details on output values, see Chapter 20, "Output Values."
814
Chapter 27 • Run Results - Understanding Step Results
Parameterized Values in the Run Results
A parameter is a variable that is assigned a value from within a component.
You can view the values for the parameters defined in your component in
the Run Results Viewer.
To view parameterized values, expand the nodes in the run results tree and
click the root node to view component input and output parameters.
Component parameters are displayed in the Parameters section of the
Executive Summary area of the Results Details pane, which you display by
clicking the root node of the run results tree. The example below shows
input test parameters. The Parameters section is identical for input
component parameters.
815
Chapter 27 • Run Results - Understanding Step Results
If output component parameters were defined, they would be displayed in
this pane beneath the input parameters.
For action parameters, the name and value of the input and output
parameters are displayed in the Result Details pane. Similar results would be
displayed for a component.
The example above shows input parameters that were defined at the action
level. If output parameters were defined at this level, they would also be
displayed in this pane.
For more information on defining and using parameters in your
components, see "How to Define Values for Your Step Arguments" on
page 541.
816
Part VII
Maintaining and Debugging Components
818
28
Debugging Components and Function
Libraries
This chapter includes:
Concepts
➤
Debugging Overview on page 820
➤
Considerations for Debugging on page 821
➤
Debug Session Speed on page 821
➤
Single Step Commands on page 822
➤
Running to a Step and Debugging from a Step on page 823
➤
Modifying and Watching the Values of Variables and Properties of
Objects During a Run Session on page 824
➤
Breakpoints on page 826
➤
Run Errors on page 827
Tasks
➤
How to Debug Your Component or Function Library on page 828
➤
How to Use Breakpoints on page 832
➤
How to Debug a Function - Exercise on page 833
➤
How to Step Into, Out of, or Over a Specific Step - Exercise on page 837
Reference
➤
Debug Viewer Pane on page 840
➤
Watch Tab (Debug Viewer Pane) on page 842
➤
Variables Tab (Debug Viewer Pane) on page 845
➤
Command Tab (Debug Viewer Pane) on page 847
➤
Run Error Message Box on page 849
Troubleshooting and Limitations - Debugging on page 850
819
Chapter 28 • Debugging Components and Function Libraries
Concepts
Debugging Overview
After you create a component or function library (including registered user
functions), you should check that they run smoothly, without errors in
syntax or logic. To debug a function library, you must first associate it with a
component via its application area and then debug it from that component.
By controlling and debugging your run sessions, you can identify and
handle problems in your components, function libraries, and registered user
functions.
QuickTest provides different options that you can use to detect and isolate
defects in a component or function library. For example:
820
➤
You can control the run session using the Pause command, breakpoints,
and various step commands that enable you to step into, over, and out of
a specific step.
➤
If QuickTest displays a run error message during a run session, you can
click the Debug button on the error message to suspend the run and
debug the component or function library.
➤
When a run session is paused (suspended), you can use the Debug Viewer
to check and modify the values of VBScript objects and variables and to
manually run VBScript commands.
➤
You can use the Debug from Step command to begin (and pause) your
debug session at a specific point in your component. You can also use the
Run to Step command to pause the run at a specific point in your
component. You can set breakpoints, and then enable and disable them
as you debug different parts of your component or function library.
➤
You can also use the Run from Step command to run your component
from a selected step. This enables you to check a specific section of your
application or to confirm that a certain part of your component or
function library runs smoothly. For more information, see "Run Sessions Overview" in the HP QuickTest Professional User Guide.
Chapter 28 • Debugging Components and Function Libraries
Considerations for Debugging
➤
While the component and function libraries are running in debug mode,
they are read-only. You can modify the content after you stop the debug
session (not when you pause it). If needed, you can enable the function
library for editing (File > Enable Editing) after you stop the session. For
more information, see "How to Manage Function Libraries" on page 440.
After you implement your changes, you can continue debugging your
component and function libraries.
➤
If you perform a file operation (for example, you open a different
component or create a new component), the debug session stops.
➤
In QuickTest, when you open a component, QuickTest creates a local
copy of the external resources that are saved to your Quality Center
project. Therefore, any changes you apply to any external resource that is
saved in your Quality Center project, such as a function library, will not
be recognized in the component until the component is closed and
reopened. (An external resource is any resource that can be saved
separately from the component, such as a function library, a shared object
repository, or a recovery scenario.)
Debug Session Speed
During a run session, QuickTest normally runs steps quickly. While you are
debugging a component or function library, you may want QuickTest to run
the steps more slowly so you can pause the run when needed or perform
another task.
For task details, see "Slow your debugging session" on page 829.
821
Chapter 28 • Debugging Components and Function Libraries
Single Step Commands
You can run a single step of a component or function library using the Step
Into, Step Out, and Step Over commands.
Tip: To display the Debug toolbar, select View > Toolbars > Debug.
Step Into
Step Into runs only the current step in the active component or function
library. If the current step calls a function, the called function is displayed in
the QuickTest window, and the function library pauses at the first line of the
called function.
Step Out
After using Step Into to enter a function in a function library, you can use
the Step Out command. Step Out continues the run to the end of the
function, returns to the calling component or function library, and then
pauses the run session at the next line (if one exists).
Step Over
Step Over runs only the current step in the active component or function
library.
If the current step calls a user-defined function, the called function is
executed in its entirety, but the called function script is not displayed in the
QuickTest window. The run session then returns to the calling component
or function library and pauses at the next line (if one exists).
For task details, see "Step into, out of, or over a specific step during a debug
session" on page 829.
822
Chapter 28 • Debugging Components and Function Libraries
Running to a Step and Debugging from a Step
You can use the Run to Step and Debug from Step commands to instruct
QuickTest to run a component (including any associated function library)
until it reaches a particular step, or to begin debugging from a specific step.
You can also use the Run from Step command to start or continue a run
from a particular step.
The Run to Step and Debug from Step commands are available in the
Debug menu, and when you right-click a step in your component.
The Run from Step command is available from the Automation menu, and
when you right-click a step in your component.
Run to Step
You can instruct QuickTest to run from the beginning of the component—or
from the current location in the component—and to stop at a particular
step. This is similar to adding a temporary breakpoint to a step. For example,
if you want to begin debugging your component from a particular step, you
may want to run your component to that step, as this opens your
application to the relevant location.
Debug from Step
You can instruct QuickTest to begin your debug session from a particular
step instead of beginning the run at the start of the component. Before you
start debugging from a specific step, make sure that the application is open
to the location where you want to start debugging. You can begin debugging
from a specific step in your component when editing a component.
For task details, see "Start or pause your debugging session at a specific point
in your component" on page 830.
Run from Step
You can instruct QuickTest to run your component from a particular step
instead of from the beginning of the component. Before you start running
from a specific step, make sure that the application is open to the location
where you want the run to begin.
823
Chapter 28 • Debugging Components and Function Libraries
The Run from Step option runs your component from the selected step until
the end of the component (or until it reaches a breakpoint).
Example:
After you debug a part of your component, you may want to skip over a set
of steps that you know work correctly, and then continue the debug session
from a later step. You can do this by inserting a breakpoint in the step where
you want to continue debugging, and then using the Run from Step option
to run the component from the step at which you stopped debugging until
it reaches the breakpoint.
Alternatively, you can use the Run from Step option to continue the run
session from a particular step to the end of the component instead of
stopping at a breakpoint.
Modifying and Watching the Values of Variables and
Properties of Objects During a Run Session
You can use the Watch tab and Variables tab to view the current value of
different VBScript expressions, variables, and object properties in a
suspended run session of your function library. A run session is suspended,
for example, if you use the Debug > Pause command, or when the function
library stops at breakpoint.
The Variables tab displays the current values and types of all variables in the
main script of the selected function in your function library, and enables
you to modify their values.
The Watch tab displays the current values and the types of VBScript
expressions that you add to the tab.
As you continue stepping through the subsequent steps in your function
library, QuickTest automatically updates the Watch tab and Variables tab
with the current value for any variable or expression whose value changes.
824
Chapter 28 • Debugging Components and Function Libraries
You can also change the value of a variable or property manually in these
tabs. For example, for objects that support the Object property, you can edit
the value of a run-time object property displayed in the Watch tab, thereby
changing the value of the property in the application you are testing before
you resume the run session.
You can add any of the following types of expressions to the Watch tab:
➤
The name of a test object
➤
The name of a variable
➤
The name of a property
➤
Any other type of VBScript expression
Caution: QuickTest runs the expressions in the Watch tab to evaluate them.
Therefore, do not add a test object method or any expression whose
evaluation could affect the state of the test object, as this can lead to
unexpected behavior of your function library.
For task details, see "Check and modify the values of variables and VBScript
expressions during a debug session" on page 830.
825
Chapter 28 • Debugging Components and Function Libraries
Breakpoints
You can use breakpoints to instruct QuickTest to pause a run session at a
predetermined place in a component or function library. QuickTest pauses
the run when it reaches the breakpoint, before executing the step. You can
then examine the effects of the run up to the breakpoint, make any
necessary changes, and continue running the component or function
library from the breakpoint. Breakpoints are applicable only to the current
QuickTest session and are not saved with your component or function
library.
You can use breakpoints to:
➤
Suspend a run session and inspect the state of your application
➤
Mark a point from which to begin stepping through a component or
function library using the step commands
By setting a breakpoint, you can pause a run session at a predetermined
place in a component or function library. A breakpoint is indicated by a
filled red circle icon in the left margin adjacent to the selected step.
You can instruct QuickTest to ignore an existing breakpoint during a debug
session by temporarily disabling the breakpoint. Then, when you run your
component or function library, QuickTest runs the step containing the
breakpoint, instead of stopping at it. When you enable the breakpoint
again, QuickTest pauses there during the next run. This is particularly useful
if your component or function library contains many steps, and you want to
debug a specific part of it.
You can enable or disable breakpoints individually or all at once. For
example, suppose you add breakpoints to various steps throughout your
component or function library, but for now, you want to debug only a
specific part of your testing document. You could disable all breakpoints in
your compo