Data from an external source can be imported into a new or existing dataset. To open the data Import dataset wizard, click the Import button (a).

Select a data source

First, select a data source. The supported data sources are Excel files, CSV/Text files, or SQL Server queries. Then Click Next

Text/CSV file

  1. Browse for or provide a path to the CSV/text file.
  2. Type the delimiter character that will separate the columns. For instance, if the text file is a .csv, then the ',' should be the delimiter.
  3. Check the First line has column headings if the first row contains column headings. 
  4. Click Next to continue.

Special Characters

  • Special characters can be included in the dataset CSV/text file using URL encoding. To insert a character with hexadecimal code XX, add the %XX sequence to the file. In rare cases, when %XX should be interpreted as a 3-character string, URL-encode the percent character, so the string will look like %25XX
  • The comma character is used as a field separator in the text file. To use a coma within values, surround it with quotes (ex. ",")

Excel

  1. Browse for or provide a path to the Excel file.
  2. Click the Refresh button to refresh the worksheets in the Excel workbook.
  3. Check the First line has column headings if the first row contains column headings.
  4. Click Next to continue.

If you have an x64 version of Microsoft Excel on your machine and getting the following error: 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine; then you may need to install Microsoft Access Database Engine 2010 Redistributable from here.

If you have a 64-bit version of Windows and a 32-bit version of Microsoft Excel, importing from Excel will not work. As a workaround, you can save the Excel file as .csv and import it as CSV/text file as described below.

SQL Server

Connection properties

  1. Fill out the SQL Server form. Provide the Server Name, Database Name, Credentials, and a Select Query.
  2. Click Next to continue.

Connection string

  1. Click the Enter connection string link to bring up the connection string textbox.

    Back to properties

    The link text will change to Enter database properties. Click the link again to go back to database properties.

  2. Enter the SQL Server connection string.
  3. Click Next to continue.

ODBC

  1. Enter the ODBC connection string.
  2. Click Next to continue. 

Preview the data

The next step displays a preview of the data that will be imported. If the data looks accurate click Next to continue.

Select a destination dataset

Select the "Create a new dataset" option to import the data into a new dataset. Or, select the "Update an existing dataset" option to import the data into an existing dataset.

Create a new dataset

  1. Give the new dataset a unique name,
  2. Select the default Default databinding option.
  3. Select the option to trip cell spaces.
  4. Select the columns to import.
  5. Click the Finish button to complete the import.

Import into an existing dataset

  1. Select the existing dataset to import the data into.
  2. Map each column in the destination dataset to a column in the data source.
  3. Click the Finish button to complete the import.

Dataset Synchronization

When a dataset is imported, its data is loaded only once, at the time of import. By default, the dataset does not automatically synchronize with its source file before running a test.

To manage synchronization behavior, use the Auto-sync Dataset property. It offers three options:

  • Never: Do not synchronize the dataset with the source file. The data remains as it was at the time of import.

  • Try: Attempt to synchronize the dataset with the source file before the test starts. If synchronization fails, the test will proceed using the previously imported data.

  • Always: Attempt to synchronize the dataset with the source file before the test. If synchronization fails, the test will not start.

This property provides flexibility in ensuring that test data remains up to date with the source file or remains static, depending on the testing requirements.


Manual Synchronization

To manually synchronize the dataset, click the Update button on the toolbar.

Relative text file path

The Text File Path property supports relative paths. The path can be relative to the main configuration file or inside the DataFiles folder.

  • No labels