< Previous | Next >

Lesson 3.1: Creating a data pool

When you record a test, you perform a sequence of steps that you expect a typical user to perform. From the recording, a test is generated that exactly captures these interactions. When you run this test, it uses the same data that you used during recording. To vary the data in the test, you use a data pool, which contains variable data. At run time, this variable data is substituted for the data in the recorded test.
In the previous lesson, you recorded a test by adding two integers (8 + 4). Now, you will create a data pool that has the -,*,/ operators and use the data pool in the test. In the data pool, you will have two columns and three rows. The first column will contain the operators and the second column will contain the result of the mathematical operation. At run time, the test will dynamically substitute the + operator with the ones from the first column in the data pool. In a succeeding lesson, the test will also use the second column to verify the recorded results.

To create a data pool:

  1. In the Test Navigator view, right-click myAndProj and click New > Datapool.
  2. In Name, type Calcdata pool and click Next.
  3. In Variables (or columns), type 2.
  4. In Records (or rows), type 3 and click Finish.
    New data pool
  5. In the data pool editor, click Variable1:String and change the column name to Operators. Similarly, click Variable2:String and change the column name to Results.
  6. Click each cell and enter data so that your data pool looks like this:
    data pool editor
  7. Click File > Save to save the data pool.

Lesson checkpoint

You created a data pool and added data to it.
< Previous | Next >

Feedback