Troubleshooting functional tests

This topic can help you troubleshoot some of the problems that you might encounter in functional tests.


Table 1.

Problem Description Solution

ObjectNotFoundException exceptions occur while inserting a verification point on ErrorProvider, HelpProvider and ToolTipText controls in .Net.

This occurs if you create a data verification point on ErrorProvider, HelpProvider and ToolTipText controls while recording in .Net.

In .NET, create properties verification points on these controls.

System.NullReferenceException occurs while playing back a data-driven script that contains calendar controls in SAP applications.

You might have closed the calendar control after recording a data-driven script, in which case a close() event is generated in the script. The script will look similar to the following example: calendar_sapCalendarControl1().setDate(dpString("SAPCalendarControl1")); dialog_calendar().close();

Because the setDate() method sets the focused date and also closes the calendar control, the script will fail during playback while trying to close the calendar control.

Perform either of the following tasks:

  • Delete the calendar close method that was generated in the script.

  • Close the calendar control before exiting the "Insert Data Driven Actions" wizard.

Playback fails while performing data verification on controls like text, ComboBox, or Tree in SAP applications.

This occurs if the verification point method is recorded before the methods like set for text/combo box or ExpandNode/doubleClickNode for a tree control.

Perform either of the following tasks:

  • Press the Enter or F2 key after you type/select the value in the text/combo box or expand a node of the tree control and then invoke the data verification point wizard.

  • Cut and paste these methods before performing data verification on the text/combo box/tree control in the script.

The following error message is displayed while creating a functional test project in .Net:

"Failed to enable ClearCase® integration. Registry entries for installed source code control provider are missing. Please configure source control provider appropriately."

This message is displayed if the registry settings for ClearCase are corrupted.

You must fix the registry settings manually. For more information about changing the source control provider or editing the registry settings, refer to the MSDN Help.

IBM Rational Functional Tester does not recognize Siebel 7.7 controls after moving back to Siebel 7.7 from Siebel 7.8.

When you start Siebel 7.8, Internet Explorer installs the latest Siebel ActiveX objects. So, if you try to record using Functional Tester on Siebel 7.7 after this, Functional Tester is not able to recognize Siebel 7.7 controls.

Remove the Siebel ActiveX objects from the folder C:\WINDOWS\Downloaded Program Files and then try to work with the Siebel 7.7 application again.

A Java application-under-test (AUT) does not open while configuring the application for testing in Rational Functional Tester .

The AUT does not open while configuring the application for testing if you specify a lower version of JRE than the JRE version that was used to compile the test application.

  • Use the same or higher version of JRE that is supported by Functional Tester to test the application.

  • Recompile the test application by setting the source and target levels of JRE in your Java IDE.

    An example to compile the test application by setting the source and target flags using the command line interface:

    C:\AUT\Test>"C:\Program Files\Java\jdk1.5.0_06\bin\javac.exe" -source 1.4 -target 1.4 *.java

Playback fails while testing SAP applications that contains password fields.

Rational Functional Tester records the entered password as it appears in the password field and is not able to read the encrypted value.

Before playing back the script, replace the recorded password with the actual password in the script.

IBM Rational Functional Tester context sensitive help does not work on VS .Net IDE.

 

Install the MSDN library. During installation, select options to integrate the MSDN library with the VS .Net IDE for the Functional Tester context sensitive help to work.

When you try to open a PDF file from the Tutorial Gallery, the computer hangs.

If you are using Adobe Reader 6.0.0, opening a PDF file from the Tutorial Gallery might cause your computer to hang.

Other versions of Adobe Reader do not cause this problem. Free upgrades to the latest level of Adobe Reader are available from the Adobe web site.

Multimedia user assistance does not appear.

Multimedia user assistance, such as Tours, Tutorials, and Show me viewlets require the Flash player to be installed on your computer.

Install Flash Player version 6.0 or newer from the Adobe web site.

Disabling the support for playback on Eclipse when views and editors are dragged or undocked after recording.

 

Add the statementrational.test.ft.enable_eclipse_support=false in ivory.properties file.

