TestComplete 3 FAQ. Testing Web Pages
and Web Servers
This page contains answers to frequently asked questions about TestComplete 3. For answers to questions about TestComplete ver. 4 - 6, see TestComplete 6 FAQ.
Q.: Is there any way to test browser-based programs? Can I test html pages?
A.: TestComplete Standard allows you to test web pages via their GUI. Run TestComplete and try to record your actions over a web page. The resultant script will look very similar to the one recorded on any other ordinary non-Open application. As the web testing depends on the connection speed, you should put the delays where it is needed. It can be calls to Sys.Delay(...) and different loops for waiting changes in the window of your Internet browser. Another aspect, you should pay attention to, is that web pages intensively use graphics. You can use Regions.Find() to locate the necessary areas on a page and then click, double-click or drag them, or perform other operations.
Web testing is fully supported by TestComplete Enterprise. Testing of web pages does not mean only simulation of mouse clicks and key presses, but also access to HTML objects from scripts. That is, you may refer to HTML elements from scripts using the same name as you use to refer to them on your page. Currently, TestComplete provides you with access to elements of web pages displayed in Internet Explorer 5.0 or higher. TestComplete contains specific program object to test combo boxes, list boxes and check boxes displayed on the page. Also, it provides two events that let you perform specific actions before navigating to a new page or upon downloading a page. For more information about web testing, see "Testing Web Pages" in on-line help.
TestComplete Enterprise 3.xx includes the HTTP load testing plug-in that allows you to perform load, stress and scalability testing of web servers.
Q.: Does TestComplete support testing of applications that use CGI, ISAPI, PHP or ASP on the server side?
A.: Yes. The fact is that TestComplete Enterprise tests the client side of web applications and does not depend on the technology used on the server side.
Q.: Does TestComplete support testing of Flash elements on web pages?
A.: Yes. Flash elements are ActiveX elements and TestComplete has access to all methods and properties of ActiveX elements.
Q.: I would like to add an HTML document to the Tested Applications list. How can I do this?
A.: Add the IEXPLORER.EXE application and specify the name and path of the desired html page as a command-line argument.
Q.: What needs configuring to perform the HTTP Load testing?
A.: Please make sure that the proxy port number has the correct value in your browser's settings dialog (i.e. Internet Explorer). This number should be the same as the number specified in the Options | Engine Options | HTTP Load Testing | Recorder | Proxy port field of the TestComplete Engine Options dialog (9090 by default).
In other words, when you are recording load testing scripts with TestComplete, it intercepts low-level HTTP requests sent by the browser and then sends them itself. To intercept these requests, it requires that the browser does not send them through its usual port (8080 by default), they should be sent through another port specified in TestComplete's options for the Load Testing plug-in. This port is 9090 by default, and the port specified in the Internet Explorer options should correspond to it.
If you want to test an external web site and you use a proxy server in your LAN to access the Internet, you should check the Use HTTP Proxy check box in the "Firewall settings" group of the following dialog: Options | Engine Options | HTTP Load Testing. In addition, you should specify the proxy network name or an IP address in the HTTP Proxy Host field and set the correct port number in the HTTP Proxy Port field. Please see the "Options of the HTTP Load Testing Plug-In" help topic for details.
If you want to test an internal web site (within your LAN), please make sure that the Bypass proxy server for local addresses check box of the Tools | Internet Options | Connections | LAN Settings dialog window is unchecked.
Q.: To record HTTP requests for my load tests I have to specify TestComplete as a proxy server in my Internet browser options. Is there a way to automate this?
A.: You should specify TestComplete as a proxy server in order for TestComplete to be able to record HTTP requests. Changing the proxy settings every time you need to record HTTP traffic or play back load testing scripts is a waste of time. To avoid this extra work, you can create (or record) a script routine that will allow you to set your Internet browser options to the desired state. You can then run this script before recording or playing back your load testing scripts.
