You are on page 1of 312

QuickTest Professional for

mySAP.comTM Windows Client


Users Guide
Version 7.3

QuickTest Professional for mySAP.comTM Windows Client Users Guide, Version 7.3
This manual, and the accompanying software and other documentation, is protected by U.S. and
international copyright laws, and may be used only in accordance with the accompanying license
agreement. Features of the software, and of other products and services of Mercury Interactive
Corporation, may be covered by one or more of the following patents: U.S. Patent Nos. 5,701,139;
5,657,438; 5,511,185; 5,870,559; 5,958,008; 5,974,572; 6,138,157; 6,144,962; 6,205,122; 6,237,006;
6,341,310; and 6,360,332. Other patents are pending in the U.S. and other countries.
WinRunner, XRunner, and LoadRunner are registered trademarks of Mercury Interactive
Corporation.TestDirector, TestRunner, TestSuite, WebTest, WinRunner and XRunner are registered
trademarks in the United States and select foreign countries.
ActionTracker, ActiveScreen, ActiveTest, ActiveTune, ActiveTest SecureCheck, ActiveWatch, Astra
FastTrack, Astra LoadTest, Change Viewer, Conduct, ContentCheck, Dynamic Scanner, FastTrack,
LinkDoctor, LoadRunner TestCenter, Mercury Interactive, POPS on Demand, ProTune, QuickTest,
SiteReliance, TestCenter, Topaz, Topaz ActiveAgent, Topaz AIMS, Topaz Console, Topaz Delta, Topaz
Diagnostics, Topaz Observer, Topaz Open DataSource, Topaz Prism, Topaz Rent-a-POP, Topaz
Weathermap, Turboload, Twinlook, Visual Testing, Visual Web Display and WebTrace are trademarks
of Mercury Interactive in the United States and/or select foreign countries.
All other company, brand and product names are registered trademarks or trademarks of their
respective holders. Mercury Interactive Corporation disclaims any responsibility for specifying which
marks are owned by which companies or which organizations.
Mercury Interactive Corporation
1325 Borregas Avenue
Sunnyvale, CA 94089
Tel. (408)822-5200 (800) TEST-911
Fax. (408)822-5300
1994 - 2002 Mercury Interactive Corporation, All rights reserved

If you have any comments or suggestions regarding this document, please send them via e-mail to
documentation@mercury.co.il.
QTSAPWINUG7.3/01

Table of Contents
Welcome to QuickTest Professional for mySAP.comTM Windows Clientvii
Contents at a Glance ......................................................................... viii
Tools for Creating Testcases .................................................................ix
Online Resources ...................................................................................x
Typographical Conventions.................................................................xi
Chapter 1: Introduction ........................................................................1
About QuickTest-SAP.............................................................................1
Creating Testcases with QuickTest-SAP.................................................3
Terminology Used in this Guide ...........................................................4
Chapter 2: Planning ..............................................................................7
About Planning .....................................................................................7
Business Processes..................................................................................8
Testcases ................................................................................................8
Planning Testcases.................................................................................9
Chapter 3: Recording and Running Scripts ........................................15
About Recording and Running Scripts................................................15
Starting QuickTest Professional for mySAP.comTM Windows Client .16
Connecting and Logging On...............................................................18
Record Mode........................................................................................21
Execution Mode...................................................................................25
Design Mode........................................................................................35
Chapter 4: Verifying ............................................................................51
About Verifying ...................................................................................51
Manual Verification ...........................................................................52
Automated Verification .......................................................................54
Verification Using QuickTest-SAP .......................................................55
Verification Procedure.........................................................................61

iii

QuickTest Professional for mySAP.com Windows Client Users Guide

Chapter 5: Data Driving Your Script...................................................73


About Data Driving Your Script ..........................................................73
Parameters ...........................................................................................74
Procedure to Parameterize an Input Step............................................77
Using External Data Files ....................................................................83
Procedure to Parameterize an Output Step .........................................86
Correlating Data ..................................................................................87
Chapter 6: Modifying and Troubleshooting Scripts...........................91
About Modifying and Troubleshooting Scripts ..................................91
Modifying Testcases ............................................................................92
Troubleshooting Tools ........................................................................97
Troubleshooting Techniques ............................................................115
Chapter 7: Integration with Other Testing Tools.............................121
Integration with LoadRunner ...........................................................121
Integration with TestDirector ...........................................................140
Integration with WinRunner ............................................................149
Chapter 8: Advanced Topics .............................................................151
QuickTest-SAP File Structure .............................................................152
QuickTest-SAP Object Attributes and Classes ...................................153
Working with Object Attributes........................................................157
Functions Available from the Step Generator...................................164
Return Codes of Functions ...............................................................178
Customizing the Step Generator.......................................................179
Adding an SAP Connect Step ............................................................180
Adding Loop Steps.............................................................................181
Adding Branching Steps ....................................................................190
Implementing Drag and Drop (ActiveX) ..........................................197
Using Reference Text.........................................................................198

iv

QuickTest Professional for mySAP.com Windows Client Users Guide

Chapter 9: Feature Reference ...........................................................201


Command Line Options ...................................................................202
Common Formula Builder dialog box ..............................................203
Confirm Override dialog box ............................................................204
Connection to TestDirector dialog box ............................................205
Customize dialog box........................................................................206
Data Explorer dialog box...................................................................211
Data Spreadsheet (data.xls) ...............................................................213
Execution Log dialog box..................................................................219
Expert Mode ......................................................................................220
Fatal Error dialog box ........................................................................222
Find dialog box (in Execution Log and Report Viewer)....................222
Find & Replace dialog box.................................................................223
Import dialog box..............................................................................223
Invalid Argument dialog box ............................................................224
Main Menu ........................................................................................225
Not Connected dialog box ................................................................231
Object Description dialog box ..........................................................231
Object Description Text dialog box ..................................................232
Object Not Found dialog box............................................................233
Open and Open from TestDirector project dialog boxes..................234
Open Testcase Results dialog box .....................................................235
Options dialog box ............................................................................236
Page Setup dialog box........................................................................242
Print dialog box .................................................................................244
Print Setup dialog box .......................................................................244
Properties dialog box .........................................................................245
SAP Logon dialog box........................................................................270
Report Setup dialog box (in Report Viewer)......................................271
Report Viewer ....................................................................................271
Results Spreadsheet (results.xls) ........................................................273
Save and Save to TestDirector project dialog boxes..........................274
Save Execution Results dialog box ....................................................275
Save Testcase Results dialog box (Report Viewer) .............................276
Select Business Process dialog box ....................................................276
Select Objects dialog box...................................................................277
Settings dialog box ............................................................................278
Step Generator dialog box.................................................................282
Toolbars .............................................................................................283
View Manager and View Name dialog boxes....................................286
Index ..................................................................................................289

QuickTest Professional for mySAP.com Windows Client Users Guide

vi

Welcome to QuickTest Professional for


mySAP.comTM Windows Client
Welcome to Mercury Interactives QuickTest Professional for mySAP.comTM
Windows Client (QuickTest-SAP), a tool for creating testcases.
Testcases emulate the actions of human users by performing the same
business processes that real end-users perform.
You can integrate QuickTest-SAPs testcases into LoadRunner scenarios to
load test your distributed applications. By emulating the actions of real endusers, QuickTest-SAPs testcases enable you to measure and quantify the enduser experience and pinpoint performance problems in real time.
This guide describes how to use QuickTest-SAP to create QuickTest-SAP
testcases.

Note: In addition QuickTest-SAP is an automated GUI testing tools used to


create and execute sophisticated automated tests on SAP applications.

vii

QuickTest Professional for mySAP.com Windows Client Users Guide

Contents at a Glance
This guide provides step-by-step instructions to help you create and
troubleshoot QuickTest-SAP testcases. The guide contains the following
chapters:

Part I

Introduction
Provides a summary of how QuickTest-SAP works, an overview of the
testcase automation process, and key terms used in this guide.

Part II

Installing QuickTest Professional for mySAP.comTM Windows Client


Lists step-by-step procedures for installing QuickTest Professional for
mySAP.comTM Windows Client and the LoadRunner Add-In.

Part III

Planning
Describes the information you need to collect and organize so that you
can create testcases effectively.

Part IV

Recording and Running Scripts


Describes how to connect and logon to an SAP system using QuickTestSAP, how to create testcases, and the various run options.

Part V

Verifying
Describes how to verify business processes by capturing output and
comparing it to an expected result.

Part VI

Data Driving Your Script


Describes how to run testcases with multiple sets of data and how to
correlate data within one or more business processes.

Part VII Modifying and Troubleshooting Scripts


Describes how to enhance your testcases and how to diagnose and fix
problems when testcases dont perform to your expectations.

viii

Welcome to QuickTest Professional for mySAP.comTM Windows Client

Part VIII Integration with Other Testing Tools


Describes how QuickTest-SAP works with other Mercury Interactive
testing products: LoadRunner, TestDirector, and WinRunner.

Part IX

Advanced Topics
Explains how to add looping and branching to your testcases and how to
work with object attributes to customize a script.

Part X

Feature Reference
An alphabetical listing of all dialog boxes, menus, and toolbars in the
software with instructions for their use or a reference to another page
containing such instructions.

Tools for Creating Testcases


Mercury Interactive offers a suite of tools for creating testcases. The tool you
use depends on the protocol of the application you want to test:
Protocol

Tool

Guide

Database

Virtual User Generator

Creating Testcases

TUXEDO

Virtual User Generator

Creating Testcases

Web

Virtual User Generator

Creating Testcases

Windows Sockets

Virtual User Generator

Creating Testcases

APPC

Virtual User Generator

Creating Testcases

RTE (Windows)

Virtual User Generator

Creating Testcases

Java

Virtual User Generator

Creating Testcases

Baan

Virtual User Generator

Creating Testcases

Oracle NCA

Virtual User Generator

Creating Testcases

Jolt

Virtual User Generator

Creating Testcases

ix

QuickTest Professional for mySAP.com Windows Client Users Guide

Protocol

Tool

Guide

QA/SAP

QuickTest-SAP

QuickTest Professional for


mySAP.comTM Windows
Client

Customized
system or other
protocol

WinRunner

WinRunner Users Guide

Online Resources
QuickTest-SAP includes the following online resources:
Readme.wri provides last-minute news and information about QuickTestSAP.
Users Guide displays the QuickTest Professional for mySAP.comTM Windows
Client Users Guide. You can read and print the users guide using Adobe
Acrobat Reader 5.0, which can be downloaded from the Adobe Web site
(http://www.adobe.com/products/acrobat/readstep2.html). You can view this
book by clicking the Help button in any dialog box or by selecting Help >
Users Guide.
Mercury Interactive Customer Support Site
(http://support.mercuryinteractive.com) provides support hours, contact
information, and other important information about customer support. Use
the site to submit support service requests on-line, and to access knowledge
base articles, user discussion forums, patches, on-line documentation and
the latest product information.
Mercury Interactive Web Site (http://www.mercuryinteractive.com) provides
information on new products, events, educational services, a list of local
distributors, and more.

Welcome to QuickTest Professional for mySAP.comTM Windows Client

Typographical Conventions
This book uses the following typographical conventions:
1, 2, 3

Bold numbers indicate steps in a procedure.

Bullets indicate options and features.

>

The greater than sign separates menu levels (for


example, File > Open).

Stone Sans

The Stone Sans font indicates names of interface


elements in a procedure (for example, Click the Run
button.).

Bold

Bold text indicates function names and the elements


of the functions that are to be typed in literally.

Italics

Italic text indicates names (for example, names of


variables or books).

Helvetica

The Helvetica font is used for examples and strings that


are to be typed in literally.

[ ]

Square brackets enclose optional parameters.

{}

Curly brackets indicate that one of the enclosed values


must be assigned to the current parameter.

...

In a line of syntax, three dots indicate that more items


of the same format may be included. In a program
example, three dots are used to indicate lines of a
program that were intentionally omitted.

A vertical bar indicates that either of the two options


separated by the bar should be selected.

xi

QuickTest Professional for mySAP.com Windows Client Users Guide

xii

1
Introduction
Testcases created with QuickTest-SAP enable you to test the functionality
and performance of your distributed applications by emulating real endusers performing typical business processes, or transactions. You create
adaptable and reusable recordings that test the functionality of your
application and allow you to emulate the end-user experience.
This chapter describes:
About QuickTest-SAP
Creating Testcases with QuickTest-SAP
Terminology Used in this Guide

About QuickTest-SAP
What is QuickTest-SAP?
QuickTest-SAP is a software testing tool optimized for SAP systems.
QuickTest-SAP launches the SAP GUI for Windows (client) and records the
user interaction with that client. QuickTest-SAP also lets you play back your
recordings with many sets of data to verify the business logic of your system
configuration.

QuickTest Professional for mySAP.com Windows Client Users Guide

How QuickTest-SAP Works


QuickTest-SAP facilitates easy testcase creation by recording how you work
on your application. It uses context sensitive recording to create virtual user
scripts. This type of recording is based on the identification of the screen
objects you select (such as windows, lists, and buttons), while ignoring the
physical location of the objects on the screen. Every time you perform an
action in the application, a C programming language statement is generated
in the script that describes the object selected and the action performed.
To run a testcase, you simply play it back. QuickTest-SAP emulates a user by
selecting objects and entering keyboard input in your application.
QuickTest-SAP reads the object descriptions in the recorded script then
searches in the application for objects which match those descriptions. It
can locate the objects within a window even if their placement has changed.
Input data and verification conditions are stored in Excel-compatible
spreadsheets, and QuickTest-SAP uses that information at the appropriate
time. In addition, QuickTest-SAP records the results of each action played
back in a separate file called the Execution Log.
You can enhance your testcases with manual programming. QuickTest-SAP
includes a Step Generator tool which helps you to quickly and easily insert
additional functions into your recorded scripts.

Introduction

Creating Testcases with QuickTest-SAP


Creating testcases with QuickTest-SAP involves 4 main stages:
1 Planning
Decide which business processes to test, then learn which user actions and
data are needed to complete the business process successfully.
2 Recording a business process
Begin creating a testcase by recording a business process. Record the user
actions of the business process with one set of data. Then play back the
script to verify correct execution.
3 Adding verification steps
Add additional steps to verify that the business process succeeded. Then
play back the script to verify correct execution.
4 Running with multiple sets of data
It is recommended that you create data-driven testcases. A data-driven
testcase uses data stored in an external data table instead of data that is
hard-coded into the script. This enables you to use several sets of data with a
single script.
After you have finished with one business process, automate the next
business process. Repeat Steps 1 through 4 for each business process that
you intend to automate.
Run the script after each stage to make sure that it runs smoothly and
without error. You can set breakpoints and control script execution in order
to identify and isolate defects. When your testcases run correctly, you can
run them from LoadRunner as Virtual Users to load test your system.

QuickTest Professional for mySAP.com Windows Client Users Guide

Terminology Used in this Guide


Throughout this guide, the terminology used is in the context of creating
automated testcases.
attribute - A defining characteristic of an object, such as name, label,
location, and value. Sometimes referred to as a property.
application under test (AUT) - The program being recorded.
business process - A series of user actions and data entry that accomplish a
business task, such as creating a sales order or creating an invoice.
correlation - Using data output from one business process as input to
another business process.
data dependency - The condition of data that is valid only in conjunction
with certain other data. For example, in the Create Order business process,
some customers and materials are defined for certain sales organizations and
not for others.
data workbook - A container for multiple spreadsheets.
expected result - The expected response or output from the server after
entering a command. Usually contrasted with the actual result during the
verification process. Sometimes referred to as the expected condition.
formula - A spreadsheet instruction to calculate data in a certain way.
SAP Frontend- The SAP GUI for Windows client software, sometimes
referred to as the native front.
function - A pre-built module in the C programming language used for a
specific purpose.
functional testing - Testing to ensure that all features and functions of the
software work the way they are supposed to.
iteration - Repetition. In QuickTest you can iterate a recorded testcase, and
you can also iterate one or more steps within a testcase.
load testing - Testing to ensure that a system works as expected with many
users performing actions simultaneously. Sometimes called stress testing.

Introduction

object - A distinct feature of the graphical user interface (GUI) of a program,


such as a window, button, or menu. Objects are defined by their attributes or
properties. Sometimes referred to as a GUI object.
OK code - A keyboard shortcut, such as VA01, used in SAP to avoid going
through menus. OK codes are entered in the command field of an SAP
screen. Sometimes referred to as a transaction code.
parameter - A container for dynamic data, i.e., data that is either entered by
the user or returned by the server. A parameter is the opposite of a constant
or a static value, both of which refer to unchanging or hard-coded data.
playback - In this manual the terms run, execute, replay and playback are
used interchangeably. They all refer to playing back a recorded testcase.
received screen/sent screen - The received screen is the screen displayed as
a result of the servers response to a command. The sent screen is the screen
submitted to the server by a user action such as pressing Enter.
regression testing - Testing a new software build to ensure that all features
and functions work the same as they did in the previous build.
step - One action as part of a business process, for example, entering data,
pressing the Enter key, or selecting from a menu.
table - A collection of input (data entry) fields that are treated as one object
by the SAP GUI for Windows. Tables permit multiple rows of data to be
entered for one field.
testcase - A recording of user actions on the SAP GUI for Windows.
Sometimes referred to as a recording, recorded test, test, test script, virtual
user, or virtual user script. Testcases emulate real users performing a business
process, or transaction, within distributed applications.
unique data - Data that is valid only the first time it is entered. For example,
SAP can be configured to allow you to create only one delivery document
per order. Under that configuration, the order number must be unique
when used for input to the Create Delivery business process.
verification - A point during script playback that validates the business
process by comparing some system output (server response) to an expected
result.

QuickTest Professional for mySAP.com Windows Client Users Guide

view - A user-defined container for recorded business processes, usually for a


subset of the business processes in a testcase. There is one built-in view for
every testcase called All Business Processes.
virtual user - A C program that, when run, emulates a real user. Sometimes
referred to as a Vuser.
virtual user script - A recording of user actions on the SAP Frontend.
Sometimes referred to as a recording, recorded test, test, testcase, test script,
or virtual user. Virtual User Scripts emulate real users performing a business
process, or transaction, within distributed applications.

2
Planning
The purpose of this chapter is to help you get everything you need to be
successful creating testcases with QuickTest-SAP. Testcases are used to
automate business processes for testing.
This chapter describes:
Understanding what a business process is
Understanding what a testcase is
Who can help with planning
The planning process to automate business processes

About Planning
The SAP system is such a large, complex system that a person concerned
with implementing QuickTest-SAP testcases could not expect to learn
everything about the system in a reasonable time. Consequently, that
person must enlist the help of R/3 experts to help get the job done. Besides
getting help, the implementer must also plan well in order to generate
scripts efficiently.
Taking the time to plan your approach to creating and enhancing your
recorded scripts improves the payoff in the end. Better business process
coverage, broader data sampling, and more accurate and useful performance
measurements are only a few of the many benefits of planning.

QuickTest Professional for mySAP.com Windows Client Users Guide

Business Processes
A business process is a series of user actions and data entry that accomplish a
business task.
The following are examples of a business process:
Create a sales order
Update a customers address
Schedule maintenance for a piece of equipment
Most business processes are not performed in isolation but are connected to
several other business processes. Business processes in the SAP environment
often pass data to each other.

Testcases
A testcase is a container for recorded business processes. It is also a recording
of user actions on the SAP GUI for Windows client software. A testcase is
sometimes referred to as a test, test script, virtual user, or virtual user script. A
testcase comprises one or more recorded business processes that you want to
test. Testcases emulate real users performing business processes, or
transactions, within your distributed applications.
Only one testcase can be run at a time.
When running a complete testcase QuickTest runs all the business processes
in the order that they appear in the script.
A testcase can be run with multiple sets of data.
A business process can be used in multiple scripts even though it was
recorded only once. You can do this by importing the business process to
each testcase you want it run it from. See Import on page 44 for more
information. If you want to run only a subset of the business processes in a
testcase, you can create a view and select the business processes to be
included in that view. See Views on page 41 for more information.

Planning

Planning Testcases
Planning is the step where the implementer gathers everything required for
automating the business processes and preparing them for testing. The
purpose is to find out what will be needed, where to get it, and then to get
it. Ideally, this should happen before trying to automate any business
processes. Use the following guidelines when developing your automation
plan.
To plan an SAP testcase:
1 Decide which business scenarios and processes to automate. Also find out
which business processes are linked sequentially.
2 Learn how an expert user would manually complete a business process
what steps to follow, how to navigate through the screens, and the expected
result of each step.
3 Learn what data to use and avoid:
Avoid match codes unless match code result lists are being tested. They
make scripts less readable, less maintainable, and harder to data drive.
Identify fields requiring unique data.
Identify data dependent fields and data correlations.
Identify possible exceptions, such as system messages and optional
screens, and which data causes them to occur.
4 Learn how business processes are verified. Depending on the situation,
messages, screens, or field values may be used for verification.
5 Learn the dependencies across business processes within a testcase: which
business processes depend on output from another business process.
Document everything!

QuickTest Professional for mySAP.com Windows Client Users Guide

1 - Decide which business scenarios and processes to automate


Scenario

Business Process
Create a Purchase Requisition
Process a Purchase Requisition With Source Determination by
Price Simulation
Create a Purchase Order (from the Purchase Requisition
Processing)

Standard
Purchase Order
Including
Shipping
Notification

Create a Shipping Notification


Enter a Goods Receipt for the Purchase Order
Display Material Documents
Enter and Check Invoices
Display Accounting Documents
Display the Purchase Order History
Display the Purchase Order Printout on the Screen

Sales Order
Processing and
Subsequent
Functions

Create a Sales Order


Create an Individual Delivery
Create a Billing Document
Display the Document Flow

10

Planning

2 - Learn how expert users manually complete a business


process
Step

Screen

Description

Data

SAP System

Type OK code; press


Enter

OK code = VA01

Create Sales
Order: Initial
Screen

Enter data; press Enter

Order type = OR
Sales org. = 3000
Distrib. channel = 10
Division = 00

Create Standard
Order:
Overview

Enter data; press Enter

Sold-to party = 1000


Purch. order no. = BU200
PO date = current date
Req. dely. date = current
date + 3 working days
Material = P-109
Order quantity = 1

Check item check box;


press Schedule lines
button

Create Standard
Order: Item
Data

Press Back toolbar button

Create Standard
Order:
Overview

Check item check box;


click Shipping tab

Press Save button

11

QuickTest Professional for mySAP.com Windows Client Users Guide

3 - Learn what data to use and to avoid

Create Sales Order: Initial Screen

Iteration

Order type

Sales
organization

Distribution
channel

Division

OR

3000

10

00

OR

3000

12

00

OR

3000

10

00

OR

1020

22

00

Create Standard Order: Overview screen

12

Iteration

Soldto
party

PO
number

PO date

3000

C-BU200000

Current
date

3850

C-SD058300

3210

1100

Req.
deliv.
date

Material

Order
quantity

Current
date + 3
working
days

M-10

Current
date

Current
date + 3
working
days

R-1141

C-FE0123000

Current
date

Current
date + 3
working
days

M-11

M-MU1200048

Current
date

Current
date + 3
working
days

T-350

Planning

When to avoid data


It pays to document the data that works before trying to create testcases.
Unless you want to deal with lots of errors, you should avoid certain data
values and data combinations.
Dependent values on one screen: On the Initial Screen, some values for
Distribution channel work only with a given Sales org. For example,
Distribution channel 10 works for Sales org. 3000, but 11 and 12 might
not.
Dependent values on two screens: Some values for Sold-to party (Single
Line Entry screen) work only with a given Sales org. (Initial Screen). For
example, Sold-to party 1000 works for Sales org. 3000, but Sold-to party
1291 might not.
Optional screen: Some data requires the use of additional information
that must be entered on additional screens. For example, using Sold-to
party 3000 causes the Partners screen to appear, and using Sold-to party
3210 causes the Choose an unloading point screen to appear. Using other
values for Sold-to party do not cause these screens to appear. The Sold-to
party and Choose an unloading point screens are optional in the sense
that they are not required to complete the business process for all values
of Sold-to party.

4 - Learn how business processes are verified


Step

VA01 Verification Points

Verify that the Confirmed quantity is the same as the Order quantity
on the Create Standard Order: Item Data screen.

Verify that the status bar displays: Standard Order [any number] has
been saved on the Create Standard Order: Overview screen.

Steps in the table above refer to the steps in the table under 2 - Learn how
expert users manually complete a business process on page 11.

13

QuickTest Professional for mySAP.com Windows Client Users Guide

5 - Learn the dependencies across business processes


Business Process

Input

Output

Create Sales Order - VA01

User enters data

1) Order number
2) Material Avail Date
3) Delivery Date

Create Delivery - VL01

1) Order number
2) Material Avail Date or
Delivery Date

Delivery number

Create Invoice - VF01

Delivery number

Document number

In the example scenario above, output from one business process is used as
input to another. When this situation occurs, the implementer must save
the output and reuse it later at the appropriate time. See Correlating Data
on page 87 for more information.

Summary
The planning process steps are the means to determine how to automate
each business process and testcase.

14

3
Recording and Running Scripts
This chapter explains how to record and run a testcase and introduces some
of the ways to enhance and troubleshoot a script.
This chapter describes:
QuickTest command line options
Connecting and Logging On
Recording and playback options
The types of steps in a testcase

About Recording and Running Scripts


This chapter assumes that you have done some planning before beginning
to record. Recording is easier and faster if you already know what you intend
to record. You should have the following in mind (if not on paper) when
you start to record:
the business processes to automate and what user actions to record
what data to input and to avoid
the expected result of each business process (e.g., order created), which
will verify that the process was successful

15

QuickTest Professional for mySAP.com Windows Client Users Guide

Starting QuickTest Professional for mySAP.comTM Windows


Client
You can start QuickTest Professional for mySAP.comTM Windows Client
using command line options. To access these options, add /help to the
command line of Qtbp.exe, then start the program. A dialog box opens
displaying a list of available command line options.

<testcase file name> - Specifies the testcase to load.


-td_ - Use these options to connect to and to place test results directly into a
TestDirector database. For more information on TestDirector see Chapter 7,
Integration with Other Testing Tools.
-active_view - Specifies the view to use in the named testcase. For more
information see Views on page 41.

16

Recording and Running Scripts

-execution_mode - Specifies behavior to follow in the event of a run error.


Equivalent to choosing a Next Error Handling option from the Execution
tab of the Settings dialog box.
-results_dir - Specifies the location to place the Execution Log. Also puts a
copy of results.xls in that location.
-data_file - Specifies the data file (.xls) to use with the testcase. This data file
overrides the test cases data file. You should make sure that this file contains
all required data sheets and parameters.
-aut_info - Specifies the logon information for a particular SAP server.
-run - Runs the named testcase as soon as QuickTest is invoked.
-batch - Causes QuickTest to shut down after the script run is completed
when used with the -run option.
-minimize - Invokes QuickTest minimized.

Combining Command Line Options


Options may be combined on the same command line. For example, the
following is a valid command line string:
"C:\QT SAP\Qtbp.exe" C:\project1\testcases\SalesOrder\SalesOrder.bpw
-active_view va01-only -run -execution_mode on_error_skip_iteration
-results_dir c:\temp2
This example specifies the testcase and view, and tells QuickTest to run it as
soon as QuickTest starts. In addition, it specifies the run mode to use and a
results directory.
The quote marks enclosing the path and program name are necessary only
when the path contains spaces. In the example above, the quotes are
required. If, however, the path were C:\QTSAP\Qtbp.exe, then the quotes
would not be required.

17

QuickTest Professional for mySAP.com Windows Client Users Guide

Connecting and Logging On


Configuring the SAP Logon
The SAP Logon dialog box lets you store logon information for multiple SAP
syetems. The dialog is accessible from in the following ways:
Select Tools > Start SAP Frontend- Allows user to logon to a selected SAP
system; not accessible when the Front is running
Select Tools > SAP Logon settings - Does not allow logon; is accessible when
the Front is running
Before you begin recording and running testcases, configure QuickTest-SAP
to log on to an SAP system. You can designate a specific application server or
a group/message server. Enter the required logon information, then test it to
make sure that the information you entered actually logs you on.
Logon information is saved with each testcase. If you record scripts using
more than one SAP sytem, QuickTest will playback each script on the correct
server.

18

Recording and Running Scripts

To connect to an SAP system:


1 Select Tools > Start SAP Frontend from the QuickTest main menu. The SAP
Logon dialog box opens.

2 Enter the correct logon information for your server.


3 Check the Auto Logon and Remember password check boxes if you want
this procedure to be automated for this testcase in the future.
Auto Logon - Checking this box causes QuickTest to use the stored logon
information for the selected server automatically so that you dont have
to enter it manually. Check Auto Logon when your script has no SAP
logon step in it.
Remember password - Checking this box allows you to control whether
the password is included in the Auto Logon information or not.

19

QuickTest Professional for mySAP.com Windows Client Users Guide

4 Check Support ActiveX if you want to record ActiveX controls.


5 Click the Logon button to log you on and to verify that the information in
the dialog box is correct.
The SAP Logon dialog box is also accessible by selecting Tools > SAP
Settings. You can access it this way when the SAP frontend is already
running, although then the Logon button will be disabled.

Auto Connect
QuickTests behavior during script playback is influenced by the Auto
Connect setting in the Settings dialog box. The Settings dialog box is
accessed from the main menu by selecting Testcase > Settings. Auto
Connect can be useful if the server you want to connect to is to be
determined within the testcase at run time. If an SAP connect step is part of
the script, then dont check Auto Connect.
If Auto Connect is checked, a connection to an SAP system is required
before playback can begin.
If a connection has already been established, playback begins
immediately.
If there is no connection:
- QuickTest uses the profile of the last successful connection if there is
one.
- If there is no such profile, QuickTest displays the SAP Logon dialog
box.
- If the user cancels the SAP Logon dialog, playback will not start.
If Auto Connect is not checked, then a connection is not required and replay
starts immediately. QuickTest ignores any connection information saved
with the script and does not try to connect.
See Adding an SAP Connect Step" on page 180 for information about how
to control the logon from within the testcase.

20

Recording and Running Scripts

Not Connected dialog box


The Not Connected dialog box appears when you try to playback a testcase
and the following conditions all apply:
Auto Connect is unchecked
QuickTest is not connected to an SAP system
There is no SAP Connect step in the script
The Not Connected dialog box controls are exactly the same as those of the
Object Not Found dialog box. See Object Not Found Dialog Box" on page
34 for more information about the dialog box controls.

Record Mode
Recording a Business Process
Recording and playing back a business process usually is a straightforward
process.
To record a new business process:
1 Start a new business process in QuickTest.
2 Record user actions on the SAP system.
3 Play back the recorded business process to prove correct script execution.
4 Fix the script if execution fails.
1 - Start a new business process
If you are working with a new testcase, a new business process is added to
the current script automatically when you start recording. QuickTest adds a
step called New Business Process to the Tree window. You can rename this
step to something more descriptive after you stop recording.
To add a new business process to an existing testcase, click the New Business
Process toolbar button, or select Insert > New Business Process from
QuickTests main menu. You can rename the new business process before
starting to record.

21

QuickTest Professional for mySAP.com Windows Client Users Guide

2 - Record user actions


Click the Record toolbar button, or select Insert > Record to start recording.
When you start a new recording, QuickTest launches the SAP Frontend, or, if
you chose not to use Auto Logon, QuickTest displays the SAP Logon dialog
box.
After you are connected to an SAP system, QuickTest automatically adds a
Reset AUT step to set the initial conditions for the run. This is done to
automate the best practice of ensuring that each recorded business process
begins and ends at the initial SAP system screen. In addition, QuickTest
displays the red <New Recording> icon at the point in the tree where the
next step will be inserted. The main window then looks like the following
graphic:
Record

Stop record

Tree
window

New steps appear in the tree as you perform user actions and move from
screen to screen in the SAP Frontend during recording. Data entry to input
fields appear after you move to another step (e.g., by pressing the Enter key,
the Save button, or by taking some other action). The actual recording
process may be broken down into the following steps.
Start Recording
Click the Record button in the QuickTest toolbar, or select Insert > Record
from the main menu.

22

Recording and Running Scripts

Note: If this is a new testcase, the SAP Logon dialog box will appear. You
must select your server, client, user, password and language, then click the
Logon button to log on. If you also check the Auto Logon and Remember
password check boxes, the Logon screen will not pop up when you run this
script again. See Configuring the SAP Logon" on page 18 for more
information about logging on.

Perform the actions and input all the data into all the screens in the system
that you want to record.
Stop recording - Click the Stop Record button in the QuickTest toolbar.
3 - Run to prove correct script execution
The purpose of running the script is to be sure that you can playback
successfully the recording you just made and resolve any issues that may
occur during the run.
To start running a script that you recorded, click the Run button or choose
one of the other run options.
4 - Fix script if execution fails
There might be occasions when a script run stops unexpectedly before
finishing. These unexpected stops are almost always data-related. Some of
the more common reasons for stoppage include:
a screen appears that was not recorded
a recorded screen fails to appear
a system error message appears
data already used cannot be used again
an object changes appearance or value
See Object Not Found Dialog Box" on page 34 and Troubleshooting Tools"
on page 97 for more information on error handling.

23

QuickTest Professional for mySAP.com Windows Client Users Guide

Recording Best Practices


Know the data and screen flow before recording.
Minimize the use of match codes when recording. They add extra steps to
your recordings with no benefits unless you happen to be testing match
codes list responses.
Use OK codes rather than menus unless they are part of the recording
specifications, because OK codes are faster than menus.

Auto Record Tables


Repeating input fields can be represented as tables in QuickTest just as they
are in the SAP Frontend. Auto record tables allows you to record SAP tables
(and loop objects) as a single object while retaining the ability to enter
multiple rows of data into each field of the table during recording and also
during playback. When Auto record tables is disabled, each field of a table
(or loop) is recorded as a separate input object.
To enable Auto record tables:
1 Select Tools > Options from QuickTests main menu. The Options dialog box
opens.
2 Click the Recording tab.
3 Check the Auto record tables check box and click the OK button.
See Changing Fields to Tables After Recording" on page 95 and
Parameterizing Tables" on page 80 for more information about tables.

24

Recording and Running Scripts

Execution Mode
A testcase will not run until it has been saved. If you want QuickTest to save
the script automatically whenever you choose one of the run commands,
you should select Tools > Options to open the Options dialog box. Then
check Auto Save testcase. If this option is not checked, you will see a
reminder message each time you try to run a script containing unsaved
changes.
If the testcase you want to save does not yet exist, saving it creates a
directory with the same name as the file and saves the file in that directory.
For example, you are saving the testcase Test1 to the local file system for the
first time. You navigate to the directory C:\Project and click the Save
button. The testcase is saved as C:\Project\Test1\Test1.bpw.
Business processes are run in the order that they appear in the Tree window.
If you start the run from the top of the tree, the business processes run
consecutively from the top to the bottom. If you start the run from, say, the
second business process in the tree, then QuickTest will run all business
processes from the second one to the bottom of the tree.
In addition to the options to run all or part of a testcase and to start the run
with the first business process or with a business process in the middle of the
script, there are other options as well. For example, you can run all the steps
in a script without stopping or you can run one or several steps at a time.
One reason for so many run options is to facilitate troubleshooting.

What QuickTest-SAP Does During Playback


SAP Frontend - If Auto Logon is checked or if your script includes an SAP
Logon step, QuickTest launches the same SAP Frontend where you
performed user actions during recording. Various SAP screens appear as
QuickTest sends your recorded actions to the SAP system.
Tree window - QuickTest highlights each step in the Tree window as the
step executes.

25

QuickTest Professional for mySAP.com Windows Client Users Guide

Execution Log - QuickTest writes one or more lines for each step in the file
ExecutionLog.bpl as it executes. Besides the name and the outcome of each
step, the log may include such things as the iteration number, data
substitution, screen resizing, and verification results. You can see this
information in real time if you make the Execution Log visible during
execution. Check Auto Show Execution Log under Execution Startup in the
Execution tab of the Options dialog box.

Run Options
Menu and Toolbar
Run options are accessed from the Execution menu or the Execution toolbar.
The run options are:
Run - Runs the entire testcase starting from the top. Use Run when you
want to run all the business processes consecutively from first to last in a
script.
Run from Cursor - If the cursor is on a business process step, Run from
Cursor runs the testcase starting from the cursor position and stops at the
end of the script. It does not wrap, so any business processes in the script
preceding the starting business process do not get executed.
Run to Cursor - Runs from the top of the testcase (or from the step where
execution was paused) to the cursor. This has the same effect as inserting a
breakpoint at the cursor position (see below for more about breakpoints).
Use this option when you want to stop the run at some point before the last
step in the script.
Step Into - Executes only the currently highlighted step, then moves to the
next available step and stops. This option is used primarily for
troubleshooting. This option allows you to run all or part of a script one step
at a time, giving you time to examine the result of a step before executing
the next step. For example, you might want to look at the values in various
output fields on the screen to see why a particular status bar message
appeared.

26

Recording and Running Scripts

Step Over - Executes the currently highlighted tree branch, then moves to
the next available step and stops. Steps executed include the current step
and any child or subordinate steps below it in the tree. This option is used
primarily for troubleshooting. For example, a screen step might have several
other steps indented beneath it in the tree: data entry to some input fields
followed by a button press. Step Over would run all the steps that perform
action on that screen and then stop.
Pause Run - Stops the run temporarily. Resume by selecting Run or Run to
Cursor. Use Pause Run when you want to take extra time before continuing.
For example, you might want to look through the Execution Log before
going to the next step.
Stop Run - Permanently interrupts the run before the next step is executed.

Insert/Remove Breakpoint - A breakpoint stops a run at a particular step.


This option lets you control in advance the step where the run will stop.
This option is used primarily for troubleshooting. For example, you might
want to run a troublesome series of steps one at a time using the Step Into
option. If those steps require the application to be in a certain state, (i.e., the
previous steps must be run to get to the steps you are interested in) rather
than perform the preceding steps manually, you could insert a breakpoint
where you want automatic execution to stop, then run the testcase from the
top. The script runs to the breakpoint and stops, allowing you to run the
following steps one at a time.

Note: Breakpoints on a comment step (or any other non-executable step)


have no effect.

27

QuickTest Professional for mySAP.com Windows Client Users Guide

Playback on a Different Server


To replay a testcase on a server other than the one where it was recorded:
1 Select Tools > Start SAP Frontend from the QuickTest main menu. The SAP
Logon dialog box opens.
2 Click Edit. The Properties dialog box opens.

3 Replace the contents of the Application Server box with the string for the
server you want to play back on. Make no other changes.
4 Click OK to close the Properties dialog box.
5 Click OK to close the SAP Logon dialog box.

28

Recording and Running Scripts

Settings Dialog Box


Other settings that influence testcase playback behavior are accessed from
the Settings dialog box. Select Testcase > Settings to open the Settings dialog
box.

Next Error Handling


In the Execution tab, click the
button to open the Next Error
Handling list and access the following settings:
Interactive Prompt (the default) - The Object Not Found dialog displays
when an error occurs during a run. This option might be useful in the
early stages of troubleshooting, when you want to work on any errors at
the time they occur.
Report error and continue - An error message is written to the
Execution Log, and QuickTest tries to continue the run from where the
error occurred. If you think that the script errors have been reduced to
the non-fatal variety, it may be possible to complete a run this way
despite any errors that occur.
Report error and stop - An error message is written to the Execution Log,
and execution stops.
29

QuickTest Professional for mySAP.com Windows Client Users Guide

Skip Business Process - Skips the current business process and continues
with the next one in the testcase if there is one. This option is useful only
if subsequent business processes in the script do not depend on output
from the current business process.
Skip Iteration - Skips the current iteration and continues with the next
one if there is more data for this business process. This option might be
useful when you are running many iterations to test large amounts of
data. Using Skip Iteration would prevent one bad data element from
terminating the entire script run.
These settings are also accessible from the Next Error Handling list in the
Object Not Found dialog box.
Think Time
Think time emulates the time that a real user waits between actions. For
example, when a user receives data from a server, he may wait several
seconds while he reviews the data before responding. This delay is known as
the think time. Think times are added automatically to screen terminator
steps and are not visible in the icon tree. Think times are recorded in whole
seconds.
Multiply Recorded Time By - If the recorded think time is 4 [seconds],
entering 2 in this box increases the think time during the run to 8
seconds. Entering 1.5 increases the think time to 6; entering 0.5 decreases
the think time to 2. Multiplying by zero causes QuickTest to ignore
recorded think times.
Min Think Time (Sends Only) - Sets a minimum number of seconds
delay before sending a screen to the server. This number may be zero.
Max Think Time - Sets an upper limit to think time delays. This number
may be zero. Entering -1 means that there is no upper limit to think
times. Use Max Think Time with Min Think Time to confine all delays to
a predetermined range.
If set via the Settings dialog box, the think time affects the entire testcase. If
set via the Properties dialog box, the think time affects only the selected
step. After making a change to think times, save the testcase, then select
File > Reload to make sure that the change is effective for the next test run.

30

Recording and Running Scripts

Retry and Delay Properties


Other useful options are Retry and Delay which give you finer control over
the Keypress and Buttonpress steps. See Retry/Delay" on page 113 for more
information.

Execution Log

The Execution Log is a text file (ExecutionLog.bpl) which contains the result
of each test step as it executed. During playback, the Execution Log dialogs
title bar shows which iteration is currently executing. When playback is
finished, the log shows every step that was executed in the most recent run
and the result of each step.
The first line in the file displays general information about the test run, such
as the view, total number of verifications and errors, and the start, end, and
elapsed times. The second line shows the iteration number. This is followed
by the business process name and all the steps for that business process.
Subsequent business processes (if any) appear in the order they were run.

31

QuickTest Professional for mySAP.com Windows Client Users Guide

Some of the step results which are logged include parameter substitution,
verification status, status bar messages and other messages.
When the testcase in QuickTests main window is the same as that displayed
in the Execution Log, clicking a step in the Execution Log causes the same
step to become highlighted in the tree view of the main window.
QuickTest can display the Execution Log automatically while a test is
playing back (Execution Mode). Select Tools > Options to open the Options
dialog box, then click the Execution tab and check the Auto Show Execution
Log check box in the Execution Startup panel. Check the Show Execution
Log check box in the Execution End panel to have it open automatically
after the run.
To open the Execution Log while in Design mode, select View > Execution
Log, or click the View Execution log toolbar button.
Execution Log Toolbar and Menu
File > Open - Opens the Open Testcase Results dialog box. Use this dialog
box to open ExecutionLog.bpl for the current testcase, or use it to navigate
to and open any saved execution logs you may have on file.
File > Save - Opens the Save Execution Results dialog box. Used to save the
current execution log. Also saves the Results spreadsheet in the specified
directory.
File > Close - Closes the Execution Log dialog box.
Edit > Clear - Clears the currently displayed Execution Log and leaves the
window open.
Edit > Find - Opens the Find dialog box.

32

Recording and Running Scripts

The Find dialog check boxes allow you to search the Execution Log for
verification failures, verification successes, any kind of error, any warning or
any combination of those four. Make sure the cursor is at the top of the
Execution Log window before you start searching because Find stops when it
reaches the end of the file.
Edit > Find Next - Locates the next occurrence of the selected Find
option(s). Selecting this item has the same effect as clicking the Find Next
button in the Find dialog box.
Edit > Find Previous - Locates the previous occurrence of any selected Find
option. Selecting this item has the same effect as clicking the Find Previous
button in the Find dialog box.
View > AUT - Brings an open SAP Frontend session to the front of the users
display.
View > Execution Report - Invokes the Report Viewer program. The Report
Viewer combines the features of the Execution Log, the Screen Capture
View, and the Results spreadsheet. For more information about the Report
Viewer, see Report Viewer" on page 97.
View > Results Data - Opens the Results spreadsheet.
View > Collapse All - Collapses the tree to a single step.
View > Expand All - Expands the entire tree so that all steps are visible.
View > Show Selected Level (no icon) - Expands or collapses the tree so
that no steps subordinate to the level of the selected step are visible.

Note: By default, there is only one Execution Log file (C:\testcase_name


\Results\ExecutionLog.bpl) per testcase. It is overwritten with each
playback. To keep a permanent copy of a particular execution log, you must
save it separately before running another script. Use the Save button in the
Execution Log dialog box to save the log. For convenience you can also
check Prompt for saving results in the Options dialog box, Execution tab.

33

QuickTest Professional for mySAP.com Windows Client Users Guide

Object Not Found Dialog Box

When QuickTest cannot find the object it is looking for during a script run,
and the Next Error Handling setting is Interactive Prompt, it displays the
Object Not Found dialog box.
The message in the Object Not Found dialog box (derived from the
Execution Log) tells you the object QuickTest was looking for and the object
it actually found for the last step that QuickTest tried to execute. From this
dialog box, you can choose to stop the run, continue the run if possible,
pause while you try to fix the problem by modifying the script, skip the
current business process, or skip the entire iteration.
The fact that QuickTest could not find the object it was looking for is often
just a symptom of another problem. Most errors are data-related. Some data
can cause an optional screen to appear. Invalid data can cause a system error
message to appear rather than the next expected screen.
If you encountered the Object Not Found dialog box during a script run and
you know the cause of the error, you can use one of the dialogs Modify
Script buttons to correct the problem at once. You can also choose one of
the Execution buttons to dismiss the Object Not Found dialog and try to
continue running the script.

34

Recording and Running Scripts

The Next Error Handling options are also available from the QuickTests
main menu. Select Testcase > Settings to open the Settings dialog box. Then
click the Execution tab. See Troubleshooting Tools" on page 97, for a
detailed explanation of the options in the Object Not Found dialog box.

Design Mode
The QuickTest design mode displays the main menu and the tree window.
Optionally, you may also display toolbars, the status bar, and the screen
capture window.

Tree Window

35

QuickTest Professional for mySAP.com Windows Client Users Guide

While recording, QuickTest creates a hierarchical tree of icons and


displays it in a window. An example icon tree is shown in the preceding
graphic.
Each icon in the tree is one step in the testcase. A step may represent a
business process, a screen, an input or output field, a user action, etc. The
name of each step appears just to the right of its icon.
Use Expand Branch and Collapse to this level from the right-click menu of
any icon to quickly expand or collapse the tree. You can also expand the
entire business process by pressing the asterisk key on the numeric keypad.
Only one instance of a script may be open at a given time. If one user has
opened a script, that script cannot be opened again at the same time. This
restriction applies to the user who opened the script as well as to other users.

Testcase Steps
Most of the different kinds of steps QuickTest displays in the Tree window
are listed below. The properties of any step may be seen in the Properties
dialog box which is accessible by right-clicking the steps icon, then
selecting Properties from the pop-up menu.
Business Process - This is not a recorded step. It is the top step of any
business process and is inserted automatically when you start recording a
new business process. You can also insert it manually by selecting
Insert > New Business Process from QuickTests main menu. All steps
occurring during a business process are indented under this icon.
Buttonpress - Buttons generally activate screen-specific functions. For
example, the Create Standard Order: Overview screen has buttons labeled
Availability, Pricing, and Sched. lines. Buttonpress steps are also screen
terminator steps and may not be moved.
Data Branch - Allows execution of alternate paths within a testcase based
upon the value of a particular object at the decision point.

Data Loop - Allows repetition of steps within the loop until data is spent.

36

Recording and Running Scripts

GUI Object Branch - Allows execution of alternate paths within a testcase


based upon the presence or the absence of a specified object at the decision
point.
GUI Object Loop - Allows repetition of steps within the loop until a
specified object either appears or disappears.
Input - Field a user can type data into; optionally may have a match code
list associated with it. In QuickTests Tree window this icon has a white
background to distinguish it from the Output step icon (see below). To the
left of each Input Step icon is the letter C (for constant or static text) or
P (for parameter or variable text). To the right of each icon is the input
fields name followed by a colon and the data value entered into that field
during recording. The data value for an Input step can be changed from the
Input tab of the Properties dialog box.
Keypress - Keys are generally represented in the SAP Frontend by icons and
activate functions commonly used in many screens, such as Save and Enter.
Keypress steps are also screen terminator steps and may not be moved.
Loop - A collection of input (data entry) fields that are treated as one object
by the SAP Frontend. Loop objects allow multiple values to be entered for
each field. A loop is nearly the same as a table from the users point of view.
Match code - Open/close a match code list. The icon for the step to open a
match code list shows an arrow pointing to the right. The close match list
icon shows an arrow pointing to the left.
Menu - Select from a menu. Menu select is also a screen terminator step and
cannot be moved.
OK Code - Enter an OK code (e.g., VA03, MM01) in the command field.
Output - This is not a recorded step. This is a specialized step you can use to
enhance automated business processes. In general, an output step is
associated with an output parameter. Parameters are used to store data to be
used later. In this case, the parameter captures and stores output from the
screen. In QuickTests Tree window this icon has a yellow background to
distinguish it from the Input step icon.

37

QuickTest Professional for mySAP.com Windows Client Users Guide

SAP Connect, SAP Logon - The SAP Connect step is used to control the SAP
connection from within a recorded testcase. The SAP Logon step is used to
control the SAP logon from within a script. For more information about
these steps see Adding an SAP Connect Step" on page 180.
Report Check - Adds a checkpoint to the testcase for a parameter that
contains a formula. When executed, a Report Check sends a result message
to the Execution Log. See Report Tab" on page 259 for more information
about this step.
Reset AUT - Reset Application Under Test (AUT) is inserted when you start
and end recording. Because it is good practice to begin each script from the
intial SAP screenscreen (the initial condition), QuickTest automates
navigation to that screen. This action corresponds to entering /NS000 in
the command field.
Resize Screen - Resizes the screen and partial screen dimensions (height and
width). The unit of measurement is a text character. Partial screen resizing
occurs when you drag the separator (sometimes called a splitter) between
two panes of a window to change their relative size. Note: Changing screen
dimensions affects the number of viewable elements on the screen,
especially in tables and lists.
Screen - These represent individual SAP screens that appeared during
recording. Steps for all actions occurring on a screen are indented under the
screens icon.
Scroll Table - Allows you to scroll by row or by text in a column; also allows
you to verify the existence of a particular row or value in a list. Scroll Table is
also a screen terminator step and cannot be moved.
Selection - Select from a list (e.g., a match code result list).
Set Focus - This step represents clicking a field to place the cursor there.
Table - A collection of input (data entry) fields that are treated as one object
by the SAP Frontend. Tables allow multiple values to be entered for each
field.
Table Set Focus - Sets the focus to a specific column and row in a named
table.

38

Recording and Running Scripts

Verification - This is not a recorded step. Verification is a specialized step


you can use to enhance automated business processes. In general, a
verification step compares text on a screen with a stored value during
playback. It then reports a pass or fail status to the Execution Log. See the
Verifying chapter for more information.
WinRunner Test - Used to invoke a standard WinRunner Professional TSL
script. This feature provides the ability to test non-SAP applications that are
part of your enterprise application.
In addition to the steps named above, there are several steps that have no
icon associated with them. For example, the comment, wait, and report
message steps appear in the tree without an icon.

ActiveX Steps
QuickTest-SAP provides support for the following ActiveX controls:
Drag & Drop - Playback is supported for Drag & Drop, although recording is
not. You must insert this step into a testcase manually, using the Step
Generator. During replay, Drag & Drop operates on the object named in its
properties. Drag & Drop currently supports Tree and Grid (ActiveX) objects.
For information about implementing drag and drop, see Implementing
Drag and Drop (ActiveX)" on page 197.
Grid - Similar to a table. Single cell activation, selection, cell input, and cell
query are supported. Single-click for activation and double-click for
selection. Selection is indicated by an exclamation point next to the icon.
The row and column for this object can be parameterized. For cell activation
and selection steps, parameterize from the Row/Column tab of the
Properties dialog box. To parameterize cell input and cell query, you must
manually change the code in the .bps file from the Expert mode. See
Parameterizing a Grid (ActiveX) Row or Column" on page 96 for more
information.
RTF Editor - Box which allows free form text editing. Paragraphs are
separated by \r. Value assignment is supported.

39

QuickTest Professional for mySAP.com Windows Client Users Guide

Toolbar/Toolbar (pull-down) - ActiveX toolbar objects are of two types:


button and menu. Button click and drop-down menu selection are both
supported.
Tree - Hierarchical structure for organizing items (e.g., folders, URLs). Item
activation, selection, and query are supported. Single-click for activation
and double-click for selection. Selection is indicated by an exclamation
point next to the icon. Image and link type items are recorded by indexes.
Multiple columns are supported for those tree objects which have them.
This includes support for any links, images, check boxes and buttons which
may appear in a column. The Column tab of the Properties for a Tree
(ActiveX) shows the column number (as in the following graphic). For
single-column objects, the Constant box will be blank.

The SAP Frontend must be fully visible and in the foreground during
playback. Pressing a key or clicking the mouse during playback may cause
unexpected results and is not recommended.
Several functions for manipulating ActiveX objects are available from the
Step Generator.
Grid (ActiveX) Cell Input
Grid (ActiveX) Cell Query
Drag & Drop (ActiveX)
Tree (ActiveX) Item Query

40

Recording and Running Scripts

See Functions Available from the Step Generator" on page 164 for more
information about these functions.

Views
Views allow you to work with a subset of the business processes within a
testcase. By using views you can isolate one or more business processes and
run them without running all the business processes in the script. This can
be useful for troubleshooting.
In addition you can use a local data file for each view. This enables you to
run views using different data sets. By default all views use the data file
associated with the All Business Processes default view. You can specify that
a view should instead use a local data file (based on the default view data
file) and then modify the data set.
Creating a View
You create a new view in the View Manager.
To create a view for the open testcase:
1 Select Testcase > View Manager. The View Manager dialog box opens.

2 Click the Insert button. The View Name dialog box opens.

41

QuickTest Professional for mySAP.com Windows Client Users Guide

3 Enter the name you want for the new view and close both dialog boxes.

Adding Business Processes to a View


After you create a view, you add business processes.
To add a new business process to a view:
1 From the View list, select a view to which you want to add a new business
process.
2 Select Insert > New Business Process or click the New Business Process
button. QuickTest-SAP adds a new business process to the current view.
To add existing business processes to a view:
1 From the view list, select a view to which you want to add an existing
business process.
2 Select Insert > Business Process to View, or click the Add Business Process to
View button. The Select Business Process dialog box opens.

3 Select one or more business processes from the list box.


4 Click the OK button to add the selected business processes to the current
view.

42

Recording and Running Scripts

Using a Local Data File for a View


By default all views use same data file. You can choose to use a local data file
for a selected view. This enables you to execute the view using a different
data.
Note that changes to a parameter definition in a business process should be
made only in the All Business Processes view.
To use a local data file for a view:
1 Select Testcase > View Manager. The View Manager dialog box opens.
2 Select the view for which you would like to use a local data file.
3 Click the Properties button. The Properties dialog box opens.

4 Clear the Use default data set check box.


5 Click OK.
Now when working in the view selected in step 2, if you open the Data table
and make changes, the changes apply only to that view.

43

QuickTest Professional for mySAP.com Windows Client Users Guide

Import
Recorded business processes from another testcase can be imported to the
current script. Importing can combine multiple business processes from
separate scripts without having to re-record them.
Browse
button

To import a business process:


1 Select File > Import from the main menu. The Import dialog box opens.
2 Click the browse button.
3 Navigate to the folder of the testcase containing the business process you
want to import. Double-click the folder to open it.
4 Select the script (the .bpw file) and click Open. The business processes of the
script are loaded into the Import dialog box.
5 Select the business process(es) you want to import and click Import.

44

Recording and Running Scripts

If a business process you are importing has the same name as another
business process in the current script, you are asked to confirm that you
want to override the existing business process.

If a newly imported business process fails to appear in the tree of the


current script, select File > Reload to refresh the display.
When you import a business process, any parameters and formulas
belonging to that business process are imported with it. Imported formulas
refer to spreadsheets and cells in the original script. Consequently, you may
need to adjust the formulas manually to synchronize them with the
spreadsheets and cells of the current script. It may be easier to redo a
formula completely rather than to adjust an imported formula.

Reload
Use Reload to refresh the testcase display from the last saved copy. Select
File > Reload from the main menu to execute the Reload command.

45

QuickTest Professional for mySAP.com Windows Client Users Guide

Screen Capture Window


QuickTest captures an image of every SAP screen that is displayed during
recording. You can view these screens in the Screen Capture window. To
display the Screen Capture window, select View > Screen Capture from the
main menu.

When enabled, the Screen Capture window appears side by side with the
Tree window. Each time you click a screen step in the Tree window in Design
mode, an image of that screen appears in the Screen Capture window. Also,
when you click a step icon in the Tree window, QuickTest highlights the
corresponding object in the Screen Capture window (as shown in the
preceding graphic).
To see the screen returned by the server, click the Received Screen tab. To
see the screen that was sent to the server (including any data entry), click
the Sent Screen tab. The Sent Screen tab can be displayed or hidden by
checking or unchecking the Show Sent Screen check box in the General tab
of the Options dialog box.
46

Recording and Running Scripts

Toolbars
QuickTest has five built-in toolbars: File, Edit, Insert, Execution, and View.
In addition, you can create your own toolbars. Each toolbar has several
buttons that activate frequently used commands. Display of the built-in
toolbars is toggled on and off from the View menu. All toolbar commands
can also be found on the main menu. Some commands have keyboard
shortcuts as well as menu selections. Toolbars are fully configurable.
To customize a toolbar:
1 Select Tools > Customize to open the Customize dialog box.
2 Click the Toolbars tab.
3 Check one or more toolbars to customize.
4 Make the desired modifications and click Close.

Toolbars tab, Customize dialog box


Reset - Resets the selected toolbar to its default configuration.
Reset All - Resets all toolbars to their default configurations.
New - Opens the Toolbar Name dialog box.

47

QuickTest Professional for mySAP.com Windows Client Users Guide

Rename - The Rename button is enabled when you select a user-created


toolbar from the list. Clicking Rename opens the Toolbar Name dialog box
from which you can change the name.
Delete - The Delete button is enabled when you select a user-created toolbar
from the list. Clicking it pops up a confirm delete message. Click Yes in the
message window to delete the toolbar.
Show text labels - Displays name below toolbar button when checked.
Rename and Delete are not available for the File, Edit, Insert, Execution, and
View toolbars because those toolbars are built-in, not user-defined.
Options tab, Customize dialog box
The Options tab allows you to change the look and feel of the Toolbars.

Show Screen Tips on toolbars - Toggles the text display of the command
name that appears when you hold the cursor over the icon.
Show shortcut keys in Screen Tips - Toggles the text display of any
shortcut key that appears appended to the command name when the cursor
is held over an icon. This feature is enabled only when Show Tool Tips is
checked.

48

Recording and Running Scripts

Large Icons - Increases size of toolbar buttons when checked.


To add a toolbar:
1 From the Toolbars tab of the Customize dialog box, click New. The Toolbar
Name dialog box opens.
2 Type a name for the new toolbar and click OK. The new Toolbar appears on
the desktop.
3 Drag commands from the Commands tab of the Customize dialog box and
drop them on the new toolbar.

The Commands tab allows you to select a command and drag it to any
toolbar. A button representing that command will appear on that toolbar.
Some buttons will appear as text only because there is no icon for those
commands. You can also drag buttons from a toolbar to remove them, and
drag sideways to insert a separator.

49

QuickTest Professional for mySAP.com Windows Client Users Guide

Layouts
QuickTest allows you to save preferences for such things as which windows
are open, the size and screen position of each open Window, which toolbars
are displayed, and whether to display the status bar. Moreover, you can save
your preferences separately for the three major activities in QuickTest:
designing, recording, and running.
To save layouts manually, select Tools > Layout from the main menu. You
can also automate layout preference saving and restoring from the General
tab of the Options dialog box. To open the Options dialog box select Tools >
Options.

Auto save layout - Enables automatic saving of open windows, window size
and position, open toolbars, and status bar display information. Layout
information is saved separately for Design mode, Record mode, and
Execution mode.
Auto restore layout - Enables automatic restoring of layout information.

50

4
Verifying
This chapter explains the process of business process verification.
Verification documents whether a business process succeeded by comparing
actual results to expected results.
This chapter describes:
Manual and automated business process verification
Constants and parameters
Using QuickTest-SAP spreadsheets to automate verification

About Verifying
Verification is a vital part of the script automation process. It is not enough
just to automate user actions with record and playback. If you have no
verification of your playback results, then the recording is not of much use
to you. Without verification, recordings are just recordings, not automated
tests.
You need to verify your script results to find out if they are the results you
wanted. For example, when the Create Standard Order process is successful,
an order saved message appears in the status bar. When running an
automated script, you need a way to find out if that message appeared
without stopping the script run.
The purpose of this chapter is to show how you can use QuickTest-SAP to
perform verification for you. QuickTest-SAP provides a way to automate
verifications. Verification results are gathered during the script run and
displayed in the Execution Log after the run has completed.

51

QuickTest Professional for mySAP.com Windows Client Users Guide

Manual Verification
Verification is a point during the business process where the tester validates
the success of his actions by checking the system output (server response)
and comparing it to a desired result.
The tester evaluates server response by examining the screen output after
submitting a previous screen (by pressing Enter, clicking a button, etc.),
then deciding whether that output met the success criteria. In other words,
verification is conditional upon an evaluation result. If screen output
matches an expected result, then the verification passes. Otherwise, it fails.
Verification always results in a PASS or FAIL status.
If you were automating the Create Sales Order business process, you would
first enter all the required data and then press the Save button. How would
you know if your business process completed successfully? You would check
the status bar message at the bottom of the screen. If successful, the status
bar would display a message that the order had been created. If the order
had not been created, a different message would be displayed, or a new
screen requesting additional data would appear.
By watching the screen for a visual cue that your business process was
successful, you are verifying the business logic even if you dont think of it
as verification. Without some kind of verification you couldnt be certain
that your actions had produced the intended result.

Static vs. Dynamic Verification


One way of thinking about expected results is to separate them into the
categories static and dynamic. The usefulness of these categories can be
explained in the following way:
Static verification - The expected result is hard-coded or constant; i.e., it
is expected to remain the same no matter how many times the script is run.
Therefore, verification depends upon the output being exactly the same as
one and only one value (see Example 1 in the following table).

52

Verifying

Dynamic verification - The expected result is variable; i.e., the result that
verifies the business process can change from one script run to another (see
Examples 2 and 3 in the following table). A variable expected result must be
expressed as a condition; e.g., todays date plus 5 days, or text to the right of
xxx and to the left of yyy, or any number between 100001 and 100099.
In QuickTest-SAP, conditions such as these are usually expressed as a
spreadsheet formula.

Example
1

Output
Type
STATIC
(constant)

DYNAMIC

DYNAMIC

Desired Output

Actual Output

Status

Message box
displays: There is
unread mail in your
mailbox.

There is unread
mail in your
mailbox.

PASS

You have no
unread mail

FAIL

Status bar displays:


Standard Order
[any number] has
been saved

Standard Order
1234 has been
saved

PASS

Error: Material
unavailable

FAIL

Order # of the
retrieved order
matches the order #
entered in the
request for the
order

(Order 1234 was


requested.) Order #
field of View Order
screen displays:
1234

PASS

Status bar displays:


E: Order 1234 does
not exist

FAIL

To summarize the manual verification process:


1 Check output text on the screen.
2 Compare output text to stored output that verifies the desired result.
3 If the current screen shows the desired result, then the verification passed;
otherwise it failed.

53

QuickTest Professional for mySAP.com Windows Client Users Guide

Automated Verification
Automated verification is fundamentally the same as manual verification.
The main difference is that instead of using human intelligence to compare
actual versus expected results, the computer does it. That means you need to
define the verification condition during the script development stage, and
embed it into the recorded script right after the expected screen output is
displayed. See the Expected Condition column in the following table for
example verification conditions.

Example
1

54

Output
Type

Desired
Output

Expected
Condition

Actual
Output

STATIC
(constant)

Message
box
displays:
There is
unread mail
in your
mailbox.

If message =
There is
unread mail in
your mailbox.
then status =
PASS else
status = FAIL

There is
unread mail
in your
mailbox.

PASS

You have no
unread mail

FAIL

Status bar
displays:
Standard
Order [any
number]
has been
saved

If status_bar =
Standard
Order +
<any_number>
+ has been
saved then
status = PASS
else status =
FAIL

Standard
Order 1234
has been
saved

PASS

Error:
Material
unavailable

FAIL

DYNAMIC

Status

Verifying

Example

Output
Type

Desired
Output

Expected
Condition

Actual
Output

DYNAMIC

Order # of
the
retrieved
order
matches the
order #
entered in
the request

If
View_Order.Or
der_number =
<order_number
_requested>
then status =
PASS else
status = FAIL

(Order 1234
was
requested)
Order # field
of View
Order screen
displays:
1234

PASS

Status bar
displays: E:
Order 1234
does not
exist

FAIL

Status

Verification Using QuickTest-SAP


Verification in a QuickTest-SAP script is accomplished using a verification
step. The tester creates a verification step to check whether an output during
a script run is equal to an expected output.
Verification using QuickTest is object driven. All data, text, etc., on a screen
are attributes of objects. In addition, each object has other attributes such as
row, column, and location which are not easily determined just by looking
at the screen. QuickTest can verify any attribute of an object. The tester can
select which attribute of an object to verify when the verification step is
created. During a script run, the result of a verification check, either PASS or
FAIL, is written into the Execution Log.
Objects are represented by icons in the QuickTest tree window. To learn the
properties of a given object, right-click that objects icon, select Properties
from the pop-up menu to open the Properties dialog box, and click the
Object tab.

55

QuickTest Professional for mySAP.com Windows Client Users Guide

To create a verification, you need to inform QuickTest:


1 What to look for - with a verification step in the tree. A verification step is a
step inserted into the icon tree of the business process to check whether an
actual output is equal to an expected output.
2 How to evaluate what it found - with a value or a condition to compare to
the actual output. The values and conditions are stored in the Data
spreadsheet.
There are two ways to define the expected condition:
constant - a static value that is expected to remain the same from one script
run to another
parameter - a placeholder for a dynamic value that is expected to change
from one script run to another

Constants
Constant is the default choice in the Expected panel when you open the
Properties dialog box for a verification step. The Constant text box is
automatically filled in with the value that was recorded.

56

Verifying

You can change the value in the Constant text box by typing in a new value.
In addition, you may use wild cards within the constant text.

The asterisk wild card can represent one or more Suggested


characters.
names
The question mark wild card represents only one character.
For example, you could replace a captured order number with an asterisk:
Standard Order * has been saved. The asterisk is used as a wild carda
placeholder for any order number. That makes the constant reusable in a
situation where only the order number is likely to change from one script
run to another.
You could also use Standard Order 1000??? has been saved. This
formulation limits a valid order number to exactly seven characters
beginning with 1000.

57

QuickTest Professional for mySAP.com Windows Client Users Guide

Parameters
Another way to define the expected verification condition is with a
parameter. A parameter is a placeholder or container for data. When you
choose this option in the Verify tab, QuickTest automatically creates two
parameters:
Output parameter - holds the screen text or other object attribute to be
verified during execution (the actual result captured in the script run)
Expected parameter - stores the expected value (or condition) against
which the value in the output parameter is to be compared
(In addition to Output and Expected parameters, QuickTest also uses Input
parameters, but not for verification. For more information on parameters see
Parameters on page 74.)

