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 property checkpoint is a test operation that verifies that an object property has the expected value in the tested application. For example, it verifies the text in a text box or the state of a check box. This helps you check whether your tested application works correctly.
In keyword tests, property checkpoints are performed using the Property Checkpoint operation:
In scripts, property checkpoints are performed using the
aqObject.CheckProperty(Aliases.Orders.MainForm.OrdersView, "wItem(5, 0)", cmpContains, "Mark Twain")
How a Property Checkpoint Works
When you run a test, TestComplete reads the current value of the specified property of the tested object (this object must exist in the application at that moment), compares it with the expected value and reports the result. Besides the "equals" check, property checkpoints let you perform "not equals", "greater than", "less than", "contains" and other kinds of checks. String values can be compared in case-sensitive and case-insensitive modes.
Property checkpoints can only be used for verifying simple values: strings, numbers, boolean values, dates and so on. They cannot check complex values, such as objects or arrays.
|If an object has a property or method that returns a
To verify complex values, use one of the alternative approaches described below.
How to Create Property Checkpoints
You can add property checkpoints to your test during test recording and at design time. You can create property checkpoints by using the Create Checkpoint wizard, or you can create Quick Checkpoints. For detailed instructions, see Creating Property Checkpoints.
During the test run, property checkpoints compare the actual and expected property values and post the comparison results to the test log. If the property values match, the checkpoint logs a success message; otherwise, it logs an error message. The Details panel displays the checkpoint parameters and the difference between the expected and actual property values (if any).
If you want to customize log messages of property checkpoints, use one of the alternative comparison approaches described below. For example, perform comparison using the
if … then … else statement and comparison operators and post the success and failure log messages from the
else branches, respectively.
Property Checkpoint Alternatives
In addition to property checkpoints for property verification, you can use one of the following approaches:
To compare the actual and expected property values, use the
if … then … elsestatement and comparison operators such as =, >, >=, <, <= and so on. This way, you can implement custom verification logic and post custom success and failure messages to the test log.
Updating Property Checkpoints
If a tested object whose property you want to verify has been modified in your application under test, your property checkpoint may fail. In order for the checkpoint to be passed successfully, update your checkpoint data. For information on how to do this, see Updating Property Checkpoints.
TestComplete includes a sample test project that demonstrates how to use property checkpoints in tests:
|If you do not have the sample, download the TestComplete Samples installation package from the https://support.smartbear.com/testcomplete/downloads/samples/ page of our website and run it.