About Table Checkpoints

Applies to TestComplete 15.68, last modified on October 16, 2024

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:

Table checkpoint in a keyword test

In scripts, table checkpoints are performed using the Tables.TableCheckpointName.Check method:

JavaScript, JScript

Tables.StoredTable.Check();

Python

Tables.StoredTable.Check()

VBScript

Tables.StoredTable.Check

DelphiScript

Tables.StoredTable.Check;

C++Script, C#Script

Tables["StoredTable"]["Check"]();

Requirements

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:

See requirements

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.

Supported Controls

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.

Unsupported Controls

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.

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 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.Compare and 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. 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 … 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 wItemCount property.

  • To verify a control’s number of columns and rows, create property checkpoints for its wRowCount and wColumnCount properties.

  • To verify that a single cell of a tabular control contains the relevant 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.

Samples

TestComplete includes a sample project that demonstrates how to create table checkpoints:

<TestComplete Samples>\Desktop\Checkpoints\Table

Note: 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.

See Also

Table Checkpoints
Table Checkpoint Operation
Check Method
About Tables Collection

Highlight search results