Script that are recorded in one browser fail to play back in another browser.

A script recorded in Internet Explorer, for example sometimes fails to playback in Mozilla Firefox

Inspect the DOM structure of the objects in the browsers. For example, you can use the DomInspector for Mozilla Firefox. Similarly, DOM Structure can be interpreted for other Browsers as well. Then you can compare and check whether the object hierarchy is same.

  • If the DOM hierarchy of the browsers is not same then the failure is not happening because of a Functional Tester problem. The browsers are creating different DOM hierarchy because of which the playback fails.

    Workaround: This can be fixed by introducing the missing hierarchy Functional Tester looks for while playing back the script

  • If DOM hierarchy of browsers is same then there might be a problem with Functional Tester. Contact IBM Software Support for Rational software products for further investigation.

Record and playback does not work on browser menu options

Rational Functional Tester supports testing the browser content but not interactions with the browser menu options or the browser itself. This is done mainly to provide cross-browser record and playback facility for testing HTML applications.

Capture the browser object and use the inputKeys method to interact with the menu options using the keyboard shortcuts for the specific menu options.

For example, the Close option in the File menu can be accessed using the shortcut key Alt+F+C. If you need to access this option, then you can use the inputKeys method on the browser object, providing the shortcut key ("%fc") as an input parameter as shown below:

Browser_HtmlBrowser(Document_HtmlDocument(),DEFAULT_FLAGS).InputKeys("%fc")

Internal SAP error (ABAP) during recording

While recording against SAP applications, sometimes SAP scripting framework internally throws some ABAP errors and recording stops. The problem will not get fixed unless SAP fixes it in their scripting framework.

Disable modal search help on the system for the user that runs the script. You can do this in the Preferences dialog in the SAP GUI, from the help menu. If this solution does not work, you may have to restart your SAP application

System.NullReferenceException occurs while playing back a data-driven script, which contains calendar controls in SAP applications.

You may have closed the calendar control after recording a data-driven script and hence a close() event is generated in the script.

The script will look like: dialog_calendar().close();

Since the setDate() method sets the focused date and also closes the calendar control the script will fail during playback while trying to close the calendar control.

Delete the calendar close method that was generated in the script.

In Linux , calling the RationalTestScript API commands from multiple threads causes asynchronous errors.

When two threads in a process submit X requests simultaneously, the X libraries cannot handle the requests because they are not thread-safe. This causes asynchronous errors with messages like Unexpected asynchronous reply or Event lost to occur. This may also occur when multiple threads are used in RFT scripts. .

In the ivory.properties file, set the option rational.test.ft.script.playback.mouse.allow_multiple_threads to "true."

Encoding problems while importing files on Linux.

On Linux, due to incompatible encoding formats, Functional Tester may not recognise or read the files that are being imported. In Functional Tester the default encoding format is set to UTF-8. But UTF-8 cannot handle a few encoding formats like Cp1252.

On Linux, set the encoding format of the files to ISO-8859-1:

  1. Select the imported project or the project to which you are importing the files in the Functional Test Projects pane.

  2. Click Project > Properties.

  3. In the Properties window, select Info from the list.

  4. In the Text file encoding field, click Other.

  5. Select ISO-8859-1 from the drop-down list.

  6. Click OK.

Unable to play back .Net scripts stored in the network.

The project in the network may not have Full Trust permission in the local computer due to its security policy. A RuntimeSecurityPolicyException message is displayed in the playback log or in the RFT debug log.

Perform the following:

  • Configure the security level for the Local Intranet zone to Full Trust. You can do this following these steps:

    1. Go to Control Panel > Administrative Tools and open Microsoft .NET Framework Configuration.

    2. Select Configure Code Access Security Policy and click Adjust Zone Security.

    3. Select Local Intranet in the Security Adjustment Wizard and set the trust level to Full Trust.
