pkimmel's avatar
pkimmel
Occasional Contributor
7 years ago
Status:
New Idea

Add "Save" and "Import" methods for Stored Tables to allow a script to add Tables to Projects.

Requested Features:

A “Save” method for Stored Tables, similar to the Objects.Save method.

An “Import” method for Stored Tables to add a saved table to a new Project

Reasons for Request:

Although the Table Wizard is useful for adding individual tables to a TestComplete project, some tests require hundreds of configurations and associated tables of information. The ability to generate and name these stored tables using a script would significantly reduce the work needed to set up for such tests.

If a new version of a tested application changes the hierarchy of the application, the aliases for the tables will change. The new “Save” method can save the tables from the original version of the application in a separate location with a revised alias. The new “Import” method can pull the saved tables into a new TestComplete Project to test the new version of the application. This would allow the test script to compare baseline data from the previous version with the data displayed by the new version of the application.

Description of the Save Method

Tables.Save (Table, Name, Alias, OutputDirectory, AddToCollection)

Parameter Descriptions

This method has the following parameters:

Table - The displayed table object whose values you want to save. (Required)

Name - Unique name of the Tables collection item to which you want to store the values. If the item already exists, it will be overwritten. (Required)

Alias - If blank, the alias of the displayed table object will be used.  

OutputDirectory The path to the directory where the Table will be saved. If blank, the Table will be added to the Tables Collection and stored in the <ProjectFolder>\Stores\Tables folder.

AddToCollection – If True, adds the Table to the Tables Collection for the current project. If False, the Table can be saved with a changed alias for use in a new version of the application without being added to the Table Collection of the current project. The default is True.

Result Value

The method returns True if the Table’s values were stored successfully, and False otherwise.

 

Description of Import Method

Tables.Import(Name, InputDirectory)

Parameters

This method has the following parameters:

Name - The name of a saved Table. If a Table of this name already exists in the Project it will be overwritten. (Required)

InputDirectoryThe path to the directory where the Table exists. If blank, the Table will be added to the Tables collection and stored in the <ProjectFolder>\Stores\Tables folder.

Result Value

The method returns True if the Table was added to the Tables collection, and False otherwise.

No CommentsBe the first to comment