Software Testing Social Network

Free Software Testing Tutorial and Quality Assurance Portal

Home Featured Articles Testing Tools IBM Rational Rational Robot IBM Rational Robot Advanced Features Before Recording

IBM Rational Robot Advanced Features Before Recording

In addition to setting the standard GUI recording options, you can take some
additional steps to refine your testing.

In addition to setting the standard GUI recording options, you can take some
additional steps to refine your testing. You can:
 Customize the order of the object recognition methods to make the script more
readable and stable.
 Map object types and classes to identify custom objects during record and
playback.

Customizing the Object Recognition Method Order

Robot has two predefined preferences for the
recognition method order for each standard object type: <Default> and C++
Recognition Order. When you record an action on an object, Robot tries each
method within the selected preference in sequence until it finds one that uniquely identifies the object.
You can redefine the order in which Robot tries recognition methods for each object type. This order has an effect on both the readability and stability of script commands. For example, when you read script files, it is easier to locate a command on a specific object if that command uses the object name or label for identification.
However, if the object name or label is likely to change between builds, another recognition method may provide more stability.
You should evaluate your own development and testing environment before you change the default order of object recognition methods.
Important Notes
 Changes to the recognition method order affect scripts that are recorded after the change. They do not affect the playback of scripts that have already been recorded.
 Changes to the recognition method order are stored in the project. For example, if you change the order for the CheckBox object, the new order is stored in the project and affects all users of that project.
 Changes to the order for an object affect only the currently selected preference. For example, if you change the order for the CheckBox object in the <Default> preference, the order is not changed in the C++ preference.

Changing the Order of Object Recognition Methods
To change the order of the object recognition methods for an object type:
1. Open the GUI Record Options dialog box.
2. Click the Object Recognition Order tab.

3. Select a preference in the Object order preference list.
If you will be testing C++ applications, change the object order preference to
C++ Recognition Order.
4. From the Object type list, select the object type to modify.
The fixed set of recognition methods for the selected object type appears in the Recognition method order list in its last saved order.
5. Select an object recognition method in the list, and then click Move Up or Move Down.
Changes made to the recognition method order take place immediately, and
cannot be undone by the Cancel button. To restore the original default order,
click Default.
6. Click OK.

Creating a New Object Order Preference
Robot has two predefined object order preferences: <Default> and C++
Recognition Order. You can create additional preferences to handle special
situations.
To create a new object order preference:
1. In an ASCII editor, create an empty text file with the extension .ord.
2. Save the file in the Dat folder of the project.
3. Click Tools > GUI Record Options.
4. Click the Object Recognition Order tab.
5. From the Object order preferences list, select the name of the file you created.
6. Change the method order to customize your preferences.

Robot recognizes all standard Windows GUI objects and many custom objects. You can also set a recording option so that Robot either automatically maps unrecognized objects to the Generic object type or stops during recording so that you can map the object to a standard object type.
If you know in advance that the application-under-test contains a custom object or any object that Robot does not recognize, you can create a custom object mapping before you start recording. You do this by adding the object’s class to the list of classes that Robot recognizes and then associating the class to a standard object type. Robot saves this custom class/object-type mapping in the project and uses it to identify the custom object during playback.

NOTE: The custom mapping from class name to object type is stored in the
project and is shared among all users of the project. Be careful about changing existing mappings because this may cause already recorded scripts to play back incorrectly.

Defining an Object Class Mapping
To define an object class and map an object type to it:
1. Identify the class name of the window that corresponds to the object.
You can use the Spy++ utility in Visual C++ to identify the class name. You can also use the Robot Inspector tool by clicking Tools > Inspector.

2. In Robot, click Tools > General Options, and then click the Object Mapping
tab.

3. From the Object type list, select the standard object type to be associated with the new object class name.
Robot displays the class names already available for that object type in the
Object classes list box.
4. Click Add.
5. Type the class name you identified in step 1 and click OK.
6. Click OK.

NOTE: An object class can be mapped to only one object type. If you try to map an object class to more than one object type, a message asks you to confirm that you want to remap the class.

Modifying or Deleting a Custom Class Name
To modify or delete a custom class name:
1. Click Tools > General Options, and then click the Object Mapping tab.
2. From the Object type list, select the standard object type that is associated with the object class name. Robot displays the class names already available for that object type in the Object classes list.
3. From the Object classes list, select the name to modify or delete.

4. Do one of the following:
– To modify the class name, click Modify. Change the name and click OK.
– To delete the object class mapping, click Delete. Click OK at the
confirmation prompt.
5. Click OK.

NOTE: You cannot modify or delete a built-in class name. 

 


Comments (0)Add Comment

Write comment
You must be logged in to post a comment. Please register if you do not have an account yet.

busy
  Attention! For US visitors deep discounted electronics products available! CLICK HERE to check it out.