If you still continue to see the message, perform the following steps:

  • Specify the computer name instead of the IP address as the project path.

  • Configure the following in Internet Explorer:

    1. Click Tools > Internet Options in the Internet Explorer window.

    2. In the Security tab, select Local intranet zone.

    3. Click Sites.

    4. In the Local Intranet dialog box, click Advanced.

    5. Uncheck Require server verification (https:) for all sites in this zone.

    6. Specify the project path and click Add.

    7. Click OK.

Executing scripts using Test Manager agent on Linux throws error.

If you start the Test Manager agent 7.0 daemon on a Linux machine and execute the scripts through Test Manager on a Windows machine, you might see some errors.

On the Linux machine, perform the following:

  1. Set the environment variable LD_LIBRARY_PATH to libjava.so of the currently used JRE.

  2. Set the CLASSPATH to /bin/rational_ft.jar

  3. Execute the command: source rtsetup.

  4. From the Test Manager install directory, run the RTsagt script.

You cannot use Test Manager agents on SUSE Linux Enterprise Server 10.0 and SUSE Linux Enterprise Desktop 10.0 platforms.

Compilation error occurs while sharing a functional test project using ClearCase.

By default, ClearCase is configured to be case insensitive. If a file name contains upper case letters, ClearCase converts it into lower case. Similar problem occurs when you record a new script inside an existing project located in ClearCase.

Change the ClearCase settings to preserve case, following these steps:

  1. Click Start > Control Panel > ClearCase to open the ClearCase Properties window.

  2. In the MVFS tab page select the Case Preserving check box.

  3. Stop and restart ClearCase.

  4. Share the functional test project again.

ClearCase integration on Linux does not work if it is not installed in the /opt/rational directory.

 

To use ClearCase with Linux, install ClearCase in the /opt/rational or the /usr/atria directory, or set CLEARCASEHOME or ATRIAHOME to the ClearCase install directory.

Unable to resolve resource bundle

If Flex Builder 2 is used to build a Flex application with the Rational Functional Tester adapter, you might get an error on resource bundling.

Copy automation_agent_rb.swc from the ../Flex automation/frameworks/locale/en_US to ../Flex SDK 2/frameworks/locale/en_US directory.

This is not required if Flex Builder 3 is used.

Unable to perform any ClearCase related operations for the functional test project This might happen if the functional test project assets hierarchy or location is modified. When a functional test project is created a default hierarchy is created for maintaining the project assets. This hierarchy and storage is used to find functional test assets for checking in.

Do not modify the functional test project assets hierarchy.

ObjectNotFound exception occurs while playing back the script if the Java AUT is hidden behind another application window   Perform the following:

  1. Click Configure > Enable Environments for Testing > Java environments tab.

  2. Type -Dawt.toolkit=sun.awt.motif.MToolkit in the Run Options field and click Finish.
Unable to record double byte character sets (DBCS) When typing double byte characters, the same key sequence might have multiple DBCS characters. The Input Method Editor (IME) provides the option of selecting the character that you want when you press the space bar after a key sequence. Press Enter to record the input string.
Rational Functional Tester does not record the actions with the Flex applications. This occurs if the Flex environment and the application are not configured correctly. Ensure that:

  • The Internet Explorer setting Initialize and script ActiveX controls not marked as safe is enabled.

  • The application is loaded through a HTML page, with an <object> tag that has an id attribute set, and the id attribute contains no periods or hyphens.

  • The application is loaded either from a web server or locally from a trusted SWF file.
ObjectNotFound exception occurs during script playback and the exception message indicates that the object state is incorrect.

For example: Looking for [button] with state [ENABLED|VISIBLE|READY], possible failing candidate[{.mappableClassIndex=0, text=*!ENT!*, .classIndex=0}] with incorrect state [DISABLED]

During playback, Rational Functional Tester expects one of the following state for a test object:

  • ENABLED

  • VISIBLE

  • READY (for browser)
If the state of the test object does not match the expected state, the ObjectNotFound exception occurs.
To override the exception, set the anchor of the object to null or ANY.

For example: Replace button().click(); with button(null, DISABLED).click();

