Lesson 6: Abstracting data by using a datapool

When you record a test, you perform a sequence of steps that you expect a user to perform. When you run this test, it uses the same data that you used during recording. However, in a real-life scenario, although a user might follow the same steps, the data that they enter into the application might be different at different point of time. 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 actual data in the recorded test.

About this task

For this tutorial, you recorded a test in which you searched for ‘Rational Test Workbench’ and saw pricing. Now, you will create a datapool that will consist of Rational Functional Tester, Rational Quality Manager, and Rational Team Concert. When you run the test, it will also search for these products.

Procedure

To create a datapool:

  1. In the Test Navigator view, right-click myProj and click myProj > New > Datapool
  2. In Name, type ProductsDatapool and click Next.
  3. In Variables (or columns), type 1 for product name.
  4. In Records (or rows), type 3 and click Finish. You entered 3 because your datapool will contain three products in three rows.
  5. You are asked whether to open the datapool editor. Click Yes.
  6. In the datapool editor, click Variable1:String and change the column name to ProductName.
  7. Click each cell and enter data so that your datapool looks like this:datapool
  8. Press Ctrl + S to save the changes.

Results

After creating datapool, you must associate it to the test so that you can substitute the recorded values with the values from data pool.

Feedback