Posted by SmartBear on Wednesday, March 17, 2010

In TestComplete 8, the Visualizer subsystem has been drastically enhanced. Now, TestComplete automatically captures screenshots during test recording and playback and let you see what happens with your tested application when recording and running your automated tests.

TestComplete captures images for keyword-driven tests and test scripts. The images captured during test recording are displayed in the new Test Visualizer panel below the Keyword Test editor or the Code Editor.

Test Visualizer Panel

Each image (frame) in this panel corresponds to a test command that simulates user actions over the tested application: clicks on a mouse button, simulating a keystroke, and other actions. The object that the test command works with is highlighted with a red rectangle on the image. Thus, the Visualizer images help you better understand what actions the recorded script statements and keyword test operations perform.

The test editor marks the test commands, for each image, with the Icon icon. Commands that do not have an image don’t have icons.

When you select the operation marked with this icon in the test editor, the Test Visualizer panel automatically highlights the appropriate image. This feature also works in the opposite direction, to view a command that relates to a certain picture, select this image in the Test Visualizer panel, TestComplete then jumps to the script line or keyword test operation that corresponds to that image.

You can perform different actions with Visualizer images, for instance, you can view frames at a larger scale, copy a frame or part of it to the clipboard, save a frame or part of it to a file, and various other actions.

Besides capturing images during recording, Test Visualizer also captures images during test execution. It captures images and posts both the “recorded” and “played back” screenshots to the test log. The test log shows these images in the Picture panel:

Picture Panel

The images captured during recording are displayed in the Expected Image section of the Picture panel; the Actual Image section contains the “played back” images. The object that worked with the test operations is highlighted with a red rectangle on both images. You can compare the expected and actual images and easily see if the application’s state and behavior differs from what you had during test recording. The toolbar of the Actual Image section contains two special buttons that simplify image comparison. Using these buttons, you can synchronize the view of the images and highlight the differences:

Buttons

By default, Test Visualizer captures images of the top-level windows in a tested application. However, you can change the captured objects to enlarge the captured area or shrink it down using the Capture style setting. Note that if you use different capturing modes when recording and playing back a test, TestComplete will report that the “recorded” and “played back” images differ.

Another important feature of Test Visualizer is: by using its images you can easily and quickly add new test commands to the keyword-driven test without running the tested application. To insert the operation, right-click the desired image in the Test Visualizer panel and select Icon Insert On-Screen Action from the context menu.

Adding New Operation

Then select the desired object from the Visualizer image and use the ensuing On-Screen Action wizard to specify the method to be called and its parameters. Once you have clicked Finish in the wizard, the new operation will be inserted to the test after the operation corresponding to the selected Visualizer frame.

As you can see, the Visualizer images help you understand the recorded test actions and find the difference between the expected and actual behavior of the tested application. However, they may consume a lot of hard disk space, especially if you run a lot of functional tests. So, when you are creating tests, you can use Test Visualizer, but after your tests are ready, it is recommended to disable Test Visualizer during the test runs. If an error occurs, you can enable the Visualizer, run the test and use the captured images to find the cause of the problem even faster than before.

To reduce the overall size of captured images, you can also use the new Store last … events option that allows you to limit the number of messages posted to the log and, as a consequence, the number of images corresponding to these messages. For example, you can specify that only 50 of the last event messages should be posted before the test stops. This will decrease the number of captured images, but leave just enough images to find the cause of an error if and when it occurs.

As you can see, Test Visualizer includes a number of features that simplify the creation of automated tests and analyzing automated test results. If you are interested in trying TestComplete 8, be sure to apply for the Beta version.

Share this blog post:
  • Facebook
  • DZone It!
  • Digg It!
  • Del.icio.us
  • Reddit
  • Twitter
  • Email It!

Comments  10

