Home

 

Recording a test

To create a simple HTTP test, do these steps:

Note: To make sure your recording accurately captures HTTP traffic, clear the browser cache.

Open the Test perspective.

Right-click RAD75JUnitWebTest in the Test Navigator view, select New Æ Test Element Æ Test From Recording and click Next.

Select Create Test From New Recording and click Next.

In the Select Location for Test Suite dialog, select the RAD75JUnitWebTest project, accept the test file name of RAD75JUnitWebTest.testsuite, and click Finish.

A progress dialog box opens while your browser starts. Your browser settings are updated and a local proxy is enabled. If you are using a browser other than Microsoft Internet Explorer, see the online help for detailed instructions on how to configure the proxy.

Tip: The browser used for recording can be set in Window Æ Preferences Æ Test Æ TPTP URL Æ URL Recorder.

Recording has now started.

Start the selected Web application by entering the following URL in the browser:

http://localhost:9080/RAD75BankBasicWeb/

Note that the port (9080) might be different in your installation.

Important: For Internet Explorer 7.0 use the IP-address to run the Web application: http://<ip-address>:9080/RAD75BankBasicWeb/. No recording is produced when using http://localhost:9080/...

For Firefox 2.0, first configure the network settings: Select Tools Æ Options Æ Advanced Æ Network. Click Settings and select Auto-detect proxy settings for the network.

We record a money transfer from a customer's account to another one, and verify that the required transactions have been created:

Select the redbank link on the ITSO RedBank welcome page, type 333-33-3333 as customer ID (SSN), and click Submit.
Click account number 003-999000777 and on the next page select Transfer, enter 500 in the Amount field and 003-999000888 in the To Account field, and click Submit.
Verify that List transactions is selected and click Submit. One Debit transaction is listed.
Click Account Details and then click Customer Details.
Click account number 003-999000888, verify that List transactions is selected and click Submit. One Credit transaction is listed.
Click Account Details, click Customer Details, and finally click Logout.

Close the browser to stop recording, or click Stop Recording in the toolbar of the Recorder Control view (Figure | 3-13).

Figure 23-13 Recorder Control view

When prompted to Confirm Open Editor, click Yes.

After closing the browser, the Recorder Control view displays the messages Recording completed and Test generation completed.

The wizard automatically builds a TPTP URL Test. When the test is successfully generated, the Recorder Control displays the message Test generation completed.
ibm.com/redbooks