User Guide

8 Working with QuickTest Professional
Test creation overview
When you record a test, QTP records the lines of the test script correlating to each action that
you performed. Each line typically represents an action that you carried out on a component
that appears on the screen. Those components are called objects and the actions you perform
on them (such as clicking a button) are called operations.
The basic building block of a test is the test object. Objects are stored in the QTP object
repository. You should understand how QTP identifies objects and adds them to the object
repository. For more information, see “Identifying objects” on page 14.
To create a narrative for a test, you record a series of operations or events on the test objects. It
is important to understand which events are recognized by QTP. For Flex developers who
want to add events to the list of supported ones for each object, see the Flex 2 Developer’s
Guide.
Most QTP tests use checkpoints to compare output values against known values. Flex
supports a subset of the types of checkpoints that are used in QTP. For more information, see
“Using checkpoints” on page 17.
If you encounter problems while testing Flex applications, you should refer to
“Troubleshooting” on page 22. This section describes error codes and their meanings, and
describes some common problems that can occur when using the Flex plugin with QTP.
About the QTP object model
Before you create a test, it is important to understand how the object model of the QTP and
Flex are integrated. The test object model is a set of object types that QTP uses to represent
objects that are used in your application. The test object model maps the QTP test objects to
the Flex objects in your application. For example, a Button control in a Flex application is
recognized as a FlexButton in the QTP object model.
The QTP test objects store properties and record events during the test. Each object has its
own set of properties and methods that QTP can record. Test objects do not support all events
and properties of the Flex objects that they correspond to, but they do support the events that
are most commonly associated with users’ gestures.
The object repository is a list of all objects used in the test. To add an object to a test, you must
add it to the object repository. To remove an object from the test, you remove it from the
object repository.