Recording a test

The test creation wizard starts when you record a test. This wizard combines these actions: recording a session with a Web application, generating a test from the recording, and opening the test in the test editor. You can record a test from Internet Explorer (the default on Windows) or from another browser.

Optionally launch the Agent Controller on the local host or default to the Integrated Agent Controller

If you will record with Internet Explorer, you do not need to set your browser preferences. However, this procedure assumes that the defaults are set, so you might want to click Window > Preferences, expand Test, select HTTP Recording, and click Restore Defaults.

If you will record with Mozilla or Firefox, set your browser preferences as follows:
  1. Click Window > Preferences, and expand Test.
  2. Select URL Recorder, and set Application to Record to Mozilla or Firefox.
  3. Enter the path to, or browse to, the browser executable.
If you will record with another browser:
  1. Click Window > Preferences, and expand Test.
  2. Select URL Recorder, and set Application to Record to None.
  3. You will have to manually configure and load your browser; consult the browser's proxy configuration documentation on how to do this.
To record a test:
  1. Click File > New > Other.
  2. In the New window, expand Test, click Test From Recording, and then click Next.
  3. In the Create New Test from Recording window, select Create Test from New Recording, and then click Next.
  4. In the list of projects, click the one in which to store this test and related files. The Java icon icon identifies projects that are suitable for containing tests. Tests stored in other projects will not run.
    Note: If you have not yet created a project, the Project Name field displays a default name of testproj, which you can change.
  5. In the Test file name field, type a name for the test, and click Finish. The standard Navigator and the Java Package Explorer use this name, with extensions. You will also see this name in the Test Navigator. A progress window opens while your browser starts.
  6. To make sure your recording accurately captures HTTP traffic, clear your browser's cache.
    To clear the Internet Explorer cache:
    1. Click Tools > Internet Options.
    2. In the Internet Options window, in the Temporary Internet files area, click Delete Files.
    3. In the Delete Files window, select Delete all offline content and click OK.
    4. Click OK to close the Internet Options window.
    To clear the Mozilla cache:
    1. Click Edit > Preferences.
    2. In the Preferences window, expand Advanced and click Cache.
    3. In the Set Cache Options area, click Clear Cache.
    4. Click OK to close the Preferences window.
    To clear the Firefox cache
    1. Click Tools > Options > Privacy > Clear Cache.
    2. Click OK to close the Options window.
  7. In the address box for your browser, type the address of the Web-based application to test and activate the link.
    Note: If you enter the address of a secure Web site (one that starts with https:), your browser might display a security alert. Depending on the security certificate for the site, you might be required to accept a security risk to proceed with the recording.
  8. Perform the user tasks that you want to test.
  9. After you finish performing the tasks, stop recording. To stop recording, close your browser or click on the Stop Recording button on the right side of the Recorder Control view bar. A progress window opens while the test is generated.
  10. The Confirm Open Editor dialog may appear (see the Window > Preferences... > Test > Open Editor preference), confirming if the new performance test suite is to be opened in the URL Test editor.
By default, when you have finished recording an interaction with a browser-based application, the Recorder Control view displays the message Test generation completed and the URL Recorder automatically starts the URL Test Generator, which produces a test from the recording. (You can modify this behavior - specify that a different test generator be started, or that none be started - by editing the URL Recorder preferences.)