There is no way to directly update Datatable at runtime and have it retain. The only thing would be to use the datatable import and export function during run time to capture runtime data. There are two options that a user can use to access the runtime data table of a test.
Option 1:
After running the first test, the runtime data table is saved in the Default.xls file located in the results folder. You can specify the location of the result folder at the beginning of the test run. To access the runtime data table of the first test, insert the following line near the beginning of the second test:
DataTable.Import(''Default.xls'')
Option 2:
Instead of accessing the Default.xls file located in the results folder of the first test, you can export the runtime data table to its own location. At the end of the first test insert the following line:
DataTable.Export('''')
You can then access this same runtime data table from a second test by inserting the following line at the beginning of the second test:
DataTable.Import('''')
Example:
In the first test, insert the line below at the end of the test:
DataTable.Export(''C:myExcelFile.xls'')
This will save the runtime data table as myExcelFile.xls, at the root of the C: drive.
In the second test, insert the line below at the beginning of the test:
DataTable.Import(''C:myExcelFile.xls'')
This will import the existing .xls file into the second test.