Keyword Driven Automation Object Repository in QTP

Setting Up Object Repositories


In this step, you build one or more object repositories and ensure that all objects have clear names that follow any predetermined naming conventions defined by your organization.

You can create object repositories using QuickTest functionality to recognize and learn the objects in your application, or you can manually define objects. The object repository should contain all the objects that are relevant for the tests using this infrastructure.

By creating and populating shared object repositories that can be associated with multiple actions, you can use the same object repository in multiple tests. By maintaining all objects that are relevant to an area of an application within one shared object repository, and by associating that object repository with all relevant actions, changes to the application can be reflected in the object repository without the need to update tests.

Before you create a new object repository, verify whether an object repository containing the objects you are testing already exists. If not, you can create a new object repository or add objects to an existing one.

Creating shared object repositories for the test automation infrastructure can include the following tasks:
  • Change the way that QuickTest identifies specific objects, if needed. This is particularly helpful when your application contains objects that change frequently or are created using dynamic content, for example, from a database. This task needs to be done before you create your object repository. For more information, see Configuring Object Identification.
  • Decide how you want to organize your object repositories. For individual tests, you can work with the individual action's object repositories, or you can work with a common (shared) object repository that can be used with multiple tests. If you are new to testing, you may want to keep the default object repository per-action setting for tests. As you feel more comfortable with the basics of test design, you may want to take advantage of the shared object repository option.
  • If you decide to work with shared object repositories, you need to determine how many shared object repository files are required for your application. You also need to determine which shared object repository will be used for each area of your application.
    For more information, see Managing Test Objects in Object Repositories.
  • Add (learn) objects from your application. You instruct QuickTest to learn the objects in your application according to filters that you define. For more information, see Adding Test Objects to a Local or Shared Object Repository.
  • If necessary, create new objects to represent objects that do not yet exist in your application. Then update the properties and values of these objects as necessary after they exist in the application. For more information, see Defining New Test Objects.
  • Ensure that objects in the object repository have names that are easy for application testers to recognize and that follow any established object naming guidelines. This helps make both test creation and maintenance easier over time.
  • Copy or move objects from one repository to another, as needed. For more information, see Managing Object Repositories.
  • Merge objects added to local repositories by application testers into the shared object repositories of the automation infrastructure. You can also merge two or more existing repositories. For more information, see Merging Shared Object Repositories.

0 comments:

Post a Comment