Setting Up a Data Source

Before you can run a data-driven test case you must set up a file that contains the tables, which are called worksheets in Microsoft Excel (Excel), and the columns that you want to use. The tables do not have to be populated with data, but it might help to have at least one complete record filled out.

  1. Open one of the data sources for data-driven test cases, for example Excel.
  2. Name at least one table, or worksheet if you are using Excel, and create column names for the table.
  3. Save the data source.

Example

The Excel file TestExcel.xls can be used as a data source for a data-driven test case and includes the three worksheets Products, Customers, and CreditCards. The Customers worksheet includes the columns Customer, Name, Address, and so on.

image\ms_excel_setting_up_datasource.gif