Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Eclipse Application Testing Guide
Previous Page Home Next Page

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 Append to an existing datapool to append the test data imported from a Comma-Separated Value (CSV) to an existing datapool.
  9. 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.
  10. Click Finish to import test data from the Comma-Separated Value (CSV) file into the existing datapool.
  11. 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


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire