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 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
Table checkpoints are available in TestComplete by default.
To be able to create table checkpoints by using optical character recognition for controls that TestComplete does not support directly, the following additional requirements must be met:
How to Create Table Checkpoint
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 specified tabular data and stores it 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.
|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.
If your tested tabular control is not supported by TestComplete, you can still verify its content. TestComplete will extract its data by using optical character recognition (OCR).
How Table Checkpoints Work
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.
Table Checkpoint Results
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.
|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 Table Checkpoints
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.CompareWithObjectscripting 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. If your tested control is not supported by TestComplete and TestComplete cannot access its data by using those properties and methods, you can use optical character recognition to capture the needed data.
To perform the verification, you can create a custom verification procedure that gets control data and then compares it using the
if … then … elsestatement 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:
If you can access individual cells of the table, create a property checkpoint for the control’s
If your control is not supported and you can only use OCR to capture its values, you can create an OCR Checkpoint for that cell. You can also use the
OCR.Recognize.DetectTable.Cellto get the cell and compare its text contents with a baseline value.
Updating Table Checkpoints
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:
|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.