Running a script from Rational® Functional Tester

When you run a script from Rational® Functional Tester, it plays back all of your recorded actions, such as starting an application, the actions you take in the application, verification points, and stopping the application.

About this task

You can play back functional tests in the Google Chrome, Microsoft Edge, Firefox, and Internet Explorer browsers. When you play back any HTML test in the Edge or Google Chrome browser, if there is a browser and driver incompatibility, Rational® Functional Tester automatically downloads the appropriate driver. Then, the test is played back successfully.

Procedure

  1. Configure your application for testing by setting the appropriate Java environment or web browser to run the application.
  2. Run the script in any of the following ways:
    • In the Projects view, click a script and click Run Functional Test Script Run Functional Test Script button in the Rational® Functional Tester toolbar.
    • In the Projects view, right-click a script and click Run.
    • In the Projects view, click a script and then click Script > Run.

    The Script Launch Wizard appears.

  3. Optional: To prevent the Script Launch Wizard from opening when you run a test script, do the following:
    1. Click Windows > Preferences.
    2. Click Functional Test > Playback > Logging.
    3. On the Logging options page, select Don't show script launch wizard.
  4. On the Select Log page, keep the default log name or select a log name.
  5. Optional: You can enter run arguments or set a dataset iteration count:
    1. Click Next to display the Specify Playback Options page.
    2. In the Run arguments field, enter or select command-line arguments to pass to the script if required.
    3. In the dataset Iteration Count field, select a number or Iterate Until Done to specify how many times a test script runs when you run the script.
  6. If the unexpected window handling feature has been enabled for all scripts in the Preferences dialog box, the Enable handling of unexpected windows checkbox is selected on the Select Log page. Clear the checkbox if you do not want to enable the feature for the script you are running.

    If the unexpected window handling feature has not been enabled for all scripts in the Preferences dialog box, the Enable handling of unexpected windows checkbox is not selected. Select the checkbox if you want to enable the feature for the script you are running. Actions that have been configured for specific controls on unexpected windows in the Configure Handling of Unexpected Windows dialog box are performed.

  7. If the dynamic find feature has been enabled for all scripts in the Preferences dialog box, the Enable script find if scoring find fails checkbox is selected on the Select Log page. Clear the checkbox if you do not want to enable the feature for the script you are running. The dynamic find feature enables Rational® Functional Tester to locate test objects in the application-under-test whose hierarchical position may have been altered from the position in the test object map, ensuring that playback does not fail.

    If the dynamic feature has not been enabled for all scripts in the Preferences dialog box, the Enable script find if scoring find fails checkbox is not selected. Select the checkbox if you want to enable the feature for the script you are running.

  8. Click Finish to begin running a test script.

Results

The Playback Monitor starts and provides information as the script plays back. If the Playback Monitor does not start, check the settings in the Playback Monitor Preferences Page.

After the script runs, a log file opens. If a log does not open, in Rational® Functional Tester, check the settings in the Logging Preferences Page.

Notes:
  • When running test scripts through command-line or through UrbanCode Deploy, you should ensure that at any given time, only a single playback process is running on the machine hosting Rational® Functional Tester.
  • If the recording was performed in one document mode on Internet Explorer, the play back needs to be done on the same document mode in Internet Explorer. Using different document modes may render the controls differently and playback may vary.
  • For information about providing more granular control of mouse and keyboard actions, see Playing Back Low Level Mouse and Keyboard Actions.
  • For information about pausing or stopping script playback, see Pausing or stopping script playback.