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 "+" icon from the upper-right corner to insert the row below 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 the 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 the Font size from the upper-right corner.
    2. Select the options Small or Medium or Large from the drop-down menu.
    To set the current row Right-click the row to be set as current row and select Set current row. 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.

    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