QuickTest suggests names for new parameters based on the object selected
for verification. That works fine for most data entry fields but for
verification it is good practice to change the suggested name for the output
parameter to something more descriptive, such as verify_order_saved. The
_exp suffix is automatically appended to the name of the expected
parameter.

58

Verifying

How Verification Works with Parameters


1 The screen text or other object attribute to be verified is captured during the
script run and stored in the output parameter.
2 The results spreadsheet compares the newly captured result (now stored in
the output parameter) with the value (or the evaluation of the condition)
stored in the expected parameter.
3 If the two values, actual output and expected result, are equal, then the
expected parameter cell automatically registers TRUE. Otherwise, the
expected parameter cell registers FALSE (or some other not true indicator
such as #N/A, REF!, or #VALUE!).
4 If the expected parameter registers:
TRUE, QuickTest writes passed in the Execution Log.
anything other than TRUE, QuickTest writes failed in the Execution
Log.
An output parameter replaces recorded text (such as, Standard Order 1234
has been saved displayed in a status bar) and is stored in a cell in the
output parameter column of the Data spreadsheet.
The tester enters a condition (expressed as a formula) or a value (which may
include a wild card) into a cell of the expected parameter column of the
Data spreadsheet. This condition or value is automatically copied into a cell
in the Result spreadsheet at run time.
When the script is run, the output parameter captures the output to be
verified and stores it in the Results spreadsheet.
The cell containing the expected condition or value is automatically
reevaluated by comparing it to the contents of the output parameter cell.
The expected result cell registers TRUE if the output text is equal to the
formula result or the value. If it they are not equal, the cell registers FALSE,
#N/A, or some other value depending on the type of data which is stored in
that cell.

59

QuickTest Professional for mySAP.com Windows Client Users Guide

Creating Verification Conditions with Spreadsheets


Verification steps are linked to two Excel-compatible spreadsheets: one for
data (DATA.XLS) and one for script run results (RESULTS.XLS).
Data (input) - The Data spreadsheet, DATA.XLS, is where you define the
condition or enter the data values for verification success. It also holds the
text that was captured at the verification point during recording.
Results (output) - The Results spreadsheet, RESULTS.XLS, holds the output
text captured at the verification point during the most recent script run. It also
has a copy of the condition/value for success.

Evaluated
condition

You can tell the type of parameter in the spreadsheet by its color:
Output parameters are displayed in gray text.
Expected parameters used for verification have columns shaded yellow.
Input parameters (not used for verification) are displayed in blue text.

60

Verifying

Note: The data spreadsheet is Excel-compatible and the data in it can be


manipulated the same way as in Excel. For more information about the Data
spreadsheet see Data Spreadsheet (data.xls) on page 213 and Procedure to
Parameterize an Input Step on page 77.

Example: A verification step might check whether the text Standard Order
[any number] has been saved appeared in the status bar of a screen.
Order_number_exp

Order_number_out

condition (formula): Standard


Order + <any number> + has
been saved

empty to start; filled during a script


run with the actual text that
appeared in the status bar

If the correct text appeared during a run, QuickTest would write the
following line into the Execution Log: Verification passed. If the correct
text did not appear, Verification failed would be written into the log.

Verification Procedure
To verify an automated business process in QuickTest:
1 Identify the text or other object attribute to be verified.
2 Insert a verification step into the tree.
3 Define the expected condition or value.
4 Test the condition.

Note: In the following section, text is understood to mean text or other


object attribute.

61

QuickTest Professional for mySAP.com Windows Client Users Guide

1 - Identify the Text To Be Verified


Make sure that you know or have defined what text you expect to see if the
business process you want to verify is successful.
Select the screen step that contains the text you want to check.
Find the text you want to check within the captured screen.

Verification step

Status bar message

2 - Insert a Verification Step Into the Tree


To insert a verification step:
Make sure that the Screen Capture window is visible.
Right-click the text you want to verify.
Select Verify from the pop-up menu. QuickTest inserts a verification step
into the tree and opens the Properties dialog box.

62

Verifying

Select Constant or Parameter.


Select Constant if the expected text is static.
Select Parameter if the expected text is dynamic.
For more information about static and dynamic text, see Static vs. Dynamic
Verification, on page 52.
Other Ways to Insert a Verification Step
Additional ways to insert a verification step besides right-clicking a captured
screen object:
Select Insert > Verification from the QuickTest main menu
Click the New Verification toolbar button
Right-click a step icon, then select New > Verification
Each of these three methods displays the Select Objects dialog box before
displaying the Properties dialog box.

Object
description

1 When the Select Objects dialog opens, the cursor changes shape to resemble
pointing hand. As the pointer passes over a screen object, that objects
attributes appear in the object description area of the dialog. These are the
same attributes that appear in the Object tab of the Properties dialog box.
2 Double-click an object you want to verify. Note that the text you clicked is
now surrounded in blue. Repeat to select multiple objects to verify. Click OK
in the Select Objects dialog box. The Properties dialog box appears.
3 Modify the properties as required for the first object selected, and click OK.

63

QuickTest Professional for mySAP.com Windows Client Users Guide

The Properties dialog for the second object appears. Repeat until the
properties for all objects selected have been saved.

Note: You can use the Select Objects dialog to spy on GUI objects to see
their properties without opening the Properties dialog for each object. This
technique works only on recorded screens, and not on the actual SAP
Frontend screen.

3 - Define the Expected Condition


Constant
To use the recorded value captured by the output parameter during
recording, no further action is needed.
To use a non-recorded value as a constant, open the Properties dialog box
for the verification step and type the value you want in the Constant edit
box of the Verify tab. Wild cards are permitted.
Parameter
1 Open the Data spreadsheet.
There are several ways to open the Data spreadsheet:
Click the Goto data button from the Properties dialog box
Click the View data toolbar button
Select View > Parameter Data from the main menu
2 Enter the expected result into the spreadsheet cell. The result can be a
formula, such as =D1=B1, or it can be a value (with or without a wild
card), such as WinRunner 6.0 (the quotation marks are not part of the
formula or value).
To create a spreadsheet formula manually:
1 Click the cell where you want the formula to go.
2 Type an equals sign followed by the formula.

64

Verifying

3 Click another cell to include a reference to that cell in the formula.


4 Press Enter when you have finished.
Referencing Cells in Another Spreadsheet
In a spreadsheet, you can reference a cell in another spreadsheet. The
following example shows how you would reference cell K1 in the
spreadsheet named VA01 if you were creating the reference from another
spreadsheet.

VA01!K1
The characters before the exclamation point are the spreadsheet name;
those after the exclamation point are the cell name.
To copy a formula to other cells in the column:
1 Click the cell containing the formula you want to copy. The cell outline
changes to heavy dark lines with a square that stands out on the lower right
corner (the handle) as shown in the following graphic.

Handle

2 Move the cursor to the cells handle so that the cursors shape changes from
a large cross to a small one.

65

QuickTest Professional for mySAP.com Windows Client Users Guide

3 Press and hold down the left mouse button, then drag the cursor downward
so that the heavy dark lines also surround the cells below the one with the
formula:

4 Release the left mouse button.


In the example shown in the above graphic, the formula in cell C1 has been
replicated in cells C2, C3, and C4. Also, the formulas cell references, D1 and
B1, were automatically adjusted so that it in cell C2 it refers to D2 and B2; in
cell C3, it refers to D3 and B3, and in cell C4, it refers to D4 and B4.
Common Formula Builder
Use the Common Formula Builder when you want to extract selected text
from a longer string of text or when a portion of the verification text can
vary within a longer string of text. Extracting selected text is used for
correlation as well as for verification.

66

Verifying

To open the Common Formula Builder dialog box, select Tools > Common
Formula Builder from the Data spreadsheet menu.

This graphic
shows the
result after
clicking the
order number
in the Select
word(s) box.

Use Parameter - The Use Parameter list includes all parameters for the
current business process only. Parameters belonging to other business
processes may be accessed by selecting the appropriate spreadsheet,
reopening the Formula Builder, then opening the Use Parameter list.
Formula Type - For example, a formula to extract words from text.
Select word(s) - After selecting from the Use parameter list, the text
captured by that parameter appears in the Select word(s) box. This should be
the text that you want to work with. If it is not, select another parameter.
Select search word(s) before/Select search word(s) after - These boxes
show the unselected text which precedes and follows the selected text.
Formula - The edit box is filled in automatically by Formula Builder when
you select text. The formula in this box is editable.
67

QuickTest Professional for mySAP.com Windows Client Users Guide

Result Parameter - The Result Parameter list includes all parameters for the
current business process only. When you select a parameter from the list,
you are telling Formula Builder to assign the formula to that parameter.
Click OK to complete the process.
If you want to create a new parameter, just type a name for it in the Result
Parameter box and click OK. QuickTest then creates the new parameter, adds
a new column with the same name to the data spreadsheet, and copies the
formula to the first row of that column.
OK, Cancel - Windows standard functionality
Extract word(s)
The purpose of the Extract word(s) formula is to get just part of the saved
output text when that is all you need for verification or correlation.
The example displayed in the previous graphic shows the result of selecting
only the order number to be extracted from the verify_order#_out
parameter.
To extract word(s) from output parameter text:
1 From the Use Parameter list, select the parameter that holds the text you
want to extract words from.
2 Select Extract word(s) from the Formula Type list.
3 In the Select word(s) box, select the text you want to extract. Common
Formula Builder automatically displays the unselected text in the Select
search word(s) before and after boxes. The formula to extract the selected
text appears in the Formula box.
4 Select a Result Parameter from the list to hold the extracted text, or create a
new parameter. Create a new parameter by typing a name for it in the Result
Parameter box.
5 Click OK.

68

Verifying

4 - Test the Expected Condition


Not only do you want your verification to pass when it should, but you also
want it to fail when it should. Otherwise the verification may be invalid.
1 Test the expected condition in the data spreadsheet.
Enter a true result into the output parameter cell.
In the example shown in the next graphic, the condition formula
=D1=B1 is contained in the cell C1 (Row 1 of the verify_cfmd_qty_exp
column). Column D is the output parameter confirmed_qty. Column B is
the parameter Order qty. The values in Row 1 of both those columns is 1.
The two values are equal, so the result is TRUE.

Enter a false result into the output parameter cell.

In the preceding graphic, the value in D1 was changed to 2, so that the


two values were unequal. The condition then registered FALSE.
After the condition formula has been tested and proven to be correct,
return any changed values back to their original values.

69

QuickTest Professional for mySAP.com Windows Client Users Guide

2 Run the script and check the result.


Even after checking the verification in the spreadsheet, you still need to run
the script to see if you get the results that you expected. When the script is
run, if the actual text on that screen matches the expected result stored in
the spreadsheet, then the verification should pass.
The following graphic shows what a verification step looks like in the
Execution Log after a successful run.

Verification step

70

Verifying

Report Checks
Another verification tool is Report Check. Report Check is used to check the
status of a parameter at a certain point in the business process and write a
result to the Execution Log.
To add a Report Check step:
1 Open the Step Generator dialog box. Click the New step toolbar icon or
select Insert > Step.
2 Select Report Check from the General category of the Step Generator. After
adding the step, the Report tab of the Properties dialog box opens.

3 Give the step a meaningful name. Type a name for the step in the Name
box.
4 In the Description box, type the text you want to appear in the Execution
Log or Report Viewer. The description may also include parameters. Enclose
any parameter name within angle brackets (e.g., <parameter_name>) to
separate it from the plain text. The parameter value at the time this step is
executed appears in the log along with the text.
5 Select a parameter from the Status list, or type the name of a new parameter
that you want to create. The parameter in this box should contain a formula
to be evaluated during the script run. If the formula evaluates to TRUE, the
check passes; otherwise the check fails. The result of the evaluation is sent to
the Execution Log.

71

QuickTest Professional for mySAP.com Windows Client Users Guide

6 Click OK or Goto Data. If you typed the name of a new parameter in the
previous step, clicking either OK or Goto Data takes you to the new column
in the Data spreadsheet.
7 In the Data spreadsheet, create a formula for the parameter to be evaluated
during the run.

A Note About Verifying Attributes


In most cases, you will probably want to verify the value attribute of an
object. The value for a screen would be the screens title. The value for an
input field would be the data entry. In some cases, though, you might want
to verify a different attribute. QuickTest allows you to do this by choosing
the attribute you want to verify from the Attribute list in the Verify tab.
You can also verify multiple attributes for one object. To verify multiple
attributes, add a separate verification step for each attribute of the object
that you want to verify.
For more information about other attributes and their uses, see QuickTestSAP Object Attributes and Classes on page 153, and Working with Object
Attributes on page 157.

72

5
Data Driving Your Script
This chapter provides you with in-depth information about parameters,
tables and troubleshooting so that you can customize your testcases
successfully.
This chapter describes:
How to use input parameters to data drive a script
How to parameterize tables
How to use input and output parameters to correlate data

About Data Driving Your Script


After adding business process verification to your recorded scripts you are
ready to try running with a larger sample of your data. One of the key
advantages of automation is the ability to run a testcase with many different
sets of data (i.e., data driving your script).
To run the VA01 business process with 10 different sets of data, there is no
need to create 10 testcases. Instead, you can parameterize the fields that are
to receive multiple data values. When you run the script, it will repeat itself
10 times using a different value for input each time. With this technique
you can get greater coverage of your data for very little cost.
Data driving is implemented in QuickTest with parameters and a data
spreadsheet. A parameter is a container for dynamic data, i.e., data that is
either entered by the user or returned by the server, and replaces a recorded
value. The Data spreadsheet, data.xls, is Excel-compatible and stores values
to be substituted for the parameter at run time.

73

QuickTest Professional for mySAP.com Windows Client Users Guide

Parameters
There are three kinds of parameters:
Input - QuickTest reads a value from the spreadsheet placed there by the
user and inputs it to the screen at an appropriate time.
Output - QuickTest writes a value to the spreadsheet that it got from the
screen or server. Used for verification and for correlation.
Expected - stores the expected value (or condition) against which the value
in an output parameter is to be compared. See How Verification Works with
Parameters on page 59 for more information about how this type of
parameter is used.
You can tell the type of parameter in the spreadsheet by its color:
Input parameters used for data entry are displayed in blue text.
Output parameters are displayed in gray text.
Expected parameters used for verification have columns shaded yellow.
To data drive, you need to:
1 Replace input values in the tree with input parameters.
2 Define additional sets of values for each parameter in the data spreadsheet.

Output Parameters
Output parameters are inserted into the tree by the tester as a new step
rather than being converted from an existing step as with an input
parameter. Output parameters are used in:
Correlation - Sometimes you need to save data output from a step and reuse
it as input to another step. The steps can be either in one business process or
in two business processes. Use output parameters to capture and store data
needed for reuse. See Correlating Data on page 87 for more information.
Verification - Data from the screen is compared to stored data to verify a
business process. Use output parameters to capture and store the data to be
verified during a script run. See Chapter 4, Verifying, for more
information.

74

Data Driving Your Script

Input Parameters
When you perform some user actions in a business process, you have to
enter a data value (letters and numbers) into certain fields on the screen.
When you record those actions, QuickTest also records the data that you
typed into those fields. If you look at the Tree window, you can see the data
that you entered displayed on the same line as the input steps. When you
play back that recording the same hard-coded values will be input again.

Recorded input
values

Parameterized
input values

When parameterizing an input step, QuickTest:


Replaces the recorded value in the icon tree with the parameter name
enclosed in brackets.
Creates a column in the Data spreadsheet with the same heading name as
the parameter.

75

QuickTest Professional for mySAP.com Windows Client Users Guide

Each spreadsheet row contains the data for one iteration of the script. Data
dependencies should be entered in the same row.

Parameter name

Input data for


one iteration
of the script

When you run the script, QuickTest substitutes a value from the Data
spreadsheet for each input parameter at the appropriate time (i.e., when the
corresponding input field is on the screen and requires the data). If you are
running an entire testcase, the first time that QuickTest encounters an input
parameter it gets the value to use for that parameter from the first row of the
Data spreadsheet and sends that value to the server.
After the first iteration is completed, QuickTest begins the next iteration of
the script. During this iteration, it gets the value from the second row in the
Data spreadsheet, and so on. The number of rows in the data spreadsheet
determines the number of times the script will iterate. QuickTest will keep
repeating the script until it runs out of data.
You can also run scripts with selected rows of the data spreadsheet. Select
one or more rows you want to run, then start the run. QuickTest will run the
script one time for each row selected.
For more information about the Data spreadsheet see Data Spreadsheet
(data.xls) on page 213.

76

Data Driving Your Script

Procedure to Parameterize an Input Step


To parameterize an input step:
1 Identify the step (in the tree) to be parameterized.
2 Parameterize the step.
3 Load data for the parameter to use into the spreadsheet.
4 Fix the script if execution fails.

Note: If you have Auto record parameterization checked (in the Recording
tab of the Options dialog box), then you can skip Steps 1 and 2.

1 - Identify the Step To Be Parameterized


In the tree, select the step for the input field you want to parameterize.

2 - Parameterize the Step


Right-click the step icon in the tree.
Select Properties. The Properties dialog box opens with the Input tab
displayed. The Constant edit box contains the recorded input value.

Recorded
input

Field name

77

QuickTest Professional for mySAP.com Windows Client Users Guide

Select Parameter.
Type a name for the parameter in the Parameter box, or accept the
suggested name.
Usually the input field name is the suggested parameter name, but you
are allowed to change ittext in the Parameter box is editable. For
example, you might want to abbreviate a long word such as organization
to org.
Click OK to close the dialog box.
Repeat this step for each field to be parameterized (including fields on
other screens, if applicable).

3- Load Data Into the Spreadsheet


To load data:
1 Open the data spreadsheet. Select View > Parameter Data or click the View
data button.
2 For each field, enter the data that you planned to use for one iteration of the
script. Make sure that data dependencies are entered in the same row.
3 Select Insert > Terminator Rows after you have entered all the data you want
for one iteration of the testcase.
4 Repeat Steps 2 and 3 to add data for more iterations.
Blank Data Cells
It is not necessary to add data for every input field in each iteration. If you
leave an input cell blank, QuickTest will input a NULL value for that field
during the script run. If data entry is not required for that field, the script
should run to completion. It is up to the implementer to make sure that
there is data for fields that require data entry.
Table Spreadsheets
In a table spreadsheet, you can enter multiple rows of data per iteration. Just
make sure that you copy a terminator row with the .End value in column
one to separate each iteration from its neighbors. (See Parameterizing
Tables on page 80.)

78

Data Driving Your Script

Note that having multiple iterations in a table spreadsheet does not


guarantee that the testcase will run multiple times. A script runs once for
each data row of a non-table spreadsheet.

4 - Fix Script If Execution Fails


There might be occasions when a script run stops unexpectedly before
finishing. These unexpected stops are almost always data-related. Some of
the more common reasons for stoppage include:
a screen appears that was not recorded
a recorded screen fails to appear
a system error message appears
data already used cannot be used again
an object changes appearance or value
For a discussion of these problems and ways to deal with them, see Object
Not Found Dialog Box, on page 107.

Note: You can also create a parameter from the spreadsheet.

To create a parameter from the spreadsheet:


1 Double-click on a column heading. The Header Name dialog box opens.
2 Type a name for the parameter and click OK. The name you type should
match exactly the name of the input field you intend to associate with this
parameter.
3 Enter your data in the spreadsheet column.
4 In the tree, right-click the step you want to associate with the new
parameter, and select Properties from the pop-up menu.
5 Select the Parameter button, then select the parameter name you just
created from the Parameter list.
6 Click OK and you are finished.

79

QuickTest Professional for mySAP.com Windows Client Users Guide

Auto Record Parameterization


When Auto record parameterization is used, QuickTest automatically
parameterizes each input field as you record. This is useful if you intend to
parameterize all or most input fields, because it is much faster than doing it
manually. With this option you still have to input the data to the
spreadsheet after recording.
To enable Auto record parameterization:
1 Select Tools > Options from the main menu. The Options dialog box opens.
2 Click the Recording tab.
3 Check the Auto record parameterization check box and click OK.

Parameterizing Tables
Repeating input fields can be represented as tables in QuickTest just as they
are in the SAP Frontend. Select Tools > Options, click the Recording tab, and
check Auto record tables to record SAP tables as tables rather than as
individual fields.

Table name

80

Data Driving Your Script

Each table has its own spreadsheet in the Data workbook. The default name
of a table spreadsheet is the parents spreadsheet name followed by a period
and the table name. For example, in the following graphic, the spreadsheet
for the All items table is called VA01-Create Order.All_items. Notice also
that the shaded rows contain the value .End in the Material column.
Those are the iteration terminator rows which appear only in table
spreadsheets. The iteration terminator rows are present to let QuickTest
know when data for an iteration has been exhausted.

Iteration
terminator
row

QuickTest supports data entry of multiple values for one table input field per
iteration, so the number of rows per iteration can vary. In the graphic above,
for example, the first iteration includes rows 1 and 2; the second iteration
includes rows 4, 5, and 6; iteration 3 includes only row 8. This support for
variable rows per iteration allows you to emulate real system usage better.

81

QuickTest Professional for mySAP.com Windows Client Users Guide

Tables with Missing Column Headings


Some table columns in the SAP Frontend have no heading. For example, the
graphic below shows a table with headings missing from the first two
columns (the row-select buttons on the left end of each row are
considered a column).

Column with
no heading, in
table and in
spreadsheet

When you record a user action to a cell in a column with no heading,


QuickTest supplies column headings for the spreadsheet in the following
way: the column heading is a pound sign [ # ] followed by the column
number, counting from left to right in the SAP Frontend. In the example
illustrated in the preceding graphic, the first column has no heading, so the
spreadsheet represents it as #1.
Note that there is no column #2 in the spreadsheet even though the second
column of the table also has no heading. If no user action is recorded for a
column, then that column is not represented in the spreadsheet.

82

Data Driving Your Script

Note: Be careful when using formulas in a table spreadsheet. The


spreadsheet automatically adjusts cell references when you copy a formula
from one row to another. (See To copy a formula to other cells in the
column: on page 65, in the Verifying chapter for more information.) In a
table spreadsheet, however, the adjustments might be incorrect because of
the extra End rows between the data rows. In this situation you might
need to edit the cell references manually to preserve the correlation of the
data between spreadsheets. See Adjusting Cell References in Table Data
Spreadsheets on page 115 for details.

Using External Data Files


You are not limited to using the Data spreadsheet that belongs to the current
testcase. QuickTest allows you to use external data files as long as they are
compatible with the internal file data.xls. External data files should be used
only when needed.
To set up a script to use external data, select Testcase > Settings to open the
Settings dialog box, then click the External Data tab.

83

QuickTest Professional for mySAP.com Windows Client Users Guide

The External Data tab allows you to specify a list of spreadsheets to use with
a testcase in addition to the local data.xls.
File (edit box) - Enter the complete path and file name (including the .xls
extension). This file must be a QuickTest-compatible spreadsheet.
Browse - Click Browse to locate and select an external .xls file if you dont
know the name or the path.
Alias (edit box) - This required attribute acts as a logical name so that you
need not include the files path in your references to the external
spreadsheet. It also makes maintenance easier, because this is the only place
where you need to change the path if the path changes.
Add - Click the Add button to add the spreadsheet named in the File box to
the list.
Delete - Deletes the selected file from the list.
Open - Opens the selected file in the VC Formula One Workbook Designer.
Note that the column headings appear in row 1 of the spreadsheet when a
file is opened this way.
When setting up an external spreadsheet for use with a QuickTest testcase,
type parameter names in Row 1. Enter any data for a parameter starting with
Row 2.
After an external data sheet is set up, you may reference it from within your
testcases. You may use an external data sheet in the same way that you
would use data.xls, including input, output, verification, and all types of
parameters.
Parameters in external data sheets must be referenced in a certain way. The
following procedure may be used in any situation where the
Constant/Parameter edit boxes appear.

84

Data Driving Your Script

To reference a parameter in an external data sheet:


1 Open the Properties dialog box for the step to be parameterized.
2 Select Parameter.
3 Type the file name, sheet name and parameter name in the Parameter box
using the following format: alias@@sheet::parameter
Note that the information in the Parameter box is case sensitive.
4 After completing the Parameter reference, click OK to close the Properties
dialog box, or click Goto data to open the spreadsheet for this parameter.

Example

Testcase iterations are still determined by the number of rows in data.xls.


For example, if your external sheet has 5 rows of data and the data.xls sheet
has none, the testcase will iterate only once.
Which rows get accessed in the external data sheet is also determined by
which rows are selected in data.xls for a given testcase run. If you select rows
2, 4, and 6 in data.xls, then QuickTest also will access rows 2, 4, and 6 in the
external sheet. Remember that QuickTest always uses data from the current
running row.

85

QuickTest Professional for mySAP.com Windows Client Users Guide

Data in an external file will be available to the Execution Log but not to the
Results spreadsheet or the Results tab of the Report Viewer. You can open the
external file itself using Excel, TTF1.exe (which ships with QuickTest-SAP),
or by clicking the Open button in the External Data tab of the testcase
Settings dialog box.
Several functions for manipulating spreadsheet rows and cells in external
data spreadsheets are available from the Step Generator.
Get Cell Value (Extern) - For the current running row, it is better to use
the Properties dialog.
Set Cell Value (Extern) - For the current running row, it is better to use
the Properties dialog.
Delete Row (Extern)
Insert Row (Extern)
Import Parameter Value (Extern)
Save Workbook (Extern)
See Functions Available from the Step Generator on page 164 for more
information about these functions.

Procedure to Parameterize an Output Step


To parameterize an output step:
1 Make sure that the Screen Capture view is visible.
2 In the Tree view, select the screen icon for the screen that contains the
object whose value you want to capture. That causes the correct screen to
display in the Screen Capture view.
3 Right-click the object in the screen capture view and select Output from the
pop-up menu. The Properties dialog, Output tab opens.
4 Give the parameter a meaningful name, or select an existing parameter from
the Output to list. (The default name is the value the object had when the
screen was captured.)

86

Data Driving Your Script

5 Click OK to close the Properties dialog and insert the step into the tree.
Rather than right-click a screen object (Step 3 above), you can also add
output steps in other ways. Highlight an icon in the Tree view and:
right-click the icon, then select New > Output from the pop-up menu.
select Insert > Output from the main menu.
click the New Output toolbar button.
Each of these methods causes the Select Objects dialog to open and changes
the shape of the cursor to a pointing hand. Double-clicking a screen object
then pops up the Properties dialog box for that object. Then proceed with
Steps 4 and 5 above.

Correlating Data
One of the challenges when automating a business process is to make sure
that data from one step of a business process is automatically entered as
input for a subsequent step when it is required. This practice is called
correlating data.
Data is correlated when it is output from one step of a testcase and used as
input to another step. The steps can be in the same business process or in
multiple business processes.
Business Process

Input

Output

Create Sales Order - VA01

User enters data

1) Order number
2) Material Avail Date
3) Delivery Date

Create Delivery - VL01

1) Order number
2) Material Avail Date or
Delivery Date

Delivery number

Create Invoice - VF01

Delivery number

Document number

In the example scenario outlined in the table above, output from one script
step is used as input to another. This is data correlation.

87

QuickTest Professional for mySAP.com Windows Client Users Guide

When correlation is indicated, the implementer must save the desired


output and reuse it later at the appropriate time. Parameters are necessary to
capture and pass data from one step to another. You need at least one output
parameter and one input parameter in order to correlate data.
To correlate data, you must:
capture the needed output value(s) from a script step in an output parameter
use the captured value(s) as input to a subsequent script step using an input
parameter.
Each business process has its own spreadsheet within the Data workbook.
Each table also has its own spreadsheet. The workbook is a container for
multiple spreadsheets. Each tab of the workbook opens a separate
spreadsheet.
Data dependencies must be entered in the same row in every spreadsheet
(except table spreadsheets) as well as within each spreadsheet. That means
that data passed between two spreadsheets must be in the same row in both
if the input fields using the data are dependent on certain values to be
successful.
To data drive your testcases, you sometimes need to correlate data within a
business process and other times between two business processes.
A cell id from the same spreadsheet as the cell containing the reference is
simply the column and row:

A cell id from another spreadsheet consists of the spreadsheet id and the cell
id separated by an exclamation point:

88

Data Driving Your Script

To correlate data within one spreadsheet:


1 Type an equals sign in the cell of the input parameter.
2 Click in the cell of the output parameter. The cells id is placed in the cell
with the equals sign.
3 Press Enter.
When you run the testcase, the value of the output parameter cell will be
placed in the cell of the input parameter. Later, the input parameter will pass
that value to the server.
To correlate data between two spreadsheets:
1 Type an equals sign in the cell of the input parameter.
2 Click the tab of the spreadsheet with the output parameter.
3 Click in the cell containing the value you want to correlate. The spreadsheet
id and the cell id (separated by an exclamation point) are placed in the cell
with the equals sign.
4 Press Enter.
Test the correlation
After correlating data, you should run the testcase to verify correct
execution. Fix any problems that may arise. Many of the potential problems
could be the result of:
data dependent fields not receiving correct input - this problem can be
resolved by resynchronizing the rows: make sure that all data dependencies
are entered in the same row in every spreadsheet (except table spreadsheets).
correlated fields not receiving correct input - this problem can be resolved
by re-correlating the data: make sure that correlated data is correctly passed
to each input parameter that requires it.

89

QuickTest Professional for mySAP.com Windows Client Users Guide

90

6
Modifying and Troubleshooting Scripts
This chapter explains ways to enhance your testcases and how to diagnose
and fix problems when scripts dont perform to your expectations.
This chapter describes:
Different ways to modify a script for better performance
Troubleshooting tools
Troubleshooting techniques

About Modifying and Troubleshooting Scripts


QuickTest-SAP provides many ways for you to enhance and customize a
recorded testcase to better fit your testingsituation. These include adding
and moving steps and data.
Despite your best efforts, testcases dont always play back perfectly the first
time you run them. For those occasions, QuickTest-SAP offers some tools
and techniques to help you diagnose and correct problems.

91

QuickTest Professional for mySAP.com Windows Client Users Guide

Modifying Testcases
Adding a Step to a Business Process
Sometimes it is useful to add a step to a test. For example, you could add a
comment, either for others or as a reminder for yourself. This might be a
note that certain data will not work for a step or to explain why a certain
step was avoided.

To add a step:
1 Select the step in the icon tree which should follow the step you want to add.
(New steps are inserted above the selected step.)
2 Open the Step Generator dialog box.
Select Insert > Step from the main menu, or
Click the New Step toolbar button

, or

Right-click the selected step icon in the Tree view, then select New > Step
from the pop-up menu.
The Step Generator dialog box opens.
3 Select the step you want to add from the Steps box. For example, expand
the SAP system category and select the SAP Logon step.
4 (Optional) Click the Advanced button to open the Script pane where you
can see and edit the code that would be added to the script for that step.
5 Click OK to close the Step Generator. QuickTest inserts the step into the tree
above the selected step and opens the Properties dialog box for that step.
92

Modifying and Troubleshooting Scripts

6 In the Properties dialog box, add the appropriate information for that step
and click OK.
See Functions Available from the Step Generator on page 164 for detailed
information about the steps you can add to a testcase.

Renaming a Step
There will be times when you want to rename a step in the tree. For
example, when you add a new business process, the default name for the
new step is New Business Process. Probably you will want to change it to
something more meaningful, such as Change Order.
To rename a step:
1 Right-click a step in the tree.
2 Choose Rename from the pop-up menu.
3 Type the step name in the edit box and press Enter.

Note: Business process names may not contain any of the following
characters: \ / : * ? < > |

Moving a Step
QuickTest allows you to move a step in the Tree window using drag and
drop. Move the cursor to the icon of the step you want to move. Press and
hold down the left mouse button to select the step, then drag the icon to its
new position.
Note that this feature allows you to move a step to another location at the
same level of the tree. For example, you could not make a screen step a substep of another screen step.
Note also that this feature does not apply to screen terminator steps (the last
step under a screen step, (e.g., Enter, Save), that occurs before changing the
context to a different screen).

93

QuickTest Professional for mySAP.com Windows Client Users Guide

You may also copy a step and paste it into another location in the tree. You
can then delete the original step to complete the move.

Using Find & Replace

The Find & Replace dialog box is accessible from the main menu by
selecting Edit > Find.
Find what - Type the text you want to find in this box.
Find (lists) - The Find drop-down lists are filters to narrow the scope of the
search.
Use the first list to limit the search to a certain type of object: Data
Objects or GUI Objects. The default is Anywhere (all objects).
Use the second list to limit the search to the current business process
only (the default). You can also choose to search all business processes in
the current view.
Replace
(check box) - Checking this box enables the optional replace feature.
(edit box) - In this box type the text you want to substitute for the found
text.
Match case - Find is not case sensitive unless you check this box.
Direction - Search the tree upwards or downwards for the specified text.
Find Next - Activates a search for the text in the Find what box.

94

Modifying and Troubleshooting Scripts

Replace (button) - Replaces the found text with the text in the Replace edit
box.
Replace All - Replaces all occurrences of the found text with the text in the
Replace edit box.

Changing a Constant Value


If you want to change the input data recorded by the user, right-click the
Input step, select Properties and enter a different value in the Constant edit
box. This changes the recorded value for the Input step to the value that you
want to test.

Changing Fields to Tables After Recording


If you forgot to enable Auto Record Tables and recorded as fields when you
wanted tables, you can make the change without recording again.
To change a recorded field object into a table object:
1 Right-click the table in the screen view and select Table Input from the popup menu. QuickTest inserts a table step into the icon tree and creates a Data
spreadsheet for the table.
2 Delete the steps recorded as fields that are now part of the table.
3 Add column headings (parameters) to the spreadsheet:
Double-click an empty column heading. That opens the Header Name
dialog box.
Type a name for the column heading and click OK. The column heading
name must match exactly the name of the field to be associated with the
column heading.
In the icon tree, right-click the step you want to associate with the new
column heading and select Properties from the pop-up menu.
Select the Parameter radio button.
Select the parameter name (column heading) from the drop-down list.
4 Add input data to the spreadsheet. For each column, enter the data that you
planned to use for running one iteration of the testcase. Make sure that data
dependencies are entered in the same row.

