Manual testing and regression testing of Web-based applications are time consuming and sometimes quite repetitive. Rational Functional Tester helps make testing more efficient by automating manual tests and helping you create test suites to be used in regression testing. Although Rational Functional Tester is available for both the Microsoft Windows and Linux operating systems, installing and configuring it on Linux is not as straightforward as it is on Windows. Some people have trouble with Java™ plug-ins, enabling the browser, or getting object recognition to work. It is, however, possible to get Rational Functional Tester up and running on a Linux platform, by performing a few additional steps to configure the environment for test automation.
This article assumes that you are familiar with Rational Functional Tester and with the concepts of test automation and object recognition. For more information about these topics, see the References section of this article.
These software versions are discussed in this article:
- Rational Functional Tester Version 8.0
- Red Hat Enterprise Linux 5.3
- Firefox 2.0
Operating system installation and configuration
Use the Red Hat Enterprise Linux 5.3 DVD to install the operating system on the test computer. After the installation is complete, verify the version that you installed:
- Enter this command:
# cat /etc/redhat-release
- Verify the computer response:
Red Hat Enterprise Linux Server release 5.3 (Tikanga)
- You need to install the 32-bit libXp library for the Rational Functional Tester graphical interface to work correctly. Enter this command:
# yum install libXp.i386
Install Firefox 2.0 and Rational Functional Tester
Red Hat Enterprise Linux 5.3 comes with Firefox 3.0 installed by default. However, Rational Functional Tester 8.0 does not support Firefox 3.0. You must remove it, and install Firefox 2.0. Rational Functional Tester also requires a 32-bit version of Firefox, because the Java browser plug-in that comes with the testing tool is 32-bit.
Download a 32-bit Firefox 2.0 .rpm file from http://www.rpmfind.net/ or http://rpm.pbone.net/. The Fedora Core 8 .rpm files also work on Red Hat Enterprise Linux 5.3, so you can use them if you cannot find one specifically for Red Hat Enterprise Linux. At the time of this writing, version 220.127.116.11 was the latest release. You might also need an additional system-bookmarks .rpm file, depending on which Firefox .rpm file you use.
Before you install Firefox 2.0, make these changes:
- Remove Firefox 3.0 by entering this command:
– yum erase firefox
- Install the 32-bit version of libgnomeui and dependent packages by entering this command:
–yum install libgnomeui.i386
- The xulrunner package and dependent packages can conflict with Firefox 2.0. Remove the packages by entering this command:
–yum erase xulrunner
- Install the Firefox .rpm file and the system-bookmarks .rpm file by entering these two commands:
# rpm -ivh firefox-18.104.22.168-1.fc8.i386.rpm
# rpm -ivh fedora-bookmarks-10-1.noarch.rpm
- Verify the installed version by entering this command:
# firefox –version
The correct computer response follows:
Mozilla Firefox 22.214.171.124, Copyright (c) 1998 - 2008 mozilla.org
If the functional testing tool is not installed, after you install Firefox 2.0, install Rational Functional Tester by running the
launchpad.sh script on disk 1 of the installation media.
Configure Firefox to work with Rational Functional Tester
To configure Firefox for Rational Functional Tester, add the Java browser plug-in to Firefox. Then add Firefox to the Rational Functional Tester environment.
Add the Java browser plug-in to Firefox
Typical Firefox installations do not include a Java browser plug-in. Without this plug-in, Rational Functional Tester cannot use Firefox. The Java developer kit that comes with Rational Functional Tester includes a 32-bit version of this plug-in. Direct Firefox to use the plug-in, by creating a soft link in the Firefox plug-ins directory. Insert these links in the directory:
# cd /usr/lib/firefox-126.96.36.199/plugins/
# ln -s /opt/IBM/SDP/jdk/jre/plugin/i386/ns7/libjavaplugin_oji.so libjavaplugin_oji.so
The About Plug-ins page in Firefox shows the installed Java plug-ins:
Figure 1. The Firefox About Plug-ins page
Add Firefox to the Rational Functional Tester environment
To add Firefox to Rational Functional Tester:
- Start Rational Functional Tester by entering this command:
- Keep the default workspace selected.
- Close the Welcome page that opens.
- Click Configure > Enable Environments for Testing.
- Click Web Browsers > Search > Search in.
/usr, and click Search. Rational Functional Tester finds Firefox 2.0, and adds the application to the list of browsers.
- Select the Firefox 2.0 entry, and click Enable.
Figure 2. Searching for installed browsers
- Click Test. The browser opens, showing a page that displays the Click here to run diagnostic tests push button.
- Click the push button. After a few seconds, the browser displays this message:
Browser Enablement Test Result: Passed!
- Close the browser.
Figure 3. Successful browser enablement
- A window with this message might open:
Errors encountered when starting browser. Ignore the message, and click OK to close the window. The display of this error message is a known issue with Rational Functional Tester v8.0.
- Click Apply, and then click Finish to complete adding the browser.
Figure 4. The Enable Environments window with the added browser
Before investing time in developing complex tests for your application, test how Rational Functional Tester and Firefox work together with a simple application. Building the test consists of three main tasks:
- Creating a test application
- Creating a test project and a test object map
- Verifying that the Add Object wizard detects browser objects
Create a test application
Create a simple Web-based application:
- In Rational Functional Tester, click Configure > Configure Applications for Testing.
- Click Add > HTML Application.
- Type the following URL to load a sample HTML page:
- To save the details, click Finish.
Figure 5. A test HTML application added to the Application Configuration Tool window
- Select the added entry, and click on Run. Firefox opens with the bookmarks.html page displayed.
Create a test project and a test object map
To create a Functional Test project and an object map:
- In Rational Functional Tester, click File>New > Functional Test Project.
- Enter the name
TestProject1, and create the new project.
- Right-click the new project, and select Add Test Object Map.
- Enter the name
TestObjectMap1, and create the new map.
Verify that the Add Object wizard detects browser objects
Verify that you can add objects that are displayed in the browser to the object map:
- Start the new Web application, by clicking Configure > Configure Applications for Testing.
- Select the Web application, and click Run.
- Open the new object map, TestObjectMap1.
- Click Insert Test Object to open the Add Object wizard.
- Select Time-delayed test selection, and set the timer to 5 seconds.
- Hover over one of the links on the Web page in the browser, and wait 5 seconds.
- The link becomes highlighted in red, and is displayed in the Add Object wizard.
Figure 6. Object selection on the bookmarks.html page
- Click OK, and verify that the object map includes the object.
Figure 7. The object map with the added object
When the object map includes the Web-page object, you know that Rational Functional Tester and Firefox are working together on Linux. Just a few extra steps can get Rational Functional Tester working on the Linux operating system for testing Web-based applications. You are ready to test your more complex Web-based applications.
- Visit the Rational Functional Tester product page.
- Get updated information in the Rational Functional Tester v8.0 Release Notes.
- Read Hello World: Learn how to create robust, reusable automated functional tests with Rational Functional Tester.
- Read Using IBM Rational Functional Tester 6.1 to run your first functional regression test.
- Explore the Rational Functional Tester Information Center, where you can also take a short video tour.
- Investigate Rational Functional Tester Plus, which is a software application testing bundle.
- Visit the Rational Functional Tester area on developerWorks for introductory to in-depth information.
- Learn about other applications in the IBM Rational Software Delivery Platform, including collaboration tools for parallel development and geographically dispersed teams, plus specialized software for architecture management, asset management, change and release management, integrated requirements management, process and portfolio management, and quality management. You can find product manuals, installation guides, and other documentation in the IBM Rational Online Documentation Center.
- Visit the Rational software area on developerWorks for technical resources and best practices for Rational Software Delivery Platform products.
- Explore Rational computer-based, Web-based, and instructor-led online courses. Hone your skills and learn more about Rational tools with these courses, which range from introductory to advanced. The courses on this catalog are available for purchase through computer-based training or Web-based training. Additionally, some "Getting Started" courses are available free of charge.
- Subscribe to the Rational Edge newsletter for articles on the concepts behind effective software development.
- Subscribe to the IBM developerWorks newsletter, a weekly update on the best of developerWorks tutorials, articles, downloads, community activities, webcasts and events.
- Browse the technology bookstore for books on these and other technical topics.
Get products and technologies
- Download trial versions of IBM Rational software.
- Download these IBM product evaluation versions and get your hands on application development tools and middleware products from DB2®, Lotus®, Tivoli®, and WebSphere®.