Using the Functional Test perspective of Rational Functional Tester 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().
- 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
- To start Rational Functional Tester: <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.
Datapool functionality
The datapools 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
- 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 Rational Functional Tester (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 Rational Functional Tester 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 above, setGDK_NATIVE_WINDOWS=true
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 Rational Functional Tester 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.