95

QuickTest Professional for mySAP.com Windows Client Users Guide

5 Add a terminator row after the data rows for each iteration. Select the next
row after the last row of data, then select Insert > Terminator rows.

Iteration
terminator
row

6 Repeat Steps 4 and 5 to add data for as many iterations as you want for the
script.

Parameterizing a Grid (ActiveX) Row or Column


To parameterize a Grid (ActiveX) row or column:
1 Right-click the Grid ActiveX icon
from the pop-up menu.

in the Tree View and select Properties

2 In the Row or Column box, replace the recorded value with a parameter
name enclosed in pointed brackets (< >) and close the Properties dialog
box.
3 Open the data spreadsheet and double-click a column heading.
4 Type the name you want for the parameter in the Header Name box and
click OK. The name should be identical to the name you entered in the Row
or Column box of the Properties dialog (Step 2).

96

Modifying and Troubleshooting Scripts

Troubleshooting Tools
QuickTest-SAP offers a number of troubleshooting tools including:
Report Viewer
Object Not Found dialog box
Expert mode
Results spreadsheet
Retry/Delay property settings

Report Viewer
The Report Viewer combines the features of the Execution Log, the Screen
Capture window, and the Results spreadsheet. This combination puts three
troubleshooting tools into one window, and by linking them together the
Report Viewer becomes a powerful troubleshooting tool.
Launch Report Viewer by clicking the View Execution Report toolbar button
from the Execution Log dialog box, or by selecting Report Viewer in the
QuickTest for SAP R3 program group from the Windows Start menu.

97

QuickTest Professional for mySAP.com Windows Client Users Guide

Menu and Toolbar


The Report Viewers menu and toolbar are similar to those of the Execution
Log dialog box.
File > Open - Opens the Open Testcase Results dialog box. Use this dialog
box to navigate to and open any saved execution logs you may have on file.
File > Save As - Opens the Save Testcase Results dialog box. Used to save the
current execution information to the local file system. Also saves the Results
spreadsheets in the specified directory.
File > Print Setup - Opens the Windows Print Setup dialog box.
File > Report Setup - Opens the Report Setup dialog box. For more
information about this dialog see Report Setup on page 105.
File > Print - Opens the Windows Print dialog box. Only the received
screens are available for printing. Both the recorded and the executed
received screens appear in the report.
File > Close - Closes the Report Viewer.
Edit > Clear - Clears the currently displayed execution information and
leaves the Report Viewer open.
Edit > Find - Opens the Find dialog box.

The Find dialog check boxes allow you to search the execution report for
verification failures, verification successes, any kind of error, any kind of
warning, or any combination of those four. Note that Find does not wrap
around the top or the bottom of the log. Find works from the currently
selected line to the end of the file (or the beginning, if you are searching

98

Modifying and Troubleshooting Scripts

backwards). If you want to find all selected items in an execution log, begin
the search at the top of the log.
Edit > Find Next - Locates the next occurrence of the selected Find
option(s). Selecting this item has the same effect as clicking the Find Next
button in the Find dialog box.
Edit > Find Previous - Locates the previous occurrence of any selected Find
option. Selecting this item has the same effect as clicking the Find Previous
button in the Find dialog box.
View > Toolbar - Toggles display of the toolbar buttons on and off. Toolbar
buttons allow you quick access to most of the menu selections.
View > Status Bar - Toggles display of the status bar at the bottom of the
main window. The status bar shows the iteration number and business
process name (if applicable) of the currently selected item.
View > Collapse All - Collapses the tree to a single step.
View > Expand All - Expands the entire tree so that all steps are visible.
View > Show Selected Level (no icon) - Expands or collapses the tree so
that no steps subordinate to the level of the selected step are visible.
Tools > TestDirector - Opens the Connection to TestDirector dialog box. For
more information about this dialog box see Connection to TestDirector
dialog box on page 205.
Help > About Report Viewer - Displays current version information for the
Report Viewer program.

99

QuickTest Professional for mySAP.com Windows Client Users Guide

Details Tab

The Details Tab displays the Testcase Run Summary Report. As illustrated by
the graphic, this report shows summary information for the entire testcase,
each iteration of the testcase, and each business process of each iteration.
The Testcase Status will always show either Passed or Failed. Likewise,
the status of a business process under Iteration Details will show either
Passed or Failed. An iteration may show any of four statuses:
Failed on Error - This status is assigned for any error other than a
verification failure.
Failed on Verification - If there are no other errors, this status is assigned
when there is a verification failure.
100

Modifying and Troubleshooting Scripts

Passed with Verification - This status is assigned when there are no errors
and all verifications passed.
Completed Successfully - This status indicates that there were no errors and
also that there were no verifications in the iteration.
The total of these four statuses will equal the Total Iterations. If an iteration
had multiple errors in a run, it will be counted only once, according to the
rules outlined above. To pass, an iteration must have no errors, at least one
verification, and no verification failures.
The WR-QuickTest Version refers to the version that ran the testcase and
created the log, not to the version you are currently using to display the
report.
The Business Processes in View list is shown in case some business processes
failed to run and therefore did not appear in the log. This could be especially
helpful when Next Error Handling is set to Report Error and Stop, or to Skip
Iteration.

101

QuickTest Professional for mySAP.com Windows Client Users Guide

Screens Tab
The Screens tab of the Report Viewer can display the received and sent
screens of the original testcase recording and of a saved test run. When a
step is highlighted in the left pane of the Report Viewer, the corresponding
screen for that step appears in the Screens tab. Only one screen is displayed
at a time.

To enable this feature, check Save executed screens in the Options dialog
box.
Although Sent screens are displayable in this tab, only Received screens are
printed. Both Executed and Recorded Received screens are printed
irrespective of the selection in this tab.

102

Modifying and Troubleshooting Scripts

Results Tab
The Results tab displays the Results spreadsheet for the current testcase run.
Selecting an iteration in the left pane causes the corresponding row of the
first spreadsheet of the Results workbook to become highlighted. Selecting a
step causes the corresponding business process spreadsheet to open and the
corresponding row to become highlighted.

To preserve data integrity, saving manual changes to the Result spreadsheet


is not supported. This ensures that the spreadsheet is synchronized with the
icon tree of the Report Viewer at all times.
For more information about the Results spreadsheet see Results
Spreadsheet on page 111.

103

QuickTest Professional for mySAP.com Windows Client Users Guide

Printed Reports
The printed report consists of three selectable sections:
summary - appears just like the graphic under Details Tab on page 100
tree - result for each step in the testcase
screen - all screens in the testcase

The bracketed number in the left column of the printed report refers to the
report page number where you can find the screen images corresponding to
that step in the log. Several steps may refer to the same page number
because they represent actions that occurred on the same screen. Both the
recorded and the executed versions of a screen appear on the same page.

104

Modifying and Troubleshooting Scripts

It is a good practice to print only the first few pages if the testcase is a large
one. That avoids printing scores of pages when you might be interested in
only the few that show failures. You may also prefer to use the Find feature
to locate errors, then print out specific pages according to the bracketed
numbers.
Report Setup
The Report Setup dialog box allows you to configure the headers and footers
of the testcase pages that you print from Report Viewer. Select File > Report
Setup to open the Report Setup dialog box.

Default - Resets the Report Setup dialog to its default values (as shown in
the graphic above).
Header/Footer
To add your own text, type it directly into the Header or Footer box.
To format a header or footer:
1 Click the button next to the header or footer. The Header/Footer Element
menu opens.
2 From the menu, select the element you want to include in your header or
footer. QuickTest adds the code for that element to the Header or Footer edit
box.

105

QuickTest Professional for mySAP.com Windows Client Users Guide

The following table shows the code associated with each element.
Code

Header/Footer Element

&C

Center justify

&D

Date

&L

Left justify

&N

File Name

&P

Page number

&R

Right justify

&T

Time

Example: To add the word Date: to the header, followed by the current
date:
1 Type Date: in the Header box.
2 Click the

button, and select Current Date from the pop-up menu.

The Header box will then contain: Date: &D

To change an existing element in a header or footer, select the code for that
element in the Header or Footer edit box, click the
button to open the
menu, then select the element that you want to replace it.
To delete an element, select it in the Header or Footer edit box and press
Delete.
Sections to Print
The three sections of the full report are separately printable. Choose only
the section(s) you want to print.
Summary - The summary pages for the full report

106

Modifying and Troubleshooting Scripts

Tree - The icon tree for the full report


Screens - The received screen images for the full report (the sent screen
images are not printable)

Object Not Found Dialog Box


The Object Not Found dialog appears during a script run when the
Execution Setting is Interactive Prompt and QuickTest cannot execute the
next step because the object referred to in the step is not visible. This dialog
offers many options to help you deal with run-time errors.

The message in the Object Not Found dialog box (also to be found in the
Execution Log) tells you the object QuickTest was looking for and the object
it actually found for the last step that QuickTest tried to execute.
The fact that QuickTest could not find the object it was looking for is often
just a symptom of another problem. Most errors are data-related. For
example, some data can cause an optional screen to appear; invalid data can
cause a system error message to appear rather than the next expected screen.

107

QuickTest Professional for mySAP.com Windows Client Users Guide

The following options are available from the Object Not Found dialog box:
Show Log - Displays the Execution Log. Although the Object Not Found
dialog box shows the last Execution Log message, you may wish to inspect
the log for previous messages.
Execution
Pause - Halts the run temporarily
Continue - Resumes the run after a Pause
Skip Business Process - Skips the current business process and continues
with the next one in the testcase if there is one. Select Skip Business Process
from the Next Error Handling list to apply it to all business processes in the
script.
Skip Iteration - Skips the current iteration and continues with the next one
if there is more data for this testcase. Select Skip Iteration from the Next
Error Handling list to apply it to all business processes in the script.
Stop - Ends the run
Modify Script
If you know the cause of the error, you can use one of the Modify Script
buttons to correct the problem at once.
Record here - If the error was caused by the appearance of a screen that was
not recorded, click the Record here button. This allows you to insert
additional steps or user actions into the script at the point where the error
occurred. QuickTest automatically designates the new screen that you record
here as optional.
Optional Screen - If the error occurred because a recorded screen did not
appear, click the Optional Screen button. This adds the optional screen
attribute to the current step (represented by a yellow question mark on top
of the icon) so that neither the presence nor the absence of the screen will
cause a run error in the future.
Step Properties - If you just want to check the current steps properties
before deciding how to proceed, then click the Step Properties button. This
opens the Properties dialog box for the step that caused the error.

108

Modifying and Troubleshooting Scripts

Next Error Handling


The Next Error Handling options determine the error handling procedure
from the point where the error occurred to the end of the script or until you
change the procedure again. Because the Object Not Found dialog is already
open, Interactive Prompt is the default selection. (Interactive Prompt is the
only choice that causes the Object Not Found dialog to appear during a
run.) If, during the next script run, you prefer to try to continue running the
script without this dialog appearing, you should choose one of the other
options.
From the Next Error Handling list, select one of the following:
Interactive Prompt (the default) - Causes the Object Not Found dialog to
display when an error occurs.
Report Error and Continue - An error message is written to the Execution
Log, and QuickTest tries to continue the run from where the error occurred
(this may not be possible). If you think that the script errors have been
reduced to the non-fatal variety, it may be possible to complete a run this
way despite any errors that occur.
Report Error and Stop - An error message is written to the Execution Log,
and execution stops.
Skip Business Process - Skips the current business process and continues
with the next one in the testcase if there is one. This option is useful only if
subsequent business processes in the script do not depend on output from
this business process. Select Skip Business Process from the Next Error
Handling list to apply it to all business processes in the script.
Skip Iteration - Skips the current iteration and continues with the next one
if there is more data for this testcase. This option might be useful when you
are running many iterations. Using Skip Iteration would prevent one bad
data element from stopping the entire script run. Select Skip Iteration from
the Next Error Handling list to apply it to all business processes in the script.
The Next Error Handling options are also available from QuickTests main
menu. Select Testcase > Settings to open the Execution tab of the Settings
dialog box.

109

QuickTest Professional for mySAP.com Windows Client Users Guide

Expert Mode
Select Tools > Expert to access the following features. If Expert does not
appear on the Tools menu, you must check Enable Expert Mode in the
General tab of the Options dialog box to enable it.
BP File - Opens the .bps file for the current business process. This file
contains the programming code underlying each step of the business
process. Each business process in the testcase has its own .bps file.
View Files - Opens the following submenu:
USR - Opens the .usr file for the current view. The .usr file contains
information needed by LoadRunner to run the script, such as the
business process names, the order in which the business processes should
be run, the spreadsheet names, and the name of the configuration file.
CFG - Opens the .cfg file for the current view. This file contains the runtime settings (e.g., think time, iterations, and logging).
PRM - Opens the .prm file for the current view. This file contains
parameter and spreadsheet information such as parameter names, data
access method, and number of spreadsheet rows (including the column
heading row).
Testcase File - Opens the .bpw file for the current testcase. This file contains
system information such as connection, logon, and error handling settings.
There is only one .bpw file per script.

WARNING: USE THIS FEATURE WITH CARE! Expert mode gives you write
access to the various code and configuration files belonging to a testcase.

110

Modifying and Troubleshooting Scripts

Results Spreadsheet
The Results spreadsheet shows the data used for all parameters during the
most recent script run. That includes:
all input data sent to the server
all output data received from the server
evaluation (either TRUE or not TRUE) of every verification condition
If examining the Results spreadsheet after the run does not help you enough
to resolve the problem, try displaying it while the script is running.
1 Select View > Results Data from the main menu or the Execution Log menu,
or click the View Results button from the main toolbar or the Execution Log
toolbar to open the Results spreadsheet.
2 Run the testcase.

The Results spreadsheet allows you to see the parameters being used in real
time during script execution. By watching the SAP Frontend at the same
time, you may be able to spot the cause of the error.

111

QuickTest Professional for mySAP.com Windows Client Users Guide

Each spreadsheet has one column for each parameter. You can tell the type
of parameter in the spreadsheet by its color:
Input parameters are displayed in blue text.
Output parameters are displayed in gray text.
Expected parameter columns are shaded yellow.
The Results spreadsheet displays data from the most current script run only.
The data is overwritten with each new script run.
The Results spreadsheet shows only those spreadsheets that participated in
the last script run. For example, if you run a script view that contains only
one business process, then the Results data will show only the spreadsheet
for that business process, even though the complete script contained more
than one business process.
The Results spreadsheet resides in the All Business Processes directory (e.g.,
C:\QuickTestR3\testcases\testcase_name\Results). The spreadsheet is
actually a workbook which consists of one or more spreadsheets.

Note: Editing the Results spreadsheet has no effect on future script runs. All
edits to data, formulas, and parameters should be made in the Data
spreadsheet. See Data Spreadsheet (data.xls) on page 213 for details.

112

Modifying and Troubleshooting Scripts

Retry/Delay
The Retry and Delay options give you finer control over the Keypress and
Buttonpress steps.

To set Retry or Delay:


1 Highlight a Keypress step or a Buttonpress step.
2 Right-click, and select Properties from the pop-up menu.
3 Open the Retry tab in the Properties dialog box.
4 Type a number, or click the up and down arrows to change the number of
retries.
5 Type a number, or click the up and down arrows to change the number of
seconds to delay between retries.

113

QuickTest Professional for mySAP.com Windows Client Users Guide

SAP Frontend (SAP GUI for Windows)


In addition to the QuickTest-SAP tools and features mentioned above, the
SAP Frontend can be a source of useful information. When a script run stops
prematurely and you cannot figure out the problem from the contents of
the Execution Log or the Results spreadsheet, the next thing to do is to look
at the current SAP Frontend screen. Select View >SAP Frontend, or click the
View SAP Frontend toolbar button to bring the SAP Frontend screen to the
front of the Windows desktop.
The purpose is to see what was on the screen at the time the error occurred.
The SAP Frontend may show a screen that was not recorded for this testcase.
It may show an error message in the status bar. If the SAP Frontend no
longer shows the screen you are interested in, use the Report Viewer to see
it.

114

Modifying and Troubleshooting Scripts

Troubleshooting Techniques
Adjusting Cell References in Table Data Spreadsheets
As noted earlier, the spreadsheet automatically adjusts cell references when
you copy a formula from one row to another in the Data spreadsheet. When
a formula references a cell in a table spreadsheet, however, the adjustments
might be incorrect because of the extra .End rows (iteration terminators)
between the data rows. In this situation you might need to edit the cell
references manually to preserve the correlation of the data between
spreadsheets.

C2

In the example shown above, data for the second iteration appears in row 2
of spreadsheet VA01 and in row 3 of spreadsheet VA01.All_items. When
replicating the formula from row 1 to row 2 of VA01, the spreadsheet
adjusted the formula reference from VA01.All_items!B1 to
VA01.All_items!B2.

115

QuickTest Professional for mySAP.com Windows Client Users Guide

To maintain the correct data dependency, the implementer had to change


VA01.All_items!B2 to VA01.All_items!B3 manually, as shown in the example
below.

C3

Using the above example, if the formula had been in VA01.All_items and
referenced a cell in VA01, rather than increasing the row number you would
have had to decrease it (e.g., for a formula in All_items cell B3, the reference
would be to VA01!D3. You should change it to VA01!D2).
Note that when you import a business process, any parameters and formulas
come with it. The formulas still refer to spreadsheets and cells in the original
script. Consequently, you may need to adjust the formulas manually to
synchronize them with the spreadsheets and cells of the current script. It
may be easier to redo a formula completely, rather than to adjust an
imported formula.

More Iterations Than Spreadsheet Rows


If the Execution Log window shows mores iterations than there are rows of
data in the spreadsheet, then the spreadsheet contains empty rows. Delete
an empty row by selecting Edit > Delete Rows. Using the Delete key deletes
only the content, not the row!

116

Modifying and Troubleshooting Scripts

Spying with the Select Objects Dialog Box


You can use the Select Objects dialog to spy on GUI objects to see their
properties without opening the Properties dialog for each object. Note that
this technique works only on recorded screens, and not on the actual SAP
Frontend screen session.

Data in Database does not exist


Sometimes, especially when correlating data, an error message such as E:
Document 80003848 does not exist appears when your testcase tried to
input 80003848 into a data entry field. The data was captured from a
previous business process, the process was verified, and a database
inspection reveals that the data does indeed exist.
This situation could be the result of a timing problem. The recorded script
may have tried to input the data before the server had finished updating all
the processes that use the data. If the error caused the Object Not Found
dialog to display, try clicking the Continue button from that dialog. Often
by the time you press the button, the server has caught up with its
processing backlog, and the recorded script will now run correctly.

Importing a Business Process with Parameters and Formulas


When you import a business process into a testcase, any parameters and
formulas belonging to that business process are imported with it. Imported
formulas refer to spreadsheets and cells in the original testcase.
Consequently, you may need to adjust the formulas manually to
synchronize them with the spreadsheets and cells of the current testcase. It
may be easier to redo a formula completely rather than to adjust an
imported formula.

Renaming Parameters
Parameter names and the corresponding column headings in the data
spreadsheet must be the same. If you rename a parameter, QuickTest will
add a new column to the data spreadsheet. The heading of the new column
will be the same as the new parameter name.

117

QuickTest Professional for mySAP.com Windows Client Users Guide

To ensure that spreadsheet data will work correctly, you should delete the
new spreadsheet column and rename heading of the old one so that they
are once again the same.

Optional Screens
An optional screen is a screen or pop-up dialog box that may or may not
appear depending on the data used. The optional screen causes a deviation
from the recorded transaction steps.
If you are creating a sales order (VA01), data entering a one value for the
Sold-to party input field could cause a Partner dialog to appear. Entering a
different value could cause an Unloading Points dialog to appear. Other
Sold-to party values cause neither of these dialogs to appear. The Partner and
Unloading Points screens are optional in the sense that the business process
does not require them for all values of Sold-to party.
If you have identified an optional screen during the planning or recording
steps, you can designate it as optional from the Properties dialog box.
To make a Screen step optional:
1 Record the user actions for the optional screen as part of the business
process.
2 After you have finished recording, highlight the optional screen step in the
Tree window and right-click it.
3 Select Properties from the pop-up menu. The Properties dialog box opens.
4 Check the Optional screen check box in the Screen tab of the Properties
dialog.
5 Click OK to close the Properties dialog. A yellow question mark now covers
half the icon in the Tree window.

118

Modifying and Troubleshooting Scripts

System errors
Server error messages may occur for a number of reasons:
data already used cannot be used again (e.g., Order number already exists)
invalid data dependency (e.g., Sold-to party 9999 not defined for Sales org.
1234)
certain actions temporarily cut off by the system (e.g., posting period not
valid after 5/98)
requested data not found (e.g., Requested delivery does not exist)
To find the underlying problem you should check the Report Viewer or the
status bar of the SAP Frontend window for any system error messages.
Data already used cannot be used again
This is sometimes known as unique data. To fix the problem, do one of
the following:
Change the Next Error Handling setting - Use Skip Iteration or Report
error and continue. These settings are accessible from the main menu by
selecting Testcase > Settings, or from the Next Error Handling list in the
Object Not Found dialog box. These settings were explained earlier in this
section.
Parameterize the input field - Parameterizing an input field means
replacing a recorded data value with a placeholder (parameter) and
controlling the input data from the Data spreadsheet. For a full discussion of
this technique, see Procedure to Parameterize an Input Step on page 77.

119

QuickTest Professional for mySAP.com Windows Client Users Guide

Delete the transaction - If the business process is reversible, use the delete
transaction as part of the testcase.
Fix the data - Create new data that avoids the problem.
Invalid data dependency
Fix the data in the data spreadsheet in one of two ways:
Find correct values for the fields the field is dependent on.
Eliminate the row of data that caused the error.
Certain actions temporarily cut off by the system
Request the system administrator to reinstate the actions for the current
period.
Postpone this part of the testing until the actions are reinstated.
Requested data not found
Eliminate the data that caused the error.
Put the missing data into the system.

120

7
Integration with Other Testing Tools
QuickTest-SAP is integrated with other Mercury Interactive testing tools.
This chapter describes:
Integration with LoadRunner
Integration with TestDirector
Integration with WinRunner

Integration with LoadRunner


LoadRunner is Mercury Interactives load testing tool. If you have
LoadRunner 5.02 (or higher) installed, you can use a QuickTest testcase file
(including a testcase with recorded ActiveX controls) as a LoadRunner script.
This enables you to run multiple virtual users connected to an SAP system
and perform load testing. You can install LoadRunner Add-in support during
the QuickTest-SAP installation process, or you can install it separately at any
time.
To install the LoadRunner Add-in separately, select Programs > QuickTestSAP > LoadRunner Add-in Setup from the Start menu. You should also run
this program if you reinstall LoadRunner for any reason (such as upgrading).

121

QuickTest Professional for mySAP.com Windows Client Users Guide

This section describes the LoadRunner features available in QuickTest-SAP.


Setting the LoadRunner Data Access Method
Adding a LoadRunner Transaction to a Testcase
Parameterizing vuser_init
Running a Testcase from LoadRunner
Editing a Testcase from LoadRunner
Adding a Global Spreadsheet
Using the SAP Monitor

Setting the LoadRunner Data Access Method


To set the Data Access Method and related properties, open the Properties
dialog for the business process step. The Properties dialog box opens with
the LoadRunner tab displayed.

When you change any of these settings, the information is saved with the
testcase when you save the testcase again. The saved settings will be used by
LoadRunner if you choose to run the testcase from the Controller.

122

Integration with Other Testing Tools

Data Access Methods


Sequential - Data is used in the order that it appears in the Data
spreadsheet. This method assigns the data in row 1 to each Virtual User
(Vuser) for iteration 1, row 2 for iteration 2, etc. Because all Vusers use the
same data per iteration, this method is useful only when there are no unique
constraints on any of the data entry fields in the testcase.
Random - Data is assigned randomly to each Vuser according to the
LoadRunner rules. Usually, Vusers will not be using the same data, but that
circumstance is not ensured with this method. Consult your LoadRunner
documentation if you need more information about this setting.
Unique - This is the only data access method that ensures that Vusers will
not contend for the same data during a particular test run. With this setting,
rows are assigned for the exclusive use of a particular Vuser so that no two
Vusers ever access the same row. It is up to the tester to ensure that all
data values in the spreadsheet are unique. If the testcase is run again, the
same data will be used again.
Properties
Repeat - When Repeat is checked, LoadRunner will reuse the spreadsheet
data if there are not enough rows to complete all the specified iterations of
the testcase. When used in conjunction with the Sequential data access
method, Repeat causes QuickTest to start over with Row 1 of the Data
spreadsheet. When used with the Unique data access method, Repeat causes
QuickTest to start over with the first row of the block assigned to each Vuser.
Set # of unique rows/user - Checking Set # of unique rows/user allows you
to determine the number of Data spreadsheet rows to assign to each Vuser in
a LoadRunner scenario. Entering a number in the default # of iterations box
tells LoadRunner how many rows of data (the block size) to assign to each
Vuser. Checking Repeat in addition to Set # of unique rows/user causes
QuickTest to reuse data beginning with the first row of the Vuser block. If Set
# of unique rows/user is not checked, then the block size is equal to the
number of iterations (set in the LoadRunner Run-Time Settings dialog box),
and the Repeat option is disabled. This property is enabled only when the
selected Data Access Method is Unique.

123

QuickTest Professional for mySAP.com Windows Client Users Guide

Adding a LoadRunner Transaction to a Testcase


LoadRunner Transaction steps are used in pairs to measure the execution
time of the steps between them.
To add a LoadRunner transaction to a testcase:
1 Select the first step in the testcase icon tree that you want to include in the
LoadRunner transaction.
2 Click the New step button, or Select Insert > Step from the main menu. The
Step Generator dialog box opens.
3 From the Step Generator dialog box, open the LoadRunner category and
select LoadRunner Start Transaction. The Properties dialog box opens.

4 Type a name for the transaction (e.g., t_logon).


5 Click the OK button. The Start LoadRunner Transaction step
is inserted
above the step you selected in the tree (see Step 1 of this procedure).
6 Select the step in the testcase tree following the last step that you want to
include in the LoadRunner transaction.
7 Click the New Step button, or Select Insert > Step from the main menu.
8 From the Step Generator dialog, open the LoadRunner category and select
LoadRunner End Transaction.

9 In the Properties dialog box, type the same name that you used for the
LoadRunner Start Transaction step.

124

Integration with Other Testing Tools

10 Select a Status from the list: LR_PASS, LR_FAIL, or LR_AUTO. Use LR_AUTO
unless you are inserting your own code. When a transaction comprises more
than one step, LR_AUTO returns FAIL if any one step fails within that
transaction.
11 Click the OK button. The LoadRunner End Transaction step
above the step you selected in the tree (Step 6 above).

is inserted

Note: The Step Generator inserts new steps above the selected step in the
icon tree.

Parameterizing vuser_init
A Vuser script requires at least three sections: vuser_init, one or more
Actions, and vuser_end. The vuser_init section contains login information
such as the username and password.
QuickTest-SAP enables you to parameterize the vuser_init section of the
QuickTest-SAP vuser scripts. This enables you to vary the login information
for each Vuser.
To parameterize the vuser_init section of a QuickTest-SAP Vuser script:
1 In QuickTest-SAP, select Testcase > LoadRunner Init action > Add init data
sheet. This inserts the a data sheet into the data file and creates four
parameters.

125

QuickTest Professional for mySAP.com Windows Client Users Guide

2 Select Testcase > LoadRunner Init action > Show init.bps file. The init.bps
file opens in a text editor.

In the sap_connect function and sap_logon function, the empty quotes


indicate that the data is taken from the SAP tab in the LoadRunner
Controller Run Time settings dialog box.

126

Integration with Other Testing Tools

3 Remove the slashes // from the sap_logon line with the empty quotes and
add slashes in front of the sap_logon line containing the parameter names.
For example:

Note that you do not have to change all the sap_logon arguments to
parameters. You can change some of the arguments to constants. For
example, if the language is always English, you can replace <Language>
with the constant EN.
4 Select File > Save or click the Save button.
5 Select File > Exit.
6 Select View > Parameter Data or click the View Data button. The Data table
opens and displays column names taken from the sap_logon function in
the init.bps file.
7 Enter data into the Client, Username, Password, and Language columns.
Each row you use represents an iteration of the test. For more information
on adding data to a Data table, see Chapter 5, Data Driving Your Script.

127

QuickTest Professional for mySAP.com Windows Client Users Guide

8 Select File > Close.


You can set the Data Access Method for the vuser_init section. To do so
select Testcase > LoadRunner Init action > Data Access Method. It is
recommended that you use the default data access method, Unique. If you
would like to use a different data access method see Setting the
LoadRunner Data Access Method on page 122. Note however that since the
vuser_init section is only executed once, the other data access methods may
not be applicable.

Running a Testcase from LoadRunner


Note that the procedure below applies to LoadRunner 5.02 through 6.5. For
information on setting up a scenario in the LoadRunner 7.0 Controller refer
to the LoadRunner 7.0 documentation.
To setup a LoadRunner scenario:
1 Start a new scenario.
2 Restore the scripts window.
3 Type a name for the Vuser in the Vuser Script Information Name field.
4 Add a new script:
To add a QuickTest-SAP script from the file system:
In the Path box, click the Browse button. Navigate to the testcase name,
select it, and click Open to run the All Business Processes view.
To run a different view, select a view from the Testcases subfolder. For
example: ...\<testcase_name>\Testcases\<view_name>
Click OK to close all dialog boxes.
To add a QuickTest-SAP script from a TestDirector database:
Make sure that you are connected to a TestDirector database.
Click the Browse button in the Path box.
Select QuickTest/SAP Testcase Files from the Test Type list. QuickTest
scripts appear, identified by the QuickTest icon.
Select a test, then click OK to close all open dialog boxes.

128

Integration with Other Testing Tools

Complete the other information to add the script.


Click OK to close the Vuser Script Information dialog box. In the Scripts
window the script Type should say DB: sap.
5 After the script has been added, click the Run-Time Settings icon or rightclick on the script name in the Scripts window and select Run-Time Settings
from the pop-up menu. An SAP tab appears in that dialog as illustrated by
the following graphic.

In the LoadRunner Run-Time Settings dialog box, the logon information


that was saved with the testcase is displayed. LoadRunner makes a local
copy of this information, so you can change it without affecting the testcase
in QuickTest.

129

QuickTest Professional for mySAP.com Windows Client Users Guide

In addition, you have the following options:


Show SAP Frontend during run - When this box is checked the the SAP
Frontend is launched during the run so that you can see which screens are
displayed and what data is entered. Only one copy of the SAP Frontend is
displayed no matter how many Vusers are running. This option is not
supported when Support ActiveX is enabled.
Enable Dialog Step Transactions - By default, automatic transactions are
disabled. Enabling them causes LoadRunner to insert a transaction for each
dialog step. These transactions then become part of the results analysis file
and show up in the graphs and reports.
Perform Verifications - Verifications in the testcase are performed only if
this box is checked. If the box is not checked, then the output part of each
verification step is performed but not the verification part.
See your LoadRunner documentation for information on the other tabs in
the Run-Time settings dialog box.

Editing a Testcase from LoadRunner


To edit a testcase from LoadRunner, right-click on the script name either in
the Scripts window or in the Vusers window, then select Edit script from the
pop-up menu. This action launches QuickTest-SAP with the script you
clicked already loaded. From the QuickTest window you can edit the script.
Close QuickTest when you have finished editing. Select Script > Refresh
from the Controller menu before running the scenario to ensure that your
edits are included in the next run.

130

Integration with Other Testing Tools

Adding a Global Spreadsheet

The Global spreadsheet holds read-only LoadRunner Vuser data which can
be used to create unique data, among other things. It is also a convenient
place to store data that you want to be accessible to all business processes.
To add a Global spreadsheet to the testcase Data workbook:
1 Select Tools > Options from QuickTests main menu. The Options dialog box
opens.
2 Click the LoadRunner tab.
3 Check the Enable Global data check box.

131

QuickTest Professional for mySAP.com Windows Client Users Guide

4 Click OK.

The new Global spreadsheet contains four output parameters with one row
of sample data filled in. The Global spreadsheet can be useful for capturing
Vuser information to help you construct unique and meaningful Vuser ids.
The parameters are:
Iter - The iteration number
VID - The LoadRunner Vuser id for the LoadRunner scenario
Host - The host name assigned to the LoadRunner scenario
Group - The Group name created by the tester for the LoadRunner scenario
For more information about these parameters and how they are used,
consult your LoadRunner documentation.

132

Integration with Other Testing Tools

Using the SAP Monitor


You can monitor LoadRunner scenario execution using LoadRunner online
monitors. The QuickTest-SAP Virtual User Driver Add-in adds the SAP
monitor to the LoadRunner Controller. This monitor enables you to analyze
the performance of an SAP system using statistical data from the SAP
backend.
You can use the SAP monitor to view:
the number of configured instances for each SAP system
data for all application instances, not just the one you logged on to
transactions used and the users that call them
number of users working on the different instances
performance history for recent periods of all instances
response time distribution and resource consumption for any application
server
application server workload for today or for a recent period
You select measurements to monitor the workload on an SAP system using
the Add SAPMonitor Measurements dialog box.
To activate the SAP monitor graph:
1 In the LoadRunner Controller, open a scenario.
2 Click the Run tab. The default graphs are displayed in the Scenario Groups
window.

133

QuickTest Professional for mySAP.com Windows Client Users Guide

3 Select Monitors > Online Graphs. The Open a New Graph dialog box opens.

