Subscribe by Email

Tuesday, October 9, 2012

What is a Test Object Model in QTP?

Test object model is an important concept of quick test professional to be understood. In this article we have focused on the test object model of the quick test professional itself. 

What is a Test Object Model?

- The test object model is considered to be a large set of classes or objects of type class which are used by the quick test professional to represent the objects present in the software system or application.
- There is a list of properties associated with every class of the test object. 
Using the properties from this property list, the objects belonging to that particular class can be uniquely identified. 
- Also, the identification of a set of relevant methods that can be recorded for the object by the quick test professional can be easily identified. 

First let us clear up few terms associated with the test object model one by one:

1. Test object: 
This is the object that is created by the quick test professional in the test component or the test as a means of representation of the actual object present in the AUT or application under test. The information regarding the object is stored by the quick test professional since later it is required for many purposes like identification of the object and checking the working of the object during the run session.

    2. Run time object: 
   This object is the actual object present in the application under test. On this object only the various methods are performed while the identification process is in progress or we can say during the run session.
Whenever the user carries out an operation on an object in the application, the  following steps are taken by the quick test professional:
a)    Identification of the test object class of the quick test professional which is said to represent the object up on which the user performed the desired operation.
b)   Creation of appropriate test object based up on the identification in the previous step.
c)     Capturing of the current values of the properties of the objects residing in the application under test and preparing a list accordingly. This list is then saved along with the test object.
d)   Giving of a unique name to the test object up on the condition that it should reflect the value of one of the objects prominent properties.
e)    Recording of the operations that the user carried out on the test object by making use of the appropriate quick test professional test object method.

There are certain points about the test object model which are always helpful:
  1. Each and every test object method that is executed during the recording session forms a separate step in the recorded test. When the command for execution of the test is encountered, this recorded test object method is played up on the run time object.
  2. The source from where the properties of the object are captured is the object itself. These properties are important since there values are used for the identification of the run time objects while a run session is in progress.
  3. The properties of the objects have a tendency to change during the run session and so this would present some difficulty while matching the objects with the description. To avoid such a situation you have the option to make a manual modification of the test object properties while designing the test component during a run session. Some times even the regular expressions can be used as a substitute for the identification of the property values.
  4. The test object property values can be viewed as well as modified and stored through the object repository dialog box. 

No comments:

Facebook activity