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:
- Open the
Test Perspective, right-click in the
Test Navigator, and select Import....
- Select Test > CSV File as Datapool, and click Next.
- Provide or select (click Browse...) the path to the Comma-Separated Value (CSV) file.
- Select the encoding of the Comma-Separated Value (CSV) file. This encoding is used to read the Comma-Separated Value (CSV) file.
- 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>]
- 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>]
- Click Next and click Next.
- Select the parent folder and define the name of the new datapool.
- Click Finish to import test data from the Comma-Separated Value (CSV) file into the new datapool.
- 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:
- Open the
Test Perspective, right-click in the
Test Navigator, select Import.
- Select Test > CSV File as Datapool, and click Next.
- Provide or select (click Browse...) the path to the Comma-Separated Value (CSV) file.
- Select the encoding of the Comma-Separated Value (CSV) file. This encoding is used to read the Comma-Separated Value (CSV) file.
- 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>]
- 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>]
- Click Next.
- Select Append to an existing datapool to append the test data imported from a Comma-Separated Value (CSV) to an existing datapool.
- Select an existing datapool from the list of datapool. 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.
- Click Finish to import test data from the Comma-Separated Value (CSV) file into the existing datapool.
- 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