Testing AJAX web applications is very difficult. Ajax relies mainly on requests to the server ( and responses received from them). We can't test what is sent and received from the server. The way to solve these problems is to use HTTP Proxy.
A HTTP proxy is a small program which intercepts between the client requests and responses to and from the server. The browser sends a request and the HTTP proxy receives the request. It then sends the request to the server and when it is processed, the response is sent back to the HTTP proxy. It is then sent to the browser. In addition to the interception job, it also records the information transfer. Fiddler is one such HTTP proxy tool which is used for testing and debugging Ajax applications.
Fiddler, a free tool is an HTTP proxy for WINInet, which is the Internet Communication library used by many desktop applications, including Internet Explorer. Once installed, Fiddler automatically begins intercepting HTTP traffic to and from your computer.
Configuring Fiddler
If you want to get fiddler to listen to the requests too, go to Tools > Options > Connection > Connection Settings and check "Manual Proxy Configuration", "Use the same proxy for all protocols" and enter 127.0.0.1 port 8888 and click OK. Note that this will pose problems if you close Fiddler as your proxy is gone, to solve the problem change back to "direct connection to internet".
Using Fiddler
The Fiddler window has two main regions. The left region shows all the requests that were sent from the machine. Each request is represented in a line. The line includes the response status, the protocol used (usually HTTP), the host name, the URL, the caching type, the length of the response, and the content type.
Read more about Testing AJAX applications with Fiddler
Visit The Digital Technology Gears for more Technical happenings around the world.