Java application testing problems

This section is intended to help pinpoint and resolve some common problems that may occur when testing Java applets and applications.

Running Another Java Application or Applet with the Same Settings

You can run another Java application or applet with the same settings as the one you are currently running to help determine whether you are encountering a general problem with the Java Add-in or an application-specific problem.

When running another Java application or applet, do the following:

  • Determine whether the application is a standalone application or an applet.

  • If the application is an applet, check the browser type.

  • If the applet is executed from a shortcut, execute another applet with the same command.

  • If the applet is executed from a batch file, copy the batch file and change only the class file that invokes the applet.

    If the classpath must also be changed, add only the new items needed. Do not remove any of the items from the original application or applet classpath.

You cannot record or run tests on Java applets or applications, or the Object Spy identifies Java objects as Standard Windows objects.

Make sure that the Java Add-in is loaded with UFT. To check this, select Help > About Unified Functional Testing and verify that the Java Add-in check box is selected.

You cannot record or run tests on Java applets running on Microsoft Internet Explorer, and the Object Spy identifies Java objects in these applets as Standard Windows objects.

If you are using Oracle Java JRE 5 or 6 on Microsoft Internet Explore, the JVM might not use the Java settings added to your system's environment variables.

The Java console does not display a line containing text similar to "Loading Java Support".

Check that the settings in your environment correspond to the environment settings defined in this section, or check for a batch file that may override the settings.

A different applet or application works with the Java Add-in, but the application you want to test does not work.

First check whether you can record and run tests if you invoke the other Java applet or application using exactly the same settings.

Check that the settings in your environment correspond to the environment settings defined in this section, or check for a batch file that may override the settings.

After installing the Java Add-in, you cannot run Java applications using the IBM Java 6 JVM.

Check that the settings in your environment correspond to the environment settings defined in Java environment variables settings, or check for a batch file that may override the settings.

In addition, you may need to do the following:

  1. Add -agentlib:jvmhook at the beginning of the _JAVA_OPTIONS and IBM_JAVA_OPTIONS environment variables.

  2. Delete the JAVA_TOOL_OPTIONS environment variable.

The add-in does not function properly with applications that run with the -Xincgc option.

Either remove the -Xincgc option, or run without dynamic transformation support.

Your Java console contains the line: Could not find -Xrun library: jvmhook.dll.

Check that the jvmhook.dll is located within your java.library.path.

Check that the jvmhook.dll is located within your java.library.path.