Assigning test variable values from a dataset by using the Run step
You can assign values from a dataset to test variables by using the Run step. This supports dynamic data substitution during test execution, allowing subsequent steps to use unique and data-driven values.
Before you begin
- Ensured that you are assigned a Team Space Owner, Project Owner, or Member with a Tester role to create or edit a test resource.
- Read and understood the information in Edit branch overview and Create or select an Edit branch.
- Ensured that your project contains a Web UI test or suite.
- Ensured that the required variables have been created and are included in your Web UI test or suite.
- Ensured that your project contains a dataset.
About this task
You can create datasets in Test Hub and assign their values to variables in a test or suite. This process helps you to run data-driven tests consistently with parameters and reduces the need to repeat steps. Dataset values are mapped to variables in a test or suite, to perform flexible data-driven testing across multiple scenarios.
Procedure
-
Click the
button displayed on the Test
Editor page.
The Edit button appears only when no active edit branch is selected.
Alternatively, right-click the test or suite in the test navigator panel and select Edit.
The Edit branch dialog is displayed.If the Edit branch dialog is not displayed, then go to step 3.
- Select an existing branch or create a new branch.
-
Click the Run step to assign the dataset columns to
variables.
The run details pane opens with the Details tab which was the default selection. The variables in the test and suite are displayed in the Inputs section.
- Select an existing dataset in the Dataset field.
-
Click the drop-down icon
in the variable.
The variables in the parent test and column names in the selected datasets are listed. - Select the column in the dataset from which you want to assign the values during test run.
-
Click Close icon
to close the run details pane.
-
Click the Save icon
to save the
modifications.