Saving, Editing and Changing the Data Table in QTP in Testing

Saving the Data Table

The data table contains the values that Quick Test substitutes for data table parameters when you run a test or component as well as any other values or formulas you enter. Whenever you save your test, Quick Test automatically saves its data table as an (.xls) file.

save-test.jpg

When working with tests, the data table is saved with your test by default. You can save the data table in another location and instruct the test to use this data table when running a test. You specify a name and location for the data table in the Resources tab of the Test settings dialog box.

test-setting-dialogbox.jpg

Saving the Data Table in a specified location can be useful in the following circumstances. You want  to run the same test with various sets of input values. For example you can test the localization capabilities of your application by running your test with a different data table file for each language you want to test. You can also vary the user interface strings that you check in each language by using a different environment parameter file each time you run the test.

datatable-location-change.jpg

You need the same input information for different tests.

Editing the Data Table

You can edit information in the data table by typing directly into the table cells. You use the data table in the same way as an Microsoft Excel spreadsheet, including inserting formulas into the cells. You can also import data saved as an Excel sheet tabbed text file (.txt)

Edit-datatable.jpg

Changing a Column Name

You can change the name of a column for a parameter by double-clicking the column heading cell. In the change parameter name dialog box you can type a new parameter name.

change-column-name.jpg


Similar Articles