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

Creating a datapool

Datapools provide variable test data to tests during execution. Test data (for example, input and output data) is stored in a datapool and substituted in the test during execution. Test data can be added, modified, and deleted from the datapool and substituted in the test during execution without any modifications to the test.

Datapools contain three structural elements:

  • Equivalence class: A subset of related test data in the datapool with an associated name that produces the equivalent pass/fail result for a test. A datapool contains at least one equivalence class.


  • Variable: A column of test data within each equivalence class with an associated name and type.


  • Record: A slice or row of test data within an equivalence class with one or more variables.

Datapools are created with the New Datapool wizard:

  1. Open the Test Perspective, right-click in the Test Navigator, select New > Test Element... > Test Assets > Datapool, and click Next.
  2. Select the parent folder and define the name of the datapool and click Next.
  3. Provide a description for the datapool.
  4. Provide the dimensions for the datapool. The dimensions represent the number of variables (or columns) and records (or rows) in each equivalence class of the datapool.
  5. 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. When working with large quantities of data, this approach is recommended. To import test data from a Comma-Separated Value (CSV) file into the datapool, select Import CSV file into the new datapool:
    • 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>]


  6. Click Finish to create the datapool.
  7. 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.

Related concepts
Datapool Editor

Related tasks
Importing a Comma-Separated Value (CSV) file as 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