Editing datasets
After you data-drive a test to create a dataset or create an empty dataset, you can edit the records and variables in the dataset.
About this task
A dataset is a test dataset, a collection of related data records which supplies data values to the variables in a test script during test script playback. A record is a row in a dataset. A variable is a column in a dataset.
You can make the following changes to a dataset:
- Add, remove, move, or edit a row
- Add, remove, move, or edit a column
- Edit or clear cell(s)
- Cut, copy, or paste a cell, row, or column
Selecting a record
About this task
To select a record:
- Click the column number, for example, 0, 1, or 2.
Adding a record
Procedure
- Click anywhere in the dataset editor or select a record,
right-click, and then click Add Record.
The new record appears after the selected record unless you select the first row.
- If you select the first row, click Add Before or Add After to place the new record before or after the first record, and then click OK.
Removing a record
About this task
To remove a record:
- Select a record you want to delete, right-click the selected record, and then click Remove Record.
Moving a record
Procedure
- Select a record, and then right-click Edit Record.
- Click the Index arrow to select
the location where you want to move the record.
For example, select Before 0 to move a record before record 0 or select After 12 to move a record after record 12.
- Click OK.
Editing dataset values
About this task
To edit dataset values:
- Select the cell you want to change, double-click the selected cell, and then type the new value of the cell.
Adding variables
Procedure
- Select a cell or click anywhere in the dataset editor, and then right-click Add Variable.
- In the Add Variable dialog box, type the name of the new variable.
- Type the full class name for the variable.
The system String class is the default.
- Click the Add arrow to select the
location where you want to place the new variable.
For example, select Before NameofVariable to place the new variable to the before an existing variable or select After NameofVariable to place the new variable after an existing variable.
- Click OK.
Removing variables
About this task
To remove a variable:
- Right-click a cell in the variable you want to remove, and then click Remove Variable.
Changing names, types, or move variables
Procedure
- Select a cell in the variable that you want to change.
- Right-click, and then click Edit Variable.
- In the Edit Variable dialog box, double-click or select the name of the variable and then type the new name of the variable.
- Type the full class name for the variable. The system String class is the default.
- Click the Move arrow to select
the location where you want to move the variable.
For example, select Before NameofVariable to move the variable before an existing variable or select After NameofVariable to move the variable after an existing variable in the dataset.
- Click OK.
Cutting, copying or pasting cells, records, or variables
About this task
To cut, copy, or paste a cell, a record, or a variable:
- To delete data in a cell, record, or variable to the clipboard and copy it to the clipboard, select a cell, a record, or a variable, right-click, and then click Cut.
- To paste the contents of the clipboard, select a cell, record, or variable that you want to overwrite with the contents of the clipboard, right-click, and then click Paste.
- To copy a cell, record, or variable to the clipboard, select a cell, a record, or a variable, right-click, and then click Copy.