Using the Functional Test perspective of HCL OneTest UI on Linux

For the Functional Test perspective, most features are supported on Linux®, except for recording the scripts. This topic provides an overview about how HCL OneTest UI behaves on Linux.

Testing applications on Linux

Test scripts

All of the functionality of the product works on Linux except for the recorder. You can test the applications on Linux® in two different ways.

  • Record functional test script on Windows® and export it to Linux®. You can then play back on Linux®.
  • You can launch the browser on Linux by adding the step startBrowser("Chrome", <url>); or startBrowser("Firefox", <url>); in the test script.
    Note:
    • Do not add or enable the browser using the options available in the Enable Environments wizard.
    • To launch the browser, use StartBrowser() instead of StartApp().
  • Ensure that you pass the fully qualified URL (with the protocol) as a parameter to startBrowser(). For example, http://www.ibm.com/.
  • You can write the test scripts using the Test Object Insert tool. Instead of creating an object map through recording, populate it outside by opening the map and select objects in the test application. For information, see Creating a New Test Object Map.

    See the API Reference Help and the Advanced Topics for examples of scripting to solve certain problems.

Verification points

You can also insert verification points without recording, by opening the Verification Point wizard from the Script Explorer.

Launcher scripts

HCL OneTest UI provides the following scripts that can be executed from the command-line:
  • To start HCL OneTest UI: <installation directory>/ft_starter
  • To set the test environment variable: source <installation directory>/FunctionalTester/bin/rtsetup

ClearCase® integration

ClearCase® integration works on Linux®, but there may be slight differences.

dataset functionality

The datasets functionality works on Linux®, but there may be slight differences.

Java and HTML support

On Linux®, you can only test Java and HTML applications. Some Linux® GUI applications, like those developed with Motiff, are not supported.

Installing the product on Linux®

When you install the HCL OneTest UI package, the only feature you can install on Linux® is HCL OneTest UI, Eclipse Integration. Before you install the product on Linux, make sure that you have the following libraries on your machine.
  • libXm.so.4
  • libstdc++.so.5
  • libXp.so.6
  • gtk2.i686
  • gtk2-engines.i686
  • PackageKit-gtk-module.i686
  • PackageKit-gtk-module.x86_64
  • libcanberra-gtk2.x86_64
  • libcanberra-gtk2.i686

Starting the test application outside the script

If you start your test application on Linux® outside HCL OneTest UI (not using a startApp command or other script call), you must first set the environment variables. You must make sure that the LD_PRELOAD and FT_INSTALL_DIRECTORY are properly set in the environment from which they start the test application, else HCL OneTest UI will not be able to properly play back scripts against the application.

Set up the following variables depending upon the shell that you are using.

export FUNCTIONAL_TESTER_DIR= <FT installation directory> For e.g, /opt/caspian

export FT_CUSTOMIZATION_DIRECTORY=$FUNCTIONAL_TESTER_DIR/bin/customization

export FT_CONFIGURATION_DIRECTORY=$FUNCTIONAL_TESTER_DIR/bin/configuration

export FT_INSTALL_DIR=$FUNCTIONAL_TESTER_DIR/bin

export FT_ECLIPSE_DIR=$FUNCTIONAL_TESTER_DIR/eclipse

export FT_JRE=$FUNCTIONAL_TESTER_DIR/eclipse/jre

export LD_PRELOAD=$FUNCTIONAL_TESTER_DIR/bin/libftevent.so

For Linux platforms that are based on GTK + 2.18 and higher, setGDK_NATIVE_WINDOWS=true

For HTML based test applications, the LD_LIBRARY_PATH must be set to the browser installation directory.
Note: Alternatively, you can use rtsetup script to set all the functional tester environment variables. Refer to the Launcher scripts section.

Enabling JREs on Linux®

To run the enabler for enabling the JREs on Linux®, you must have root privileges.

Functionality not supported on Linux

Recorder

You cannot record on Linux®. You can record scripts on Windows® and then play them back on Linux®.

Tutorials

The tutorials provided with HCL OneTest UI involve recording scripts. To learn the product functionality, do the tutorials on the Windows® platform. You can play back the scripts you recorded using the tutorial on Linux®.