Running a script from HCL OneTest™ UI
When you run a script from HCL OneTest™ UI, 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.
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 HCL OneTest™ UI 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 HCL OneTest™ UI 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 HCL OneTest™ UI, check the settings in the Logging Preferences Page.
- 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 HCL OneTest™ UI.
- 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.