Subscribe by Email


Showing posts with label Smart Identification Mechanism. Show all posts
Showing posts with label Smart Identification Mechanism. Show all posts

Sunday, October 7, 2012

How does QTP recognize Objects in AUT?


The quick test professional comes with two types of object identification mechanisms unlike winrunner as mentioned below:
  1. Usual or the normal object identification mechanism and
  2. The smart identification mechanism

What is Usual or Normal Object Identification Mechanism

- In the usual object identification routine, the first step of the quick test professional is to learn the description of the object as provided by the user before the starting of the test. 
- The description of the object provided by the user consists of the properties of the object. 
- All the objects present in the software system or AUT (application under test) are matched one by one with this physical description.
- It is checked that how many properties of the object are matching with the properties mentioned in the description. 
- This method is the easiest  of the two above mentioned object identification routines. 

Now what if this usual object identification mechanism fails to identify the object? 
The alternative here is the second object identification mechanism i.e., the smart identification mechanism. 

Why does a the normal method fails?

- The normal method fails because the value of the object properties starts changing dynamically which makes it difficult for the quick test professional to track the object. 
- Another situation in which the normal identification mechanism can fail is when the quick test professional finds not one but more than one objects in the application under test matching with the properties mentioned in the description. 
- In such a case the quick test professional erases from its memory the learnt description of the object and calls up on the smart identification mechanism for the identification of that particular object. 

Let us see a comparison between the smart identification mechanism and the normal identification mechanism:
  1. Smart identification is more complex then the usual one.
  2. Smart identification is more flexible then the usual one.

What is Smart Identification Mechanism

- Smart identification mechanism is so reliable that it can work even if the currently provided description of the object fails.
- To get the best out of the smart identification mechanism, one needs to configure it properly in a logical way. 
- Smart identification mechanism is driven by two different sets of properties as described below:
  1. Base filter properties: As the name suggests these are the base or the fundamental properties belonging to a particular test object class. The value of these fundamental properties cannot be changed until and unless you make changes in the properties of the original object.
  2. Optional filter properties: The leftover properties i.e., all the properties leaving out the base filter properties are grouped under this category i.e., the optional filter properties. These properties unlike the other base filter properties do not change frequently. These properties can some times be ignored i.e., when they do not hold to be applicable and therefore have been named as optional filter properties.

How the smart identification process follows?

- The description given by the user is erased from the memory of the quick test professional and a list of objects called candidate list is created.
- Objects or candidates in this list match at least one property in the property list. 
- Now, the base filter properties are used for cutting down on the list of the object candidates. 
- The list is narrowed down to only one object which has most number of properties matching in the list of properties. 
- Some times it may happen even after reaching this stage the quick test professional may not find a matching object. 
- In such a case the quick test pro makes use of an ordinal identifier in addition with the learnt description. 


Tuesday, October 2, 2012

What is smart Identification in QTP?


Smart identification mechanism is one of the most important and effective mechanisms of the quick test professional. Usually for the identification of an object the quick test professional goes around the usual i.e., the normal identification process.
But what the quick test professional is supposed to do when this usual object identification routine fails? At this point the smart identification mechanism of the quick test professional comes to the rescue of the testers.

Smart Identification in QTP

- The smart identification mechanism has got many positive attributes.
- It is more flexible and works with more efficiency for the identification of the difficult objects present in the application that cannot be found with the normal identification mechanism. 
- But for the smart identification to work, it is required that you enable this option in the object identification settings. 
- Smart identification mechanism works up on two types of properties as mentioned below:
  1. Base filter properties and
  2. Optional filter properties.
