Friday, 29 November 2013

How will you call from one action to another action

HP QTP allows calling an action in 2 ways
1.  Call to copy of Action - The original action is copied in its entirety, including checkpoints, parameterization, the corresponding action tab in the Data Table, any defined action parameters, local object repository. The action is inserted into the test as an independent, non-reusable action (even if the original action was reusable). After the action is copied into your test, you can add to, delete from, or modify the action just as you would with any other non-reusable action. Any changes you make to this action after you insert it affect only this action, and changes you make to the original action do not affect the copied action. To view, Right-click & select Action > Insert Call to Copy.

2.    Call to Existing an Action - In this approach, a link is created to called Action. User can view the steps of the action in the action view, but you cannot modify them. The called action’s local object repository (if it has one) is also read-only. If the called external action has data in the Data Table, however, you can choose whether you want the data from the action’s data sheet to be imported as a local, editable copy, or whether you want to use the (read- only) data from the original action. (Columns and data from the called action’s global data sheet are always imported into the calling test as a local, editable copy.) To modify a called, external action, you must open the test with which the action is stored and make your modifications there. The modifications apply to all tests that call that action. If you chose to use the original action’s data when you call an external action, then changes to the original action’s data are applied as well. To view, Right-click & select Action > Insert Call to Existing Action.

Sunday, 24 November 2013

How does QTP identifies object

 HP QTP identifies any GUI Object based on its corresponding properties.  While recording, QTP identifies and store peculiar properties (as defined in the Object Identification settings) in the object repository of the GUI object. At run-time, QTP will compare the stored property values with the on-screen properties, to uniquely identify the GUI object.

What is Virtual Object

Application Under Test (AUT) may contain objects that behave like standard objects but are not recognized by QTP. You can define these objects as virtual objects and map them to standard classes, such as a button or a check box. QTP emulates the user's action on the virtual object during the run session. In the test results, the virtual object is displayed as though it is a standard class object.

For example, suppose you want to record a test on a Web page containing a bitmap that the user clicks. The bitmap contains several different hyperlink areas, and each area opens a different destination page. When you record a test, the Web site matches the coordinates of the click on the bitmap and opens the destination page.
To enable QTP to click at the required coordinates during a run session, you can define a virtual object for an area of the bitmap, which includes those coordinates, and map it to the button class. When you run a test, QTP clicks the bitmap in the area defined as a virtual object so that the Web site opens the correct destination page.

You can define a virtual object using the Virtual Object Wizard Tools -> Virtual Objects -> New Virtual Object. The wizard prompts you to select the standard object class to which you want to map the virtual object. You then mark the boundaries of the virtual object using a crosshairs pointer. Next, you select a test object as the parent of the virtual object. Finally, you specify a name and a collection for the virtual object. 
 

Tuesday, 19 November 2013

HP Quick Test Professional Supports 2 types of Object Repository


1.      Shared Object Repository (also called Global)

2.      Per-Action Object Repository, (also called Local)

What is Object Repository & their types in HP Quick Test Professional

Object Repository is a centralized place for storing Properties of objects available in AUT (Application Under Test). It is a test structure location where QuickTest stores object information/properties captured during recording. It acts as interface between test script and application in order to indentify the objects during script execution. The Object Repository can be used to:
·        Add a new object in the repository.
·        Rename logical name for readability.
·        Configure the object properties used to identify an object.
The Objects stored in the Object repository (OR) are called as Test Objects. Actually it is just equivalent to the corresponding actual object in AUT.

Object: It is a graphic user element in an application. It contains structure and properties. In QTP windows, WebPages, button, edit boxes, check boxes etc are termed as software object