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
- Configure your application for testing by setting the appropriate Java™ environment or web browser to run the application.
- Run the script in any of the following ways:
- In the Projects view, click a script and click Run Functional Test Script 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 .
The Script Launch Wizard appears.
- Optional: To prevent the Script Launch Wizard
from opening when you run a test script, do the following:
- Click .
- Click .
- On the Logging options page, select Don't show script launch wizard.
- On the Select Log page, keep the default log name or select a log name.
- Optional: You can enter run arguments or set
a dataset iteration count:
- Click Next to display the Specify Playback Options page.
- In the Run arguments field, enter or select command-line arguments to pass to the script if required.
- 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.
- If the unexpected window handling feature has been enabled
for all scripts in the Preferences dialog box, the Enable
handling of unexpected windows check box is selected on
the Select Log page. Clear the check box 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 check box is not selected. Select the check box 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.
-
If the dynamic find feature has been enabled for all scripts in the Preferences dialog box, the
Enable script find if scoring find fails check box is selected on the Select
Log page. Clear the check box 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 check box is not selected. Select the check box if you want to enable the feature for the script you are running.
- 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.
- When running test scripts through command-line or through IBM® 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.