< Previous | Next >

Lesson 3.2: Substitute with data pool values

After creating a data pool, you will now substitute the actual value that you used in recording with the ones from the data pool.
By default, at run time, the data pool values are accessed sequentially. You have the option to specify that the test accesses data pool values randomly or in a shuffled manner as well. If you have a long list of data pool values that are used by multiple tests from the same workspace, you can share a data pool.
  1. Open the Calculator test and navigate to the Click Button '+' action.
  2. In the User Action Details area, in the Text field, select and right-click the + operator, and click Substitue > Select Data Source.
  3. In the Select Data Source window, click the Datapool button.
  4. Click Calcdatapool that you created and, from Columns, click Operators.
  5. Click Finish. If you are prompted to substitute for more values, click No. The + operator is highlighted in green indicating that the value will be substituted in the test.
  6. To save the changes, click File > Save.
  7. In the home screen of mobile test client, click Enter passive mode. This action ensures that the mobile test client is in the passive state and test can now be run from test workbench.
  8. In the test editor of test workbench, click Run Test.
The test runs and the first operator from the data pool is used in the test. You can verify this fact in the Mobile and Web UI Report. Note that the other operators from the data pool will be used only after you add the test to a loop that iterates as many number of times as you want. Because you used three operators in the data pool, you will iterate the test thrice.

Lesson checkpoint

You substituted the + operator with the operators from data pool.
< Previous | Next >

Feedback