4 Click the + next to Application Server Resource Graphs, select SAP


Monitor.
5 Click Open Graph. The graph appears in the graph view area.

134

Integration with Other Testing Tools

To configure the SAP Monitor:


1 Right-click the graph in the graph view area and choose Add
Measurement(s), or choose Monitors > Add Online Measurement. The SAP
Monitor dialog box opens

2 In the Monitored Server Machines section of the dialog box, click Add to
enter the server name or IP address of the machine you want to monitor.
Select the platform on which the machine runs, and click OK.

Note: You can specify a system number along with the IP address. To do so,
add a : (colon) after the IP address and then type the system number. For
example:

199.35.106.162:00

135

QuickTest Professional for mySAP.com Windows Client Users Guide

3 In the Resource Measurements section, click Add. The SAPMonitor Logon


dialog box opens.

4 Enter a logon name, password, server name and client. Click OK.
The Add SAPMonitor measurements dialog box opens, displaying the
available measurements for the Workload object.

136

Integration with Other Testing Tools

5 Select a measurement for the SAP Workload object. The following table
describes the most commonly used measurements.
Measurement

Description

Average CPU time

The average CPU time used in the work process.


During a dialog box step, the CPU of the
application server is used for processing (such as
loading, generating, database request processing,
and ABAP processing).
The CPU time is determined by the operating
system. At the end of the transaction step, the
application server work process queries the CPU
time from the operating system. The CPU system is
therefore not an additive component of the
response time, unlike the wait, roll-in, load, and
database time.

137

QuickTest Professional for mySAP.com Windows Client Users Guide

Measurement

Description

Average response time

The average response time is the average time


measured from the time a dialog box sends a
request to the dispatcher work process through the
processing of the dialog box, up to the time the
dialog box is completed and the data is passed to
the presentation layer. The response time between
the SAP GUI and the dispatcher is not included in
this value.
The response time does not include the time taken
to transfer data from the SAP Frontend to the
application server. For networks with low
performance, this can create a highly subjective
response time.
Response time is usually split into wait time plus
dispatch time. The SAP response time is composed
of the following components:
Response time = wait time + dispatched time

Dispatched time = Generation time during


runtime + Loadtime for programs, screens and
CUA interfaces, + Roll times to roll-in work data,
+ABAP processing time, + Enqueue time for
logical SAP lock procedures, + CPIC/RFC time,
+Roll wait time (apart from task types
(RFC/CPIC/ALE)
The CPU time is not an additive component of the
response time, but the sum of the CPU time that is
used by the individual components. The CPU time
therefore provides additional, independent
information on the response time.
Average wait time

138

The time an unprocessed dialog box step waits in


the dispatcher queue for a free work process.
Under normal conditions the dispatcher work
process should pass a dialog box step to the
application process immediately after receiving the
request. Under these conditions, the average wait
time is a few milliseconds. A heavy load on the
application server or on the entire system causes
queues at the dispatcher queue.

Integration with Other Testing Tools

Measurement

Description

Average load time

The time needed to load and generate objects such


as ABAP source code and screen information from
the database.

Database calls

The number of parsed requests sent to the database.

Database requests

The number of logical ABAP requests for data in the


database. These requests are passed through the SAP
backend database interface and parsed into
individual database calls.
The proportion of database calls to database
requests is important. If access to the information in
a table is buffered in the SAP buffers, database calls
to the database server are not required. Therefore,
the ratio of call/requests gives an overall indication
of the efficiency of table buffering. A good ratio is
1:10.

GUI time

The GUI time is measured in the work process and


is the response time between the dispatcher and the
GUI.

Roll ins

The number of rolled in user contexts.

Roll outs

The number of rolled-out user contexts.

Roll in time

The processing time for roll ins.

Roll wait time

Queue time in the roll area. When synchronous


RFCs are called, the work process executes a roll out
and may have to wait for the end of the RFC in the
roll area, even if the dialog box step is not yet
completed. In the roll area, the RFC server programs
can also wait for other RFCs set to them.

Average time per logical


DB call

Average response time for all commands sent to the


database system (in milliseconds). The time
depends on the CPU capacity of the database server,
network, buffering, and on the input/output
capabilities of the database server. Access times for
buffered tables are many magnitudes faster and are
not considered in the measurement.

139

QuickTest Professional for mySAP.com Windows Client Users Guide

6 Click Add. Repeat for each measurement you would like to use and then
click Close.
7 Click OK in the SAP Monitor dialog box to activate the monitor.
For more information on online monitoring, refer to your LoadRunner
Controller Users Guide.

Integration with TestDirector


TestDirector is Mercury Interactives test and defect management tool. If you
have TestDirector 5.01 (or higher) installed, QuickTest lets you connect to
TestDirector (including the browser-based TestDirector 7i), run tests stored
in TestDirectors databases, save test results to a TestDirector database, and
display run results in TestDirectors Run Tests tab. In addition, you can
configure QuickTest to convert a QuickTest testcase to TestDirector design
steps when you save it. You can also launch QuickTest from TestDirector.
This section describes the TestDirector features available in QuickTest-SAP.
Connecting to TestDirector
Opening and Saving Tests
Saving Execution Results
Opening Execution Results
Running Testcases from TestDirector
Generating TestDirector Design Steps

140

Integration with Other Testing Tools

Connecting to TestDirector
To connect to TestDirector from QuickTest:
1 Open the Connection to TestDirector dialog box. Select Tools > TestDirector
from QuickTests main menu or from the Report Viewers menu.

2 Type the Server name, and click Connect.


3 Select a Project from the Project list.
4 Type a valid User Name and Password in the appropriate boxes.
5 Click Connect.
6 Click Close.

141

QuickTest Professional for mySAP.com Windows Client Users Guide

Opening and Saving Tests


After QuickTest is connected to TestDirector, the File > Open dialog box is
affected as shown by the following graphics.

142

Integration with Other Testing Tools

You can switch back and forth between the TestDirector and local file
systems by clicking the File System and TestDirector buttons.
The File > Save As dialog box is affected the same way as the Open dialogs.
When connected to TestDirector, a File System/TestDirector button lets you
toggle between the two systems. The Save As dialog box title will be Save to
TestDirector project when accessing a TestDirector database.

Saving Execution Results


When QuickTest is not connected to TestDirector and the save the
Execution Log, the Save Execution Results dialog looks like the following
graphic:

If the test you just ran was opened from TestDirector, you can choose to save
the execution results to the TestDirector database. In that case the Save
Execution Results dialog looks like the following graphic:

143

QuickTest Professional for mySAP.com Windows Client Users Guide

If you click the Goto File System button, the button label changes as in the
following graphic:

When you save execution results to a TestDirector database, the results of


any verification and report check (tl_step) steps are saved as well as any
reported errors. The actual and expected value fields in TestDirector are
populated appropriately by QuickTest verification steps.

Opening Execution Results


The results of a test run in TestDirector can be opened from QuickTest and
displayed in the Report Viewer or the Execution Log dialog box.
To open test results stored in a TestDirector database (from QuickTest):
1 Select File > Open and open the QuickTest test from the TestDirector
database.
2 Open the Execution Log.

144

Integration with Other Testing Tools

3 Click Open from the Execution Log dialog box. The Open Testcase Results
dialog box opens.

4 Select a run from the Run Name list and click OK. The test results are
displayed in the QuickTest Execution Log dialog box.
To open test results stored in a TestDirector database (from Report Viewer):
1 Click the Open button or select File > Open from the menu. The Open
Testcase Results dialog box opens.
2 Select a run from the Run Name list and click OK.

Running Testcases from TestDirector


QuickTest testcases can be run from TestDirector. Note that they can be run
only in batch mode, not interactive mode. Therefore, if a QuickTest testcase
was saved with the Next Error Handling set to Interactive Prompt, that
setting will be changed to Report error and continue when running the
testcase from TestDirector. However, if Next Error Handling is set to
anything other than Interactive Prompt, then that setting will be used by
TestDirector. For more information on running testcases from TestDirector
please consult your TestDirector documentation.
145

QuickTest Professional for mySAP.com Windows Client Users Guide

In TestDirector 7.02 you can run test cases with command line options.
To specify command line options for a test case:
1 In the Execution Grid in the TestLab tab, select the test case.
2 Click the Test Run Properties button. The Test Run Properties dialog box
opens.
3 Click the Exec Config tab. The Exec Config tab appears:

4 Type in the required command line options. For information on available


command line options see Chapter 3, Recording and Running Scripts.

146

Integration with Other Testing Tools

Generating TestDirector Design Steps


When Generate Design Steps on Save is checked in the TestDirector tab of
the Options dialog box, saving a testcase to a TestDirector database causes
each step in the icon tree to be stored as a test step. Unchecking this box is
recommended when the testcase has many steps because it slows the Save
process considerably. Instead, select Testcase > Generate TestDirector
Design Steps, to save steps manually as needed.
The following two figures show what the steps of one testcase look like in
QuickTest and in TestDirector.
Testcase steps in QuickTest:

147

QuickTest Professional for mySAP.com Windows Client Users Guide

Testcase steps in TestDirector:

QuickTest tests appear with the QuickTest icon in the TestDirector tree.

148

Integration with Other Testing Tools

Integration with WinRunner


Using this open API and WinRunner Professional or other tools, you can
pass data between SAP systems and other system components (e.g., the
Web).
The WinRunner add-in can be used to create a complete end-to-end system
testcase where part of the system is based on SAP modules and part of it on
the Web. For example, a system which has a Web interface for employee
self-service could be tested.
The script could be implemented to enter a new employee record in the SAP
system and then to verify that the record displays on the intranet. The
implementer would record the business process to create an employee and
then create a step to invoke WinRunner to check for that employees
existence on the Web Intranet. To create that step, the user should invoke
the QuickTest Step Generator and add a WinRunner script call. One of the
steps properties is the full path to the WinRunner script.
WinRunner needs to search for the newly created employee ID and return
Found | Not Found. QuickTest offers a communication DLL that allows
exactly that. QTDataAgent.dll exports two functions:
declaration:

load_dll(c:\\ProgramFiles\\Mercury\\WinRunner\\<dll_name>.dll);
extern int qt_set_value(string parameter, string value, string spreadsheet);
extern int qt_get_value( string parameter, inout string value, int size, string
spreadsheet);
usage:

qt_set_value() - set a QuickTest-SAP parameter in the results workbook


qt_get_value() - get a QuickTest-SAP parameter from the results workbook
Please note that the value of the parameter is evaluated according to the
currently running business process and iteration. This means that the user
does not need to know which spreadsheet or row to access. The spreadsheet
argument is not in use for now.

149

QuickTest Professional for mySAP.com Windows Client Users Guide

In the example shown above, WinRunner would drive the Web application
and attempt to locate the employee ID gotten from QuickTest by using
qt_get_value(). After WinRunner is done, it sets a value for a parameter in
QuickTest that indicates the status of the WinRunner search. Users can then
add a Report Check step to evaluate a formula that should look something
like =B2="Found", where B2 should hold the value returned by WinRunner.

Note: The wrun.exe location is calculated based on the wrun.ini file, section
[WrEnv], entry "M_ROOT". This points to the WinRunner root. To that is
added "arch\wrun.exe".

Known Limitations:
WinRunner should not be running before QuickTest launches the
WinRunner script. If so, WinRunner will fail to open or run the script and
QuickTest will hang.
WR is launched and terminated each iteration, instead of being launched
once and continuing to run until the end of the QuickTest execution.

150

8
Advanced Topics
This chapter deals with QuickTest-SAPs advanced features and techniques
which give power users much greater control and flexibility over their
testcases than do the standard features.
This chapter describes:
How to work with object attributes
StepGenerator functions you can add to your testcases and how to
customize the StepGenerator by adding your own functions
Adding flow control steps such as branching and looping
Using reference text for objects with no labels

151

QuickTest Professional for mySAP.com Windows Client Users Guide

QuickTest-SAP File Structure

In the example above, CreateOrder is the testcase name.


Other useful files:
\QuickTest for R3\dat\StepGenerator.dat - This text file contains the
categories, steps and code used by the Step Generator dialog box. You can
add your own steps and functions to the Step Generator by modifying this
file. (See Return Codes of Functions on page 178.)
\QuickTest for R3\dat\bp.h - bp.h defines the lr_ functions and flow
control macros, and contains support for parameterization and external
data files.
\QuickTest for R3\dat\ bpsap.h - bpsap.h contains support for SAPs
GuiLib.

152

Advanced Topics

QuickTest-SAP Object Attributes and Classes


Attributes
Attributes

Characteristics

activex_progid

any ActiveX control

attached_text

static text belonging to an object when it is not a


label

back_color

background color; values can be a number from 0 to


29; modifiable, deletable; documented in detail in
bpsap.h (search on color).

class

the type of object (e.g., window, menu, button);


NOT modifiable or deletable

color

foreground color; values can be a number from 0 to


29; modifiable, deletable; documented in detail in
bpsap.h (search on color).

col

screen column, numbered from left to right;


modifiable and deletable

enable

determines whether the object is active, usable;


values are 1 and 0; modifiable, deletable

height

vertical size in screen characters; modifiable

intensive

specifies whether the objects foreground color is


intense; values are 1 and 0.

key

an internal code for a keyboard key; modifiable,


deletable

label

the static text of the object (e.g., Save on a button


object); modifiable, deletable

list_page_rows

the number of rows of an SAP list object displayed


at one time

list_rows

the number of rows in the entire list

list_start_row

the first row of the current list display

location

a control index for the screen; modifiable, deletable

153

QuickTest Professional for mySAP.com Windows Client Users Guide

154

Attributes

Characteristics

name

a system-assigned identifier; modifiable, deletable

program

the name of the program in the application server


thats running when this object appears; modifiable,
deletable

readonly

determines whether a user can change the value of


the object; values are 1 and 0; modifiable, deletable

reftext

text object associated with a different object; must


be created by the user; see Using Reference Text
on page 198 for more information

row

screen row, numbered from top to bottom;


modifiable and deletable

screen

the name of the screen on which the object appears;


modifiable, deletable

table_page_rows

the number of rows displayed at one time

table_rows

the number of rows in the entire table

table_start_row

the first row of the current table display

value

data (e.g., text in an edit box; check/unchecked for


a check box); modifiable, deletable

visible

determines whether a user can see the object on the


screen; values are 1 and 0; modifiable, deletable

width

horizontal size in screen characters; modifiable

Advanced Topics

Attribute Types
Type

Characteristics

obligatory

no preceding character (e.g.: value); used by


QuickTest to identify an object uniquely

optional

preceded by an asterisk (e.g.: *value); used to help


identify objects if multiple objects have the same
obligatory attributes; can be made obligatory

informational

preceded by a hyphen (e.g.: -value); carries possibly


useful information, unnecessary for object
identification (e.g., -row, -col); can be made
obligatory or optional

Classes
Class

Default Recorded Attributes

button

class, value, name, *location

checkbox

class, label, name, *location,-value

edit

class, name, *location, -value

grid_activex

class, activex_progid, -label

key

class, -label, key

manager

class, name, *location

menu

class, label, *location

object

class, label, name, *location

radiobutton

class, label, name, *location, -value

rtf_edit_activex

class, activex_progid, -label, *location

static

class, value, name, *location

status_bar

class, -value

table

class, label, name, *location

table_caption

class, label, name, *location

155

QuickTest Professional for mySAP.com Windows Client Users Guide

156

Class

Default Recorded Attributes

table_column

class, label, name, *location

table_select_btn

class, label, name, *location

toolbar_activex

class, activex_progid, -label

tree_activex

class, activex_progid, -label

window

class, -label, screen, program, -width, -height

Advanced Topics

Working with Object Attributes


Attributes define an object. Throughout the course of scripting user actions
with QuickTest, you may need to create and modify objects. The Object tab
of the Properties dialog is the place where attributes can be copied and
modified as needed. The features available in the Object tab give you great
control over the objects in your testcase and, if improperly used, can also
cause problems.
In general, an attribute may be modified or deleted based on the attribute,
not on the attribute type. For example, the attributes row and column are
often informational but they may not be deleted, whereas the name
attribute is obligatory and may be deleted.

Object Tab

The Object tab of the Properties dialog box displays SAP Frontend
information and allows some modifications.
Tag - The Tag box displays the objects name.

157

QuickTest Professional for mySAP.com Windows Client Users Guide

Attribute - The Attribute list displays the objects attributes, such as class,
name, location, and value.
Value - The Value list displays the value of each attribute when the object
was recorded or last modified. Some of these values accept wild cards and
parameters.
Attribute name - You can modify the attribute type and the name of some
attributes in this edit box.
Attribute value
Constant (the default) - Leave this box checked if the attribute value is
not expected to change.
Parameter - Check this box if you want the attribute to be able to take a
range of dynamic values.
Goto data - Opens the Data spreadsheet.
Options - Opens the following menu:
New Attribute - Adds a new attribute to the list with the default name
attr and the default value value.
Delete Attribute - Deletes the selected attribute with no confirmation
message.
Copy - Copies all attributes of the object to the Windows clipboard.
Paste - Pastes previously copied attributes to the current object.
Modify - Opens the Object Description Text dialog box for editing. See
Modifying Attributes on page 161 for information about using this
feature.
Select Object - Opens the Select Objects dialog box and changes the
cursor to the shape of a pointing hand. Allows you to point to a screen
object and substitute that objects properties for the properties of the
current object. For more information about this feature see Replacing an
Objects Attributes on page 159.

158

Advanced Topics

Add Reference Text - Opens the Select Objects dialog box and allows
you to point to screen text to associate with the selected object. Use this
when the text associated with the selected object is a separate object in
the SAP Frontend. See Using Reference Text on page 198 for more
information about this feature.

Replacing an Objects Attributes


QuickTest-SAP provides an easy way for you to replace an objects attributes
with the attributes of another object.
To replace an objects attributes with the attributes of another object:
1 Open the Properties dialog, Objects tab, for the object whose attributes are
to be replaced.
2 Click the Options button, and choose Select Object from the pop-up menu.
The Select Objects dialog box opens and the cursor changes to the shape of a
pointing hand.

Object
description

3 The object description area displays the objects attributes. These are the
same attributes displayed by the Object tab of the Properties dialog box.
4 Point to the screen object whose attributes you want to associate with the
current step.
5 Double-click to substitute the attributes of the clicked object for the
attributes of the original object. Both objects must be on the same screen. If
they are not, use Copy and Paste instead.

159

QuickTest Professional for mySAP.com Windows Client Users Guide

Copying an Objects Attributes


QuickTest provides two easy ways for you to copy attributes from one object
to another. One situation where you might want to do this is when you add
a flow control step, such as GUI Object Branch or GUI Object Loop, to your
testcase.
To copy attributes if both objects are on the same screen:
1 Open the Properties dialog, Objects tab, for the object which is to receive
the copied attributes.
2 Click the Options button, and choose Select Object from the pop-up menu.
The Select Objects dialog box opens and the cursor changes to the shape of a
pointing hand.
3 Click the screen object whose attributes you want to copy.
To copy attributes if the objects are on different screens:
1 Open the Properties dialog, Objects tab, for the object which has the
attributes you want to copy.
2 Click the Options button, and choose Copy from the pop-up menu, then
click OK to close the dialog.
3 Open the Properties dialog, Objects tab, for the object which is to receive
the copied attributes.
4 Click the Options button, and choose Paste from the pop-up menu, then
click OK to close the dialog.

Deleting Attributes
To delete an attribute:
1 Click the attribute in the Attribute list of the Object tab to select it.
2 Click the Options button.
3 Select Delete Attribute.

160

Advanced Topics

Note: WARNING: Attributes are deleted with no confirmation message.


Be sure that you have selected the correct attribute before clicking Delete
Attribute.

Modifying Attributes
To modify an attribute:
1 Click the attribute in the Attribute list of the Object tab to select it.
2 Click the Options button.
3 Select Modify. The Object Description Text dialog box opens.

4 Make the modifications in the text box and click OK.

WARNING: USE THIS FEATURE WITH CARE! Modifying attributes


incorrectly may result in your testcase not running as expected.

161

QuickTest Professional for mySAP.com Windows Client Users Guide

Parameterizing Object Attributes


The ability to parameterize an attribute of an object allows you to refer to
different objects using a dynamic attribute. This ability could be useful, for
example, in picking different objects from a list or selecting different lines
from a table.

The following is an example of parameterizing the label attribute to open


different tabs on a screen:
1 Record clicking a tab.
2 Open the Properties dialog, Object tab for the tab object.
3 Select the name attribute and click the Options button.
4 Select Delete Attribute from the pop-up menu. The name attribute is
deleted.
5 Select the label attribute.
6 Select the Parameter radio button. The suggested name Sales A_label
appears in the Parameter edit box because Sales A was the label of the tab
that was clicked on when the object was recorded.

162

Advanced Topics

7 Change the name to something more intuitive, such as Tab_label.


8 Click OK to close the Properties dialog box.

9 Type the labels of the other tabs in the Data spreadsheet.

163

QuickTest Professional for mySAP.com Windows Client Users Guide

Now you can select a row to run and the testcase will open that tab. Or put
the tab click step inside a Data Loop and the script will open all the tabs
during one run.

Functions Available from the Step Generator


Some functions described in this section take arguments called object_tag
and object_description:

BRANCH_ON_OBJECT (object_tag, object_description, EXISTS=1);.


The object tag is the text that appears in the Tag box of the Object tab in the
Properties dialog box for that object. Sometimes the tag is the same as the
label attribute; for example, Enter for the Enter key. For other objects, such
as the check box example shown in the following graphic, the tag is the
same as the name attribute. Right-click an object in the icon tree and select
Properties from the pop-up menu to access the Object tab.

164

Advanced Topics

The format for an object description is the same as that found in the Object
Description dialog box for that object.

Right-click an object in the screen capture view and select Object


Description to access the Object Description dialog box. Note that the
description includes optional and informational attributes as well as
obligatory attributes. You can copy the object description from the Object
Description dialog box and paste it as is into a function.
Flags refer to Boolean arguments, i.e., those that take one of only two values
(usually 1 and 0). In the example:

BRANCH_ON_OBJECT (object_tag, object_description, EXISTS=1);


the third argument, EXISTS=1, is a flag. Other flags that you may
encounter are VERIFY, OPTIONAL, and SHOW_FRONT. In all these cases, a
value of 1 means TRUE, and a value of 0 means FALSE. Some functions may
take more than one flag argument.
Alias is the user-defined name for an external spreadsheet. The alias is
defined in the Settings dialog box, External Data tab.
Function arguments enclosed in quotation marks are strings or Booleans;
those not so enclosed are numeric values.
All arguments are required, but not all require a value, for example:

wr_exec (script_name, command_line_option, );


The third argument is not in use currently but may not be omitted. Enter
the argument as shownwith two consecutive quotation marks.
For functions that require a file name, the full path should be included.
When specifying a path, you must use double backslashes, for example:

E:\\QT for R3\\testcases\\CreateOrder\\CreateOrder.bpw

165

QuickTest Professional for mySAP.com Windows Client Users Guide

References to spreadsheet columns should be in the following format:

spreadsheet_name::column_name
If the reference is a parameter, it should be enclosed in angle brackets like
any other parameter.
References to spreadsheet rows must be integers > 0.

Note: For functions that query SAPs GuiLib, see the GuiLib documentation.
GuiLib header declarations are included in \QuickTest for R3\dat\bpsap.h.

166

Advanced Topics

Functions in Alphabetical Order


Syntax
Step/Function Name
Additional Information
Comment

// Comment text
A non-executing step to hold user-determined text
intended to document or serve any other purpose; must be
preceded by two slashes to denote that its non-executable.

Data Branch

BRANCH_ON_DATA (parameter name, );


A flow control function based on a data value. Consists of 3
parts: If, containing a formula condition that is evaluated
at run-time; then, containing steps to execute if the
condition evaluates to TRUE; and else, containing steps
to execute if the condition evaluates to a NOT TRUE result.
Parameter_name should contain a formula condition to be
evaluated. The 2nd argument is not currently used. See
Branch on Data on page 195 for more information.

Data Loop

LOOP_ON_DATA (sub-spreadsheet name, flags);


A flow control function based on data in a sub-spreadsheet.
The Data Loop iterates data entry until all rows in the
named spreadsheet have been used. See Data Loops on
page 181 for more information about how to use this step.

Delete Row (Extern


Data)

int delete_row ("alias", "spreadsheet name", row);


Deletes a row from an external spreadsheet. Alias is the
short name (local to each testcase) for the external .XLS file.
Spreadsheet is one spreadsheet tab within the .XLS file.
Returns (0) if successful, (-1) if not. See Using External
Data Files on page 83 for more information.

167

QuickTest Professional for mySAP.com Windows Client Users Guide

Syntax
Step/Function Name
Additional Information
Drag & Drop
(ActiveX)

object_drag_drop ("Tag", "drag_object_properties",


"DragCol", "DragRow", "drop_object_properties",
"DropCol", "DropRow", "flags");
Currently implemented for Tree and Grid ActiveX objects.
Tag may be Tree or Grid. DragCol and DropCol may be
null for one-column objects. For tree objects DragRow and
DropRow values translate to tree paths, e.g.,
TopLevelTag;NextLevelTag;DragObjTag. DragRow and
DropRow accept parameters.

Evaluate a String

int eval (input string, output_buffer, output_buffer_size,


recalculate_flag);
Can evaluate plain text or text containing parameters.
Example: <order_no>00<year> can be resolved to
5678001999 where 5678 is the order_ no and 1999 the
year. This function returns an integer value. Input_string
may contain parameters. Output_buffer and output_
buffer_size are user-defined. Setting the recalculate flag to
1 causes the spreadsheet to be recalculated when this
function is called.

Get Cell Value (Extern


Data)

int get_cell ("alias", "spreadsheet name", row, "column


name", output_buffer, output_buffer_size);
Gets the value of a cell in an external data spreadsheet.
Alias is the short name (local to each testcase) for the
external .XLS file. Spreadsheet is one spreadsheet tab
within the .XLS file. Row can be an integer between 1 and
65,536. Output_buffer and output_buffer_size are userdefined. Returns (0) if successful, (-1) if not. See Using
External Data Files on page 83 for more information.

Get Current Running


Row

168

long get_current_run_row();
Returns the current running row number (not the iteration)
of the data spreadsheet. Returns (-1) if it failed.

Advanced Topics

Syntax
Step/Function Name
Additional Information
Get GUI Object
Attribute Value

int get_obj_attr_val ("object description", "attribute name",


output_string_buffer, buffer_size);
Use this function to avoid parsing. Output_string_buffer
and buffer_size are user-defined. Output_string_buffer will
hold the retrieved value of the object attribute. See
Attributes on page 153 for a list of attributes you can
query for the value.

Get Replay Context

get_sap_replay_context(pSapReplayContext_C);
Returns a pointer to SAP_REPLAY_CONTEXT_C *

Get Result Workbook

get_result_wb();
Returns the pointer to the results workbook object
PRESULTS_WB. Returns NULL if it failed.

Grid (ActiveX) Cell


Input

table_set_cell_value(object tag, grid object description,


column name, row, new value, flags);
Puts a value into a cell of an ActiveX grid. Column and row
accept parameters.

Grid (ActiveX) Cell


Query

grid_get_cell_value(grid object description, column


name, row, output_buffer, output_buffer_size);
Gets the value of a cell in an ActiveX grid. Column and row
accept parameters. Output_buffer and output_buffer_size
are user-defined.

GUI Object Branch

BRANCH_ON_OBJECT (object tag, object description,


EXISTS=1);
A flow control function based on the presence or absence
of object. Consists of 3 parts: If, containing a formula
condition that is evaluated at run-time; then, containing
steps to execute if the condition evaluates to TRUE; and
else, containing steps to execute if the condition
evaluates to a NOT TRUE result. See GUI Object Branch
on page 191 for more information.

169

QuickTest Professional for mySAP.com Windows Client Users Guide

Syntax
Step/Function Name
Additional Information
GUI Object Exists

int obj_exists ("object description", "EXISTS=1");


When the EXISTS flag is set to 1, the function returns TRUE
if the object is found, otherwise it returns FALSE. If the
EXISTS flag is set to 0, the function returns TRUE if the
object is not found, otherwise it returns FALSE. If the
argument contains no value, the behavior is the same as
when EXISTS=1.

GUI Object Loop

LOOP_ON_OBJECT (object tag, object description,


EXISTS=0);
This is a flow control function based on the presence or
absence of particular object. All steps in the loop iterate
until the object appears or disappears. Examples: Can be
used to repeat a scroll step for a long list until an item
appears, or to keep pressing Choose until a screen goes
away. EXISTS=1 means loop until object disappears;
EXISTS=0 means loop until object appears. See GUI Object
Loops on page 186.

Import Param Value


(Extern Data)

import_param_val (Alias, Sheet, row, ColumnName,


Parameter);
Gets the value of a cell in an external data spreadsheet.
Alias is the short name (local to each testcase) for the
external .XLS file. Spreadsheet is one spreadsheet tab
within the .XLS file. Row can be an integer between 1 and
65,536. Column Name must be a column in the named
spreadsheet. Returns (0) if successful, (-1) if not. See Using
External Data Files on page 83 for more information.

Input

set_value (object tag, object description, input value


or parameter, OPTIONAL=0);
A data entry function. The step can be made optional by
setting the OPTIONAL flag to 1 via the General tab in the
Properties dialog box.

170

Advanced Topics

Syntax
Step/Function Name
Additional Information
Insert Row (Extern
Data)

int insert_row ("alias", "spreadsheet name", row);

Load DLL

int load_dll ("dll name");

Adds a row to an external spreadsheet. Alias is the short


name (local to each testcase) for the external .XLS file.
Spreadsheet is one spreadsheet tab within the .XLS file.
Returns (0) if successful, (-1) if not. See Using External
Data Files on page 83 for more information.

Loads the named external DLL. Returns 0 when successful,


non-zero when it fails.
LoadRunner End
Transaction

lr_end_transaction("transaction name", LR_AUTO);

LoadRunner Error
message

lr_error_message("message text");

LoadRunner Get
Attribute double

lr_get_attrib_double("parameter name");

LoadRunner Get
Attribute long

lr_get_attrib_long("parameter name");

Marks the end of a transaction. 2nd argument flag may be


LR_PASS, LR_FAIL or LR_AUTO. See Adding a LoadRunner
Transaction to a Testcase on page 124 for more
information.

Sends an error message to the LoadRunner Output


window.

Retrieves the value of a command line parameter (or any


variable set by set_attrib) whose type is a double precision
floating point. Place the command line parameter's name
in the function's argument field and lr_get_attrib_double
returns the value of that parameter. This function eliminates
the need to manually parse the command line. Note that
this function is not limited to retrieving command line
parameters; it can be used instead of lr_whoami as an
alternate way to retrieve Vuser information.

Retrieves the value of a command line parameter whose


type is a long integer. Usage is the same as
lr_get_attrib_double.

171

QuickTest Professional for mySAP.com Windows Client Users Guide

Syntax
Step/Function Name
Additional Information
LoadRunner Get
Attribute string

lr_get_attrib_string("parameter name");

LoadRunner Get host


name

lr_get_host_name();

LoadRunner Get
master host name

lr_get_master_host_name();

LoadRunner Load DLL

lr_load_dll("dll name");

Retrieves the string assigned to a parameter or to a


LoadRunner command line variable. Usage is the same as
lr_get_attrib_double, plus, you can also check if a certain
parameter or command line option is valid. If the
command line parameter does not exist, the function
returns NULL.

Returns the name of the machine executing the Vuser


script.

Returns the name of the machine running the LoadRunner


Controller.

Loads a DLL (Windows) allowing you to call an external


function when replaying a script using the C interpreter.
Once you load the DLL, you can call any function defined
within the DLL, without having to declare it. You can
specify a full path for the DLL. If you do not specify a path,
lr_load_library searches for the DLL using the standard
sequence used by the C++ function, LoadLibrary on
Windows platforms. For more information see the
LoadRunner manual.

172

LoadRunner log
message

lr_log_message("message text");

LoadRunner Output
message

lr_output_message("message text");

Sends a message to a log file called output.txt. You can use


this function for debugging your script by sending error or
other informational messages to the log file. You can avoid
overloading the network by sending messages to the log
file instead of to the Output window.

Sends notifications to the LoadRunner Output window.

Advanced Topics

Syntax
Step/Function Name
Additional Information
LoadRunner Peek
events

lr_peek_events();

LoadRunner
Rendezvous

lr_rendezvous("rendezvous name");

LoadRunner Set
Transaction Status

lr_set_transaction_status(LR_PASS);

LoadRunner Start
Transaction

lr_start_transaction("transaction name");

LoadRunner Status
message

lr_vuser_status_message("message text");

LoadRunner think
time

lr_think_time(time);

LoadRunner Unload
DLL

lr_unload_dll("dll name");

Used to receive LoadRunner events at a particular moment


in script execution. You should insert this function into your
Vuser program at the point you want the Vuser to pause,
otherwise you will be unable to pause a Vuser.

Indicates a rendezvous point in a Vuser script. When this


statement is executed, the Vuser program stops and waits
for permission from LoadRunner to continue.

Sets the last invoked transactions status, either LR_PASS or


LR_FAIL. Returns 0 if OK, -1 if error.

Marks the beginning of a transaction.

Lets you send a formatted string to Vuser status area in the


Controller.

Indicates the length of the pause, in seconds. The valid


range of the parameter is from 0 to 32,767 seconds. This
function allows you to pause text execution during a script
run. This is especially useful in simulating think time, the
time a real user pauses to think between actions.

Unloads a dll.

173

QuickTest Professional for mySAP.com Windows Client Users Guide

Syntax
Step/Function Name
Additional Information
LoadRunner User data
point

lr_user_data_point("sample name", double);

LoadRunner Who am I

lr_whoami(*vuser_id, *vuser_group, *scid);

Allows you to record your own data for analysis. Each time
you want to record some data, use this function to record
the sample name, and the value. LoadRunner automatically
records the time that the sample is taken. After scenario
execution, you can use LoadRunners User Defined graph to
analyze the results.

Returns information about the Vuser. Note that the


vuser_group parameter is a pointer to constant data and
should only be read, not altered. The other parameters,
vuser and scid, may be altered. If you do not want to
retrieve one or more of the parameters, replace the
parameter name with NULL. Alternatively, you can retrieve
Vuser information with the lr_get_attrib_string for the Vuser
Group or lr_get_attrib_long function for the vuser_id.
Output

get_value (object tag, object description,


<output_parameter>, , OPTIONAL=0);
Stores a value from the AUT to an output parameter. The
step can be made optional by setting the OPTIONAL flag to
1 via the General tab in the Properties dialog box. This is
the same function as the one used for verification.

SAP Connect

sap_connect2(host name or IP address, system


number, system id, group, SHOW_FRONT=1);
Connects to the named SAP system host. SHOW_FRONT can
be 1 or 0; all arguments can accept parameters.

SAP Logoff

sap_logoff( );
Logs off from the connected host.

174

Advanced Topics

Syntax
Step/Function Name
Additional Information
SAP Logon

sap_logon(client, user name, password, language,


);
Logs on to the connected host with the specified logon
information. The 5th argument is not in use currently but
cannot be omitted; all arguments can accept parameters.

Report Check

tl_step(check, parameter, description);


Checks a parameter and sends the result to the Execution
Log. See To add a Report Check step: on page 71 for
more information.

Report Message

report_msg(message text);
Inserts a message into the testcasereport. The message may
contain parameters.

Reset AUT

reset_aut();
Returns the SAP Frontend to the initial screen of the
application server; equivalent to entering /ns000 in the
command field.

Save Workbook
(Extern Data)

void save_book_as("alias", "file name");

Set Cell Value (Extern


Data)

int set_cell ("alias", "spreadsheet name", row, "column


name", "new value");

Saves an external data spreadsheet workbook. Alias is the


short name (local to each testcase) for the external .XLS file.
Filename is the full path and filename + extension of the
external .XLS file. See Using External Data Files on page
83 for more information.

Puts a value into a spreadsheet cell. Alias is the short


name (local to each testcase) for the external .XLS file.
Spreadsheet is one spreadsheet tab within the .XLS file.
Returns (0) if successful, (-1) if not. See Using External
Data Files on page 83 for more information.

175

QuickTest Professional for mySAP.com Windows Client Users Guide

Syntax
Step/Function Name
Additional Information
Set Focus

set_focus(object tag, object description,


OPTIONAL=1);
Sets the cursor position to the named object.

Set Parameter Value

int set_parameter_value( "parameter name", "new value",


loop name );
Puts a value into a parameter. Loop name is the name for
a sub-spreadsheet (e.g., a table). Loop name is required but
may be empty.

Table Cell Set Focus

table_set_focus(object tag, table object description,


column name, row, OPTIONAL=1);
Sets the cursor position to the named table cell.

Tree (ActiveX) Item


Query

tree_get_item_value(tree object description, item


number, column, output_buffer, output_buffer_size);
item number specifies an items ordinal position in the
tree. item number and column accept parameters.
Output_buffer and output_buffer_size are user-defined.

Trim All Spaces

trim(input string);
Trims leading and trailing spaces from the named string
variable.

Trim Left Spaces

ltrim(input string);
Trims leading spaces from the named string variable.

Trim Right Spaces

rtrim(input string);
Trims trailing spaces from the named string variable.

Unload DLL

int unload_dll ("dll name");


Unloads the named external DLL. Returns 0 when
successful, non-zero when it fails.

176

Advanced Topics

Syntax
Step/Function Name
Additional Information
Verification

get_value (object tag, object description, <param


out>, expected value, VERIFY= 1);
Creates an output parameter for data to be verified. VERIFY
flag: 1 means do the verification; 0 means dont do it. This
is the same function as the one used for output.

Wait

Sleep(5000);
Pauses script execution for the specified number of
milliseconds.

WinRunner Test

wr_exec(script name, command line options and


<parameters>, );
Used to invoke a standard WinRunner Professional TSL
script. The 2nd argument may contain any combination of
valid WinRunner command line options and string
parameters. (See your WinRunner documentation for more
information.) The 3rd argument is not in use currently but
may not be omitted. This feature provides the ability to
script non-SAP systems that are part of your enterprise
application. See Integration with WinRunner on page
149 for more info.

177

QuickTest Professional for mySAP.com Windows Client Users Guide

Return Codes of Functions


Return Code

Description

Success with notification


1

API_INSTANTIATED_NEW_CONNECTION

API_REPLAY_SKIP_OPTIONAL_SCREEN

API_REPLAY_SKIP_OPTIONAL_STEP

API_REPLAY_NO_OP_MODE

API_REPLAY_PARAM

API_REPLAY_VERIFICATION_PASS

API_REPLAY_VERIFICATION_EXPECTED

API_REPLAY_VERIFICATION_ACTUAL

Success with warning


1001

API_REPLAY_FREE_CONNECTION_ERROR

1002

API_REPLAY_ALREADY_CONNECTED

1003

API_REPLAY_VERIFICATION_FAIL

1004

API_REPLAY_CLEARING_DEFAULT_EXCEPTION

Failure with error

178

2001

API_REPLAY_INVALID_OBJECT

2002

API_REPLAY_OBJ_NOT_FOUND

2003

API_REPLAY_WIN_NOT_FOUND

2004

API_REPLAY_NOT_CONNECTED

2005

API_REPLAY_UNKNOWN_ERROR

2006

API_REPLAY_COMPILER_ERROR

2007

API_REPLAY_INTERPRETER_ERROR

Advanced Topics

Example:

int rc; //declare variable to hold the return code


char Num[512]; //declare string buffer
//assign return code of QuickTest function get_value to variable rc
rc=get_value( . . . );
sprintf(Num, rc=%d, rc); //put string and variable value into buffer
report_msg(Num); //send buffer contents to QuickTest Execution Log
In the example above, the verification function get_value is shown without
its arguments for the sake of brevity. When the script is run the report_msg
would show rc=6 when get_value succeeds and rc=1003 when it fails
(refer to the Return Code table above).
The get_value and report_msg functions can be inserted into the testcase
using the QuickTest GUI. The declarations and sprintf statement must be
hand coded. Adding rc= to the beginning of the get_value statement must
be hand coded as well.

Customizing the Step Generator


Information used by the QuickTest Step Generator resides in the text file
StepGenerator.dat located in \QuickTest for R3\dat. Users can edit this file
to add new categories and functions if they follow the rules outlined below.
Adding a category
Add an entry to the bottom of the list in the [Categories] section of the file
StepGenerator.dat. If the last entry is Category5, your new entry should
begin with Category6=, followed by the name you want to give it. For
example:

[Categories]
Category1=General
....
....
Category5=Advanced Steps
Category6=My Category

179

QuickTest Professional for mySAP.com Windows Client Users Guide

Adding a step
Add a new section to the file StepGenerator.dat. Use the same name that you
gave your new category in the Categories section. Add a line to the new
section for each new step you want to add to the category. For example:

[My Category]
Step1=Wait
Step2=Display Message Box
Adding the code for a new step
Add a new section to the file StepGenerator.dat. Use the format
[Category\Step title]. Each line of the section should begin with Line1=,
Line2=, etc. followed by one line of code. For example:

[My Category\Wait]
Line1=Sleep(1000);
[My Category\Display Message Box]
Line1=MessageBox(0, Hello World, Window Title, 0);

Adding an SAP Connect Step


You might want to control the connection and logon to the SAP system
from within a testcase rather than having QuickTest perform those actions
automatically. One reason to do this is to be able to play back a script on a
server different from the one it was recorded on.
To add an SAP Connect step to a testcase:
1 Highlight the step that should follow the SAP Connect step (for example, the
first step in the icon tree).
2 Select Insert > Step to open the Step Generator dialog box.
3 Select SAP System from the Category list and SAP Connect from the Steps
list.
4 Click OK to insert the step into the tree above the highlighted step. The
Properties dialog box opens for the SAP Connect step.

180

Advanced Topics

5 Select a server from the Description drop-down list, or type the connection
information into the Properties dialog box and click OK.

Remember to uncheck Auto connect in the Settings dialog box when you
run a script which includes an SAP Connect step.

Adding Loop Steps


Loops are flow control steps that allow you to repeat one or more steps until
a certain condition is met. QuickTest-SAP has two kinds of loop steps:
Data loop
GUI Object loop

Data Loops
A Data Loop repeats one or more actions until the data in a Table subspreadsheet for one iteration has been exhausted. The number of repetitions
depends on the number of data rows in the iteration. The Data Loop is
useful in those situations when the number of data rows varies from one
iteration to another.

181

QuickTest Professional for mySAP.com Windows Client Users Guide

Overview of Process to Create a Data Loop


1 Decide which step(s) should be repeated.
2 Highlight the first step to be included in the loop.
3 Add a Data Loop step from the Step Generator. The Table tab of the
Properties dialog opens.
4 Select the appropriate table from the Table drop-down list and click OK.
5 Drag the steps to be repeated onto the Loop icon.
6 Modify the attributes of the repeated step(s) so that the object gets data
values from the table. To specify a parameter from a sub-spreadsheet, use the
following format: sub-sheet_name::parameter_name (e.g.,
All_items::Material).
7 Delete any duplicate steps from the original recording.
Data Loop Example
Selecting a different table row each time through the data loop:
In the VA01 Create Order business process, you want to select an item from
the All items table, check its availability, select the next item, and repeat the
availability check until all items in the table have been checked.
The actions to be repeated are:
On the Overview screen, select an item from the All items table, then click
the Availability button to open the Availability Control screen.
On the Availability Control screen, verify that the Confirmed quantity
equals the Order quantity, then click the One-time dlv. button to return to
the Overview screen.
Record the actions to be repeated at least once, then complete the business
process and stop recording.

182

Advanced Topics

Now you are ready to create the loop.

Table set
focus step

1 Click the Overview screen step that has the Table Set Focus step under it.

183

QuickTest Professional for mySAP.com Windows Client Users Guide

2 Add a Data Loop step from the Flow Controls category of the Step
Generator. The Table tab of the Properties dialog box is displayed.

3 Select All_items from the Table list and click OK. The Data Loop step is
inserted above the Overview screen step.
4 Select the Overview screen step below the Data Loop step, drag it to the Data
Loop icon, and drop it.
5 Select the Availability Control screen step below the Data Loop step, drag it
to the Data Loop icon, and drop it so that it falls below the Overview screen.

These icons are


deleted in Steps
6 and 7.

184

Advanced Topics

When Step 5 has been completed, the example business process looks like
the one in the preceding graphic.
1 Delete the Table step from below the Overview screen that is inside the Data
Loop. Click Yes if a pop-up message asks whether you want to delete the
All_items1 table.
2 Delete the Table set focus step from below the Overview screen that is inside
the Data Loop.
3 With the Availability button step highlighted, add a Set focus step from the
GUI Object category of the Step Generator. The Object tab of the Properties
dialog opens.
4 Click the Options button, then click Select Object from the pop-up menu.
The Select Objects dialog opens.
5 Click the Row 1 cell in the Material column of the All items table in the
Screen Capture view. Rename the Tag to select All items row and click OK.
6 Delete any other duplicate steps that may be present below the Data Loop.
7 Add data to the main spreadsheet and to the table spreadsheet.

185

QuickTest Professional for mySAP.com Windows Client Users Guide

When Step 12 has been completed, the example business process looks like
the one in the preceding graphic.

GUI Object Loops


A GUI Object Loop repeats one or more actions until a particular object
appears or disappears. The GUI Object Loop is useful in those situations
when the number of repetitions it takes to trigger the appearance or
disappearance of the object can vary.
Overview of Process to Create a GUI Object Loop
1 Decide which step(s) should be repeated.
2 Highlight the first step to be included in the loop.
3 Add a GUI Object Loop from the Step Generator. The Loop tab of the
Properties dialog opens.
4 Select Until object appears or Until object disappears, and click the Object
tab.
5 Click the Options button, then click Select Object from the pop-up menu.
6 Click the screen object whose appearance or disappearance should control
the exit from the loop, then close the Properties dialog box.
7 Drag the steps to be repeated onto the Loop icon.
8 Delete all duplicated steps from the original recording except the first one.
GUI Object Loop Example
Dismissing a series of Information screens:
When you change the value of the Material field in the VA02 Change Order
business process and press Enter, SAP Frontend displays an Information
message box. You press Enter to dismiss it, and another Information
message box appears. Under some configurations this repetitive action and
response may occur several times before SAP Frontend allows you to save
your changes to the order.

186

Advanced Topics

In the process to create a GUI Object Loop described above, the only action
to be repeated is pressing the Enter key. Pressing the Enter key should be
repeated until the Information screen disappears.

Repeated
steps

{
1 Right-click the first Information screen step and select New > Step from the
pop-up menu. The Step Generator dialog box opens.
2 Select GUI Object Loop from the Flow Controls category and click OK. The
Properties dialog box opens with the Loop tab displayed.

187

QuickTest Professional for mySAP.com Windows Client Users Guide

3 Select the Until object disappears radio button, and click OK.

4 Right-click the first Information screen step again, select Properties, and
click the Object tab.
5 Click the Options button, select Copy, and click OK.
6 Right-click the GUI Object Loop step, select Properties, and click the Object
tab.
7 Click the Options button, select Paste, then click OK.
8 Drag the first Information screen step icon and drop it on top of the GUI
Object Loop icon. When this is done correctly, the screen step becomes a
sub-step of the GUI Object Loop step. The Enter keypress step should be
included as a sub-step of the Information screen step.

188

Advanced Topics

Note: You are not allowed to drag and drop the Enter keypress step by itself.
The Enter keypress step is a screen terminator. That is, it is the last action
performed on a screen before context changes to another screen. Screen
terminator steps may not be moved except as part of the parent screen.
Correct technique is to drag and drop the screen step. All steps subordinate
to the screen move with the screen, including the screen terminator.

9 Delete all Information screen steps except the one that is contained in the
GUI Object Loop.
When Step 9 has been completed, the example business process looks like
the one in the graphic below.

189

QuickTest Professional for mySAP.com Windows Client Users Guide

Adding Branching Steps


Branching is a form of script flow control. It is a way for a testcase to take
either of two paths (branches) depending on the value of a condition at a
certain point during the run. Branching is implemented by inserting a step
that evaluates a condition, followed by the steps to execute when the
condition is true and the steps to execute when the condition is false. The
next graphic shows a simple example of branching.

If condition
Then (if true), do this
Else (if not true), do this

In this example, QuickTest evaluates an if condition. If the result is TRUE


(then), 5 is input to the Order qty field. If the result is FALSE (else), 10 is
input to the Order qty field.
The conditional steps appear indented below the then and else icons. In the
example shown above, only the set focus and the input steps are
conditional. The Save step (highlighted) is always executed, irrespective of
the outcome of the evaluation. Notice that the Save step is on the same level
as the branch step, whereas the set focus and the Order quantity input steps
are one level below.

190

Advanced Topics

QuickTest-SAP provides two kinds of branching steps:


GUI Object branch - the object exists/does not exist
Data branch - the objects value does/does not meet a certain condition
For both kinds of branch:
1 Insert the branch step from the Step Generator.
2 Define the condition as part of the branch step.
3 Drag one or more steps onto the then icon.
4 Drag one or more steps onto the else icon.
The actions subordinate to then are executed when the condition is true;
the actions subordinate to else are executed when the condition is false.
After executing either the then steps or the else steps, the script
continues with the next step on the same (or higher) level as the condition
step.

GUI Object Branch


In a GUI Object Branch step, the condition to be evaluated is: A particular
object is [is not] present on the screen. Decide whether the presence or the
absence of the object constitutes a TRUE result at the time you add the step
to the testcase. Then select the appropriate radio button in the Branch tab of
the Properties dialog: either Object found or Object not found.
To add a GUI Object Branch step
1 Select the step below where you want the GUI Object branch step to go.

191

QuickTest Professional for mySAP.com Windows Client Users Guide

2 Select the GUI Object Branch step from the Flow Controls category of the
Step Generator and click OK. The Properties dialog box for the GUI Object
Branch step opens with the Branch tab displayed as in the graphic below.

3 If you want the condition to be true when the object exists on the screen,
select the Object found button. If you want the condition to be true when
the object does not exist on the screen, select the Object not found button.
4 Click the Object tab, click the Options button, and choose Select Object
from the pop-up menu. The Select Objects dialog box opens.

192

Advanced Topics

5 In the Screen Capture view, click the object whose appearance or


disappearance defines the condition for the branching of the business
process. The Properties dialog opens, displaying the Object tab.

6 (Optional) Edit the attribute values if necessary.


For example: You know that the object you pointed to will appear. Usually
the object has a value, and you want to execute certain steps only if there is
no value.
Select -value from the Attribute list. The hyphen preceding value indicates
that the attribute is informational. That means QuickTest does not
consider -value when identifying the object. For this branching decision,
you want QuickTest to do the opposite.
In the Attribute name edit box, delete the leading hyphen from
-value. That makes the value attribute obligatory and insures that
QuickTest must consider value when identifying the object.

193

QuickTest Professional for mySAP.com Windows Client Users Guide

Delete all text in the Constant edit box. The value of importance to your
script is none or no value.

The result of this procedure is that, when you run this script, the business
process will run one branch if the object has no value; otherwise, it will run
the other branch.
7 Click OK to close the Properties dialog.
8 Drag the steps to be executed when the condition is true to the then icon.
Drag the steps to be executed when the condition is false to the else icon.
Remember that screen terminator steps (e.g., menu select, button press, key
press) cannot be dragged and dropped except as part of their parent screens.

194

Advanced Topics

Branch on Data
In a Branch on Data step, the condition to be evaluated is a user-defined
formula. For example, you might want to perform certain steps if the value
of a field is in the range of 1 to 100, or if the date in a field is earlier than the
current date. Otherwise, you want to do something else.
To make a Branch on Data step work, you need:
an output parameter to store a value
a formula containing a condition to be evaluated
an if/then/else branch on data step in the script

Output parameter
If net_value > 0
Then (if true), do this
Else (if not true), do this

In the example illustrated in the preceding graphic, the Branch on data step
checks the value of the net_value output field (captured in an output
parameter). If the value is greater than zero it does nothing and proceeds to
the next step outside the loop. Otherwise, it writes a line to the Execution
195

QuickTest Professional for mySAP.com Windows Client Users Guide

Log. The formula to express that condition would look something like the
following (the cell reference, E1, is variable depending on what else you had
in your spreadsheet at the time):

=E1 > 0
The output parameter net_value would be assigned to Column E in the Data
spreadsheet. When the parameter captured the value of the field during a
script run, the value would be assigned to the cell E1. The formula would be
evaluated automatically, registering either TRUE or FALSE. The steps in the
appropriate branch would be executed depending on the outcome of the
evaluation.
To add a Branch On Data step
1 Make sure that the output parameter containing the value you need for the
formula appears in the script above the place where you want the Branch On
Data step to go. (The value to be evaluated must be captured before the
evaluation takes place. The Branch On Data step performs the evaluation.)
You can use an existing output parameter, or you can create a new one just
for this purpose. If you need help creating an output parameter, see
Procedure to Parameterize an Output Step on page 86.
2 Select the step below where you want to the Branch On Data step to go.
3 Select the Branch On Data step from the Flow Control category of the Step
Generator and click OK. The Properties dialog box for the Branch On Data
step opens with the Branch on Data tab displayed.

4 Select the parameter you want from the list or type the name for a new
parameter in the Decision box. This parameter will hold the formula
condition to be evaluated.
5 Click the Goto data button. The Data spreadsheet opens.
196

Advanced Topics

6 If this is a new parameter, type the formula to express the condition for the
branch in the Row 1 cell of the new parameters column.
7 Click OK to close the Properties dialog.
8 After inserting the Branch On Data step, drag or insert one or more steps
underneath the then icon that you want to be executed when the
condition is true. Then drag or insert one or more steps underneath the
else icon that you want to be executed when the condition is false.
Remember that screen terminator steps (e.g., menu select, button press, key
press) cannot be dragged and dropped except as part of their parent screens.
If there is nothing to execute for one of the branches, you can omit putting
any steps there. You can also put a comment there as shown in the example
at the beginning of this section.

Implementing Drag and Drop (ActiveX)


QuickTest-SAP supports the replay of drag and drop steps for Tree (ActiveX)
and Grid (ActiveX) objects. You can add a drag and drop step from the Step
Generator to automate a drag and drop user action. QuickTest-SAP will then
play it back as part of the testcase.
During recording, click the tree or grid ActiveX object you want to drag and
drop to select it. QuickTest-SAP will not record the drag and drop action,
only the item selection. After recording, add the Drag & Drop (ActiveX) step
from the Step Generator immediately below the step where you selected the
tree or grid object.
Enter the arguments for the Drag & Drop step either from the Properties
dialog box or from the Expert Mode window. If you prefer to work from
Expert Mode rather than the Properties dialog box, you should save the
testcase after adding the step, and before opening the Expert Mode window.

197

QuickTest Professional for mySAP.com Windows Client Users Guide

In the Expert Mode window, the object_drag_drop function should appear


immediately below the list_select_item function for the item you want to
drag and drop. The first argument for the object_drag_drop function should
be the type of object (e.g., Tree or Grid). You can copy properties and
other arguments from the list_select_item function to paste into the
object_drag_drop function. Refer to Drag & Drop (ActiveX) in the table
Functions in Alphabetical Order on page 167 for information about each
function argument.

Using Reference Text


The purpose of reference text is to be able to refer to an object by nearby text
when that text is not part of the object. Consider the screen shown in the
following graphic:

198

Advanced Topics

On this screen, it looks as if each check box has a label, Entry 1, Entry 2, etc.
If you right-clicked on one of the check boxes on this screen and selected
Object Description, you would see that the Label attribute had a null value.
Looking at the object description for the text next to the check box would
confirm that the check box and the text are indeed two separate objects.
QuickTest records the check boxes and the text on the example screen as
separate objects (as it should). What would happen if you wanted to
parameterize the check boxes on this screen, so that different boxes would
be checked and unchecked depending on the iteration of the testcase? You
could parameterize the object attributes that QuickTest uses to identify the
objects such as Location. But Location refers to screen location, and takes
non-intuitive values.
The reference text feature allows the implementer to associate a text object
with the object to be parameterized so that the parameterized object can be
identified in the same way that the implementer would identify it manually.
Continuing with the check box example, the implementer identifies the
box to be checked by the text next to the box (e.g., Entry 1, Entry 2,
etc.). Reference text allows you to automate that intuitive method, thus
making script implementation and maintenance easier.
To create reference text:
1 Open the Properties dialog, Object tab, for the object.
2 Click the Options button and select Add Reference Text from the pop-up
menu. The Select Objects dialog box opens.
3 Click the screen text you want to associate with the selected object.
4 QuickTest adds an attribute called reftext(col., row). The value of the reftext
attribute is the text that you clicked.

199

QuickTest Professional for mySAP.com Windows Client Users Guide

5 Click OK to close the Properties dialog.


The column and row of the reftext attribute indicate the screen position of
the text to be associated with the object. The column and row are identified
by numbers (integers) which may be signed or unsigned. A signed number
indicates a position that is offset from the object; an unsigned number
indicates absolute screen coordinates. Offsets are calculated as shown in the
following table.
+

Column

to the right of

to the left of

the same; no offset

Row

below

above

the same; no offset

For example, look at the graphic at the beginning of this section again. Lets
say that you opened the object properties for the check box at the top of the
column and added the text Entry 1 as reference text for it. The attribute
would be called reftext(+2,+0) with the value Entry 1. The +2,+0 means
the following: The reference text begins 2 columns to the right of this
object (the check box) on the same row.

200

9
Feature Reference
This chapter provides an alphabetical listing of all dialog boxes, menus, and
toolbars in QuickTest-SAP. Each entry contains either a complete review of
the objects features and controls or a reference to another part of the book
where such a review can be found.

201

QuickTest Professional for mySAP.com Windows Client Users Guide

Command Line Options


QuickTest-SAP has several command line options. To access these options,
add /help to the command line of Qtbp.exe, then start the program. You
should see the screen shown in the following graphic:

The usage options are fully explained in Starting QuickTest Professional for
mySAP.comTM Windows Client on page 16.

202

Feature Reference

Common Formula Builder dialog box


To open the Common Formula Builder dialog box, select Tools > Common
Formula Builder from the Data spreadsheet menu or the Results spreadsheet
menu.
Use the Common Formula Builder when:
you want to extract selected text from a longer string of text (good for
correlating data as well as for verification)
the verification text can vary within a longer string of text
The example displayed in the following graphic shows the result of selecting
only the order number to be extracted from the order_saved_out parameter.

For a complete explanation of the dialog box controls see Common


Formula Builder on page 66.

203

QuickTest Professional for mySAP.com Windows Client Users Guide

Confirm Override dialog box

The Confirm override dialog box appears when you attempt to import a
business process with the same name as an existing business process in the
testcase. For more information about how this dialog box is used see
Recorded business processes from another testcase can be imported to the
current script. Importing can combine multiple business processes from
separate scripts without having to re-record them. on page 44.

204

Feature Reference

Connection to TestDirector dialog box


Open the Connection to TestDirector dialog box by selecting Tools >
TestDirector from QuickTests main menu or from the Report Viewers
menu.

For more information about this dialog box, see Connecting to


TestDirector on page 141.

205

QuickTest Professional for mySAP.com Windows Client Users Guide

Customize dialog box


The Customize dialog box allows you to change the appearance of certain
controls in the QuickTest-SAP user interface. You can change which toolbars
are active, which buttons appear in the toolbars, and the shortcut keys.
Select View > Customize to access the Customize dialog box.
Close button - Closes the dialog box

Commands Tab

The Commands tab allows you to select a command and drag it to any
toolbar. A button representing that command will appear on that toolbar.
You can also drag buttons from a toolbar to remove them, and drag sideways
to insert a separator. Some buttons will appear as text only because there are
no icons for those commands.

206

Feature Reference

Toolbars Tab

The Toolbars tab allows you to display or hide any of the toolbars and to
create a new toolbar.
For more information about the features in this tab, see Toolbars tab,
Customize dialog box on page 47.

207

QuickTest Professional for mySAP.com Windows Client Users Guide

Keyboard Tab

The Keyboard tab allows you to setup shortcut (or accelerator) keys for
various commands. Select a command from the list. Any shortcuts already
assigned to that command are shown in the Current Keys box. If no
shortcut has been assigned, the Current Keys box remains blank.
Category - Select a category to filter the Commands list. For example,
selecting File reduces the list to only those commands which appear on the
File menu.
Commands - A list of all menu commands.
Description - Describes the function of the selected command.
Set Accelerator for - Used to set the shortcut key for the selected command.
Current Keys - Displays any shortcuts currently assigned to the selected
command.
Press New Shortcut Key - After clicking this box, press the key(s) you want
to assign to the selected command. If the key(s) you pressed is already
assigned to a command, the command it is assigned to appears below this
box. Otherwise, the Assign button is enabled.

208

Feature Reference

Assign - Click the Assign button to assign the key(s) displayed in the Press
New Shortcut Key box to the selected command.
Remove - Selecting a key in the Current Keys box enables the Remove
button. Click the Remove button to delete the shortcut.
Reset All - Removes all custom shortcuts and reassigns the default shortcuts
to all keys.

Menu Tab

The Menu tab allows you to customize the QuickTest menu bar.
Show Menus for - Default Menu is the only selection
Reset - Undoes any menu changes
Menu animations - Changes the way menus open. The choices are None,
Slide, and Unfold.

209

QuickTest Professional for mySAP.com Windows Client Users Guide

Options Tab

The Options tab allows you to change the look and feel of the Toolbars.
For more information about the features in this tab, see Options tab,
Customize dialog box on page 48.

210

Feature Reference

Data Explorer dialog box


There might be a time when you want to find a particular step but you cant
remember what business process its in. It might be quicker to find it in the
Data Explorer than by using the Find utility.

The Data Explorer dialog box displays all data related to one business
process. To access this dialog, highlight the business process in the Tree
window, then select View > Data Explorer.
To view the data for another business process, just highlight that business
process in the Tree window. The data in the Data Explorer dialog will change
to display that of the newly highlighted business process.
The default sort order of the data is Step Order. You can change the sort
order by clicking a column heading. The data is then sorted by the values in
that column.

211

QuickTest Professional for mySAP.com Windows Client Users Guide

<All Data Items> drop-down list - Lets you select which data items will
appear in the display. For example, selecting Inputs filters out the Outputs
and Verification steps so that only Input steps appear in the table.
<All Data Items>
Inputs
Outputs
Verifications
<All Values> drop-down list - Lets you select which data values will appear
in the display. For example, selecting Parameters filters out the Constants
(static text) so that only parameters appear in the table.
<All Values>
Parameters only
Constants only
Step Properties - Opens the Properties dialog for the selected object so you
can parameterize or unparameterize a step or just view the properties.
Goto Step - Highlights the selected step in the Tree window
Goto Data - Opens the Data spreadsheet
Close - Windows standard functionality

212

Feature Reference

Data Spreadsheet (data.xls)


In QuickTest-SAP, parameters, data, and verifications are entered in
Formula1 (Excel-like) Workbooks. Each testcase has its own workbook called
data.xls.

You can access the data spreadsheet in the following ways:


Select View > Parameter Data from the main menu
Click the View data toolbar button
Click the Goto data button from any dialog box that has one
The Data spreadsheet resides in the All Business Processes directory (e.g.,
C:\QuickTestR3\testcases\All Business Processes). The Data spreadsheet is
actually a workbook which consists of one or more spreadsheets. The
workbook includes one spreadsheet for each business process and each table
in the testcase.
A spreadsheet has one column for each parameter in the business process or
table. (Parameters are placeholders for variable data. See Parameters on
page 74 for more information about parameters.) The parameter name is
also the spreadsheet column name.

213

QuickTest Professional for mySAP.com Windows Client Users Guide

You can tell the type of parameter in the spreadsheet by its color:
Input parameter values are displayed in blue text.
Output parameter values are displayed in gray text.
Expected parameter columns are shaded yellow.
Spreadsheet cells may contain data or formulas.
When you run a testcase, Quicktest iterates (repeats) the run once for each
row in the Data spreadsheet, unless you have selected one or more rows
before running it (see Running Selected Rows below).
Blank Data Cells
It is not necessary to add data for every input field in each iteration. If you
leave an input cell blank, QuickTest will input a NULL value for that field
during the test run. If data entry is not required for that field, the test should
run to completion. It is up to the tester to make sure that there is data for
fields that require data entry.
Creating a Formula Manually
1 Click the cell in which you want to enter a formula.
2 Type an equals sign [ = ] followed by the formula.
3 Click another cell to include a reference to that cell in the formula.
4 Press Enter when you have finished.
Referencing Cells in Another Spreadsheet
In a spreadsheet, you can reference a cell in another spreadsheet. The
reference must include the spreadsheet name as well as the cell id. The
spreadsheet name and cell id must be separated by an exclamation point.

=VA01!J1
This example shows how you would reference cell J1 in the spreadsheet
named VA01 if you were creating the reference from another spreadsheet.

214

Feature Reference

Running Selected Rows


You can run a selected row or rows by selecting them in the Data
spreadsheet, then selecting Run from the main menu or toolbar. This feature
can be useful for troubleshooting a row of data without having to run all the
iterations.
Creating New Parameters
Normally, you parameterize a field by right-clicking its icon in the tree view,
and opening its Properties. You can also create a new parameter from the
spreadsheet.
To create a new parameter from the spreadsheet:
1 Double-click an empty column heading. That opens the Header Name
dialog box.
2 Type a name for the parameter and press OK. The parameter name must
match exactly the name of the field to be associated with the parameter.
3 In the icon tree, right-click the step you want to associate with the new
parameter and select Properties from the pop-up menu.
4 Select the Parameter radio button
5 Select the parameter name from the drop-down list.

Tables
Repeating input fields can be represented in the QuickTest Tree window as
tables or as loop objects. From the users point of view, loop objects are
almost the same as tables. Everything said about tables in this section
applies equally to loop objects. Loop objects should not be confused with
data loops or gui object loops. Select Tools > Options and check Auto record
tables to record these objects as tables rather than as separate input fields.
Tables have their own spreadsheet in the Data workbook. The default name
of a table spreadsheet is the parents spreadsheet name followed by a period
and the table name.

215

QuickTest Professional for mySAP.com Windows Client Users Guide

Iteration
terminator
row

In the preceding graphic, notice that the shaded rows contain the value
.End 1, .End 2, etc., in the Material column. Those are the iteration
terminator rows. The iteration terminator rows are present so that QuickTest
knows when data for an iteration is exhausted.
QuickTest supports data entry of multiple values for one table input field per
iteration, so the number of rows in the table spreadsheet per iteration can
vary. In the graphic above, for example, the first iteration includes rows 1
and 2; the second iteration includes rows 4, 5 and 6; iteration 3 includes
only row 8. This support for variable rows per iteration allows you to
emulate real system usage better.
Tables with Missing Column Headings
Some table columns in the SAP Frontend have no headings. When you
record a user action in such a column, QuickTest supplies a heading for the
column in the spreadsheet in the following way: the column heading is a
pound sign [ # ] followed by the column number, counting from left to right
in the SAP Frontend. An example of this is shown in the following graphic.

216

Feature Reference

Column with
no heading, in
table and in
spreadsheet

Note that there is no column #2 in the spreadsheet even though the second
column of the table also has no heading. That is because QuickTest creates a
spreadsheet column for a field only when there is some recorded action on
that field. Note also that the buttons at the left end of every row that are
used to select the row are recorded as a fields in a column. That column is
column #1.

Note: Be careful when using formulas in a table spreadsheet. The


spreadsheet automatically adjusts cell references when you copy a formula
from one row to another. In a table spreadsheet, however, the adjustments
might be incorrect because of the extra End rows between the data rows.
In this situation you might need to edit the cell references manually to
preserve the correlation of the data between spreadsheets.

If the Execution Log window shows mores iterations than there are rows of
data in the spreadsheet, then the spreadsheet contains empty rows. Delete
an empty row by selecting Edit > Delete Rows. Using the Delete key deletes
only the content of the row, not the row itself!

217

QuickTest Professional for mySAP.com Windows Client Users Guide

Spreadsheet Menu
File
Close - Closes the Data Spreadsheet.
Edit
Cut, Copy, Paste, Rename Sheet, Delete Cells, Delete Rows, Delete
Columns, Delete Sheet - These commands employ Excel standard
functionality.
Insert
Cells, Rows, Columns, and Sheet - These commands employ Excel
standard functionality.
Terminator Rows - This command inserts one shaded row above the
selected row. The cell in Column 1 of a terminator row contains the value
.End. Use Terminator Rows for table spreadsheets only.
Format
Cells - Opens the Format Cells dialog box which employs the same
functionality as it does in Excel. This dialog box has the following tabs:
- Number - currency, scientific, etc.
- Alignment - horizontal, vertical
- Font - typeface, point size, weight, and style
- Border - line style, color, and hide segments
- Patterns - color, patterns
- Protection - locked, hidden
- Validation - rule, text
Tools
Common Formula Builder - Opens the Common Formula Builder
dialog box. For information about this dialog, please refer to Common
Formula Builder dialog box, on page 203.

218

Feature Reference

Execution Log dialog box


The Execution Log dialog box displays the Execution Log. The Execution
Log is a text file (ExecutionLog.bpl) which contains the result of each test
step as it executed.
To open the Execution Log while in Design mode, select View > Execution
Log or click the View Execution log toolbar button.

During playback, the Execution Log dialogs title bar shows which iteration
is currently executing. When playback is finished, the log shows every step
that was executed in the most recent run and the result of each step.
For a complete explanation of the Execution Log dialog boxs controls and
features see Execution Log on page 31. See also Report Viewer on page
271.

219

QuickTest Professional for mySAP.com Windows Client Users Guide

Expert Mode
Select Tools > Expert to open the Expert Mode window. If Expert does not
appear on the Tools menu, you must check Enable Expert Mode in the
General tab of the Options dialog box to enable it.

Selecting Tools > Expert allows you to open any of the following files for
viewing and editing in Expert Mode:
.bps - the business process file
.usr - the LoadRunner file
.cfg - the run-time settings
.prm - the parameter file
.bpw - the testcase file

220

Feature Reference

For an explanation of each of these files, please see Tools on page 229.
The Expert Mode window acts as a programmer editor and includes the
following functions:

Toolbar
New - Opens a new text file for editing without closing any files already
open
Open, Save - Windows standard functionality
Print - Prints the contents of the current window
Cut, Copy, Paste - Windows standard functionality
Undo - Reverses the last edit operation
Redo - Duplicates the last edit operation
Indent - Each click moves the selected text one character position to the
right
Undent - Each click moves the selected text one character position to the
left

Menus
File - New, Open, Save, Save as, Save as RTF, Save as HTML, Close, Print,
Print setup, Exit
Edit - Undo, Redo, Cut, Copy, Paste, Delete, Select All, Read only, Word
wrap, Properties
Search - Find, Find Next, Show All, Replace, Use Regular Expressions
Tools - Insert Character, Character case (Uppercase/Lowercase), Select token
Options Language - C, HTML, Object Pascal, e-mail, JavaScript, No highlighting
Delphi - As Delphi 2.0, As Delphi 3.0

221

QuickTest Professional for mySAP.com Windows Client Users Guide

Font - Opens Font dialog box


Set Bookmark - Bookmark 0 through 9, Custom
Goto bookmark - No Bookmarks set, Custom
Help - About

Fatal Error dialog box


The Fatal Error dialog box appears only when there is a software failure for
an unknown reason. Except for the title, the Fatal Error dialog is identical to
the Object Not Found dialog box. See Object Not Found Dialog Box on
page 107 for an explanation of the dialog box controls.

Find dialog box (in Execution Log and Report Viewer)

See Report Viewer on page 97 for information about this dialog box.

222

Feature Reference

Find & Replace dialog box

The Find & Replace dialog box is accessible from the main menu by
selecting Edit > Find.
See Using Find & Replace on page 94 for a complete description of the
Find & Replace dialog boxs controls.

Import dialog box


Recorded business processes from another testcase can be imported to the
current testcase. Importing can combine multiple business processes from
separate testcases without recording again.

223

QuickTest Professional for mySAP.com Windows Client Users Guide

Access the Import dialog box by selecting File > Import from the main
menu.
Browse button

See Recorded business processes from another testcase can be imported to


the current script. Importing can combine multiple business processes from
separate scripts without having to re-record them. on page 44 for a
complete discussion of the Import dialog boxs controls.

Invalid Argument dialog box


The Invalid Argument dialog box appears only when a user has changed the
C code underlying a testcase. Except for the title, the Invalid Argument
dialog is identical to the Object Not Found dialog box.
See Object Not Found Dialog Box on page 107 for an explanation of the
dialog box controls.

224

Feature Reference

Main Menu
Keyboard shortcuts are shown in parentheses.

File
File > New (Ctrl + N)
, Open (Ctrl + O)
, Save (Ctrl + S)
As, Print Setup (Ctrl + P), Exit, recent file list - Windows standard
functionality.

, Save

File > Reload (Ctrl + L) - Changes the current display to the last saved copy
of the testcase, discarding any unsaved changes.
File > Import - Opens the Import dialog box so you can import business
processes and their related data, scripts, and screens (excluding views).
Automatically links the imported business processes to the current view.
File > Page Setup - Opens the Page Setup dialog box from which you can
configure the page headers and footers. See Page Setup dialog box on page
242 for more information.
File > Print - Allows you to prints all screens and steps in the current
testcase or a selected business process or screen. Use this as a quick and easy
way to help document a testcase. See Print dialog box on page 244 for
more information.

Edit
Edit > Copy (Ctrl + C)
standard functionality.

, Paste (Ctrl + V)

, Delete

- Windows

Edit > Rename - Opens the selected step for editing.


Edit > Find (Ctrl + F) - Opens the Find & Replace dialog box. Works only
with the icon tree.
Edit > Goto data - Opens the Data spreadsheet for the selected step. Goto
data is enabled for business processes, verifications, tables, and any step that
is parameterized.

225

QuickTest Professional for mySAP.com Windows Client Users Guide

Edit > Properties (Alt + Enter) - Opens the Properties dialog box for the
selected step.

Insert
Insert > Record (F3) - Starts the recording process.

Insert > Stop Recording (Ctrl + F3) - Stops the recording process.

Insert > New Business Process - Adds a new business process to the tree of
the current testcase
Insert > Business Process to View - Opens the Select Business Process dialog
box. Select a business process from the list and click the OK button to add
that business process to the current view.
Insert > Input - Adds an input parameter under the current screen step.
Opens the Select Objects dialog. The cursor changes to a pointing hand.
Clicking a screen object adds an input parameter step to the tree for that
object.
Insert > Output - Adds an output parameter under the highlighted screen
step. Opens the Select Objects dialog. The cursor changes to a pointing
hand. Clicking a screen object adds an output parameter step to the tree for
that object.
Insert > Verification - Adds a verification step under the highlighted screen
step. Opens the Select Objects dialog. The cursor changes to a pointing
hand. Clicking a screen object adds a verification step to the tree for that
object.
Insert > Step - Opens the Step Generator dialog box. Allows you to add an
additional step to the test above the highlighted screen step.

Execution
Execution > Run (F5) - Runs the entire testcase starting from the top, for as
many iterations as there are rows in the Data spreadsheet for this testcase or
for selected rows only. Use Run Testcase when you want to run all the
business processes in a testcase.

226

Feature Reference

Execution > Run from Cursor - If the cursor is on a business process step,
Run from Cursor runs the testcase starting from the cursor position and
stopping at the end of the script. It does not wrap, so any business
processes in the script preceding the starting business process do not get
executed.
Execution > Run to Cursor (Ctrl + F10) - Runs from the top of the testcase
(or from the step where execution was paused) to the cursor position. This
has the same effect as inserting a breakpoint at the cursor position. Use this
option when you want to stop the run after a certain step.
Execution > Step Over (F10) - Executes the currently highlighted tree
branch, then moves to the next available step and stops. Steps executed
include the current step and any child steps below it in the tree. Used for
troubleshooting.
Execution > Step Into (F11) - Executes only the currently highlighted tree
step, then moves to the next available step and stops. Used for
troubleshooting.
Execution > Pause Run (Shift + F5) - Stops the run temporarily. Resume by
selecting Run or Run to Cursor. Use Pause Run when you want to take extra
time before continuing. For example, you might want to look through the
Execution Log before going to the next step.
Execution > Stop Run (Ctrl + F5) - Stops the run.

Execution > Insert/Remove Breakpoint (F9) - Inserts or removes a


breakpoint. Breakpoints stop a run. Used for troubleshooting.

Note: Breakpoints on a comment line (or any non-executable line) have no


effect.

227

QuickTest Professional for mySAP.com Windows Client Users Guide

Testcase
Testcase > View Manager - Opens the View Manager dialog box which
allows you to create, delete, and modify testcase views.
Testcase > Settings - Opens the Settings dialog box from which you can
select Next Error Handling options, Execution Delay, the Auto Connect
feature, and external data files to use. See Settings dialog box on page 278
for more information about these settings.
Testcase > Generate TestDirector Design Steps - Selecting this menu item
causes each step in the icon tree to be stored as a test step. To enable
automatic saving of testcase steps as TestDirector design steps, check Auto
Generate Design Steps on Save in the Test Director tab of the Options
dialog box. See Integration with TestDirector on page 140 for more
information.
LoadRunner > Init Action - Enables you to parameterize the vuser_init
section of a Vuser script. See Integration with LoadRunner on page 121.

View
View > File Toolbar - Displays or hides the File toolbar.
View > Edit Toolbar - Displays or hides the Edit toolbar.
View > Insert Toolbar - Displays or hides the Insert toolbar.
View > Execution Toolbar - Displays or hides the Execution toolbar.
View > View Toolbar - Displays or hides the View toolbar.
Toolbars display as icons above the Tree window and Screen Capture
window.
View > Status Bar - Displays or hides the status bar at the bottom of the
screen.
View > SAP GUI For Windows - Brings an open SAP window to the front of
the users display.
View > Parameter Data - Opens the data spreadsheet.

228

Feature Reference

View > Results Data - Opens the results spreadsheet.

View > Execution Log - Opens the Execution Log window.

View > Screen Capture - Displays or hides the Screen Capture window.

View > Data Explorer - Opens the Data Explorer dialog box which shows all
data components belonging to the testcase.

Tools
Tools > TestDirector - Opens the Connection to TestDirector dialog box
from which you can establish a connection between QuickTest-SAP and
TestDirector. After connecting, the QuickTest menu items File > Open and
File > Save As can operate on stored TestDirector files as well as on QuickTest
files. Connecting also allows you to launch QuickTest from Test Director. See
Integration with TestDirector on page 140 for more information.
Tools > Start SAP Frontend - Opens the SAP Logon dialog and allows you to
log on to an SAP system. This feature stores logon information for multiple
SAP systems.
Tools > Stop SAP Frontend- Terminates the SAP client.
Tools > SAP Logon Settings - Opens the SAP Logon dialog. Allows you to
make changes while the front is running. Does not allow you to log on to an
SAP system.
Tools > Layout - Opens a submenu that has the following selections:
Save - Opens a submenu that has the following selections:
For current mode - Saves the preferred window size and location settings
for the current mode
For Design - Saves the window settings for Design mode
For Execution - Saves the window settings for Execution mode
For Record - Saves the window settings for Record mode

229

QuickTest Professional for mySAP.com Windows Client Users Guide

Restore Defaults - Opens a submenu that has the same selections as the
Save submenu. Restores the preferred window size and position settings
separately for each mode.
Tools > Customize - Opens the Customize dialog box. For more
information, see Customize dialog box on page 206.
Tools > Options - Opens the Options dialog box. Options are global,
affecting all testcases. See Options dialog box on page 236 in this chapter
for more information.
Tools > Expert - Expert mode gives you access to the code and configuration
files belonging to a testcase. To enable Expert, check Enable Expert Mode in
the General tab of the Options dialog box.
This selection opens the following submenus:
BP File - Opens the .bps file for the current business process. This file
contains the program code underlying each step of the business process.
Each business process in the testcase has its own .bps file.
View Files - Opens the following submenu:
USR - Opens the .usr file for the current view. The .usr file contains
information needed by LoadRunner to run the script, such as the
business process names, the order in which they should be run, the
spreadsheet names, and the name of the configuration file.
CFG - Opens the .cfg file for the current view. This file contains the runtime settings (e.g., think time, iterations, and logging).
PRM - Opens the .prm file for the current view. This file contains
parameter and spreadsheet information such as parameter names, data
access method, and number of spreadsheet rows (including the column
heading row).
Testcase File - Opens the .bpw file for the current testcase. This file
contains system information such as connection, logon, and error
handling settings. There is only one .bpw file per testcase.

230

Feature Reference

Help
Help > Users Guide - Opens the Users Guide in PDF format if you have
Adobe Acrobat Reader 5.0 installed.
Help > About QuickTest Professional for mySAP.comTM Windows Client Version and copyright information.

Not Connected dialog box


The Not Connected dialog box appears when you try to playback a test
script and the following conditions all apply:
Auto Connect is unchecked
QuickTest is not connected to an SAP server
There is no SAP Connect step in the script
The Not Connected dialog box controls are exactly the same as those of the
Object Not Found dialog box. See Object Not Found Dialog Box on page
34 and Object Not Found dialog box on page 233 for more information
about the dialog box controls.

Object Description dialog box


The Object Description dialog box is accessed by right-clicking an object in
the screen capture view, then selecting Object Description from the pop-up
menu.

231

QuickTest Professional for mySAP.com Windows Client Users Guide

The properties displayed in the Object Description dialog box are identical
to the properties displayed in the Object tab of the Properties dialog box and
in the Select Objects dialog box.
The text in the Object Description dialog box is read-only.

Object Description Text dialog box


Use the Object Description Text dialog box to modify the description of an
object.
To open the Object Description Text dialog box:
1 Select a testcase step, open the Properties dialog, and click the Object tab.
2 Click the Options button.
3 Select Modify from the menu.

The text in the Object Description Text dialog box is editable.


OK, Cancel, Copy, Paste - Windows standard functionality.

232

Feature Reference

Object Not Found dialog box


The Object Not Found dialog appears during a test run when the Next Error
Handling setting is Interactive Prompt and QuickTest is unable to execute
the next step successfully. The message in the Object Not Found dialog is
the same as that of the last step in the Execution Log. This dialog offers
many options to help you deal with run-time errors.

For a detailed discussion of the Object Not Found dialog boxs controls, see
Object Not Found Dialog Box on page 107.
Note: This dialog box can also appear with any of the following titles:
Fatal Error - This occurs only when there is a failure for an unknown
reason.
Invalid Argument - This occurs only when a user has changed the C code
underlying a testcase.
Not Connected - If you attempt to run a test script while not connected
to an SAP system and the Execution setting Auto Connect is disabled, then
this dialog title appears.

233

QuickTest Professional for mySAP.com Windows Client Users Guide

Open and Open from TestDirector project dialog boxes


When QuickTest is connected to TestDirector, you can switch back and forth
between the TestDirector database and the local file system by clicking the
File System and the TestDirector buttons. Select File > Open to access these
dialog boxes.

234

Feature Reference

Open Testcase Results dialog box

The results of a test run from TestDirector can be opened from QuickTest
and displayed in the Execution Log dialog box or in the Report Viewer. You
can switch between a TestDirector database and the local PC file system by
clicking the File System and TestDirector buttons. See Opening Execution
Results on page 144 for more information about using these dialog boxes.

235

QuickTest Professional for mySAP.com Windows Client Users Guide

Options dialog box


Open the Options dialog box by selecting Tools > Options.

General Tab

Auto save layout - Enables automatic saving of open windows, window size
and position, open toolbars, and status bar display information. Layout
information is saved separately for Design mode, Record mode, and
Execution mode.
Auto restore layout - Enables automatic restoring of layout information.
Show Sent Screen - Enables the Sent Screen tab of the Screen Capture
window. The Sent Screen shows the screen sent to the server along with any
input data entry.
Enable Expert Mode - Checking this box adds the Expert Mode submenu to
the Tools menu. Choosing one of the Expert Mode submenu items allows
the user to open various code and configuration files belonging to the
current testcase. See Expert Mode on page 110 for more information about
this option.

236

Feature Reference

Show step tip - Checking and unchecking this box toggles the display of
descriptive balloons when the cursor moves over an icon in the tree.

Recording Tab

Auto record tables - Allows you to record SAP tables (and loops) as single
objects while retaining the ability to enter multiple rows of data into each
field of the table. When Auto record tables is disabled, each field of a table
(or loop) is recorded as a separate input object.
Auto record parameterization - Causes QuickTest to automatically
parameterize each input field as you record. This is useful when you intend
to parameterize all or most input fields because it is faster than doing it
manually. With this option you still must input the data to the spreadsheet
after recording.

237

QuickTest Professional for mySAP.com Windows Client Users Guide

Execution Tab

Auto Show Execution Log (Execution Startup) - Opens the Execution Log
when a testcase run starts. If this option is disabled, it will not hide an
already open Execution Log the next time the testcase is run.
Auto Save Testcase - Causes QuickTest to save the testcase automatically
when you choose one of the Run options.
Prompt for saving results - Causes the Save Execution Results dialog box to
display when you start to run a testcase. Selecting this option ensures that
you wont forget to save execution results.
Auto Show Execution Log (Execution End) - Opens the Execution Log
when a testcase run finishes. If this option is disabled, it will not hide an
already open Execution Log the next time the testcase finishes a run.
Save executed screens - This option saves all screens that appeared during a
test run so that you can see them in the Report Viewer after the run. This
can be useful when troubleshooting a recorded testcase.

238

Feature Reference

TestDirector Tab

Allow TestDirector to run tests remotely - When checked, TestDirector can


run tests stored in the QuickTest file structure.
Auto Generate Design Steps on Save - When this box is checked and you
are connected to TestDirector, saving a testcase causes each step in the
testcase to be stored as a test step in a TestDirector test database. It is
recommended not to leave this box checked when the testcase has many
steps because it slows the saving process considerably. Instead, select
Testcase > Generate TestDirector Design Steps, to save steps manually as
needed. For more information see Integration with TestDirector on page
140.

239

QuickTest Professional for mySAP.com Windows Client Users Guide

LoadRunner Tab

Enable Global data - Adds a Global spreadsheet to the data workbook. For
more information see Integration with LoadRunner on page 121.

240

Feature Reference

Common DLL(s) Tab

The Common DLL(s) tab allows you to include with all your testcases DLL
files which are external to QuickTest-SAP. This feature makes it unnecessary
to add load_dll statements to your scripts. QuickTest attempts to load any
included DLLs first from the directory where QuickTest is installed, and
second from directories in the path. See also Local DLL(s) Tab on page 281
for information about including external DLLs for a specific testcase.

241

QuickTest Professional for mySAP.com Windows Client Users Guide

Page Setup dialog box


The Page Setup dialog box allows you to configure the headers and footers
of the testcase pages that you print. Select File > Page Setup to open the
Page Setup dialog box.

To add your own text, type it directly into the Header or Footer box.
To format a header or footer:
1 Click the button next to the header or footer. The Header/Footer Element
menu opens.
2 From the menu, select the element you want to include in your header or
footer. QuickTest adds the code for that element to the Header or Footer edit
box.
The following table shows the code associated with each element.

242

Code

Header/Footer Element

&B

Business process name

&C

Center justify

&D

Date

&L

Left justify

&N

testcase Name

&P

Page number

&R

Right justify

&S

Screen type (received or sent)

Feature Reference

Code

Header/Footer Element

&T

Time

&V

View name

Example: To add the word Date: to the header, followed by the current
date:
1 Type Date: in the Header box.
2 Click the

button, and select Current Date from the pop-up menu.

The Header box will then contain: Date: &D

To change an existing element in a header or footer, select the code for that
element in the Header or Footer edit box, click the
button to open the
menu, then select the element that you want to replace it.
To delete an element, select it in the Header or Footer edit box and press
Delete.

243

QuickTest Professional for mySAP.com Windows Client Users Guide

Print dialog box


Select File > Print from the QuickTest menu or from the Report Viewer menu
to open the Windows standard Print dialog box for the version of Windows
you are running.
All - Select All to print all screens and steps belonging to the current testcase.
Pages - Select Pages to specify which pages to print. Enter the beginning
page to print in the from box; enter the ending page to print in the to box.
Selection - Select Selection to print only the selected business process or
screen. Selection prints the selected business process or screen and the next
lower level of steps only.
Click OK to print your selection.

Print Setup dialog box


Select File > Print Setup from the QuickTest menu or from the Report Viewer
menu to open the Windows standard Print Setup dialog box for the version
of Windows you are running.

244

Feature Reference

Properties dialog box


The Properties dialog box displays different tabs depending on the type of
step that was selected. For example, Screen steps have a Screen tab, Input
steps have an Input tab, etc.; most steps have an Object tab in addition to
another tab.
With a testcase step selected, the Properties dialog box is accessible in the
following ways:
right-click the step in the icon tree, then select Properties from the pop-up
menu.
select Edit > Properties from the main menu
The following controls belong to the dialog box, not to any particular tab:
OK, Cancel, Apply, and Help buttons - Windows standard functionality

245

QuickTest Professional for mySAP.com Windows Client Users Guide

Branch Tab

The Branch tab opens for a GUI Object Branch step.


Object found - Select this button if you want the if condition to be true
when the object is found.
Object not found - Select this button if you want the if condition to be
true when the object is not found.

Branch on Data Tab

The Branch on Data tab opens for a Data Branch step.

246

Feature Reference

Decision - Type the name of a new parameter or choose an existing


parameter from the drop-down list. The parameter in the Decision box
contains the formula condition which determines the branching. See
Branch on Data on page 195 for more information.
Goto Data - Opens the Data spreadsheet which contains the parameter
currently displayed in the Decision box.

Column Tab

The Column tab opens for a Tree (ActiveX) step.


Constant - Contains the referenced column number of the ActiveX Tree
object. This box is blank for single column Tree objects.
Parameter - Placeholder for data that you want to vary for each iteration of
a test. Data for the parameter is pulled from the Data spreadsheet of the
testcase or from an external spreadsheet.
Goto data - If parameter is selected, clicking the Goto data button opens the
spreadsheet which contains the parameter currently displayed in the tab.

247

QuickTest Professional for mySAP.com Windows Client Users Guide

Drag Object and Drop Object Tabs

Drag Row and Drop Row Tabs

248

Feature Reference

Drag Col and Drop Col Tabs

All the drag and drop tabs appear in the Properties dialog for a Drag & Drop
(ActiveX) step.
For information about drag and drop steps, see Implementing Drag and
Drop (ActiveX) on page 197.

249

QuickTest Professional for mySAP.com Windows Client Users Guide

General Tab

Optional step - Makes a step optional in the same way that a screen can be
made optional. Not applicable to screen terminator steps. (See Optional
Screens on page 118 for more information.)
Think time - Think times are recorded in whole seconds. The think time
feature in the Properties dialog box lets you control the duration of think
times for the selected step. Think time can also be set for an entire testcase
via the Settings dialog box. For an explanation of how the Think Time
controls work see Think Time on page 30.
Clear extra event - Use Clear extra event for those occasions when the SAP
system returns two events at once, creating a synchronization problem
during script playback. Clear extra event is active only for screen terminator
steps.

250

Feature Reference

Input Tab

The Input tab opens for an Input step.


Constant - Static or hard-coded text for input that is exactly the same for
each test run.
Parameter - Placeholder for input that you want to vary between iterations
of a test.
Goto Data - If parameter is selected, clicking the Goto data button opens
the Data spreadsheet which contains the parameter currently displayed in
the tab.

251

QuickTest Professional for mySAP.com Windows Client Users Guide

LoadRunner Tab

The LoadRunner tab is displayed for a business process step.


For a detailed description of the features in the LoadRunner tab, see
Integration with LoadRunner on page 121.

252

Feature Reference

Loop Tab

The Loop tab opens for a GUI Object Loop step.


Until object appears - Loop until the object appears
Until object disappears - Loop until the object disappears
Select the appropriate button depending on how you want to control your
loop. The object must be described in the Object tab of the properties for the
same step. See GUI Object Loops on page 186 for more information.

253

QuickTest Professional for mySAP.com Windows Client Users Guide

Object Tab

The Object tab displays SAP Frontend information using an SAP dialog and
allows some modifications.
Tag - Displays the objects name.
Attribute - Displays the objects attributes, such as class, name, location,
and value. See Attributes on page 153 for a complete list.
Value - Displays the value of the attribute when the object was recorded or
last modified.
Attribute name - You can modify the values of some attributes in this edit
box.
Constant - Static or hard-coded text for input that is exactly the same for
each test run.
Parameter - Placeholder for input that you want to vary between iterations
of a test.

254

Feature Reference

Goto Data - If parameter is selected, clicking the Goto data button opens
the spreadsheet which contains the parameter currently displayed in the
tab.
Options - Opens the following menu:
New Attribute - Adds a new attribute to the list with the default name
attr and the default value value.
Delete Attribute - Deletes the selected attribute with no confirmation
message.
Copy - Makes a copy of all attributes of the object.
Paste - Pastes previously copied attributes to the current object.
Modify - Opens the Object Description Text dialog box for editing. For
more information about this feature see Modifying Attributes on page
161.
Select Object - Opens the Select Objects dialog box and changes the
cursor to the shape of a pointing hand. Allows you to point to a screen
object and substitute that objects properties for the properties of the
current object. For more information about this feature see Object Tab
on page 157.
Add Reference Text - Opens the Select Objects dialog box and allows
you to point to screen text to associate with the selected object. Use this
when the text associated with the selected object is a separate object in
the SAP Frontend. See Using Reference Text on page 198 for more
information about this advanced feature.

255

QuickTest Professional for mySAP.com Windows Client Users Guide

Output Tab

The Output tab opens for Output step.


Output to - List box of output parameters; you can type in another name.
You can also output to a sub-spreadsheet by using the following syntax:
subsheet_name::parameter_name.
Attribute - Select an attribute from the list. The value of the selected
attribute will be assigned to the output parameter.
Attributes available from the list are shown in the following table:
activex_progid

attached_text

back_color

class

color

col

enable

height

intensive

key

label

list_page_rows

list_rows

list_start_row

location

name

program

readonly

row

screen

table_page_rows

table_rows

table_start_row

value

visible

width

256

Feature Reference

This is the same Attribute list accessible from the Verify tab (see Verify Tab
on page 268). See Attributes on page 153 for information about these
attributes.
Goto Data - Opens the Data spreadsheet which contains the parameter
currently displayed in the tab.

Path Tab

The Path tab opens for a Tree (ActiveX) step.


Constant - Static or hard-coded text for input that is exactly the same for
each test run. Tree branches are separated by a semicolon. In the preceding
graphic, the Controls branch is a child of the Workbench Demos branch.
Parameter - Placeholder for input that you want to vary between iterations
of a test.
Goto Data - If parameter is selected, clicking the Goto data button opens
the spreadsheet which contains the parameter currently displayed in the
tab.

257

QuickTest Professional for mySAP.com Windows Client Users Guide

Property Page Tab

The Property Page tab opens for a Reset AUT step.


The OK Code text is editable so the tester can change the default /ns000 to
another OK code if desired.

SAP Connect Tab

The SAP Connect tab opens for an SAP Connect step.


Use an SAP Connect step to control the SAP connection from within a
recorded testcase. From this tab you can modify the arguments originally
used in a connect step, or select an already configured connection from the

258

Feature Reference

Description list. That allows you to run the same test on multiple systems.
For more information see To connect to an SAP system: on page 19.

SAP Logon Tab

The SAP Logon tab opens for an SAP Logon step.


The SAP Logon step is used to control the SAP logon from within a testcase.

Report Tab

The Report tab opens for a Report Check step.


Name - Type a name for the Step.
259

QuickTest Professional for mySAP.com Windows Client Users Guide

Description - in the Description box, type the text you want to appear in
the report. You are allowed to imbed parameters in the text to display the
parameter value. Parameter names must be enclosed in brackets (e.g.,
<parameter_name>).
Status - Lists available parameters for this business process. You can also
type in the name of a new parameter that you want to create for this step.
The parameter in this box should contain a formula to be evaluated during
the run. If the formula evaluates to TRUE, the check passes; otherwise the
check fails. The result of the evaluation is sent to the Execution Log.
Goto Data - Opens the Data spreadsheet which contains the parameter
currently displayed in the Status box.
For more information about Report Checks see To add a Report Check
step: on page 71.

Resize Tab

The Resize tab opens for a Resize Screen step.


The edit boxes allow you to set the width and height attributes in characters
for a screen object.

260

Feature Reference

Retry Tab

The Retry tab opens for a keypress step or a buttonpress step.


Retry and Delay give you finer control over a button press step or a keypress
step. Type a number or click the up and down arrows to change:
the number of retries.
the number of seconds to delay before executing the step.

261

QuickTest Professional for mySAP.com Windows Client Users Guide

Row/Column Tab

The Row/Column tab is displayed for a Table Set Focus step and for a Grid
(ActiveX) step.
Column - Enter the name of the column where you want to set the focus. If
you are not sure of the name, check the object description for the column
heading. If the column has no heading, you can use the ordinal number for
the column. Columns are numbered consecutively starting from the left, so
you would use #4 for the fourth column from the left, for example.
Row - Enter the number of the row where you want to set the focus.
The Row and Column boxes can accept parameters. Parameters should be
enclosed in pointed brackets (< >). For more information see
Parameterizing a Grid (ActiveX) Row or Column on page 96.

262

Feature Reference

Screen Tab

The Screen tab is displayed for a Screen step.


Optional screen - Allows you to make a screen optional so that its
appearance or disappearance during a test run wont stop execution. When
a screen has been made optional, its icon on Tree window is partially
overlaid with a question mark.
Clear default exceptions - Checking Clear Default Exceptions instructs
QuickTest to try to clear some exceptions before checking the current screen
to match with the expected screen. For example, QuickTest can dismiss
some information and warning messages automatically without reporting
an error. When QuickTest clears a default exception, it writes a warning line
to the Execution Log.
Each screen object has its own Clear Default Exceptions check box in its
Properties dialog box. This setting for a screen overrides the testcase Clear
default exceptions setting in the Settings dialog box whenever the Properties
check box is checked or unchecked. For the testcase Setting to apply to a
screen, the Properties check box for that screen must be in the so-called

263

QuickTest Professional for mySAP.com Windows Client Users Guide

third state. The third state refers to a check box that is both checked and
grayed out as shown in the following graphic:

When the Properties setting is in the third state, then the setting in the
Settings dialog box prevails.

Scroll Lines Tab

The Scroll Lines tab is displayed for a Scroll Table step.


Scroll by Row - Enter a number to determine the number of rows to be
scrolled. An unsigned number means scroll to that row number. Preceding
the number with a + or - means scroll forward or backward this number of
rows from the current row.

264

Feature Reference

Scroll by Text - Defines the column to be searched for the specified text.
This field also can accept a parameter.
Verify Existence - Check this box when you need to know if the row or the
text you are searching for was found. A message is sent to the Execution Log
indicating whether or not the text was found during the run.

Note: The Table Scroll step is a screen terminator. If you do anything to the
table in-between scrolls (including setting the focus), another subspreadsheet will be created in the data workbook.

Table Tab
This version of the Table tab appears for Table steps.

Table - Allows you to select an existing table spreadsheet from the list or
type in the name for a new table spreadsheet.

265

QuickTest Professional for mySAP.com Windows Client Users Guide

Goto Data - Opens the data file which contains the table spreadsheet
currently displayed in the Table box.
This version of the Table tab appears for Data Loop steps.

A Data Loop repeats one or more actions until the data in a Table subspreadsheet for one iteration has been exhausted. The number of repetitions
depends on the number of data rows in the iteration. The Data Loop is
useful in those situations when the number of data rows varies from one
iteration to another. See Data Loops on page 181 for more information.

Unknown Tab

The Unknown tab opens when the associated object does not belong to an
established category (e.g., when you insert a Comment step, an SAP Logoff
step, or a LoadRunner function into the tree).
Text - Type any text you want in this edit box. You can use this to add
comments to document your testcases.

266

Feature Reference

Value Tab

The Value tab opens for a Grid ActiveX step.


Constant - Static or hard-coded text for input that is exactly the same for
each test run.
Parameter - Placeholder for input that you want to vary between iterations
of a test.
Goto Data - If parameter is selected, clicking the Goto data button opens
the spreadsheet which contains the parameter currently displayed in the
tab.

267

QuickTest Professional for mySAP.com Windows Client Users Guide

Verify Tab

The Verify tab opens for a verification step.


Output to - This drop-down list includes all parameters for the current
testcase only. When you select a parameter from the list, you are assigning
output to that parameter. Click OK to complete the process.
If you want to create a new parameter, just type a name for it in the Output
to box and click OK. QuickTest then creates the new parameter and adds a
new column with the same name to the data spreadsheet.
Attribute - The default attribute to verify is value. If you want to verify a
different attribute, select it from this list. Multiple verifications of the same
object are allowed. Add a separate verification step for each attribute you
want to verify. For a list of verifiable attributes, see Output Tab on page
256.

268

Feature Reference

Constant - Static text for results expected to remain the same from one test
run to another. You can also use wild cards here when only part of the text
(such as the order number in the graphic above) is expected to change. Use
an asterisk to represent multiple consecutive characters; use a question mark
to represent a single character.
Parameter - Placeholder for results expected to change from one test run to
another. Expected parameters may hold different values during different test
runs.
Goto Data - If parameter is selected, clicking the Goto data button opens
the spreadsheet which contains the parameter currently displayed in the
tab.

WinRunner Tab

The WinRunner tab opens for a WinRunner test step


Step Generator.

added via the

Test path - Contains the full path to the WinRunner test. You are allowed to
enter the path to a TestDirector project.
Browse - Displays an Open dialog box. Allows you to navigate to the desired
test.
Arguments - Optional command line arguments to be used when running
the test.

269

QuickTest Professional for mySAP.com Windows Client Users Guide

SAP Logon dialog box

The SAP Logon dialog box lets you store logon information for multiple SAP
systems. The dialog is accessible in the following ways:
Select Tools > Start SAP Frontend - Allows user to logon to a selected SAP
system; not accessible when the Front is running
Select Tools > SAP Logon Settings - Does not allow logon; is accessible when
the Front is running
For more information about how to use this dialog box, see Configuring
the SAP Logon on page 18.

270

Feature Reference

Report Setup dialog box (in Report Viewer)


The Report Setup dialog box allows you to configure the headers and footers
of the testcase pages that you print from Report Viewer. Select File > Report
Setup from the Report Viewer menu to open the Report Setup dialog box.

For more information about the Report Setup dialog box, see Report Setup
on page 105.

Report Viewer
The Report Viewer combines the features of the Execution Log, the Screen
Capture window, and the Results spreadsheet. This combination puts three
troubleshooting tools into one place. By linking them together, the Report
Viewer becomes a powerful troubleshooting tool.

271

QuickTest Professional for mySAP.com Windows Client Users Guide

The Report Viewer is a standalone program, separate from QuickTest-SAP.


Select Report Viewer in the QuickTest for SAP R3 program group from the
Windows Start menu. It can also be invoked from the Execution Log by
clicking the View Execution Report toolbar button.

For more information about the Report Viewer, see Report Viewer on page
97.

272

Feature Reference

Results Spreadsheet (results.xls)


The Results spreadsheet displays data from the most recent test run only.
The data is overwritten with each new test run.
The Results spreadsheet shows only those spreadsheets that participated in
the most recent test run. For example, if you run a testcase view that
contains only one business process, then the Results data will show only the
spreadsheet for that business process, even though the complete testcase
contained more than one business process.

You can access the Results spreadsheet in the following ways:


Select View > Results Data from the QuickTest main menu
Click the View results button on the QuickTest toolbar
Select View > Results Data from the Execution Log menu
Click the View Results icon on the Execution Log toolbar
Click the Results tab in the Report Viewer
For more information about the Results spreadsheet see Results
Spreadsheet on page 111.

273

QuickTest Professional for mySAP.com Windows Client Users Guide

Save and Save to TestDirector project dialog boxes


When QuickTest is connected to TestDirector, selecting the File > Save opens
the Save to TestDirector project dialog box.

When QuickTest is not connected to TestDirector, selecting the File > Save
opens the Save dialog box.

You can switch back and forth between the TestDirector database and the
local file system by clicking the File System and the TestDirector buttons.

274

Feature Reference

If the testcase you want to save does not yet exist, saving it creates a
directory with the same name as the file and saves the file in that directory.
For example, you are saving the testcase Test1 to the local file system for the
first time. You navigate to the folder C:\Project and click the Save button.
The testcase is saved as C:\Project\Test1\Test1.bpw.

Save Execution Results dialog box


The Save Execution Results dialog is used to save the current execution log.
It also saves the Results spreadsheet in the specified directory. To access the
Save Execution Results dialog box, click the Save button in the Execution
Log dialog box or the Report Viewer.

Select Prompt for saving results from the Execution tab of the Options
dialog box for an automatic save reminder at the beginning of each run.
The Save Execution Results dialog box can also be used to access records
stored in a TestDirector database. For more information see Saving
Execution Results on page 143.

275

QuickTest Professional for mySAP.com Windows Client Users Guide

Save Testcase Results dialog box (Report Viewer)


The Save Testcase Results dialog is used to save the current information from
the Report Viewer. Select File > Save, or click the Save toolbar button to
access this dialog.

Select Business Process dialog box


To access the Select Business Process dialog box select Insert > Business
Process to View from the main menu or click the Add Business Process to
View toolbar button.

List box - Lists all business processes in the testcase


Select one or more business processes, then click OK to add them to the
current view. See Views on page 41 for information about creating views.
276

Feature Reference

Select Objects dialog box


The Select Objects dialog box is accessible in the following ways:
Select Insert > Input from the main menu
Select Insert > Output from the main menu
Select Insert > Verification from the main menu
Click the Select Object button from the Object tab of the Properties dialog
box.

Object
description

Point To-> - Clicking this button causes the cursor to change its shape to
resemble a pointing hand. When you click a screen object with the pointing
hand, QuickTest inserts a step into the tree under the current screen step.
The step will be Input, Output, or Verification depending on the type of step
you accessed this dialog box from.
Object description area - Displays the objects attributes (e.g., class, name,
location, valuesee QuickTest-SAP Object Attributes and Classes on page
153 for a complete list. These are the same attributes displayed by the Object
tab of the Properties dialog box and by the Object Description dialog box.
OK, Cancel - Windows standard functionality

277

QuickTest Professional for mySAP.com Windows Client Users Guide

Settings dialog box


To open the Settings dialog box select Testcase > Settings from the main
menu.
All tabs: OK, Cancel, Help - Windows standard functionality.

Execution Tab

Next Error Handling list:


These settings are also accessible from the Next Error Handling list in the
Object Not Found dialog box.
Interactive Prompt (the default) - Causes the Object Not Found dialog to
display when an error occurs.
Report Error and Continue - An error message is written to the
Execution Log, and QuickTest tries to continue the run from where the
error occurred (this may not be possible).
Report Error and Stop - An error message is written to the Execution
Log, and execution stops.

278

Feature Reference

Skip Business Process - Skips the current business process and continues
with the next one in the testcase if there is one.
Skip Iteration - Skips the current iteration and continues with the next
one if there is more data for this testcase.
Think Time
Think times are recorded in whole seconds. The think time feature in the
Settings dialog box lets you control the duration of think times for the
current testcase. Think time can also be set for a step via the Properties
dialog box. For an explanation of how the Think Time controls work see
Think Time on page 30.
Auto Connect - Causes QuickTest to connect to an SAP system
automatically when you select one of the Run commands and you are not
already connected.
Clear Default Exceptions - Checking Clear Default Exceptions instructs
QuickTest to try to clear some exceptions before checking the current screen
to match with the expected screen. For example, QuickTest can dismiss
some information and warning messages automatically without reporting
an error. This setting applies to the entire testcase. When QuickTest clears a
default exception, it writes a warning line to the Execution Log.
Each screen object has its own Clear Default Exceptions check box in its
Properties dialog box. The Clear default exceptions Properties setting for a
screen overrides the testcase setting in the Settings dialog box whenever the
Properties check box is checked or unchecked. For the testcase Setting to
apply to a screen, the Properties check box for that screen must be in the socalled third state. The third state refers to a check box that is both checked
and grayed out as shown in the following graphic.

279

QuickTest Professional for mySAP.com Windows Client Users Guide

When the Properties setting is in the third state, then the setting in the
Settings dialog box prevails.

External Data Tab

The External Data tab allows you to specify a list of spreadsheets to use with
a testcase in addition to data.xls. External data files should be used only
when needed.
See Using External Data Files on page 83 for more information.

280

Feature Reference

Local DLL(s) Tab

The Local DLL(s) tab allows you to include with a testcase a DLL file that is
external to QuickTest-SAP. This feature makes it unnecessary to add a
load_dll statement to your script. QuickTest attempts to load any included
DLLs first from the directory where QuickTest is installed, and second from
directories in the path. See also Common DLL(s) Tab on page 241 for
information about including external DLLs with all testcases.

281

QuickTest Professional for mySAP.com Windows Client Users Guide

Step Generator dialog box


Use this feature to add a step to a testcase manually. The Step Generator
inserts new steps above the selected step in the icon tree.

Steps - Displays the available steps you can add, organized by category. You
can add additional steps and categories to this dialog. See Customizing the
Step Generator on page 179 for more information about adding steps.
OK, Cancel - Windows standard functionality.
Advanced/Simple - Toggles display of the Script edit box.
Script - An advanced feature showing the function syntax for the selected
step. Code in this box is editable. See Functions Available from the Step
Generator on page 164 for more information.
See Adding a Step to a Business Process on page 92 for the procedure to
add a step.

282

Feature Reference

Toolbars
QuickTest has five toolbars: File, Edit, Insert, Execution and View. Each
toolbar has several buttons that activate frequently used commands. Display
of the toolbars is toggled on and off from the View menu. Some commands
have default keyboard shortcuts as well as menu selections.

Edit Toolbar

Keyboard shortcuts are shown in parentheses.


Copy (Ctrl+C) - Copies selected text or object to the Windows Clipboard.
Paste (Ctrl+V) - Pastes contents of the Windows Clipboard to the selected
object.
Delete - Deletes a step from the tree.
Properties (Alt+Enter) - Opens the Properties dialog box for the selected
step.
Find (Ctrl+F) - Opens the Find & Replace dialog box.

Execution Toolbar

Keyboard shortcuts are shown in parentheses.


Record (F3) - Starts the recording process.
Stop Record (Ctrl + F3) - Stops the recording process.
Run (F5) - Runs the entire testcase starting from the top, for as many
iterations as there are rows in the Data spreadsheet for this testcase or for
selected rows only. Use Run Testcase when you want to run all the business
processes in a testcase.

283

QuickTest Professional for mySAP.com Windows Client Users Guide

Run from Cursor - If the cursor is on a business process step, Run from
Cursor runs the testcase starting from the cursor position and stopping at
the end of the script. It does not wrap, so any business processes in the
script preceding the starting business process do not get executed.
Run to Cursor (Ctrl + F10) - Runs from the top of the testcase (or from the
step where execution was paused) to the cursor position. This has the same
effect as inserting a breakpoint at the cursor position. Use this option when
you want to stop the run after a certain step.
Step Into (F11) - Executes only the currently highlighted tree step, then
moves to the next available step and stops. Used for troubleshooting.
Step Over (F10) - Executes the currently highlighted tree branch, then
moves to the next available step and stops. Steps executed include the
current step and any child steps below it in the tree. Used for
troubleshooting.
Pause Execution (Shift + F5) - Stops the run temporarily. Resume by
selecting Run to Cursor. Use Pause Run when you want to take extra time
before continuing. For example, you might want to look through the
Execution Log before going to the next step.
Stop Execution (Ctrl + F5) - Stops the run.
Insert/Remove Breakpoint (F9) - Inserts or removes a breakpoint.
Breakpoints stop a run. Used for troubleshooting.

File Toolbar

Keyboard shortcuts are shown in parentheses.


New (Ctrl + N) - Starts a new testcase.
Open (Ctrl + O) - Opens an existing testcase.
Save (Ctrl + S) - Saves the current testcase to disk.
Print (Ctrl + P) - Opens the Print dialog box from which you can print the
entire testcase with one click.

284

Feature Reference

Display Users Guide - Opens the QuickTest Professional for mySAP.comTM


Windows Client Users Guide in PDF format (requires Adobe Acrobat Reader
5.0 or higher).
About - Displays version information for QuickTest-SAP.

Insert Toolbar

New Business Process - Starts a new business process in the current testcase
by inserting a business process step in the Tree window.
Add Business Process to View - Opens the Select Business Process dialog
box.
View Manager - Opens the View Manager dialog box, so that you can create
new views of the current testcase.
New Input - Opens the Select Objects dialog box and changes the cursor
into a pointing hand. Double-clicking an object in the Screen Capture
window inserts an input step into the tree and opens the Properties dialog
box for that step.
New Output - Opens the Select Objects dialog box and changes the cursor
into a pointing hand. Double-clicking an object in the Screen Capture
window inserts an output step into the tree and opens the Properties dialog
box for that step
New Verification - Opens the Select Objects dialog box and changes the
cursor into a pointing hand. Double-clicking an object in the Screen
Capture window inserts an verification step into the tree and opens the
Properties dialog box for that step.
New Step - Opens the Step Generator dialog box. Allows you to add an
additional step to the test above the highlighted screen step.

View Toolbar

285

QuickTest Professional for mySAP.com Windows Client Users Guide

View AUT - Brings a currently open SAP window to the front.


View data - Opens the Data spreadsheet.
View results - Opens the Results spreadsheet.
View Execution Log - Opens the Execution Log.
Toggle Screen Capture - Displays and hides the Screen Capture window.
View Data Explorer - Opens the Data Explorer window.

Customizing Toolbars
Toolbars are fully configurable. For information about how to customize a
toolbar see Toolbars on page 47 and Toolbars Tab on page 207.

Adding a Toolbar
QuickTest-SAP allows you to add new toolbars. For information about how
to add a toolbar see Toolbars on page 47 and Toolbars Tab on page 207.

View Manager and View Name dialog boxes


The View Manager dialog box is accessible from the main menu by selecting
Testcase > View Manager.

286

Feature Reference

Views allow you to work with a subset of the business processes within a
testcase. For example, Testcase1 contains BP1 and BP2. You record a new
business process, BP3, in the same testcase. You could create a view of
Testcase1 that displays only BP3 so that you can play BP3 back by itself.
Insert - Opens the View Name dialog box. Enter the name you want for the
new View and press OK to close View Name, then click Close to close the
View Manager.

Delete - Deletes the highlighted View. Highlight the View you want to
delete by clicking it, then click the Delete button.

Note: You cannot delete the <All Business Processes> view.

Rename - Opens View Name dialog box. Enter the new name for the View
and click OK to close View Name, then click Close to close the View
Manager.
Properties - Displays the Properties dialog box for the selected view.

287

QuickTest Professional for mySAP.com Windows Client Users Guide

Run-Time Settings - Run-Time Settings determine a variety of conditions


when a testcase is run as a script from the LoadRunner Controller. Such
conditions as whether to show the SAP GUI for Windows (client), number of
iterations, and the level of detail in the output log are all controlled from
this dialog. For more information see Running a Testcase from
LoadRunner on page 128. Also refer to your LoadRunner documentation.
Close - Closes the View Manager dialog box.
See also Views on page 41 for more information about how to create a
view.

288

Index
Symbols
&. See headers, footers, Page Setup, Report
Setup.
*value. See attributes, types of
.bps. See Expert Mode
.bpw. See testcases. See also Expert Mode.
.cfg. See Expert Mode
.End. See iteration, separator
.prm. See Expert Mode
.usr. See Expert Mode
.xls. See data.xls and results.xls
/help. See command line options
\r. See ActiveX

A
ActiveX 20, 39, 197
Add Business Process to View 285
Add Reference Text 159, 199, 255
Adobe Acrobat Reader x
Alias 84, 165
All Business Processes 112, 128, 213
Allow TestDirector to run tests remotely 239
application server 28
Attribute name 254
attributes 153
copying 160
definition 4
in Object tab 158, 193, 254
in Output tab 256
in Verify tab 72, 268
list of 256
modifying 161, 193
parameterizing 162
types of 155
verifying 72
Auto Connect 2021, 181, 231, 279

Auto Logon 19, 23, 25


Auto record parameterization 77, 237
Auto record tables 80, 95, 215, 237
enabling 24
Auto restore layout 50, 236
Auto save layout 50, 236
Auto Save Testcase 25, 238
Auto Show Execution Log 26, 32, 238

B
Books Online x
bp.h 152
bpsap.h 152, 166
Branch on Data 195
branching 190
breakpoint 2627, 227, 284
browse button 44
business process 8
correlating data in 74
default name 93
definition 4, 8
examples 10
file 110
importing 44, 223225
in Execution Log 31
input to 75
running 25
step 36, 252
verifying 13, 51, 52, 56
viewing in Data Explorer 211
Business Process to View 42, 226, 276
Business Processes in View, Report Viewer
101
business scenario 10
button class 155
Buttonpress step 31, 113, 261

289

QuickTest Professional for mySAP.com Windows Client Users Guide

C
classes of objects 155
Clear default exceptions 263, 279
Clear extra event 250
Collapse All 33, 99
Collapse to this level 36
Column tab 247
command line options 1617, 202
comment step 27, 266
Common DLL(s) Tab, Options dialog box
241
Common Formula Builder dialog box 67,
203
Confirm override dialog box 45, 204
connecting to an SAP system 19
connecting to TestDirector from QuickTest
141
constant 63
definition 56
in Data Explorer 212
in defining expected condition 64
in GUI object branching 194
in Object tab, Properties dialog 158
in verification 56
See also, static text
Constant edit box 64, 77, 95
Continue run 108
correlation. See data correlation
Customize dialog box 47, 206
customizing
keyboard 208
menus 209
Step Generator 179
toolbars 47, 207

D
Data Access Method 123
Data Branch step 246
data branch. See Branch on data
data correlation 9, 14, 66, 74, 87, 203
definition 4
procedure 89
data dependency 9, 1314, 76, 78, 8889,
95, 116, 119120
definition 4

290

Data Explorer dialog box 211, 229


data loop 181, 266
Data Loop step 184, 266
data spreadsheet. See spreadsheet
data workbook 81, 88, 213, 215, 265
data.xls 73, 84, 213, 280
data_file command line option 17
Decision 196, 247
Default button, Report Setup dialog box 105
Delay setting 31, 97, 113, 261
procedure 113
Delete Attribute 160, 255
Design mode 32, 35, 219
Details Tab, Report Viewer 100
Display Users Guide 285
drag and drop 39, 249
adding a step for 197
commands to toolbars 49, 206
testcase steps 93, 189
dynamic text 53, 63

E
Enable Dialog Step Transactions 130
Enable Expert Mode 110, 220, 230
Enable Global data 240
End LoadRunner Transaction step 124
error handling 34, 79
error messages 34, 119
exceptions 9
Execution Log 26, 3134
automatically displaying 26
in verification 39, 55, 61, 7071
iterations in 116, 217
menu 32
messages in 107, 233
opening 229, 286
saving results 275
specifying location at start up 17
toolbar 32
Execution Report 33
Execution Settings 107
ExecutionLog.bpl 26, 31, 33, 219
Expand All 33, 99
Expand Branch 36
expected condition 5461, 64, 69

Index
expected parameter 58, 74, 112
expected result 64, 70, 214, 263, 279
definition 4
in TestDirector 144
in verification 52
of a business process 9
of a step 9
of a test 15
Expert mode 39, 110, 197, 220, 230
external data files 84, 152, 280
External Data tab 165, 280
Extract word(s) formula 6768

F
Fatal Error dialog box 222, 233
Find & Replace dialog box 94, 223, 225, 283
Find dialog box, Execution Log 32, 98
Flags 165
flow control 151152, 160, 167, 169170,
181, 184, 187, 190, 192, 196
footers, formatting 105, 242
Formula Builder. See Common Formula
Builder
Formula Type 67
formulas. See spreadsheet, formulas
Frontend 4
functions
ActiveX 40
for external data files 86
list of, in Step Generator 167
LoadRunner 152, 171
return codes 178

G
General tab 50, 236, 250
Generate Design Steps on Save 239
Generate TestDirector Design Steps 147, 239
Global spreadsheet. See spreadsheet, Global
Goto data button 64, 72, 158, 212
Goto data menu item 225
Goto Step 212
Grid (ActiveX) 39
step 262, 267
GUI Object Branch step 37, 160, 191

GUI Object Loop step 160, 188, 253


creating 186
GUI object properties 64
GuiLib 152, 166

H
hard-coded. See constant 251, 254
Header Name dialog box 95, 215
headers, formatting 105, 242

I
Import dialog box 44, 223225
importing business processes 8, 223225
procedure 44
informational attribute type 155
Init action, parameterizing 125
initial conditions 38
input data 37, 95
input step, parameterizing 77
Input tab 77, 251
Insert Breakpoint 27, 227, 284
Interactive Prompt 29, 107, 109, 233, 278
intranet 149
Invalid Argument dialog box 224, 233
iteration 17, 26, 31, 216, 226, 288
and Data Loop 266
and external data 85
and LoadRunner 288
and spreadsheet 76, 7879, 116, 214,
215, 283
in CFG file 110, 230
in Execution Log 31, 217, 219
in Object Not Found dialog 34
in Report Viewer 100101, 103
in status bar 99
skipping 17, 30, 279
status in Report Viewer 100
terminator rows 78, 81, 96, 115, 216

K
keyboard
customizing 208
shortcuts 48, 208
Keypress step 31, 113, 261
291

QuickTest Professional for mySAP.com Windows Client Users Guide

L
layouts 50, 229, 236
LoadRunner
editing a testcase from 130
functions 152, 171
integration with 121
SAP Monitor 133
scenario 123, 128
transactions 124
LoadRunner tab, business process properties
252
LoadRunner tab, Options dialog box 240
logon information 17, 23
loop object 37
Loop Tab 253
loop, flow control
data 181, 266
GUI Object 186

M
match code step 38
match codes 9, 24, 37
Max Think Time 30
menus, QuickTest 35, 225
customizing 209
Execution Log 32
spreadsheet 218
menus, SAP 24, 37
Min Think Time 30
Modify Script buttons 34, 108
moving a step 93
Multiply Recorded Time By 30

N
New Attribute 255
New Business Process 21, 36, 226, 285
New Input 285
New Output 285
New Recording icon 22
New Step 285
New Verification 63, 285
Next Error Handling 17, 29, 34, 108119,
228, 233, 278

292

Not Connected dialog box 21, 231, 233


not true verification condition 59, 111

O
object
attributes 157
classes 155
properties 64
tag 164, 254
Object description area, in Select Objects
dialog box 63, 159, 277
Object Description dialog box 165, 231, 277
Object Description Text dialog box 232, 255
Object Found button 246
Object Not Found button 246
Object Not Found dialog box 21, 29, 30, 35,
97, 107, 109, 117, 119, 233, 278
Fatal Error 233
Invalid Argument 233
Not Connected 233
Object tab 55, 63, 157164, 185, 199, 232,
254, 277
obligatory attribute type 155
OK codes 24, 37
definition 5
online resources x
Open Testcase Results dialog box 32, 98
optional attribute type 155
optional screens 9, 13, 34, 108, 263
creating 118
Optional step 250
Options button 199, 232, 255
Options dialog box 24, 25, 32, 33, 50, 110,
220, 230, 236, 275
output parameters. See parameters
output step 256
parameterizing 86
Output tab 86, 256
Output To list, Verify tab 268

Index

P
Page Setup dialog box 225, 242
parameterizing
input step 77
object attributes 162
output step 86
parameters 37
creating 68, 79, 215
definition 5, 56
expected 58, 74, 112
in Formula Builder 67
in imported business processes 116
in Object tab, Properties dialog 158
in Report Check step 71
in spreadsheets 112
in verification 58, 63
indicating in tree view 37
input 37, 74, 88, 112, 119, 214, 226
object attribute 162
output 58, 74, 80, 88, 112, 195, 214,
226, 256
renaming 117
suggested names 58, 78
tables 80
Path tab 257
Pause Execution 284
Pause Run 27, 108, 227
Perform Verifications 130
planning 7, 15
procedure 9
playback. See running tests
pointing hand cursor 226, 277
Print dialog box 244, 284
Print Setup dialog box 244
printing 225, 284
procedure
manual verification 53
to add a Data Branch 196
to add a Global spreadsheet 131
to add a GUI Object Branch 191
to add a LoadRunner transaction to a
testcase 124
to add a Report Check step 71
to add a step 92
to add a toolbar 49
to add an SAP Connect step 180

procedure (continued)
to add business processes to a view 42
to change recorded field objects into a
table object 95
to connect to an SAP system 19
to connect to TestDirector from
QuickTest 141
to copy attributes from one object to
another 160
to correlate data 89
to create a Data Loop 182
to create a formula manually 64
to create a GUI Object Loop 186
to create a view 41
to create reference text 199
to customize a toolbar 47
to customize Step Generator dialog
179
to enable Auto record tables 24
to format a header or footer 105, 242
to import a business process 44
to make a screen step optional 118
to modify an attribute 161
to open test results stored in a
TestDirector database 144, 145
to parameterize an attribute 162
to parameterize an input step 77
to parameterize an output step 86
to plan an SAP test 9
to play back on a different server 28
to reference a parameter in an
external data sheet 85
to rename a step 93
to set Retry or Delay 113
to setup a LoadRunner scenario 128
verification 61
Prompt for saving results 33, 238, 275
Properties dialog box 36, 55, 95, 108, 118,
226, 245, 277, 283, 285
Branch on Data tab 246
Branch tab 192, 246
Column tab 247
Drag & Drop tabs 248
General tab 250
Input tab 77, 95, 251
LoadRunner tab, business process 252

293

QuickTest Professional for mySAP.com Windows Client Users Guide


Properties dialog box (continued)
Loop tab 253
Object tab 63, 157164, 199, 254,
277
Output tab 86, 256
Path tab 257
Report tab 71
Resize tab 260
Retry tab 113, 261
Row/Column tab 262
SAP Connect tab 258
SAP Logon tab 259
Screen tab 263
Scroll Lines tab 264
Table tab 184, 265
Unknown tab 266
Value Tab 267
Verify tab 268
WinRunner tab 269
properties of Application Servers 28
properties of GUI objects 64

Q
Qtbp.exe 16, 202
QTDataAgent.dll 149

R
Read Me First x
Received Screen tab 46
Record button 22
Record here button 108
Recording 15, 226
best practices 24
Recording tab 24, 80, 237
reference text 159, 198, 255
creating 199
referencing spreadsheet columns in code 166
Reload 30, 45, 225
Remember password 19, 23
Remove Breakpoint 27, 227
renaming
parameters 117
steps 93, 225
views 287

294

Report Check step 71, 259


Report error and continue 29, 109, 119, 278
Report error and stop 29, 101, 109, 278
Report Setup dialog box (in Report Viewer)
105, 271
Report tab 71
Report Viewer 33, 71, 97105, 114, 119,
238, 271, 276
Reset AUT step 22, 38
Resize Screen step 260
Resize tab 260
Result Parameter 68
Results spreadsheet. See spreadsheet, results
Results Tab, Report Viewer 103
results.xls 17, 273
Retry setting 31, 97, 113, 261
procedure 113
Retry tab 113, 261
return codes of functions 178
Row/Column tab 262
RTF Editor (ActiveX) 39
Run 26, 226, 238, 283
Run from Cursor 26, 227
run tests with selected data rows 76, 215
Run to Cursor 26, 227
running tests 23, 25
on a different server 28, 258
Run-Time Settings in LoadRunner 129, 288

S
SAP Connect step 180, 231, 258
SAP Connect tab 258
SAP Frontend 4
SAP functional expert 11
SAP Logon dialog box 18, 19
SAP Logon Settings 229, 270
SAP Logon settings 18
SAP Logon tab 259
SAP menus 24, 37
SAP Monitor 133
Save dialog box 274
Save executed screens 102, 238
Save Execution Results dialog box 32, 238,
275
Save Testcase Results dialog box 98, 276

Index
Save to TestDirector Project dialog box 143,
274
scenario. See LoadRunner, scenario
Screen Capture window 35, 46, 97, 193, 228,
229, 271, 285
Screen step 118, 263
Screen tab 263
screen terminator step 3638, 189, 250, 265
Screens Tab, Report Viewer 102
Scroll by Row 264
Scroll by Text 265
Scroll Lines tab 264
Scroll Table step 38, 264
Sections to Print 106
Select Business Process dialog box 42, 276,
285
Select Object button 277
Select Objects dialog box 117, 158, 159, 185,
199, 226, 232, 255, 277, 285
selecting multiple objects at once 63
Select word(s) 67
Selection step 38
Sent Screen tab 46, 236
server, application 28
Set Focus step 38, 185
Settings dialog box 17, 20, 29, 35, 165, 228,
263, 278, 279
External Data tab 84
Show Front during run 130
Show Log 108
Show Screen Tips 48
Show Selected Level 99
Show Sent Screen 236
Show step tip 237
Show Tool Tips 48
Skip Business Process 30, 108, 279
Skip Iteration 30, 101, 108109, 119, 279
spreadsheet 74
adjusting cell references 83, 115, 217
blank data cells 78, 214
column headings in Row 1 84
creating a formula manually 214
creating new parameters 79, 215
data 59, 60, 64, 67, 72, 75, 119, 203,
213, 225, 226, 228, 247, 251, 257,
260, 283

spreadsheet (continued)
external 83
formulas 59

creating manually 64
in Branch on Data 195
in data correlation 88
in Formula Builder 67
in imported business processes 117
in Report Check step 71
in table spreadsheets 83, 115
Global 131, 240
menu 218
more iterations than spreadsheet rows
116
not TRUE 59, 111
parameters in 112
referencing cells in another
spreadsheet 214
referencing in code 166
results 33, 60, 97, 98, 99, 103, 111,
203, 229, 271, 273, 275
running selected rows 76, 215
table 78, 81, 95, 215, 265
TRUE 59, 71, 111
spying on GUI objects 64, 117
Start LoadRunner Transaction step 124
Start SAP Frontend 18, 229, 270
static text 37, 52, 212, 269
See also, constant
status bar (in QuickTest) 35, 228
status bar (in SAP Frontend) 119
Step Generator dialog box 71, 92, 124, 149,
180, 226, 269, 282, 285
customizing 179
functions 167
Step Into 26, 227, 284
Step Over 27, 227, 284
Step Properties button
in Data Explorer 212
in Object Not Found dialog box 108
step properties. See Properties dialog box
StepGenerator.dat 152, 179

295

QuickTest Professional for mySAP.com Windows Client Users Guide


steps 5, 25
Activex 39
adding 92
Buttonpress 31, 261
comment 27, 266
Data Branch 246
Data Loop 184, 266
Drag & Drop (ActiveX) 39, 197, 249
End LoadRunner Transaction 124
Grid (ActiveX) 39, 262, 267
GUI Object Loop 186, 253
inserting 226
Keypress 31, 261
list of 36
moving 93
optional 250
output 256
renaming 93
Report Check 259
Resize Screen 260
RTF Editor (ActiveX) 39
SAP Connect 180, 231, 258
Screen 118, 263
screen terminator 3638
Scroll Table 264
Set focus 185
Start LoadRunner Transaction 124
Table 185, 265
Table Set Focus 183, 185, 262
Toolbar (ActiveX) 40
Tree (ActiveX) 40, 247, 257
verification 55, 62, 70, 268
WinRunner test 269
Stop Execution 284
Stop Record 226, 283
Stop Record button 23
Stop Run 27, 227
Stop SAP Frontend 229
suggested names. See parameters
Support ActiveX 20
system messages 9, 23, 34, 79, 107, 119, 120

T
Table Input 95
Table Set Focus step 183, 185, 262

296

Table step 95, 185, 265


Table tab 184, 265
tables 78, 115, 215
adjusting cell references in 115
auto recording 24, 80, 215, 237
converting recorded fields to 95
parameterizing 80
terminator rows 78, 81, 96, 115, 216
with missing column headings 82,
216
tag, object 164, 254
test results, opening from a TestDirector
database 144
testcase planning 9
testcases 6
.bpw file 44, 110, 230
and importing 223
creating 3
definition 5, 8
editing from LoadRunner 130
run options 25
specifying at start up 16
TestDirector 229, 239, 269
connecting to, from QuickTest 141
integration with 140
think time 30, 250, 279
Toggle Screen Capture 286
toolbars 35, 47, 228, 283
ActiveX 40
adding 49
customizing 47, 207
Execution 26
Execution Log 32
Toolbar Name dialog box 47
transaction codes. See OK codes
transactions, LoadRunner 124
Tree (ActiveX) 40
Grid (ActiveX) 197
step 247, 257
Tree window 21, 22, 25, 3537, 46, 75, 92,
118, 211212, 215, 228, 285
troubleshooting 27, 29, 41, 97117, 284
TRUE verification condition 59, 71, 111

Index

unique data 9
definition 5
Unknown tab 266
Until object appears 186, 253
Until object disappears 186, 188, 253
Use Parameter 67
Users Guide 285

wild cards 57, 64


WinRunner tab 269
WinRunner test step 269
WinRunner, integration with 149
workbook, data 88, 265
World Wide Web 149

V
Value Tab 267
Value, in Object tab, Properties dialog 254
-value. See attributes, types of
verification 9, 13, 33, 5172, 98
definition 5
good practice 58
inserting 62, 63, 226
not true condition 59, 111
of object attributes 72
output parameters in 59, 74
procedure 61
step 62, 70
TRUE condition 59, 71, 111
Verify Existence 265
Verify tab 64, 72, 268
View AUT 286
View Data Explorer 286
View data toolbar icon 64, 78, 213, 273, 286
View Execution Log 286
View Execution Report 97
View Manager dialog box 41, 228, 285, 286
View Name dialog box 41, 287
View results 286
views 8, 16, 31
adding a business process to 42
creating 41
renaming 287
vuser_init, parameterizing 125

297

QuickTest Professional for mySAP.com Windows Client Users Guide

298

Mercury Interactive Corporation


1325 Borregas Avenue
Sunnyvale, CA 94089 USA
Main Telephone: (408) 822-5200
Sales & Information: (800) TEST-911, (866) TOPAZ-4U
Customer Support: (877) TEST-HLP
Fax: (408) 822-5300
Home Page: www.mercuryinteractive.com
Customer Support: support.mercuryinteractive.com
Home Page: www.mercuryinteractive.com
Customer Support: support.mercuryinteractive.com
4 7 6 $ 3 :, 1 8 *      

You might also like