This example contains an implementation of a proxy server (referred to simply as
the proxy from now on) that records any GET requests in an HTTP conversation
between a browser and a server and generates a file that can be imported into
the Component Test perspective as an HTTP test case.
To start the application you will need to launch the class httpRecorder.HttpRecorderFrame. It will present a frame that allows
you to:
- Define the port that will be used by the proxy
- Start the proxy and start recording
- Pause the recording, keeping the proxy alive
- Stop the recording and the proxy and save any recorded GET requests
To use the proxy, you must first register it on the browser you are using.
In Microsoft Internet Explorer:
- Click Menu Tools->Internet Options->Connections
- If you are using the LAN to access the internet:
- Click the LAN Settings button
- Enable the check box under the Proxy Server group
- Enter localhost as the address, with the port number you entered
in the recorder's frame.
- If you are using dial-up access:
- Select the appropriate connection
- Click on the Settings button
- Enable the check box under the Proxy Server group
- Enter localhost as the address, with the port number you entered
in the recorder's frame.
In Netscape 4.x:
- Click Edit->Preferences->Advanced->Proxies
- Select Manual Configuration
- Click on the View button
- Enter localhost as the address, with the port number you entered in
the recorder's frame.
Once you register the proxy everything that is sent by the browser or received
from the server will be redirected to the proxy. As a result, it will be
necessary to activate the proxy to use the browser. If you don't want to record a particular interaction, click on the pause
button.