Recording a script

To start recording scripts against your applications, you must first configure your test environments, configure your applications, and create a project. Under certain conditions, you can start recording scripts without preparing your functional test environment.

About this task

If you haven't done these configuration tasks, see Getting Started with HCL DevOps Test UI (Test UI) for the necessary steps.

When you record a script, Test UI records any user actions against your application, such as keystrokes and mouse clicks. You can also insert verification points to test data or properties of any objects in your application. During recording, the verification point captures object information and stores it in a baseline file. Then during playback, the verification point captures the object information and compares it to the baseline.

Note: All Functional Test scripts use a default helper base class. You can create your own helper base class if you want to add additional methods or override the methods within RationalTestScript. For more information, see Changing the Default Script Helper Base Class for a Script.

Procedure

  1. Click Tools > Options to set any recording options that you need.
  2. In the folder hierarchy, click the DevOps Test UI folder icon to open the options. Set any recording options. Close the options when you are done. Optionally, you can first set any recording options you may need.
  3. Click the Record a Functional Test Script Record a Functional Test Script button button or click File > New > Add Script Using Recorder. The Add New Item opens.
  4. In the Add New Item dialog, select the project you want the script to be part of. Type a name for the script.
  5. Click Open.

    The Select Script Assets page appears. Test UI will create a local object map for your script by default. If you want to use a different test object map, helper base class, or test dataset, select them from the Select Script Assets page. You can also set the dataset record selection order or change the dataset associated with the script.

  6. Click Finish to begin recording.

    The Recording Monitor opens and the recording starts. Click the Display Help icon on the Recording toolbar in the monitor for information on the toolbar buttons and how the monitor works.

  7. On the Recording toolbar, click the Start Application button to start your test application. See Starting Your Test Applications for more information. (If your application is already running, you don't need to do this step.)
  8. Perform any actions in the application.
    Note: To record the action of moving the mouse over a link that has a tooltip, move the mouse over the link so that the tooltip is displayed, and press Shift. This notifies the recorder to capture the action in the script.
  9. If you want to record a verification point, locate the object in your application you want to test, and click anywhere in the application window or dialog. Next, click the Insert Verification Point or Action Command button. Click the Help button in the Verification Point and Action Wizard while creating the verification point for more information on the Verification Point and Action Wizard, or see Creating a Properties Verification Point for an example of how to create one type of verification point.
  10. If you want to insert any features into the script, such as a call script command, log entry, timer, script delay command, or comment, click the Insert Script Support Commands button. Click the Help button in the Script Support Functions for information on script support functions.
  11. Close your application, if you want closing the application to be part of the script.
  12. When you are finished recording, click the Stop Recording button.
    Note: