Thursday, 19 April 2012

Smart Identification In QTP

As we know that QTP is object based tool. QTP uses the learned object description to identify the objects. It searches for an object that matches with all of the property values in the description. In most of the cases the object description is the simplest way to identify the object, unless the main property values of the object change.

If QTP is unable to find any object that matches the learned object description, or if it finds more than a objects matches the learned description, and uses the Smart Identification mechanism to try to identify the object.

While Smart Identification(SI)  is more complex, it's more flexible. Therefore, the SI is configured logically, Smart Identification definition can probably help QTP to identify an object,if it present even the learned description fails.

Smart Identification mechanism use two types of properties.

Base Filter Properties: These are the fundamental properties of a particular object class.The values of the these properties can't be changed without changing the essence of the original object.
Example: Assume that the web link's tag is changed from {a} to some other value, you could no longer call it the same object.

Optional Filter Properties: Assume that the QTP is not able to identify the object with the help of Base Filter Properties. In that case QTP will use Optional Filter Properties to identify the object of a particular class.These properties are unlikely to changes on a regular basis, but can be ignored if they are no longer applicable.

Smart Identification Steps:
01. QTP forgets the learned test object description and creates a new object candidate list containing the objects that matches all of the properties defined in Base Filter properties.

02.QTP filters out the object in the object candidate list that does not match the first property listed in the Optional Filter Properties list. The remaining objects become the new object candidate list.
03.QTP evaluates the new object candidate list.
 03.00.If the new object candidate list still has more than one object, QTP uses the new object candidate list to repeat step 2 for the next optional filter property in the list.
 03.01.If the new candidate list is empty, QTP ignores this optional filter property, returns to the previous object candidate list, and repeats the step 2 for the next optional filter property in the list.
 03.02.If the candidate list contains only one object then QTP concludes that it has identified the object and performs the statement containing  the object.

04. QTP continues the process described in the step 2 and 3 until it either identifies one object, or runs out of Optional Filter Properties to use.

Assume that QTP is not able to identify the object even after Smart Identification elimination process.In such case QTP will use the learned description plus the ordinal identifier to identify the object.
If third combination is also not able to identify the object, QTP stops the run session and displays the error message.


Pavithra M said...

It is really a great work and the way in which u r sharing the knowledge is excellent.Thanks for helping me to understand basic concepts. As a beginner in software testing your post help me a lot.Thanks for your informative article. software testing Training in chennai | Best software testing Training institute in velachery

softwaretestsolutions said...

Thanks @Pavithra M :)

Post a Comment

Back To Top