There are many new videos available on IBM Education Assistant for Rational. New content covering topics for Rational Team Concert, ClearCase, Rational Application Developer, and DOORS. Check them out today!
Your feedback helps us improve. You can find the feedback form on the category pages for your product and version. The feedback form is quick and easy.
Leave comments and let us know if these demonstrations help you achieve
is IBM Education Assistant? IBM Education Assistant is a collection of multimedia educational modules designed to help you gain a better
understanding of IBM software products and use them more effectively to meet your business requirements.
IBM Rational Functional Tester (RFT) is all about object recognition. If the graphical user interface (GUI) contains objects that Rational Functional Tester recognizes, you can record a sequence of actions. You can replay this sequence afterward.
This post wants to introduce you to object recognition in Rational Functional Tester.
The heart of object recognition in Rational Functional Tester is the object map. The object map is a graphical representation of the objects in your application under test that Rational Functional Tester encounters.
Through Windows hooks, Rational Functional Tester memorizes what actions you played in the GUI. Here, a hook means a mechanism that works between the keyboard or mouse and the GUI object.
Let’s say, when you click an object, information about that object flows from your video chip to the memory of Rational Functional Tester. During recording, Rational Functional Tester stores the information that the hook gathered.
For more information about hooks, see the following document on Microsoft.com.
When you finished recording, Rational Functional Tester puts the information about the objects into a kind of table. This table shows the objects of your application in a parent-child view. We call this table the object map.
With this object map, you can manipulate the way Rational Functional Tester recognizes the objects in your application under test. In this way, you can fine-tune your script to play back more easily, for example.
Roughly, the object map contains the following information about the objects that you touched during recording: administrative properties, recognition properties.
The object map displays the name that the developer gave to the object.
The name that you in the application’s graphical interface.
If you look at the picture, the domain is the first information that the object map reports about an object. In this example, we’re talking about a Java application. Therefore, the domain is Java. If the application runs in a browser, the object map would say HTML. The domain must match with the type of application under test.
These values are the properties that the recorder collects. These properties make the object unique. Therefore, when you run the script, Rational Functional Tester recognizes the object without ambiguity.
The recorder also assigns a weight. The weight says how important a property is for recognition. If you want, you can change the weight of any recognition property. In this way, you decide yourself what property is important for recognition.
In the sample application Classics Java, you can see the following properties of the Place Order button.
Unique ID: 1.3kaXiXo9H95:AQpC:Pyg70l9:8WW.
You can also see that the most important properties for recognition are the class name, accessible name, and name.
What to do with the object map
In the Rational Functional Tester Script Explorer, you see two kinds of test objects. You see an icon with caption Private Test Object Map. As the name “private” says, these objects belong only to that script that you recorded.
You can also make an object map that you can share with other scripts. With such a shared object map, you can change the object properties in a single place instead of all the private object maps. To create a test object map:
Right-click your project > Add Test Object Map.
When you right-click an object in the object map, you see a set of action that you can apply to the object. The most important are the following items.
Highlight test object
Insert test object
Highlight recognized objects
If Rational Functional Tester recognizes an object properly, you can highlight that object through the object map. Watch the video to see how that looks like.
Insert test object
If your application has an object that you didn’t record, you can still add these objects to the object map. Now, Rational Functional Tester can recognize the object when you run a script where the object does play a role.
Is there a better way? find() method
Sometimes, the object map is not an option. Sometimes manipulations on the object map are too tedious. Sometimes, the object map doesn’t contain an object that you want to play back. Then, the find() method is the way to go.
You can start with the class of RootTestObject. This class gives you access to your application. So to say, RootTestObject opens the objects of your application under test.
Let’s look at the syntax first. I show an example later.
public TestObject find(Subitem properties, boolean mappableOnly
For Subitem, you can use the following items.
A name or value pair that represents a TestObject property.
Contains properties that match with the direct child of the parent TestObject.
Contains properties that match with children or objects under the children of the parent TestObject.
Specifies a sequential properties list that match with atList.
public TestObject find(Subitem properties, boolean mappableOnly)
//Define window and find Place Order button RootTestObject root = RootTestObject.getRootTestObject(); TestObject matchingObj = root.find(atProperty("name", "placeOrder"));
The video shows how you can click the button Place Order in the sample application through the find() method. The find method is a different way to a click from a click through recording. In the video, you can watch the following steps.
Open the application under test.
Create an empty script.
Open the empty object map.
Click Insert Objects … to populate the object map.
Drag the object finder, the hand, to the caption bar of the application. This action casts a red rectangle around the entire screen of the application.
Select Include all available objects on this window. Then, click Finish.
Locate the Place Order button in the object map. Then, click Save.
Insert the following code into the script. This code makes the objects available in the application window.
Rational Functional Tester does not support custom objects.
When something is wrong with the object recognition, you see that the object map either doesn’t list the object and the Test Object Inspector doesn’t see the object. Also, when you see Win.GenericProxy or HTML.Generic.Proxy in the object map, you are dealing with a custom object. When you play back the script, you notice. For example, you get an ObjectNotFoundException.
From my experience, I would first check whether Rational Functional Tester recognizes the objects in the right kind of application. In other words, what domain the object map assigns to the objects. For example, the object map must say HTML for objects in a web browser.
If the domain is the right domain, you can see whether you can highlight the object through the object map. See the video in this post.
What to do with objects not in the object map
With the find method, you can also try to discover an object that Rational Functional Tester recognizes but doesn’t put in the object map. You can see these objects through the Test Object Inspector.
If you set the Test Object Inspector in the Options menu to not hiding objects that are not mapped. If you want to find objects that are absent in the object map, use the mappableOnly parameter. Now, you say that the Boolean value is false.
Object recognition is an important condition for Rational Functional Tester to work. A central role in the object recognition is the object map. You can manipulate the object map or use the find method.
I hope that I explained how the object map works and what you can do to improve object recognition.
If you’d like to share your experiences with object recognition in Rational Functional Tester, leave a comment here or follow me on Twitter.
I am sure you have seen multiple download buttons after adding Rational Tokens to existing Token server using the License Key Center, wondering why – please find the details below.
IBM Rational License Key Center captures the activity with the date history. When more tokens are added to the existing server on different intervals, Rational License Key Center records the number of Tokens assigned to the server and the date when it was generated.
This helps you to determine the total number of token to be used during the import of the license key on the server.
For Example: Screen shot 1 will show you how the download page looks on license key center when initially100 Tokens are generated for a given server on the July 3rd 2014.
Now, as and when the requirement for Tokens increases the License key center administrator logs in to the center to add more Tokens
Example: 100 more on a 8th of July, I see 2 download buttons.
What is important here is the date that the key center captures to maintain history of number of Tokens used on different dates. So on the July 8th the license key was generated for 200 Tokens irrespective of which Download button you choose.
Note: The license keys get appended when more tokens are added to the existing server, so ideally there is no difference in quantity between the two download buttons.
Our folks were busy the last few weeks of 2013 pulling together some new educational material to help you better understand how you can use test case execution records with IBM Rational Quality Manager (RQM). A new six part video series was published to help explain how you can use test case execution records to plan, execute, and report on testing activities.
Rational Quality Manager v4.0.4: Test Case Execution Records