Functional Tester recognizes GEF objects as FigureCanvas The GEF objects that are implemented using standard and non-standard GEF editors are recognized as FigureCanvas.

  • Ensure that the GEF enabler plug-in com.rational.test.ft.gef_xx.jar exists in the plug-in directory of the AUT.

  • If the GEF objects are not identified even after enabling, start the AUT with -clean option.

  • For non-standard editors, add the method getAdapter in the non-standard GEF editor (AUT). This method is used by Functional Tester to get an instance of GraphicalViewer to recognize GEF objects in the editor.
    public Object getAdapter(Class type)
    {
    if (type == org.eclipse.gef.GraphicalViewer.class)
     {
    <<return the current instance of org.eclipse.gef.GraphicalViewer>>
     }
    }
Problems while recording and playing back on Internet Explorer 7.0 with Functional Tester, version 8.0. However, recording and playing back scripts works on Functional Tester 7.x. This problem might occur because of the changes in Functional Tester to improve the playback performance on Internet Explorer 7.0.

Set the performance changes flag to false and test if the problem is resolved. To change the performance flag:

  1. Open the ivory.properties file located at <Functional Tester installation directory>\SDP\FunctionalTester\bin

  2. Set rational.test.ft.html.enableie7performancechanges=false

    Changing this flag to false will impact the performance while testing HTML applications on Internet Explorer 7.0.

  3. Restart Internet Explorer 7.0 for the changes to take place.
Firefox 3.0 browser is not enabled by default even when the Enabler displays Firefox 3.0 as enabled after upgrading from Firefox 2.0 to Firefox 3.0. Firefox 3.0 is installed in the same location as Firefox 2.0. So, a different enablement dll is required. To enable Firefox 3.0 browser, disable and enable the browser after upgrading from Firefox 2.0 to Firefox 3.0.
Unable to record a script on Internet Explorer 7.0 in Microsoft Windows Vista after enabling the browser. In Windows Vista the Internet Explorer 7.0 browser setting has to be changed to record a script. To change the browser setting:

  1. Go to Tools > Internet Options > Security Wizard.

  2. Clear the Protected mode check box.

  3. Restart the browser.
Unable to view Dojo logs in Firefox version 3.0. In FireFox version 3.0, few security flags have to be set to view the Dojo logs. These security flags enable Firefox version 3.0 to gain access to the Java scripts in the file system for the installed Dojo. To view Dojo logs in Firefox 3.0:

  1. Type about:config as the URL in the Firefox 3.0 browser.

  2. Set the following security flags:

    • key: security.fileuri.origin_policy and value: 3

    • key: security.fileuri.strict_origin_policy and value: false
Unable to launch the Flex application using Web application > Compile time option through application configuration wizard. The application configuration wizard generates a html page and swf file corresponding to the Flex application mxml file. The html page generated through the wizard contains the complete path to the swf. But in case of web application the application is launched using the localhost option in the url. The swf is not accessible through complete path and hence fails to launch the application. Modify the html page to point only to the swf name rather than complete path.

  • Change <param name="movie" value="C:\FlexSample\Smoke.swf"> to <param name="movie" value="Smoke.swf"/>.

  • Change <embed src="C:\FlexSample\Smoke.swf"> to <embed src="Smoke.swf">.
Prerequisite for all users with Red Hat Enterprise Linux 5, Update 4 and later. To install Rational Functional Tester using Installation Manager, disable SELinux. You can disable SELinux either temporarily or permanently depending on your usage. To disable SELinux temporarily, :

  1. Open the terminal with root credentials

  2. Browse to /usr/sbin and run the command run the command setenforce 0.

To disable SELinux permanently, :

  1. Open the terminal with root credentials

  2. Browse to /etc/selinux

  3. Open config in editable mode

  4. Change the value from enforcing to disabled.

  5. Restart the computer.
Rational Functional Tester fails to capture visual information of controls that are displayed in the same window that had previously hosted other controls. If the top level window is the same, then Rational Functional Tester captures only the hierarchy information of the actual control.

Add the statement rational.test.ft.enable_eclipse_support=false in ivory.properties file.


Related concepts

Collecting IBM Rational Functional Tester error logs

GEF support

Related tasks

Configure object properties in the object library