Sunday, 30 August 2015

INTERVIEW QUESTIONS ON OBJECT REPOSITORY

Object Repository Interview Questions -QTP:

Define Object Repository in QTP.

Object Repository is used to store objects which QTP learns. Object repository stores things like logical name, properties (identification) etc. of an object.

Define Object Repository Manager.

Object Repository Manager enables you to create and modify single/multiple shared object repositories. You can save the shared object repository to your Quality Center project using the Object Repository Manager. Object Repository Manager helps you to Work with Repository Parameters, merge two Shared Object Repositories, import and export Shared Object Repositories using XML.

Can you export Local Objects to a Shared Object Repository using Object Repository Manager?

No, its done with the help of Object Repository Window.

What are the Drawbacks/Disadvantages of Shared Object Repository?

Multiple users working on Shared Object Repository can’t edit it concurrently.

Any small or big change in shared Object Repository affects all associated test cases.

There MAY be performance issue(s) if size of shared Object Repository is big. For example, if any object is vague / unclear then QTP has to assign some additional properties in order to recognize it uniquely and many other similar issues may slow down Object Repository performance.

Explain Object Repository parameter.

Repository parameters are useful when you want to create and run tests on an object that changes dynamically. As an example suppose there is a button whose text property value changes in a localized application depending on the language of the user interface. You can parameterize the name property value using a repository parameter, and then in each test that uses the shared object repository you can specify the location from which the property value should be taken. For example, in one test that uses this shared object repository you can specify that the property value comes from an environment variable.

In another test it can come from the data table. In a third test you can specify it as a constant value.

Can we update an Object Repository parameter at run-time?

You can set or retrieve the value of repository parameters using the Repository object [An object that enables you to work with repository parameters.]. All changes made to repository parameters using the Repository object are temporary, and are valid only for the current run session.

In order to set the value of a repository parameter use:

Repository (RepositoryParameterName) = NewValue

In order to retrieve the value of an existing repository parameter use:

CurrentValue = Repository (RepositoryParameterName)

How would you load an Object Repository at run time?

Using "Add" Method of RepositoriesCollection, as this adds an object repository file to the specified index position in the run-time collection of shared object repository files associated with the current action.

Syntax:
RepositoriesCollection.Add RepositoryPath [, Position]

RepositoryPath is the absolute or relative path of the shared object repository that you want to add and Position Number is the index position to which you want to add the shared object repository in the run-time list of associated shared object repositories. If you do not specify a position, the object repository is added to the end of the list (position = -1).

Explain kind of conflicts that occur when you try to merge two Shared Object Repositories?

An object in the primary object repository could have the same name as an object in the secondary object repository, but have a different description.

0 comments:

Post a Comment

Note: only a member of this blog may post a comment.