When applying rules from a rules file to an RPT test, you might find that some rules do not apply correctly -- the src value is set to ''. This can happen if the substitution name has characters that result in an invalid regular expression.
This is caused because RPT data correlation rules have a special regular expression for linking the value pointed to by either a reference or a substitution by using the reference or substitution name like "%< Reference or Substitution Name>%". For example, consider a scenario where the application has a dynamic key-value pair "myParam=foo". If RPT uses a reference parameter with name "myParam" and sets its regular expression to "myParam=(.*?)", in order to substitute it in all occurrences of the string foo in requests, a regular expression %myParam% can be used for the substitution site. Also note that though RPT uses a portion of the regular expression as the reference or substitution name by default, it can be modified using the rules editor or test editor.
When you create a new manual correlation, the substitution name matches the regular expression value. Thus, if a new manual correlation creates a substitution with a regular expression that includes characters used in regular expression syntax -- like % -- and you keep the default substitution name, when RPT tries to use the pattern %<SUBSTITUTION NAME>%, this name will generate an error because of the invalid regular expression (caused by the un-escaped "%" sign within the substitution name).
You can work around this issue by renaming the substitution name to not include characters that result in invalid regular expressions.
You may encounter a problem while attempting to do a TN3270 recording with RPT on Windows 2012 R2, you will find that the "IBM Personal Communication" item is grayed out, and that the "Select Client Application" dialog displays a message similar to:
Recording of external native application is only supported on the following platforms: Windows 8, Windows 7, Windows Server 2012, Windows Server 2008, Windows Vista, Windows Server 2003, Windows XP Service Pack 1, Windows XP Service Pack 2, Windows XP Service Pack 3; you are running Windows Server 2012 R2 6.3
This happens even though IBM Personal Communications 6.0.x is installed and RPT 9.0.1 supports Windows Server 2012 R2.
This problem happens because the RPT socket I/O recorder is not available on Windows 2012 R2 (APAR PI74206). However, see the below Workaround to allow you to move beyond this error:
In RPT's SDP directory, edit the eclispe.ini file to add the line:
-Drpt.socket.os.name=Windows Server 2012
Here is a sample eclipse.ini snippet showing this change:
-Xjit:disableValueProfiling -Drpt.socket.os.name=Windows Server 2012
After making this change and (re)starting RPT, you should be able to select "IBM Personal Communication" in the "Select Client Application" dialog and record a TN3270 session.
Today we released version 9.6.0 of Rational Software Architect Designer and Rational Software Architect Designer for WebSphere Software. Find the download, Release Information, and Fix list information below that you'll need to install or upgrade to this version.
This topic comes up frequently. Sometimes a customer will have a set of existing service tests and the server has been changed to require TLS 1.2 and the service tests no longer work. Or the customer is trying to record a new service test using the General Service Client and can't get a valid response after invoking the request.
The error message reported by RPT will be similar to:
RPWY0002E An exception occurred in com.ibm.rational.test.lt.models.wscore.transport.impl.HttpTransporterImpl
The default value used by General Service Client is SSL_TLS. However RPT will not use the property com.ibm.jsse2.overrideDefaultProtocolbut use the property com.ibm.rational.test.lt.soa.ssl.protocols instead
We need to set this property in two separate places so it can be used for recording as well as playback
Like for recording we need to set the same -Dcom.ibm.rational.test.lt.soa.ssl.protocols=TLSv1.2 for the playback engine of the test. The only way to do this in RPT is
to put the test in a schedule, then configure the schedule to run on a location instead of local computer. Then we add the -Dcom.ibm.rational.test.lt.soa.ssl.protocols=TLSv1.2 as a property of the location.
1. install the RPT Agent, on the same machine as RPT workbench is OK.
2. create a schedule
3. put the test in the schedule
4. on the group of the schedule click "Run this group on the following locations (0) defined)"
5. Do Add...New
6. Create an Agent location using the location that shows up in the Agent Status icon
7. Add a property for this location with the value RPT_VMARGS= -Dcom.ibm.rational.test.lt.soa.ssl.protocols=TLSv1.2
8. run the schedule
The playback should now work. Remember the test will never be able to be run standalone any more if TLS 1.2 is required, it must be run in a schedule using an agent and a RPT_VMARGS set for that agent following the steps above
The ClearCase and ClearQuest patches have been posted to Fix Central and are now available for download. The associated IM update sites are also "live".
The 18.104.22.168, 22.214.171.124, and 126.96.36.199 download pages are available from http://www-01.ibm.com/software/rational/support/ and their URLs are listed below. We
have all the URLs you'll need in one place. Find them below!
When using the RQM/RFT integration, you may run into a problem running RFT scripts from RQM when using Shared Location, which results in this error:
The script cannot be executed
You have this problem even though the RQM/RFT integration is set up correctly and the RFT script itself works fine.
RFT scripts run from RQM fail with the "The script cannot be executed" error, but the same scripts run from RFT itself work fine.
If you reconfigure the problem script to use Local instead of Shared Location, the script runs fine from RQM.
In the RQM adapter console, the RFT command used by RQM has a UNC or network path in the -datastore switch instead of a local path to a local temporary location.
This problem happens on machines that are missing a Microsoft VC++ Redistributable required by RFT's RQM adapter, which prevents a DLL file (rftrqmcomm.dll) from loading. The RQM adapter relies on rftrqmcomm.dll to get the temporary location where RQM copied the RFT scripts that were in the shared location. The -datastore switch of the RFT command used by RQM should never have a network path as its value -- if it does, that indicates a problem with the integration or the system hosting the RQM adapter.
How to determine whether you are having this problem
Enable debug logging for the RQM adapter. Then start the RQM adapter, reproduce the problem, and check the RFT command used by RQM -- if the -datastore switch has a network path, you might be having this problem. Proceed to the next step.
With the RQM adapter still running, start Process Explorer and use its Find command to search for rftrqmcomm.dll. If nothing is found, that indicates this DLL was not loaded by the RQM adapter, and that you are having this problem.
(If you cannot run Process Explorer but the test from #1 indicates you may be having this problem, go ahead and follow the steps to resolve the problem.)
Resolving this problem
The RQM adapter requires a new enough version of the 32-bit Microsoft Visual C++ 2005 Redistributable. This can be obtained here. Installing the missing redistributable will resolve this problem.
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'm excited to share a couple more changes with you regarding the Rational Twitter handle and YouTube channel, respectively. These changes will provide you with powerful support content for IBM Cloud Technical Support.
Starting on Monday, November, 14, 2016 our Twitter account/handle @rationalsupport will begin tweeting content from @IBM_CTS. We will leave @rationalsupport up with a pointer to @IBM_CTS for a bit so that you can follow the new handle.
The second change we'll make on November 14th is to begin posting new support videos on the IBMSupportTV channel (https://www.youtube.com/user/WebSphereEducation). Currently, we have 131 videos out on the Rational YouTube channel and those will continue to be available on that channel until they are all migrated to the IBM SupportTV channel. For this change, you will need to subscribe to the IBMSupportTV YouTube channel to continue to receive updates.
@IBM_CTS (Cloud Technical Support) is who we are and our support social channels will reflect that, in the robust content we will continue to provide. We're excited for these changes! Please let us know if you have questions by commenting on this blog or reaching out to us on any of our channels. We look forward to continue serving you up the most relevant technical content to make you successful.
useful particularly it's split string function. It's easy to use, just paste the text to be split, the character to split on, and press the Split button
The above tools are the ones I just happened to find a while back and used them. They work so I continue to use them. For each of these tools you can find other sites that do the same functions.
By using these online tools almost any POST content or response data can be decoded and formatted to make it easy to read which means easy to work with when doing data correlation in RPT.
Sometimes a combination of these tools needed to be used in order to format the text, example it has to be URL decoded first then formatted. With the three basic tools above I found that almost any text I come across when working the RPT can be formatted into a human readable format.
I find them valuable and a great time saver when doing manual data correlation.