Lesson 7: Associating a dataset with a test
You can learn about associating a dataset with a recorded test to add actual data to the test during the playback. The associated dataset is accessed during the playback of the test and the actual data in the test is substituted with the variable data in the dataset.
Before you begin
You must have completed the following tasks:
- Created a dataset. See Lesson 6: Creating a dataset.
- Ensured that the wiki-search-animals test is displayed in the Test Contents panel of the test editor window. See Lesson 5: Splitting actions in a test.
About this task
For the test scenario in this tutorial, you can associate the AnimalsDataset dataset with the wiki-search-animals test.
Procedure
-
Select the Enter value 'Elephant' in Search field action in the
wiki-search-animals test.
The details of the selected action are displayed in the User Action Details panel.
-
Right-click Elephant in the Value field, and
then click .
The Test Editor - Select Data Source dialog is displayed.
-
Click Yes to display all the matching strings in the test that
you can use as a data source to substitute the value of Elephant in the
Value field.
The Select Data Source dialog is displayed.
-
Click the Add Dataset icon .
The Select dataset column dialog is displayed.
-
Select AnimalsDataset.csv in the Available
Datasets panel, and then select Column1 in the
Columns panel.
-
Click Finish.
The AnimalsDataset dataset is displayed in the Select Data Source dialog.
-
Ensure that AnimalsDataset dataset is selected, and then click
Select.
The Test Editor - Find and Substitute dialog is displayed to confirm whether you want to view more substitutable locations in the test.
-
Click Cancel.
The color of Elephant in the Value field of the User Actions Details panel changes to green. The change indicates that the selected dataset is successfully associated with the field.
- Press Ctrl+S to save the changes.