Enabling Java environments

You need to enable Java environments before you can use HCL OneTest UI to test Java applications. HCL OneTest UI is shipped with a JRE that is automatically enabled during your installation. The JRE is called "Default JRE." To enable other JREs, or if you install a new JRE, you must run the enabler again.

Before you begin

To enable Java environments, you must log on as an administrator. On Microsoft® Windows® 7 operating system, you must also run HCL OneTest UI as an administrator.

About this task

In HCL OneTest UI, the automatic enablement check box is selected, which is the default option. When this option is enabled, the testing environment such as web browsers, the associated Java™ Runtime Environments (JREs), Java plug-ins, and Eclipse platforms are enabled automatically. Therefore, you can directly record the functional test scripts without enabling the testing environment manually. The automatic enablement of the testing environment takes place under certain conditions and limitations. For more information about the conditions and limitations on the automatic enablement, see the related links section.

Procedure

  1. Click Configure > Enable Environments for Testing any time from HCL OneTest UI to invoke the Enable Environments dialog box (the enabler). Click the Java Environments tab.
  2. Click Search. The Search for Java Environments dialog box opens.
    1. Select one of the following search mechanisms.
      • Quick Search can only be used on Windows® systems. It searches the Windows® registry for the Java environments, and is quicker than searching your hard disk drive(s)
      • Search All Drives scans all of your hard disk drives or partitions to locate all the Java environments on your system
      Note: You should not use the Search All Drives option to find JREs on Linux® systems. Instead use the Search in option and browse for the JRE.
    2. Select Search in to browse to a specific drive or root directory to search.
    3. After choosing one of the search mechanisms, click the Search button.
  3. When the search is complete, HCL OneTest UI lists the JREs in the Java Environments list on the left side of the Java Environments tab. The list includes the full path name of each environment. Decide which environments you want to enable.
  4. Select the environments you want to enable by clicking on them in the list. You can select multiple JREs by using the Ctrl key while selecting. Click the Select All button if you want to enable all of the JREs.
  5. Click Enable.
    The selected environment(s) will be enabled for Java testing. The enabled environments will be indicated in parentheses after each JRE name in the list.
  6. Select a JRE to be the default, and click the Set as Default button.
  7. Click Close.

Results

Notes:
  • Enabling JVM:

    When you run HCL OneTest UI for the first time, it automatically enables the JVM of your browser's Java plug-in so that HTML recording works properly. If you install a different JVM, you must rerun the enabler to enable it.

    However, if you experience an error regarding the Java plug-in during HTML testing, or when trying to launch the Verification Point Comparator from the HTML log, you need to make sure your plug-in is configured properly. See Enabling the Java Plug-in of a Browser for instructions.

  • You do not have to use the Search button to add an environment. You can click the Add button instead in Step 2. This brings up the Add Java Environment dialog box, which you can use to locate the new Java environment. After you select it and click Add, the environment will then be added to the Java Environments list, and you follow steps 4 - 7 to enable or disable it. If you try to add a file that is not a Java environment, you will get an error and it won't be added to the list.

  • If your JRE is not enabled, you will be able to tell because the Recording Monitor will be blank when you try to record against a Java application. For this reason, leave the Recording Monitor in view while recording. If you see this symptom, you need to run the enabler.

  • To enable browsers for HTML testing, see Enabling Web Browsers.

  • You can test that your JRE is enabled properly by clicking the Test button in the enabler. This opens the JRE Tester, which reports the JRE version, JRE vendor, and whether the JRE is enabled successfully. Click OK to close the JRE Tester.