- The first category of the properties i.e., the base filter properties constitute of the most fundamental properties pertaining to a particular class of test object. 
- The values of the properties falling in this category cannot be changed or altered without changing the same properties in the original object.
- The second category of the properties i.e., the optional filter properties consists of the other properties that contribute in the identification process of the objects. 
- In the process of smart identification of an object, the quick test professional first erases from its memory the learnt description or the description that was entered by the user in to the physical description field of the object. 
- Instead of this single object, a list of matching objects (in this case such objects are called candidates) is created by the quick test professional called the candidate list. 
- This list is created based up on the properties that have been defined in the category of base filter properties and thus all the objects match a little or lot (i.e., to say one or more properties) with the base filter properties. 
- Base filter properties as the name suggests are the major properties that help cut down or reduce the number of objects in the candidate so that an exact match can be found or we can say that the area of search is reduced. 
- The idea is to be left with only one object matching with most or all of the properties mentioned in the saved description. 
- In some cases it may happen that it may be required to invoke smart identification mechanism during the run session. 
- In such cases a warning message is generated by the test results tree which indicates about the invocation of the smart identification and insertion of a smart identification process. 
- It is said that the smart identification is applicable only for the web based applications. 
- The object is recorded from the AUT or application under testing and its properties are identified accordingly and finally the scripts are executed. 
- Some times you may receive a warning alert in the results of the tests. 
- You just need to navigate over this message in the file which stores the messages and read what it says and follow accordingly. 
- Usually the normal identification routine fails whenever there occurs a dynamic change in the properties of the object to be identified. 
- Because of such dynamic changes the value of the object properties keep on changing thus making it difficult for the quick test professional to track that particular object. 
- These dynamic changes are shown only in the result and are not stored in the local object repository and are accessible only for the run  time. 


Saturday, September 8, 2012

How does QTP identifies objects?


Just like winrunner the process for identification of objects is same for quick test professional. In Winrunner, it is required that the winrunner learns about all the objects before it begins identifying them. After learning about the entire GUI objects present in the software system or application the quick test professional begins its search regarding the object or objects that seem to be matching with the properties as stated by the user in the description of the objects.
In many of the cases the description of the objects proves to be quite a useful and simplest method for the identification of the GUI objects residing in the software system or application. This mechanism of quick test professional of searching the objects is bound to work until and unless the properties of the GUI objects are changed. In some cases it happens that the quick test professional encounters two situations;
  1. It does not proves successful in the identification of the object that is suppose to match with the description given by the user or
  2. It finds more than two objects having the same description as stated by the user.
In the above two situations the quick test professional adopts another mechanism and rejects the usual way of object identification. This new mechanism is quite advance then the usual one and is thus known as the smart identification mechanism.

Smart Identification Mechanism for objects in QTP

- This smart identification mechanism being smarter than the normal mechanism is also more complex than that. 
- Even though it is more complex it is more flexible also.
- If the smart identification mechanism is configured according to proper logic then there are possibilities that the quick test professional may be able to identify the GUI objects even if the description provided by the user fails. 
- There are 2 basic properties that are unique to the smart identification mechanism of the quick test professional:
  1. Basic filter properties: These properties represent the basic fundamental properties of the test object class. The values represented by these properties cannot be changed or replaced without making proper changes to the original object values.
  2. Optional filter properties: These are the properties apart from the basic filter properties which also help in the identification of the GUI objects belonging to a particular test class. Unlike the basic filter properties, the optional filter properties do not change on a regular basis. Still these properties can be ignored if they no longer hold to be applicable.

When is Smart Identification Mechanism Activated by QTP?

The smart identification mechanism is activated by the quick test professional only when its unable to identify some object and the whole process is carried out through the following steps:
  1. The quick test professional erases the learnt description of that particular object from its memory and creates a new list of the object candidates that fall under that particular parent object. The objects mentioned in this candidate list are the ones whose properties have a match with the properties in the list of the base filter properties.
  2. The object in the candidates list is matched one by one with the properties listed in the base filter property list and if the no match is found that particular object candidate is simply rejected. The leftover object candidates in the list constitute a new candidate list.
  3. When the list gets empty for one property, the previous candidate list is again adopted by the quick test professional and is considered for matching with the second property.
  4. If only one object remains in the candidate list then this object is considered to be the required one. 


Facebook activity