Mercury QuickTest Professional JavaTM Add-in 9.1 Readme
This file provides the following information about the QuickTest Professional Java Add-in:
Overview
Welcome to the QuickTest Professional Java Add-in 9.1. The QuickTest Professional Java Add-in can record and run tests on Java applications using customized test objects and methods.
The QuickTest Professional Java Add-in recognizes objects in Java toolkits such as AWT, Swing, SWT, and more. Using the Java Add-in test objects and methods makes tests easier to read, maintain, enhance, and parameterize so that both advanced and less technical users can create sophisticated tests on Java applications and applets.
In addition, you can use the QuickTest Professional Java Add-in Extensibility SDK to develop custom support for third-party and custom Java controls that the QuickTest Professional Java Add-in does not support out-of-the-box. For more information, refer to the QuickTest Professional Java Add-in Extensibility Developer's Guide.
For more information on the QuickTest Professional Java Add-in and for details and syntax of Java test objects and methods, refer to the QuickTest Professional Java Add-in Guide and the Java section of the QuickTest Object Model Reference.
Note: Support for Oracle Applications and Oracle Forms applications is provided through the separate QuickTest Professional Oracle Add-in 8.2. For more information, refer to the QuickTest Professional Oracle Add-in Guide.
Customer Support
Technical support for QuickTest Professional and the QuickTest Professional Java Add-in is provided via our award-winning Customer Support Web site. From this Web site, customers are able to review Frequently Asked Questions, submit and check the status of support requests, and access online documentation, patches, and other downloads. Please visit the Customer Support Web site at:
Customer Support contact numbers all over the world are available at:
http://support.mercury.com/cgi-bin/portal/CSO/contacts.jsp
System Requirements
To successfully work with the QuickTest Professional Java Add-in, your system configuration should meet the requirements as specified for QuickTest Professional 9.1 (in the QuickTest Professional 9.1 Readme), plus the following add-in specific requirements:
Supported Environments
The QuickTest Professional Java Add-in supports creating and running tests on the following Java toolkits:
The QuickTest Professional Java Add-in supports creating and running tests on the following Java run-time environments:
- Sun JDK, JRE, and Plug-in versions 1.3.1, 1.4.2, 1.5.0, and 1.6.0 beta
- Sun Java Web Start 1.4.x and 1.5.x
- IBM JDK, JRE, and Plug-in, versions 1.3.0 and 1.4.2
- Microsoft Internet Explorer JVM versions 3158 and later
- Netscape version 8.0 (using a supported Sun Plug-in)
- Mozilla Firefox version 1.5 (using a supported Sun Plug-in)
What's New in the Java Add-in
- The latest beta version of Sun JDK is now supported. For more information, see Supported Environments above.
- The Java Add-in supports creating and running tests on the SWT toolkit. Recording is not supported for this toolkit, but you can activate a record session to create checkpoints or output values.
- You can use the QuickTest Professional Java Add-in Extensibility SDK, to develop custom support for third-party and custom Java controls that the QuickTest Professional Java Add-in does not support out-of-the-box.
- Improved Java Object Model:
- The JavaToolbar test object class is supported.
- The Java Add-in supports right-clicks (as well as left and middle mouse-button clicks) for button objects. The JavaButton.Click test object method has a new optional argument that specifies the mouse button that performed the click.
- The following test object methods have been added:
For more information, refer to the Java section of the QuickTest Object Model Reference.
Known Problems and Limitations
Installation Issues
- When you install the QuickTest Professional Java Add-in 9.1, the Setup program checks whether the WinRunner Java and/or Oracle Add-ins 7.6 are installed on the same computer. If either or both of these add-ins are installed, a message prompts you to install the WR76DualAgentPatch patch after you finish the add-in installation. If you do not install this patch, you will not be able to use the WinRunner Java and/or Oracle Add-ins on this computer.
Note: Install the WR76DualAgentPatch patch only after you install the QuickTest Professional Java Add-in.
- If you install the QuickTest Professional Oracle Add-in 8.2 after installing the QuickTest Professional Java Add-in 9.1, the Java Add-in does not work properly.
Workaround: Install the Oracle Add-in before the Java Add-in, or repair the Java Add-in installation after installing the Oracle Add-in.
- In Windows XP and Windows 2003, after you install the QuickTest Professional Java Add-in 9.1, the Windows Remote Shell Service (rshsvc.exe) may fail and display an error message every time you restart the computer. This occurs only if the Remote Shell Service is configured to run automatically.
Workaround: Either disable the automatic launching of the Remote Shell Service, or move the following variables from the System Variables section of the Environment Variables dialog box to the User Variables section: _classload_hook, _JAVA_OPTIONS, IBM_JAVA_OPTIONS, and MSJAVA _ENABLE _MONITORS.
Verification Issues
- You can create text checkpoints and text output values only for Java objects that meet specific criteria. For more information, refer to the QuickTest Professional Java Add-in 9.1 Guide.
- To create a new table checkpoint on a Java table while editing a test or component, you must first open the application containing the table you want to check and display the table in the application.
- If you add a checkpoints on a JavaList or JavaTree object while editing a test or component, the list_content or tree_content property is not available in the checkpoint.
Workaround: Create checkpoints on Java lists and Java trees during a record session.
Workaround: If a checkpoint on a transient object is required, make sure the object is visible prior to executing the checkpoint. For example, in the case of combo box list, you should insert a statement that clicks on the combo box button before executing the checkpoint.
- In QuickTest Professional Java Add-in 9.1 the maximum number of characters in a test object identification property is increased. Therefore, checkpoints created in older versions of QuickTest may fail.
For example, if you created a text checkpoint on a JavaEdit control with two kilobytes of text, using version 8.2 of the Java Add-in, the checkpoint captured only part of the text. If you perform this checkpoint using version 9.1 of the Java Add-in, all of the text is captured, and therefore does not match the text captured in the checkpoint.
Workaround: Run the test in Update mode, to update the value of the checkpoint. Alternatively, you can manually modify the checkpoint to use a regular expression and add .* at the end of the property value. The checkpoint will now succeed because it ignores the unexpected part of the text.
General Issues
- If, while recording keyboard operations in a JFC single-line edit box in an IME composition window, you press the ENTER key to select the composition string, the key press may be recorded as the Activate method, thereby generating an extra step. For example: JavaWindow("Application").JavaEdit("User Name").Activate
This extra step generally does not affect the run session adversely.Workaround: Before running your test or component, remove the extra step that was recorded.
Workaround: When testing with QuickTest Java support, do not use -Xincgc in your command line, or, alternatively, do not use the dynamic transformation support mechanism. For more information, refer to the QuickTest Professional Java Add-in Guide.
Workaround: Use a string instead of the original type. For example, instead of 1, use "1". For example: y = JavaCheckBox("Active").WaitProperty ("enabled", "1", 1000)
Workaround: To instruct the Java Add-in record these actions, use the Setting.Java method to set the record_win_ops variable to 1. For example: Setting.Java("RECORD_WIN_OPS") = 1
Workaround: Use other verification methods (such as using GetTOProperty). For more details on verification methods, refer to the QuickTest Professional User's Guide.
- When selecting a JAR file from the command line in the Record and Run Settings dialog box, you should manually add -jar to the Command line box before you invoke the Java application.
- If you intend to launch your Java application using the Record and Run Settings dialog box, without using a batch file (or another executable file), and without the -jar command line option (after selecting a JAR file), you should include the fully qualified name of the Java class in the Command line box.
- A call to .Object.startModal of a JavaInternalFrame or JavaDialog object may cause QuickTest to behave unexpectedly until the dialog box is closed.
- The use of multibyte characters in a multiline edit field object is not supported.
- When you learned an object within a Java toolbar (such as a JButton or JCheckBox) using the QuickTest Professional Java Add-in, version 8.2, it was learned as a second-level test object within the JavaApplet object. In version 9.1, QuickTest recognizes these objects as test objects within a JavaToolbar. Therefore, steps created on these objects using the Java Add-in 8.2 will fail if you run them in QuickTest 9.1.
Workarounds:
You can use any of the following solutions to overcome this problem:
- Relearn the objects using the QuickTest Professional Java Add-in 9.1 and adjust the object hierarchy in the steps appropriately.
- Learn the JavaToolbar object and then modify the steps to use the relevant JavaToolbar methods to perform the operations.
For more information on Java test objects and methods, refer to the Java section of the QuickTest Professional Object Model Reference.
- To instruct QuickTest whether to relate to objects within a toolbar as independent test objects, or as test objects within a toolbar, set the DisableJToolbarWrapping option. To do this, add a Setting statement: Setting.Java("DisableJToolbarWrapping") = <"1"> to relate to the objects as independent, or Setting.Java("DisableJToolbarWrapping") = <"0"> to relate to the objects as test objects within a toolbar.
- For button objects (either JavaButton or a button in a JavaToolbar) whose label is determined by the name of the image file they display, the process of name naming the test object when running in JDK 1.6 is different than the one used when running in JDK 1.5.
Therefore, if you have a test or component containing button objects that were learned on JDK 1.5 and labeled according to their image file, then when you run it on JDK 1.6, the test or component may fail.
Workaround:
- For a JavaButton object-relearn the object on JDK 1.6. Then modify the test to use the new test object, or delete the old object from the object repository and rename the new test object to match the object name used in the step.
- For a button in a JavaToolbar-modify the Item argument in the JavaToolbar statement to refer to the relevant button. You can specify the button's index, or you can use the Object Spy to spy on the toolbar button, and then provide the label identification property as the Item argument.
- The Alt+F4 keyboard shortcut (used for closing a Java applet or Java application) is not supported for recording or running.
Workaround: Use a Close menu command or button to close a Java applet or Java application during a recording session. Alternatively, manually add a JavaWindow(...).Close step.
- If an application contains AWT objects within SWT objects or vice versa, the application may take a long time to open when running with the QuickTest Professional Java Add-in. In addition, it may take a significant amount of time to add objects to the object repository or to create checkpoints.
Workaround: If, when you create a test, the application takes a long time to open, this may indicate that the application will take a long time to open when you run the test as well. To ensure that the application opens before performing the first step, add an Exist statement before the first step. The statement should check for the existence of an object that is visible when the application opens. For example:
While TheFirstObjectintheTest.Exist
Wend
- You can use the RegisterUserFunc statement to register a user-defined function that will override an existing test object method. You can also register a user-defined function to override a test object method that was created using the QuickTest Professional Java Add-in Extensibility SDK. If you override this type of test object method, the user-defined function must not call the test object method that it overrides.
- The new QuickTest 9.1 feature, Navigate and Learn, is not supported for Java Applets.
Workaround: Use the Add Object or Record command to add Java test objects to the object repository.
- If the ActiveX Add-in is loaded when working with SWT-based Java applications, the Java application being tested may behave unexpectedly.
Workaround: When you want to test SWT-based Java applications, make sure that the ActiveX Add-in is not loaded with QuickTest. To check this, choose Help > About QuickTest Professional and verify that the ActiveX Add-in check box is cleared.
If you want to test an ActiveX object that is embedded in your SWT-based Java application, you must first disable Java support. To do this, rename the _JAVA_OPTIONS or IBM_JAVA_OPTIONS environment variables. This instructs QuickTest to treat the ActiveX object as if it is embedded in a Standard Windows application. In addition, the container application objects will be identified as Standard Windows objects. (To test the Java controls in this application, remove the ActiveX Add-in, restore the environment variables and run a separate test.)
© This document, and the accompanying software and other documentation, is protected by U.S. and international copyright laws, and may be used only in accordance with the accompanying license agreement. Features of the software, and of other products and services of Mercury Interactive Corporation, may be covered by one or more of the following patents: United States: 5,511,185; 5,657,438; 5,701,139; 5,870,559; 5,958,008; 5,974,572; 6,137,782; 6,138,157; 6,144,962; 6,205,122; 6,237,006; 6,341,310; 6,360,332, 6,449,739; 6,470,383; 6,477,483; 6,549,944; 6,560,564; 6,564,342; 6,587,969; 6,631,408; 6,631,411; 6,633,912; 6,694,288; 6,738,813; 6,738,933; 6,754,701; 6,792,460 and 6,810,494. Australia: 763468 and 762554. Other patents pending. All rights reserved.
Mercury, Mercury Interactive, the Mercury logo, the Mercury Interactive logo, LoadRunner, WinRunner, SiteScope and TestDirector are trademarks of Mercury Interactive Corporation and may be registered in certain jurisdictions. The absence of a trademark from this list does not constitute a waiver of Mercury's intellectual property rights concerning that trademark.
All other company, brand and product names may be trademarks or registered trademarks of their respective holders. Mercury disclaims any responsibility for specifying which marks are owned by which companies or which organizations.
Mercury Interactive Corporation
379 North Whisman Road
Mountain View, CA 94043
Tel: (650) 603-5200
Toll Free: (800) TEST-911
Customer Support: (877) TEST-HLP
Fax: (650) 603-5300QTPJAVARM9.1/01
Copyright 2006 Mercury Interactive Corporation |
Documentation comments or suggestions? Please send feedback to documentation@mercury.com |