Top  Previous  Next

The HTTP Analyzer automation library allows other applications or DLLs to talk to HTTP Analyzer Stand-alone application or HTTP Analyzer Add-on, and it can control them to capture HTTP/HTTPS traffic, save and load HTTP Transaction log files. There are three main COM components. The first one is IHTTPAnalyzerAddon, which allows you to capture HTTP/HTTPS traffic from a specific internet explorer application, the second is IHttpAnalyzerFirefox, which allows you to capture HTTP/HTTPS traffic from a specific firefox application. The thrid one is more powerful IHTTPAnalyzerStandalone, which allows you to capture HTTP/HTTPS traffic from a specific process or user/session/system wide, and display HTTP/HTTPS traffic originating from Java applets and JavaScript embedded in a Web page, and HTTP/HTTPS traffic originating from ActiveX controls and COM objects instanced by an application. A quite useful feature of Httpanalyzer standalone is that you could call AttachProcessByID(GetCurrentProcessID) to integrate Http Analyzer to your unit test and use it to verify whether the data sent/received by your Web method is correct.

Except for the area of application, IHTTPAnalyzerStandAlone, IHttpAnalyzerFirefox and IHTTPAnalyzerAddon have the same interface. Both of them derive from IHTTPAnalyzer. IHTTPAnalyzer can control HTTPAnalyzer by the corresponding control methods.(e.g. Start, Stop, Pause, Resume, Clear), and use SaveLog method to export log to an external file with various types of log format, use LoadLog method to open an existing log file. IHTTPAnalyzer has some useful tool methods such as DeleteURLCache, DeleteSessionCookies, DeletePersistentCookie. They can help the developer to create a repeatable testing environment.

IHTTPAnalyzer refers to an read-only ILog object which
represents a list of ILogEntry objects captured by HTTP Analyzer or re-loaded from the existing log files. These objects contain the detailed read-only information of each HTTP transaction and provide programmatic access to the information seen in HTTP Analyzer, e.g. Headers, Content, Cookies, Cache, QueryStrings, PostData, Request and Response Streams. ILog object also contains some useful summary information (e.g. number of round trips, bytes received/sent, etc.) for individual web pages, processes or the whole log.