Attach Data Source Columns to Test Steps
Recording a test scenario allows you to interact with different controls on the page. Depending on these and the action performed against them various steps get recorded in Test Studio test. Most action and verification steps have at least one property, that can be bound to a column from your data source.
Once you have bound a test to a data source, you are ready to continue with binding the recorded steps.
Use the Step Properties
pane to find out which properties can be data driven for a particular step.
Choose a Step Property to Data Bind
Choose an action or verification step from the recorded steps in a test and expand it with double-click.
Use the Data Bind
button to open the Data binding
dialog. It lists all step's fields which you can use for binding.
The Data binding
dialog can be also opened through the step properties. The Bindings
property is the first in the list. Click the three dots button at its right side to open the Data binding
dialog.
Note
Depending on the project layout you are using, theProperties pane
can be on different location within your project.
Some steps allow you to bind more than one property. In such case the Data binding
dialog lists all available fields to data drive.
Data Bind a Step Property
Once you know which step property you need to bind and have attached the required data source, you can select the corresponding column from the attached data. Each property available for binding is associated with a drop-down list where you can find the list of all columns from data source. Choose the column which holds the data for this step field.
Click the OK
button to confirm the selection and close the Data binding
dialog.
Use an Extracted Variable to Data Bind a Test Step
If the test scenario requires some dynamically generated data to be used in the upcoming steps, you can use the option to extract the value of an element during the test run to a "run-time" variable and bind that variable to any property from the upcoming steps.
Use Data Columns Not Directly Bound to the Test
Test Studio allows you to use data, which is not directly referenced in the test. This could be an extracted variable generated in a coded step, or this test is used as step in another test and is set to use the data source of the "parent" test.
For these cases you will need to manually enter the name of the extracted variable, or the parent data source column, which the step property need to access. Open the Data binding
dialog and the dropdown of the property to bind. Type the external variable name in the Add coded data variable
text field. Then, click the curly brackets in front of the text field.
Click the OK
button to confirm the selection and close the Data binding
dialog.