Wednesday, May 18, 2011

Type Of Check Points

Ø  Standard Checkpoints:

      Standard checkpoint is used for checking the standard GUI objects properties value.
Ø   Bitmap checkpoints:
Bitmap checkpoint is used for checking the complete bitmap or a part of a bitmap.
Ø   Text Checkpoint:
Text checkpoint is used for checking the text present on a specified object.
Ø  Text Area Check Point:
Test area checkpoint is used for checking the test presenting a specified area. It can be inserted only through the application but not through the active screen
Ø  Data Base Checkpoint:
      Data base check point is used for checking the contents of the data base
Ø  XML Check Point:
XML is a universally understandable language which is mainly used for data information
Note: XML check point is used for checking the contents of an XML file
Ø  Table Check Point:
This is used for checking the contents of a table
Ø  Image Check Point:

                              This is used for checking the properties of an image
                                   
Ø  Accessibility Check point:
Accessibility check point is used for checking the w3c standards in order to confirm, the page can be accessed all over the world or not

Check Point

Checkpoint is defined as validation pointer test point which checks the objects state or bitmap state or data state during execution at any point of time

Operational over view of checkpoint:
                Checkpoint works in two phases

i.      Pre-execution Phase:
·    It captures the expected value
·    Generates the corresponding test script statement
ii.    While-execution phase:
·    It captures the actual value
·    Compared the actual value with the expected value
·    Displays the result

Synchroniztion:

Synchronization is a process of matching the speeds of both the tool and the application in order to keep them in sync with each other to obtain proper testing results
Here the main concept is making the tool to wait till the application finishes its work it can be done in following ways.
Ø  Inserting the synchronization point
Ø  Increasing the default time
Ø  Inserting the wait statement
SYNTAX: Object hierarchy. Wait property ”Property name” property value, extra time in milliseconds
Syntax for Wait Statement:
                        Wait (time in seconds)
Example: Wait (5)

Wednesday, May 11, 2011

How To work with Object Repository


Adding the objects in object repository:

Ø      Open the object repository
Ø      Click on add objects button
Ø      Click on the title bar of the window
Ø      Click on ok
Ø      Select one of the following options
a) Only the selected objects
b) Selected objects and all its direct children
c) Selected objects and all its descendants
Ø      Click on OK

Deleting the objects form the object repository:
Ø      Select the desired object to be deleted in the object hierarchy
Ø      Right click on it
Ø      Select the option delete
Ø      Confirm the deleting by clicking on yes
Or
Ø      Select the desired object to be deleted in the object hierarchy.
Ø      Press on Delete available on keyboard

 Re-naming the objects:
Ø      Select the desired object in the object hierarchy
Ø      Right click on it
Ø      Select the option Rename
Ø      Specify the desired name
Or
Ø      Select the desired object in the object hierarchy
Ø      Press F2
Ø      Specify the desired name

Updating the properties list:
Ø      Select the desired object in the object hierarchy
Ø      Click on add/Remove button
Ø      Select the desired properties to be added in to the properties list
Ø      Deselect the properties to be removed from the properties list
Ø      Click on OK

Highlight:
Highlight button is used for highlighting the corresponding object in the AUT so that a test engineer can clearly understand which objects information is that.




Object identification

Object identification:

Object identification is based on four types of properties and an ordinal identifier
 1. Mandatory Properties
 2. Assistive properties
 3. Base-Filter Properties
4. Optional Filter properties

QTP learns the information in the following in case only normal brain:

First of all the QTP will learn all the mandatory properties at a time and then think whether these properties are sufficient to identify the object uniquely. If it feels sufficient then it will stop learning otherwise it will learn the first assistive property and once again stops and thinks whether these properties are sufficient to identify the object uniquely. If it feels sufficient then it stops learning otherwise learns the second assistive property and checks whether these properties are sufficient or not. This process continuous till the QTP satisfies or up to the end of the assistive properties list. At the end of the assistive properties list also if it feels not satisfied then it will finally learn the ordinal identifier and stops learning.



