TestComplete samples (both built-in and additional) are located in the <Users>\Public\Public Documents\TestComplete 15 Samples folder.
Some file managers display the Public Documents folder as Documents.
A region checkpoint is a test operation that verifies that an application’s window or control or an arbitrary area inside an application’s window or control is displayed correctly. Verification is done by comparing the actual image of the window, control or area in your application with the baseline image stored in your test project.
In keyword tests, region checkpoints are performed using the Region Checkpoint operation:
In scripts, region checkpoints are performed using the
How a Region Checkpoint Works
When you run a test, TestComplete captures an image of the specified window or control in your application (the corresponding window or control must exist in your application at that moment), checks the captured image against the stored baseline image (by performing pixel-by-pixel comparison) and reports the results.
For detailed information on how image comparison in TestComplete works, see How Image Comparison Works. For information on factors that may affect verification results, see Factors Affecting Image Comparison.
How to Create Region Checkpoints
You can add region checkpoints to your test during the test recording and at design time.
TestComplete provides the Checkpoint wizard that guides you through the creation and configuration of region checkpoints. For detailed instructions on using the wizard, see Creating Region Checkpoints.
When you create a region checkpoint, TestComplete captures an image of the specified control or window in your application and stores the image to the project’s Stores > Regions collection. This image will be used as a baseline image during the test run.
Region Checkpoint Results
During the test run, region checkpoints perform a pixel-by-pixel comparison of actual images of objects and areas in the application under test with baseline images.
If images match, the checkpoint logs a success message. Otherwise, it logs an error message.
The Details panel of the test log reports differences (in size, color or pixels) found between images.
The Picture panel of the test log displays the expected and the actual images.
On the Picture panel, you can activate the comparison mode to see the difference between the expected and the actual images easily. For more information on working with the panel, see Generic Test Log - Picture Panel.
|To change the type of the message posted to the test log on verification failure or customize the log message of the checkpoints, use one of the alternative approaches described below.
Region Checkpoint Alternatives
In addition to region checkpoints, to compare images and find one image within another, you can use the following approaches:
Use the Compare Pictures operation to compare images in keyword tests.
Using these operations and methods, you can work with images stored in the project’s Stored > Regions collection, images loaded from external files and arbitrary images to which you obtain scripting access in your tests.
TestComplete includes a sample project that demonstrates how to create region checkpoints:
|If you do not have the sample, download the TestComplete Samples installation package from the support.smartbear.com/testcomplete/downloads/samples page of our website and run it.