TestComplete samples (both built-in and additional) are located in the <Users>\Public\Public Documents\TestComplete 14 Samples folder.
Some file managers display the Public Documents folder as Documents.
A table checkpoint is a test operation that verifies that a control displaying information in the tabular form contains relevant data. This verification is done by comparing the control’s actual contents with the baseline data stored in your project.
You can use table checkpoints to verify all data contained in specified controls or verify separate rows and columns of the specified control.
In keyword tests, table checkpoints are performed using the Table Checkpoint operation:
In scripts, table checkpoints are performed using the
You can add table checkpoints to your tests during the test recording and at design time. TestComplete provides the Table Checkpoint wizard that guides you through the process of creating and modifying table checkpoints. For detailed instructions on using the wizard, see Creating Table Checkpoints.
When you create a table checkpoint, TestComplete retrieves the data of the selected control and stores the data in a Table element of the project’s Stores | Tables collection. This data will be used as the expected data during the verification. The name of the object to be verified is also stored by the Table element’s settings.
You can use table checkpoints to verify data of a wide range of standard Windows and third-party controls that display their data in the tabular form. For the complete list of supported controls, see Supported Controls.
|Note:||For VCL and CLX controls, you must recompile your application with debug information included. Otherwise, TestComplete will not be able to access internal objects, methods and properties of controls under test.|
When you run the test, the table checkpoint obtains the specified control in your application (the control must exist at the moment), retrieves the actual data contained in the control, checks the actual data against the baseline data stored in the project and reports results.
For detailed information on how the table verification procedure works, see How the Table Verification Works.
During the test run, table checkpoints check the actual data of the control against the baseline data stored in your project.
If the actual and the expected data are equal, the checkpoint posts a success message to the test log.
Otherwise, the checkpoint posts an error message to the test log. The Details panel reports all differences found during the verification.
|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.|
In addition to table checkpoints, to verify controls that display data in the tabular form, you can use the following approaches:
To check the actual control’s data against data stored in a Table element, use the
Tables.TableName.CompareWithObject scripting methods. These methods are similar to table checkpoints but allow you to specify whether to report differences found when comparing and what kind of message (an error, warning, informative message or no message at all) will be posted if the comparison fails.
TestComplete provides special scripting methods and properties that let you retrieve data from the most popular controls. To perform the verification, you can create a custom verification procedure that uses those methods and properties to obtain control data and then compare them using the
if … then … else statement and comparison operations.
To verify the number of items that a list-based control contains, create a property checkpoint for the control’s
To verify a control’s number of columns and rows, create property checkpoints for its
To verify that a single cell of a tabular control contains the relevant value, create a property checkpoint for the control’s
wValue(Row, Column) property.
If your table checkpoint fails because the actual data of the control has been modified in your application, in order for the checkpoint to be passed successfully, update its baseline data.
For information on how to do this, see Updating Table Checkpoints.
TestComplete includes a sample project that demonstrates how to create table checkpoints:
|Note:||If you do not have the sample, download the TestComplete Samples installation package from the https://support.smartbear.com/downloads/testcomplete/samples/ page of our website and run it.|