An object repository is a storehouse for the test objects (and other object types) used in your test.
Test objects are stored representations of the actual objects (or controls) in your application. QuickTest creates test objects by learning a select set of the properties and values of the objects in your application. QuickTest uses the information it learns to uniquely identify the run-time objects in your application.
Each test object is part of a test object hierarchy. For example, a Link object may be part of a Browser/Page/Link hierarchy. Top-level objects, such as Browser objects, are known as container objects, as they can contain lower-level objects, such as Frame or Page objects.
Note: Object repositories can also include checkpoint objects. This object type is covered in Creating Checkpoints and Using Functions.
Run-time objects are created and maintained during a QuickTest run session by the object creator (for example, Microsoft for Microsoft Internet Explorer objects, Netscape for Netscape Browser objects, the product developer for ActiveX objects, and so on). During a run session, QuickTest performs the specified test object method on the run-time object. Run-time objects are not stored in an object repository, as they are available only during the run session.
Later in this lesson, you will use the Object Spy dialog box to view the properties and operations of objects in your application.
Object Repositories
QuickTest can store the test objects it learns in two types of object repository files: shared and local.
A shared object repository contains test objects that can be used in multiple actions. This versatility makes it the preferred repository type for storing and maintaining test objects. By associating a shared object repository with an action, you make the test objects in that repository available for use in the action. Any maintenance you perform on an object in a shared object repository is reflected in any step using that object.
A local object repository stores test objects that can be used in one specific action. The objects in this type of repository cannot be used in any other action. Local object repositories are useful for backing up your test objects, or for learning one or several objects.
When you create an object repository, try to include only the objects you need for testing purposes. This keeps the object repository relatively small and helps makes maintenance and object selection easier. Also, make sure that you provide logical names so that others can easily choose the correct objects when creating or modifying tests.
During a run session, QuickTest references the test objects stored in the associated object repositories in order to perform operations on the corresponding objects in your application.
No comments:
Post a Comment