Recording a test

The test creation wizard starts the HTTP Proxy Recorder, which records your interactions with a browser-based application. When you stop recording, the wizard starts a test generator, which creates a test from the recorded session.

Before beginning, verify that the Agent Controller is running on the local machine. For instructions on how to start the Agent Controller, see Administering the Agent Controller.

Tests are stored inside a Java project. If no Java project currently exists in your workspace, the test creation wizard creates one, allowing you to change its name. If you want to store a test in a specific project, verify that it exists before beginning. For instructions on how to create a Java project, see Creating Java elements.

Recording and script generation behavior are controlled by recorder preferences. To inspect the current settings, go to Windows > Preferences > Test > HTTP Proxy Recorder.

If you use a browser other than Microsoft Internet Explorer, before starting the steps listed below, first start and configure your browser as explained in Configuring your browser for test recording.

To record a test:

  1. Open the Test perspective.

  2. Start the recorder:

    1. Click File > New > Other. The New dialog box opens.


    2. In the Wizards list box, expand Test and Recording and click HTTP Proxy Recorder.

    3. Click the Next button. If one or more Java projects exists, the HTTP Proxy Recorder, shown below, opens. If no Java projects exist, a new project is created and a similar dialog box opens allowing you to change its name.


    4. In the list of projects, click the one in which to store this test and related files.

    5. In the Recording file name: field, type a name, without suffix, for the test. The name you type is the base name for the recording, test, and other required files. You see these files in the Java or Resource perspectives with their distinguishing suffixes, but you see only the simple (test) name in the test perspective.

    6. Click Finish. A progress dialog box opens while your browser starts.

  3. In your browser's address: field, type the URL of the Web-based application that you want to test and activate it. Now perform a task that you want to test. If you enter the URL of a secure web site (beginning https:), a security alert appears: enter Yes to continue.


  4. When you have completed the task to be tested, stop the recorder. You can do this by closing your browser or by clicking the round Stop button on the right side of the Recorder Control viewer bar.


    A progress dialog box opens while the test is generated. On completion, the Recorder Control window displays the message test generation completed and the Test Navigator lists your test.

  5. To record additional interactions with the application under test, go the step 2 and repeat this procedure as many times as needed.

 

Parent topic

Testing browser-based applications - quick start
Previous topic: Configuring your browser for test recording
Next topic: Editing a test