Over the past 6 months or so I’ve been working on writing a courseware book for TestComplete focused on Keyword Testing, a new feature as of v7. The book provides a detailed introduction to the TestComplete IDE with step-by-step examples of using the Keyword Testing scenarios covering a wide range of topics including Data Driven testing, Web GUI testing, Stores & Checkpoints and many others.
This question came up in the AutomatedQA newsgroup and this was my response:
A short list off the top of my head…
For Windows Apps
- Avoid use of painted controls or use controls that support UI Automation or MSAA particularly in the event they are painted
- Avoid non-standard custom UI skinning while it can look good it often will seriously thwart automation.
- Provide UI cues when the state of the application is changing or when there is a long running operation (title/status bar messages)
- Use keyboard shortcuts wherever possible "&" in menus, labels etc.
- Be sure to name controls dynamically created at run time
For Web Apps
- Avoid using frames
- Try to adhere to the Accessibility Standards (Section 508 here in the US)
I’d also mention that if the code they (the developer’s) are writing is hard to read and they dread debugging it, automation it is likely to be a nightmare. No matter how many hints about automation one can give there really is no substitute for good design.
Any other suggestions you would add?
Just posted a new video to tv.falafel.com illustrating how to resolve issues with automated tests when there have been UI changes to the application you’re testing. UI changes can be especially difficult for test automation when you’re relying on a static NameMapping of elements in the UI.
If you’re working with TestComplete be sure to checkout our other related videos.
I’ve recorded a video for Falafel TV illustrating how to use TestComplete’s Stores and Checkpoints features including v7’s new Checkpoint Wizard dialog. In the video I demonstrate recording a Keyword test and leveraging various checkpoints to validate the test has performed as expected. The checkpoints illustrated in this video include:
If you have questions or have suggestions for future videos leave a comment.
I’ve recorded a video for Falafel TV illustrating how to use TestComplete’s distributed testing features. In the video I demonstrate recording a Keyword test and adding the necessary support to allow it to be executed in a distributed fashion. If you’re just getting started this is a good introduction and should get you headed in the right direction. I’ve got some notes for an advanced video on the subject but if you have suggestions let me know.
I just posted a new video to Falafel TV illustrating how to create an HTTP Load Test using TestComplete v7.1. The video covers the basics of getting an HTTP Load Test recorded and running against a website including scaling the test out to four virtual users running on two different machines.
In the interest of keeping the video to a reasonable time length other features related to HTTP Load Testing will be covered in upcoming videos.
Recently, I was teaching a class where the client was interested in HTTP load testing for which Test Complete has great support. Test Complete ships with a tool called Remote Agent that can be installed separately and allows for HTTP load testing using virtual users on multiple machines all controlled by a single instance of TestComplete. In fact, you can load test with up to 250 virtual users allowing a single tester to easily leverage an entire network of computers.
The following outlines the steps I took to demonstrate how easy it is to setup and execute HTTP load tests.
The first step is to create a new HTTP Load Test project.
- Select File | New Project
- Click the HTTP Load Testing Template
- Click Ok
- The Project Wizard appears and you can simply click Finish which will give you a project that looks like the image to the right.
As you can see the project has several nodes by default.
- Stations: represents the machines that will be conducting the tests. Master is my current machine, the one I’m running TestComplete on.
- Tasks: is the HTTP traffic you’re interested in testing.
- Tests: allows you to assign tasks to various stations for test execution.
- Scripts: is for manually writing test automation.
Setting up Remote Agent
For this example, I’m using a virtual machine running Windows XP. I’ve installed TestComplete 6.0 and I’m running Remote Agent which runs in a console window on the desktop. If you’re going to try and duplicate my setup be sure that your VPC network adapter is not set for Shared networking (NAT).
- Right click the Stations node and select Add New… (you should see the dialog to the right)
- Enter the IP address of your Remote Agent machine, in my case that’s 192.168.1.104.
- Click Ok
This will give you a new node under Stations, “VPC” which is your VM, or the machine running Remote Agent.
Record an HTTP Task
The next step is to create the HTTP traffic you want to load test your server and the easiest way is using TestComplete’s recording facilities. For HTTP load testing this requires setting TestComplete to be a proxy for your web browser.
- Configure Internet explorer to use TestComplete as a proxy allowing it to monitor and record HTTP traffic. For IE you can do that from the Connections tab of the Internet Options dialog setting the proxy to localhost on port 9999. For Firefox open the Tools|Options dialog and look on the Advanced page, under the Network tab.
- Click the record button on the TestComplete toolbar and once recording begins click the “Record and HTTP Task” button (circled in red below):
- This will bring up the Select Load Testing dialog where you can decide to record a new HTTP traffic or append it to an existing task.
- Once you click OK you can begin recording HTTP traffic by simply using your browser. TestComplete will record the HTTP traffic and add it to the task you specified.
Once recorded you can modify the web requests to fit your needs. Here is an example of what the recorded HTTP traffic looks like:
Running HTTP Load Testing
The next step is to configure individual Stations to perform the Tasks you’ve created. To execute your tests, TestComplete sends the recorded HTTP traffic to the web server bypassing the browser which means clients hosting Remote Agent will have no UI appear on screen other than the agent itself.
As you can see I’ve configured one virtual user to sent HTTP traffic starting half a second after the Master with a User-Agent of IE6.
Running HTTP Load Testing
The final step is to run your HTTP load tests and examine the output. To do that you can simply right click your test under the Tests node in the Project Explorer. The results at first will appear overwhelming but undoubtedly provide you with a detailed report of how you server performed.
As you can see TestComplete makes it quick and easy to create and run HTTP Load Tests so if this is something you’re looking for you might want to give it a try.
[UPDATED: Jan, 17 2008] Fix a few typos, and clarify adding a new Stations node.