Bind Test to a Data Source

Now that you have added a data source definition to your test project, you are ready to bind your test to that data source. Click the Bind test to data source button.

Bind test to data source

The Bind test to data source dialog opens:

Bind test to data source

Click the Select DataSource dropdown and choose the data source you just defined in the previous section. If your source is an Excel spreadsheet, choose which sheet from the spreadsheet to use. Once you select a sheet, the data from that sheet will be read and displayed in the dialog. Note that the first row of the excel spreadsheet is used to define the column names.

Select Data Source

Check the Filter data between rows box under the Configure section to adjust which rows from the data source to use:

  • If left unchecked, all data rows will be used during the test run.
  • To define which rows to use, check that box and select which rows you want to use by clicking the numeric up/down counters, and then Update to apply changes.

filter data filter data

To be able to bind an Excel file you must have Microsoft Office installation on this machine or Microsoft Data Connectivity Components (x86 redistributable).

If your source is a SQL database, you have the option of using T-SQL to select the data you want. Using T-SQL, you can get as complex as you need in your SQL select statement. For example:

SQL database

After entering your select statement, click Update to test and display the selected data in the Preview table.

Click OK to bind this data source to your test.

Remove Data Binding

To remove the external data source associated with a test, open the test and click the down arrow of the Bind test to data source button and click on Unbind.

Remove Data Binding

After you have configured the test to use a data source you can attach the data columns to an input value or a verification.

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