About Object Checkpoints

Applies to TestComplete 15.62, last modified on March 19, 2024
Object checkpoints are deprecated. We do not recommend using them. Use property checkpoints instead.

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:

Object checkpoint in a keyword test

In scripts, object checkpoints are performed using the Objects.CheckpointName.Check method:

JavaScript, JScript

Objects.wndNotepad.Check(Sys.Process("notepad").Window("Notepad", "*").Window("Edit"));

Python

Objects.wndNotepad.Check(Sys.Process("notepad").Window("Notepad", "*").Window("Edit"))

VBScript

Call Objects.wndNotepad.Check(Sys.Process("notepad").Window("Notepad", "*").Window("Edit"))

DelphiScript

Objects.wndNotepad.Check(Sys.Process('notepad').Window('Notepad', '*').Window('Edit'));

C++Script, C#Script

Objects["wndNotepad"]["Check"](Sys["Process"]("notepad")["Window"]("Notepad", "*")["Window"]("Edit"));

How to Create Object Checkpoints

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.

How Object Checkpoints Work

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.

The checkpoint works with unmapped child objects, that is, the hierarchy of child objects it checks is the actual hierarchy (you see it in the Object Browser), rather than the hierarchy you see in the NameMapping editor.

Object Checkpoint 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 Details panel displays a table containing properties that fail verification with their actual and expected values.

Object checkpoint results
Note: 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.

Alternatives to Object Checkpoints

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.

Updating 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.

See Also

Object Checkpoints
Object Checkpoint Operation
Check Method
About Objects Collection
About Property Checkpoints

Highlight search results