Recording a script

To start recording scripts against your applications, you must first configure your test environments, configure your applications, and create a project.

If you haven't done these configuration tasks, see Before you record for the necessary steps.

When you record a script, Functional Tester 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 Tester scripts use a default helper superclass. You can create your own helper superclass if you want to add additional methods or override the methods within RationalTestScript. For more information, see Changing the Default Script Helper Superclass.

To record a script:

  1. Optionally, you can first set any recording options you may need. Click Window > Preferences to access the Functional Tester options. In the tree hierarchy, click the plus sign (+) beside Functional Tester to expand the preferences. Set any recording options. Close the preferences when you are done.
  2. Click the Record a Functional Test Script Record a Functional Test Script button button or click File > New > Functional Test Script Using Recorder. The Record a Functional Test Script dialog box opens.
  3. In the Record a Functional Test Script dialog box, select the project you want the script to be part of. Type a name for the script.
    Note: Script names cannot contain space or any of the following characters: $ \ / : & * ? " < > | # % -

    Check Add the script to Source Control if you want the script to be under source control. The script is added to ClearCase® but remains checked out so that you can modify it.

    You can click Finish here to begin recording. Functional Tester will create a local object map for your script by default. If you want to use a different test object map, helper superclass, or test datapool, click Next. The Select Script Assets page appears. From here, you can also set the datapool record selection order or change the datapool associated with the script.

  4. Once you have clicked Finish, 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.
  5. 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.)
  6. Perform any actions in the application.
  7. 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 box. 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.
  8. 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 dialog box for information on script support functions.
  9. Close your application, if you want closing the application to be part of the script.
  10. When you are finished recording, click the Stop Recording button.

    Your script and object map are then written into your project directory. Also, the Functional Tester window is restored and the script is displayed.

    Note: For a more detailed walk-through of recording scripts, creating verification points, and playing back scripts, see the Functional Tester Tutorials.
    Note: For recording tips and troubleshooting information, see Recording Troubleshooting and Tips.
Related tasks
Associating functional test scripts with the keywords
Data-driving functional tests
Related reference
Tips for recording functional tests

Feedback