On Windows 10, Windows 8, Windows 7, Windows Vista, Windows Server 2008 and 2012, TestComplete samples are located in the <Users>\Public\Public Documents\TestComplete 12 Samples folder.
On earlier operating systems, the samples reside in the <Documents and Settings>\All Users\Shared Documents\TestComplete 12 Samples folder.
Some file managers display the Public Documents and Shared Documents folders as Documents.
An object checkpoint is a test operation that verifies that an object’s properties contain expected values. For example, it can verify that a control in your application under test is enabled, visible on screen and located at the specified position.
In keyword tests, object checkpoints are performed using the Object Checkpoint operation:
In scripts, object checkpoints are performed using the
You can add object checkpoints to your tests during the test recording and at design time. TestComplete provides the Object Checkpoint wizard that assists you in creating and configuring object checkpoints. For detailed instructions on how to use the wizard to insert checkpoints in your tests, see Creating Object Checkpoints.
When you create an object checkpoint, TestComplete stores collection of the object’s properties with their values and, optionally, collections of its child objects’ properties with their values to the project’s Stores | Objects collection.
An object checkpoint takes only one parameter - the name of the object whose properties you want to verify. Properties to be verified and baseline values to be used for comparison are specified by the Stores | Objects collection used by the checkpoint.
When you run your test, the object checkpoint obtains the specified object in your application (this object must exist at that moment), checks its actual property values and its child objects’ property values against expected values stored in the Objects collection and reports results.
During the test run, object checkpoints check actual values of object properties against stored values and post check results to the test log. If the objects are identical (if the Store data of the selected object and its children option was enabled, TestComplete also checks all child objects), the checkpoint returns True and posts a successful checkpoint message () to the test log.
Otherwise, the checkpoint returns False and posts an error message () to the test log. The Additional Info panel displays a table containing properties that fail verification with their actual and expected values.
|Note:||If you want 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.|
In addition to object checkpoints, you can use the following approaches to verify object properties:
Create a custom verification procedure that obtains the desired object and its properties and compares them with expected values.
Use the Objects.Compare method. The method is similar to object checkpoints, but it posts less detailed output to the test log.
|Note:||To verify a single property, use property checkpoints.|
For more information, see Alternatives to Object Checkpoints.
If an object under test whose properties you verify has been modified in your application under test, your object checkpoint may fail. In order for the checkpoint to be passed successfully, update the collection of baseline values stored in the project’s Stores | Objects collection.
For information on how to do this, see Updating Object Checkpoints.
TestComplete includes a sample project that demonstrates how to create object checkpoints: