Datapool structure

Datapools provide variable data to your tests during execution. You can add Variables (columns), Records (rows) and Equivalence Classes (groups of related Records), to define a datapool's structure. This section describes these structural elements. For information about populating a datapool and using the datapool API, see Tutorial: Creating a datapool driven JUnit test application.

Performance testing example

Performance tests are based on user emulation. During a session with the application-under-test, the tester uses a feature that real customers will use, and from the recorded session a test is generated containing the exact data that the tester entered. For example, to create a performance test for a dialog in a web-based shopping application that prompts a shopper for an account number, the tester engages the dialog by selecting an item that is offered for sale, clicking a "pay now" button, and entering an account number. During playback of the test, in which the tester might request that hundreds of instances of the transaction be run simultaneously, it is desirable that different account numbers (perhaps a combination of valid and invalid numbers) are used for each of the instances. To supply variable data for tests to use during playback, the tester creates datapools.

Structural elements.

Datapools contain three structural elements

As shown in the following figure, the datapool editor is a grid similar to a spreadsheet. Right-clicking on the grid opens the pop-up menu that you use to add or maintain the datapool structural elements described above. You add data by typing in a cell.

When you create a datapool, you have the option of initializing the new datapool with data contained in an existing comma-separated value text file (CSV) that you created with a spreadsheet editor or with some external or custom tool. For datapools containing large amounts of data, this approach is recommended. The datapool editor is suitable for entering small amounts of data and modifying individual records but provides no means of generating large amounts of typed data.

Related concepts
Tutorial: Creating a datapool driven JUnit test application

(C) Copyright IBM Corporation 2000, 2006. All Rights Reserved.