New to Telerik Test Studio? Download free 30-day trial

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, there are various steps recorded in Test Studio. 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 proceed 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. Then open its properties. The Bindings property is the first in the list. Click the three dots button at its right side to open the fields for this step, which can be bound to use data values.

open-step-properties

Note

Depending on the project layout you are using, the Properties pane can be on different location within your project.

There are steps for which you can data bind more than one property. In such case the drop-down list will contain all available options to data drive.

bindings-dropdown

Data Bind a Step Property

Once you have identified the step property to bind and prepared a data source accordingly, you can select the corresponding column from the attached data. In the drop-down next to each of the properties available for binding, you will see a list of all columns from data source.

data-columns-dropdown

To confirm the selection and close the Properties pane, click the Set button.

set-button

Use an Extracted Variable to Data Bind a Test Step

If the test scenario requires some dynamically generated data to be used in the following 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.

bind-extracted-variable

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 dropdown of the property to bind and type the necessary value in the Add coded data variable text field. Then, click the curly brackets in front of the text field.

external-variable

To confirm the selection and close the Properties pane, click the Set button.

external-variable-set-button

In this article
Not finding the help you need? Improve this article