Creating a datapool

Datapools contain data that tests can use when they run.

To create a datapool, do the following.

  1. Open the test perspective.

  2. In the Test Navigator, right-click a Java project and select New > Test Artifact: the New Test Artifact dialog box opens. You can also get to this dialog box from the File > New menu selection.

  3. In the Wizards list box, expand Test Elements and click Datapool.

  4. Click Next: the New Datapool dialog box opens.

  5. In the list of existing Java projects (middle field), click the one in which to store the datapool: its name appears in the Enter or select the parent folder field.

  6. In the File name field, enter the name of the datapool file. The suffix .datapool is required. If you want to create an empty datapool, go directly to the last step. If you want to provide a description for your datapool or initialize it with data contained in an existing CSV file, continue to the next step.

  7. Click Next. A dialog box opens allowing you to describe the datapool.

  8. Click Next. A dialog box opens allowing you to initialize the new datapool with the contents of an existing comma-separated-value (CSV) file.

  9. In the CSV File field, type the name of a CSV file or click Browse to navigate to the file.

  10. The first row of the CSV file may contain column names. If it does, check the box beside First row contains variable names and suggested types. If this box is not checked, columns are named Variable1... You can easily change the names with the datapool editor.

  11. The first column of the CSV file may contain a row name to be indexed starting with 0. For example, if the first column contains the name row, the rows will be indexed row::0, row::1, and so on. If it does, check the box beside First column contains equivalence class names. If this box is not checked, each row is assigned a separate equivalence class (not used for performance testing) named Equivalenceclass1... You can easily change the names with the datapool editor but you cannot easily replace the separate equivalence classes with a single indexed equivalence class.

  12. Click Finish.

The new datapool opens in the datapool editor's Overview tab.


For instructions on how to add data to or edit the new datapool, go to Editing a datapool.

 

Parent topic

Providing tests with variable data
Previous topic: Datapools and performance testing
Next topic: Opening a datapool