Explain the following TSL functions:

Ddt_open
i. Creates or opens a datatable file so that WinRunner can access it.
Syntax: ddt_open ( data_table_name, mode );
data_table_name The name of the data table. The name may be the table variable name, the Microsoft Excel file or a tabbed text file name, or the full path and file name of the table. The first row in the file contains the names of the parameters. This row is labeled row 0. mode The mode for opening the data table: DDT_MODE_READ (read-only) or DDT_MODE_READWRITE (read or write).
b. Ddt_save
i. Saves the information into a data file.
Syntax: dt_save (data_table_name);
data_table_name The name of the data table. The name may be the table variable name, the Microsoft Excel file or a tabbed text file name, or the full path and file name of the table.
c. Ddt_close
i. Closes a data table file
Syntax: ddt_close ( data_table_name );
data_table_name The name of the data table. The data table is a Microsoft Excel file or a tabbed text file. The first row in the file contains the names of the parameters.
d. Ddt_export
i. Exports the information of one data table file into a different data table file.
Syntax: ddt_export (data_table_namename1, data_table_namename2);
data_table_namename1 The source data table filename.
data_table_namename2 The destination data table filename.
e. Ddt_show
i. Shows or hides the table editor of a specified data table.
Syntax: ddt_show (data_table_name [, show_flag]);
data_table_name The name of the data table. The name may be the table variable name, the Microsoft Excel file or a tabbed text file name, or the full path and file name of the table.
show_flag The value indicating whether the editor should be shown (default=1) or hidden (0).
f. Ddt_get_row_count
i. Retrieves the no. of rows in a data tables
Syntax: ddt_get_row_count (data_table_name, out_rows_count);
data_table_name The name of the data table. The name may be the table variable name, the Microsoft Excel file or a tabbed text file name, or the full path and file name of the table. The first row in the file contains the names of the parameters.
out_rows_count The output variable that stores the total number of rows in the data table.
g. ddt_next_row
i. Changes the active row in a database to the next row
Syntax: ddt_next_row (data_table_name);
data_table_name The name of the data table. The name may be the table variable name, the Microsoft Excel file or a tabbed text file name, or the full path and file name of the table. The first row in the file contains the names of the parameters.
h. ddt_set_row
i. Sets the active row in a data table.
Syntax: ddt_set_row (data_table_name, row);
data_table_name The name of the data table. The name may be the table variable name, the Microsoft Excel file or a tabbed text file name, or the full path and file name of the table. The first row in the file contains the names of the parameters. This row is labeled row 0. row The new active row in the data table.
i. ddt_set_val
i. Sets a value in the current row of the data table
Syntax: ddt_set_val (data_table_name, parameter, value);
data_table_name The name of the data table. The name may be the table variable name, the Microsoft Excel file or a tabbed text file name, or the full path and file name of the table. The first row in the file contains the names of the parameters. This row is labeled row 0.
parameter The name of the column into which the value will be inserted.
value The value to be written into the table.
j. ddt_set_val_by_row
i. Sets a value in a specified row of the data table.
Syntax: ddt_set_val_by_row (data_table_name, row, parameter, value);
data_table_name The name of the data table. The name may be the table variable name, the Microsoft Excel file or a tabbed text file name, or the full path and file name of the table. The first row in the file contains the names of the parameters. This row is labeled row 0.
row The row number in the table. It can be any existing row or the current row number plus 1, which will add a new row to the data table.
parameter The name of the column into which the value will be inserted.
value The value to be written into the table.
k. ddt_get_current_row
i. Retrieves the active row of a data table.Syntax: ddt_get_current_row ( data_table_name, out_row );
data_table_name The name of the data table. The name may be the table variable name, the Microsoft Excel file or a tabbed text file name, or the full path and file name of the table. The first row in the file contains the names of the parameters. This row is labeled row 0.
out_row The output variable that stores the active row in the data table.
l. ddt_is_parameter
i. Returns whether a parameter in a datatable is valid
Syntax: ddt_is_parameter (data_table_name, parameter);
data_table_name The name of the data table. The name may be the table variable name, the Microsoft Excel file or a tabbed text file name, or the full path and file name of the table. The first row in the file contains the names of the parameters.
parameter The parameter name to check in the data table.
m. ddt_get_parameters
i. Returns a list of all parameters in a data table.
Syntax: ddt_get_parameters ( table, params_list, params_num );
table The pathname of the data table.
params_list This out parameter returns the list of all parameters in the data table, separated by tabs.
params_num This out parameter returns the number of parameters in params_list.
n. ddt_val
i. Returns the value of a parameter in the active roe in a data table.
Syntax: ddt_val (data_table_name, parameter);
data_table_name The name of the data table. The name may be the table variable name, the Microsoft Excel file or a tabbed text file name, or the full path and file name of the table. The first row in the file contains the names of the parameters. parameter The name of the parameter in the data table.
o. ddt_val_by_row
i. Returns the value of a parameter in the specified row in a data table.
Syntax: ddt_val_by_row ( data_table_name, row_number, parameter );
data_table_name The name of the data table. The name may be the table variable name, the Microsoft Excel file or a tabbed text file name, or the full path and file name of the table. The first row in the file contains the names of the parameters. This row is labeled row 0.
row_number The number of the row in the data table.
parameter The name of the parameter in the data table.
p. ddt_report_row
i. Reports the active row in a data table to the test results
Syntax: ddt_report_row (data_table_name);
data_table_name The name of the data table. The name may be the table variable name, the Microsoft Excel file or a tabbed text file name, or the full path and file name of the table. The first row in the file contains the names of the parameters. This row is labeled row 0.
q. ddt_update_from_db
i. imports data from a database into a data table. It is inserted into your test script when you select the Import data from a database option in the DataDriver Wizard. When you run your test, this function updates the data table with data from the database.

 

This Question is not yet answered!

 
 

Related Answered Questions

 

Related Open Questions