Automated Test Visualizer Tips
Develop | Posted June 13, 2011

If you've spent some time working with TestComplete, you're familiar with the Visualizer, which gives you screenshots of your application both during the recording process and during test playback. A lesser known feature is that the Visualizer also allows you to insert simple actions and property checkpoints into your tests, right from the screenshot.

To try this, open up one of your Visualizer images and mouse over the various controls in the screenshot. You'll see TestComplete draw a black box around each control as you hover over it. When you're hovering over a control, right click on it. You'll be given two choices: Insert Onscreen Action and Insert Property Checkpoint.

Insert Onscreen Action will allow you to perform simple commands against the control. For example, you can insert text into a field, check a box or click a button.

Insert Property Checkpoint will launch the Create Property Checkpoint wizard and allow you to verify that a given object has a particular value for a specific property.

The beauty of both these features is that they don't require your application to be running. You can just make modifications to your test right from the Visualizer image.

Additionally, you can configure the Visualizer's behavior by going to Tools>Current Project Properties and then selecting Visualizer. This will allow you to turn the Visualizer on or off, and you can specify the Visualizer's capture style. If the style is set to Top-Level Parent, then TestComplete will take pictures of the application you're performing commands against. If you specify Desktop, then TestComplete takes pictures of your entire screen. Desktop is handy for debugging, especially if you think that something else on your system may be contributing to errors you're receiving in your tests. However, the images it produces are understandably larger, so you should probably only use this feature on a case-by-case basis.

The Visualizer settings also allow you to automatically update the Visualizer images in your tests. Just check the "Auto-update frames during the run" box, and TestComplete will update all the images in your test. This can be handy if your application’s UI has changed from one build to the next.  Note that you can also update a Visualizer image from the Test Log, by right clicking on the Actual Image and selecting Update Visualizer Data. One thing to note here, though, is that if you update a Visualizer image from the log, you lose the ability to insert onscreen actions and checkpoints, because the log images don't store object information. As such, if those features are important to you, you should always update the images via the project settings page.

Hope you found these tips helpful!


By submitting this form, you agree to our
Terms of Use and Privacy Policy

Thanks for Subscribing

Keep an eye on your inbox for more great content.

Continue Reading

Add a little SmartBear to your life

Stay on top of your Software game with the latest developer tips, best practices and news, delivered straight to your inbox