Parameterization from multi-column data
files is a powerful means of parameterizing data. It defines files in which
specific combinations of string values are stored. Each column in a data
file corresponds to a specific parameter. Multi-column data files enable a
data-driven test model and allow you to cover all user-data input with a single
data file.
-
Choose
.
The
Open dialog box opens.
-
Select a replay database TrueLog and click
OK.
The replay TrueLog opens in
TrueLog Explorer.
-
Click
Customize Input Parameters on the workflow bar.
The
Workflow - Customize Input Parameters dialog box opens.
-
Click
Customize input parameters.
The first API node in the test script that includes input parameters is selected and the
Step through TrueLog dialog box opens with the
Input parameters option button selected.
Note: If you do not want to customize input parameters for the selected node, click
Find Next to advance to the next node that incorporates input parameters.
-
In
Input Parameter or
SQL Command view, right-click an input parameter and choose
Customize Value.
Two methods are available for modifying values in scripts. You can use an existing parameter that has previously been defined
in the
dclparam or
dclrand sections of the BDL script, or you can create a new parameter. New parameters can be created from constant values, random
variables, or variables based on data in multi-column data files.
The
Parameter Wizard - Customize Value dialog box opens.
-
Click the
Parameter from Multi-column Data File option button and click
Next.
The
Parameter Wizard - Parameter from Multi-column Data File page opens.
-
Perform one of the following steps:
-
Right-click columns to edit column names, add/delete rows, or add/delete entire columns.
Note: Each column represents a separate parameter that is assignable to a single input value.
-
Type data into the data fields as appropriate.
Alternatively, you can select column header names directly to customize them.
-
Customize
Handle name or the
Parameter name as required.
-
Click
Next to save the file.
The
Choose the Insert Attribute of the Parameter page opens.
-
In the
Row selection order group box specify the order in which the values from the multi-column data file are to be assigned:
-
In the
Attribute group box, specify the frequency at which new insertions should be inserted.
For example, specify if a new username should be inserted with each transaction or only once per test.
All available user groups and transactions are available from the
Per transaction list boxes.
-
Click
Finish.
TrueLog Explorer modifies the test script and saves the multi-column data file.
Customized input parameters are indicated in green.
Initiate a Try Script run with the random variable function in your test script to confirm that the script runs without error.