Importing a Comma-Separated Value (CSV) file as a datapool

Test data in a Comma-Separated Value (CSV) file can be imported into a new or existing datapool. Test data can be created and edited in a Comma-Separated Value (CSV) file editor (for example, Microsoft® Excel®) and imported into a new or existing datapool. This is the recommended approach when working with large quantities of data.

Import test data from a Comma-Separated Value (CSV) file into a new datapool with the Import CSV File as Datapool wizard:

  1. Open the Test Perspective, right-click in the Test Navigator, and select Import....
  2. Select Test > CSV File as Datapool, and click Next.
  3. Provide or select (click Browse...) the path to the Comma-Separated Value (CSV) file.
  4. Select the encoding of the Comma-Separated Value (CSV) file. This encoding is used to read the Comma-Separated Value (CSV) file.
  5. Select First row of the CSV file contains the variable names and optional suggested types if the first row of the Comma-Separated Value (CSV) file contains the variable names and optional suggested types. That is, the first row of the Comma-Separated Value (CSV) file contains:

    <variable 1 name>[::<variable 1 type>],<variable 2 name>[::<variable 2 type>]...<variable n name>[::<variable n type>]


  6. Select First column of the CSV file contains the equivalence class names and optional record numbers if the first column of the Comma-Separated Value (CSV) file contains the equivalence class names and optional record numbers. That is, the first column of the Comma-Separated Value (CSV) file contains:

    <equivalence class 1 name>[::0]

    <equivalence class 2 name>[::1]

    ...

    <equivalence class n name>[::<n>]


  7. Click Next and click Next.
  8. Select the parent folder and define the name of the new datapool.
  9. Click Finish to import test data from the Comma-Separated Value (CSV) file into the new datapool.
  10. The Confirm Open Editor dialog may appear (see the Window > Preferences... > Test > Open Editor preference), confirming if the new datapool is to be opened in the Datapool editor.

Import test data from a Comma-Separated Value (CSV) file into an existing datapool with the Import CSV File as Datapool wizard:

  1. Open the Test Perspective, right-click in the Test Navigator, select Import.
  2. Select Test > CSV File as Datapool, and click Next.
  3. Provide or select (click Browse...) the path to the Comma-Separated Value (CSV) file.
  4. Select the encoding of the Comma-Separated Value (CSV) file. This encoding is used to read the Comma-Separated Value (CSV) file.
  5. Select First row of the CSV file contains the variable names and optional suggested types if the first row of the Comma-Separated Value (CSV) file contains the variable names and optional suggested types. That is, the first row of the Comma-Separated Value (CSV) file contains:

    <variable 1 name>[::<variable 1 type>],<variable 2 name>[::<variable 2 type>]...<variable n name>[::<variable n type>]


  6. Select First column of the CSV file contains the equivalence class names and optional record numbers if the first column of the Comma-Separated Value (CSV) file contains the equivalence class names and optional record numbers. That is, the first column of the Comma-Separated Value (CSV) file contains:

    <equivalence class 1 name>[::0]

    <equivalence class 2 name>[::1]

    ...

    <equivalence class n name>[::<n>]


  7. Click Next.
  8. Select Import into an existing datapool to import the test data from a Comma-Separated Value (CSV) to an existing datapool.
  9. Select an existing datapool from the list of datapools. Select Show folders to show the list of datapools in the workspace project structure. If the selected datapool contains an encrypted variable, provide the password for the selected datapool.
  10. Select Append to existing records to append the test data from a Comma-Separated Value (CSV) to the existing records in the datapool or Replace existing records to replace the existing records in the datapool with the test data from a Comma-Separated Value (CSV).
  11. Click Finish to import test data from the Comma-Separated Value (CSV) file into the existing datapool.
  12. The Confirm Open Editor dialog may appear (see the Window > Preferences... > Test > Open Editor preference), confirming if the existing datapool is to be opened in the Datapool editor.

Related concepts
Datapool Editor

Related tasks
Creating a datapool
Exporting a Datapool as a Comma-Separated Value (CSV) file

Related samples
Tutorial: Accessing a datapool from a TPTP JUnit test