Managing datasets

You can add, modify, or remove data from a dataset similar to the way you work with a spreadsheet using the Dataset CSV Editor. If you created dataset using HCL OneTest™ Data, you can update the data at the click of a button or update it automatically for every test run.

About this task

Starting from 9.5, by default, all the datasets are opened in a browser-based CSV editor. If you want to open in any other method, you can right-click the dataset and choose Open With. If your dataset changes are extensive, it might be easier to delete the dataset, enter the revised data into a CSV file, and then import the data into a new dataset. If your changes are minor, it is easier to edit the dataset.

To have seamless access to a dataset CSV editor use any one of the following web browsers on Windows or Linux or Mac operating systems:
  • Mozilla Firefox
  • Google Chrome
  • Internet Explorer
  • Microsoft Edge

Since the dataset war file always launches using Java, you must install the JDK 1.8 and set the environment variable CLASSPATH and point it to the bin directory.

Java classpath
Note:

When you open the CSV editor, an error message is displayed, if you have not set the CLASSPATH environment variable.

Server error

Procedure

  1. To edit the data in the CSV editor, double-click the dataset in the Test Navigator:
    Option Description
    To change the data in a cell Click the cell and type the data just like you would do in a spreadsheet.
    To add a row Right-click the cell or row and select Insert row above or Insert row below depending upon your requirement. You can also click the + plus_icon icon in the upper right side of the screen to insert the row under the current selection.
    To remove a row Right-click the cell or row to be deleted and select Delete row.
    To add a column Right-click the cell or column and select Insert column left or Insert column right depending upon your requirement.
    To change a column name Double-click the column header and type the correct name.
    To remove a column Right-click the cell or column to be deleted and select Delete column.
    To go to a specific cell
    1. Click Go to from the upper-right corner.
    2. Enter the row number in the Row field and column number in the Col field.
    3. Click Go.
    To change the font size
    1. Click Font size from the upper-right corner.
    2. Select the options Small or Medium or Large from the drop-down menu.
    To change data configuration settings In Data configuration settings, 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.
    1. Click the Settings Dataset Settings icon in the upper right side of the page.
    2. Configure the following options in the Data configuration settings window:
      • Column header: To change the column header, use an up-down control button to increment or decrement the value.
      • Data start point: To change the data starting pointer, use an up-down control button to increment or decrement the value.
      • Current row: To set the current row, use an up-down control button to increment or decrement the value. You can also see the Current row number on the upper-right side.
        Note:

        The current row will be moved to next row if you delete the current row. The data in the current row is saved if you add or delete any rows that are before the current row.

        For example, if you set the current row as 6 and inserting any row between 1 to 5 will move the current row number up to 7. Similarly, the current row will be moved down to 5 if any of those rows are deleted.

      • Treat empty text as null: If a dataset contains any blank cells, the value of those blank cells is interpreted as null when you select this field.
      • Treat as null: Enter a string value that is to be treated as null when running test.
      • Treat as empty: Enter a string value that is to be treated as empty when running test.
    3. Click Save.
      Note: Changing the Column header and Data start point value saves the updates made to the dataset.
    To import CSV files into a dataset
    1. Click Import and choose the CSV file.
    2. Choose the following options in the Import pop-up window:
      • Click Append to add rows and columns from the selected CSV file to the end of the dataset.
      • Click Overwrite to add the rows and columns from the selected CSV file from the beginning of the dataset.
    3. Click Save.
  2. To update the data that was generated from HCL OneTest Data, in the Test editor, ensure that the Common Options category is selected, and click Dataset Properties.
    1. To update the data once, click Update dataset. The Update dataset content with HCL OneTest Data dialog box would display the new set of data. Click OK.
    2. To update the data automatically for every run, select the Update dataset during deployment check box.
  3. Click Save and close the CSV editor browser.
  4. Optional: Click Discard changes to discard the updates made to the dataset.
Feedback