Dataset editing

You can add, modify, or remove data from a dataset by using the CSV Editor. The working principle of the CSV Editor is similar to that of a spreadsheet.

If you are a project Owner or Tester in Rational® Test Automation Server V10.1.0 or later, you can use the CSV Editor to view and edit data in the dataset. From the Datasets page, you can click the Edit icon edit_ds_icon from the Actions column of the dataset to open the dataset in the CSV Editor in a web browser.

After you edit the dataset, you can publish the dataset to the Git repository or you can save the changes made to the dataset. If you save and close the edited dataset, the Changes page lists the edited dataset, and then later you can publish to the Git repository for other members to use. For any reason, if you want to discard the changes that you made to the dataset, you can click the Menu icon menu_icon and then select Discard.

Basic tasks in CSV Editor

When you want to run a test asset with different dataset values, you can either edit the existing dataset or create a new dataset and use it during the test asset run. When the number of edits is minimal, it is easier to edit the dataset within the CSV Editor.

You can perform basic tasks in the CSV Editor by right-clicking any row, column, or cell in the dataset to organize your data in a better way. For example, you can perform tasks such as updating data in a cell, inserting or deleting rows and columns, or renaming column names.

When you edit the dataset in the CSV Editor, you can use the following keyboard shortcuts to control the cursor selection in the CSV Editor:
  • Tab - To move the cursor control to the next available option.

  • Shift-Tab – To move the cursor control to the previous option.

  • Shift+F10 – To open the context menu from the dataset cell.

Note:

You cannot resize the width of rows in the CSV Editor. When you have a large amount of data in a cell, you can right-click the cell and select Copy (or Ctrl+C), and then paste it into a text-editing program to view the content. Alternatively, you can hover the mouse over the cell to view the content.

Set current row in the dataset

During the test run, if you want variable data to be selected from a current row instead of the first row in a dataset, you can right-click any cell in a row and select Set as current row. Also, you can set the current row from the Datasets page by clicking Menu, and then the Configure option.

If you delete any row between row 1 to current row, the current row data is taken from the next row. For example, when you set the current row as 6, and then you delete any row between row 1 to row 6, the current row remains at row 6, but the content of row 7 is moved to row 6.

Similarly, if you insert any new row between row 1 to the current row, the current row data is taken from the previous row. For example, when you set the current row as 6, and then you insert any row between row 1 to row 6, the current row remains at row 6, but the content of row 5 is moved to row 6.

Configure row and column settings

In the Configure Dataset window, you can change the row and column settings and configure the string values in a dataset that contains variable data for tests to use when they run. You can click Menu, and then Configure option to configure row and column settings

You can change the Column header and Data start point values by using the up-down control buttons. You can enter a string value in the Treat as null and Treat as empty fields to treat the entered value as null or empty during a test run.

If a dataset contains any blank cells, the value of those blank cells is interpreted as null when you select the Treat empty text as null field checkbox.

Content search by using Find and Replace option

When you have a large set of data in a dataset, you might want to find a specific word and replace the word with a new word in the dataset. You can do this task by using the Find and Replace find_replace_icon option. You can search the content and replace with new content more effectively by selecting any of the following options:
  • Case sensitive - To search the content that matches the letter case of the content entered in the Find field.

  • Match entire cell contents - To search for cells that contain only the characters that you entered in the Find field.

  • Search using regular expression – To search the pattern that matches strings.

    For example, to search a cell that contains any number between 0 to 9, you can enter \d in the Find field, select the Search using regular expression checkbox, and then click Find.

You can replace the individual instances by clicking Replace and replace every instance of the content throughout the dataset by clicking Replace All.

Undo and redo actions

While editing a dataset, if you want to revert the changes made to the dataset, you can use the Undo undo_icon option. Similarly, you can redo the action in the dataset by using the Redo redo_icon option. You can use the undo and redo options even after you saved the dataset for all the actions performed in the dataset.