Relevant for: GUI tests and scripted GUI components
When working with tests, the data table is saved with your test by default as an .xls or .xlsx file (or sometimes both). By default, UFT One uses the entered values for the test's data table when running the test.
However, when running a test, you can instruct UFT One to use different data tables/sheets than the ones saved with your test. For example, you can save the entered data table in another location and instruct the test to use this data table when running a test. You can also tell UFT One to use an external saved data table. You specify the data sheet name and location for the data table in the Resources pane of the Test Settings dialog box.
There are different scenarios in which you may need to save or access different data tables:
|When to save or use a data table in a different location
|When to save a run-time data table
If it is important for you to save the resulting data from the run-time data table, you can insert a DataTable.Export statement to the end of your test to export the run-time data table to a file. You can then import the data to the design-time data table using the data table's File > Import from File menu. Alternatively you can add a DataTable.Import statement to the beginning of your test to import the run-time data table that was exported at the end of the previous run session. For more details on these methods, see the DataTable object in the Utility Objects section of the UFT One Object Model Reference for GUI Testing.
|When to save a run-time data table in ALM
When working with ALM, you must save the data table file in the Test Resources module in your ALM project before you specify the data table file in the Resources pane of the Test Settings dialog box.
You can add a new or existing data table file to your ALM project. Note that adding an existing data table file from the file system to an ALM project creates a copy of the file. Thus, once you save the file to the project, changes made to the ALM data table file will not affect the data table file in the file system and vice versa.