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 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 projects (middle field), click the one in which to store the datapool: its name appears in the Enter or select the parent folder field. You can store datapools in any kind of project (Java, Simple, etc.). Datapools need not be stored with the tests that use them.
  6. In the Name field, enter the name of the datapool file. 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. If you do not want to do this, go to the last step.
  9. In the CSV File field, type the name of a CSV file or click Browse to navigate to the file.
  10. If the data in the CSV file is encoded differently from what the local computer expects, select the encoding from the Import Encoding pull-down.
  11. The first row of the CSV file can 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, Variablen ... You can easily change the names with the datapool editor.
  12. The first column of the CSV file can contain an equivalence class name rather than data. For example, if the first column contains the name row, all of the data will be created in the equivalence class named row. If the first column contains an equivalence class name rather than data, check the box beside First column contains equivalence class names. If this box is not checked, each row is added to the default equivalence class named EquivalenceClass1.
  13. Click Finish.
The new datapool opens in the first equivalence class tab (EquivalenceClass1 by default). For instructions on how to add data to or edit the new datapool, go to Editing a datapool.
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.