QTP learns the information in the following way in case of smart brain also (smart identification):

While learning the mandatory properties along with them it will learn the base filter properties, optional filter properties and stores them in the secret place.

It considers the mandatory properties only and check whether these properties are sufficient to identify the object uniquely and repeats the above process.

 Note: In the above learning process except base filter properties and optional filter properties all the remaining information learnt will be stored in the object repository.


Whenever the QTP is unable to identify the objects with the help of the properties present in the object repository then the special mechanism provided by QTP to identify the object smartly with some other properties is known as smart identification.

QTP will use the information in the following way to identify the object during execution:
 First of all QTP will use all the properties present in the object repository except ordinal identifier and try to identify the object. If at all the object is not identified then it will forget about all these properties and freshly enters in to the secret place.

QTP will consider all the base filter properties and try to identify the object and forms a list of all the objects that are matched with the base filter properties.
If the list contains only one object then that is the object otherwise it will take the support of first optional filter property and try to match with all the object present in the list and forms a new list of all the objects that are matched with that property and then check whether the list is containing one object or more that one object. If the list is containing more than one object then it will consider the second optional filter property and repeats the whole procedure till the list contains on object or up to the end of the optional properties list.
At the end of the optional filter properties list also if the list is containing more than one object then it will finally go to the object repository and check whether the ordinal identifier is available or not. If at all the ordinal identifier is available it will identify the object roughly using that otherwise it will fail.

Ordinal Identifiers:
 There are three types of ordinal identifiers
  1.Location
  2.Index
  3.Creation time


1.Location:
If at all the location is selected, as an ordinal identifier then the QTP will generate a sequence of numbers from 0,1,2,3 based on the sequence of the objects located in AUT.

2.Index:
  If at all the index is selected as an ordinal identifier than the QTP will generate the numbers from 0,1,2,3…. Based on the sequence of the programs of the objects.

3.Creation Time (specially for web pages):
 If at all creation time is selected as an ordinal identifier the QTP will generate the number from 0,1,2,3,… based on the loading time of the web pages
      



Monday, May 9, 2011

Anatomy Of QTP

For simple understanding of QTP I have divided QTP in the following parts   

1.Test Pane:
Test pane is an area provided by QTP, which is used for developing, viewing, and modifying the test screen. It represents the test scripts in two views
(a). Expert view: It represents the script in VB script format
(b). Key word view: Keyword view represents the script using a graphical user interface (GUI) which is further divided in to four parts.
Ø      Item
Ø      Operation Value
Ø      Documentation

2.Active Screen:
Active screen is an area provided by QTP, which holds the snapshots of each and every script statements and used for the following.
Ø      Easily understanding the script
Ø      Easily enhancing the script.

3.Data-Table:
The date table is originally called as formula1 sheet developed by third party and integrated with QTP.
·               It is used for holding the test data
·               It isolates the test script from the data source.
·               It provides the facility to import the test data from different data sources like excel         files, data base and flat files (a file with out having format)
·               It allows the user to interact with the data directly

Qtp have two data tables
a)Global Data table
b)Action data table

4. Debug Viewer Pane:
Debug viewer pane is an area provided by QTP which is used for viewing, modifying or setting the current values of variables or expressions during the execution break with the help of three Tabs by name Watch expression, Variables and Command

5.Tool- Options:
            All the options available in the menu bar, file tool bar and testing tool bar are known as tool-options.

These are the basic anatomy of QTP.

Add In Manager in QTP

This is a feature provided by QTP which is used for showing all the list of addins,while opening the QTP.So that the user can select the desired addin and then enter  into the QTP, Before the user access the QTP the adding manager will make the QTP compatible with all the selected environments.
                                                                                                                                                                        By default QTP is always compatible with standard window’s environment.
QTP also have the following three built-in addins.
1.Activex
2.Visual Basic
3.Web.
A part from the above add-ins one needs to purchase the add-inns by paying extra cost.