Gravatar
  • Martin 03/17/2010 18:45 PM

    Hi,

    this feature looks really great, but still - will TC8 have some configuration option to switch-off saving images and leave full textual logging ("old way")?
    Thanks.

     
    Gravatar
  • Alex 03/17/2010 19:52 PM

    Hi Martin,

    Yes, TestComplete will support textual logging. Visualizer images serve as an additional logging feature, they don’t replace log messages. The present logging functionality will be preserved and developed. For instance, in the second image of this post, you can see the Remarks tab in the test log. This is the Remarks panel that is used in all TestComplete versions to display the extended part of log messages.

    Best regards,
    Alex

     
    Gravatar
  • Carsten 03/18/2010 00:00 AM

    Hi,
    thanks for the post - it's a nice sneak for TC8.

    One of my experiences is that debugging tests can take a lot of time. Problable I'm not alone with this. So, helping to understand what's happening or what went wrong is a clever idea from my point of view. Highlighting the affected object in the screenshot is also very nice.

    I did not really understand how I will be able to insert steps into a keyword test which I have wanted to do with TC7.5 serveral times. Maybe I just have to read the post again or better try it out myself mit TC8 ;-)

    Looking forward to TC8!

    -Carsten

     
    Gravatar
  • Alex 03/18/2010 01:54 AM

    Hi Carsten,

    Thank you for your kind words. We think that Visualizer will be helpful for test debugging.

    As for adding a new operation from an image... For each image, Test Visualizer saves information about objects that are displayed on this image. To append the On-Screen Action operation, you select the Insert On-Screen Action command from the context menu as it is shown in the last image of the post. This will invoke a dialog in which you can choose a button, text box or other object, with which the operation will work. Then TestComplete will display the standard wizard in which you specify the method to be called, its parameters and so on. In other words, this is easy. You’ll see it yourself  :-)

    Best regards,
    Alex

     
    Gravatar
  • Rob 03/30/2010 04:05 AM

    When exporting test results, will the stored images also be made available to the MHT file?

     
    Gravatar
  • Alex 03/30/2010 05:26 AM

    Hi Rob,

    Yes, the Expected and Actual images are part of the test log data and they are exported to .mht.

    Best regards,
    Alex

     
    Gravatar
  • Senthil Kumar 06/02/2010 18:46 PM

    Hi...
    Now In my company we are using Testcomplete 7.5. I am using 1 GB RAM.
    Problem is its too slow while opening a project and closing the testcomplete.Now you are also capturing the screen shots while recording and play back. Have you done any enhancements for performance of testcomplete with this.Because, even though its interesting to work with testcomplete, lot of times it irritates due to the performance.

    Regards
    Senthil Kumar

     
    Gravatar
  • Alex 06/03/2010 23:11 PM

    Hi Senthil,

    Test Visualizer does not require much RAM, so it will not make the situation worse. Also, you may disable the Visualizer functionality in project settings and work with TestComplete without it. You may join the beta testing and try it for yourself. To join the beta, send a request to our support team (http://www.automatedqa.com/support/message/).

    Best Regards,
    Alex

     
    Gravatar
  • Kelvin Ngai 06/08/2010 06:01 AM

    Hi,

    I'm currently using Version 7.52.678.5 and interested to try out the beta version 8. One of the major hurdles I've been running into is some controls in our PowerBuilder app. are not retrievable by TC on playback. Will the Test Visualizer be able to resolve this issue?

    Thanks,

    Kelvin

     
    Gravatar
  • Alex 06/08/2010 18:10 PM

    Hi Kelvin,

     

    Test Visualizer is used to capture and compare images that illustrate test steps. It does not deal with object recognition. However, TestComplete 8 includes a lot of improvements, and perhaps, your problem with PowerBuilder controls has been fixed. You can join beta testing and check it yourself. To join the beta, send a request to our Support Team (http://www.automatedqa.com/support/message/).

     

    Best Regards,
    Alex

     

    Leave a comment:

    1.    
       
       
       
       
         
     

    +1 978-236-7900

    © 2012 SmartBear Software. All rights reserved.
    Home | Privacy | Terms of Use | About | Contact Us | Site Map | Print