Export (0) Print
Expand All

How to: Add a CSV File Data Source to a Web Performance Test

This topic applies to:

Visual Studio Ultimate

Visual Studio Premium

Visual Studio Professional 

Visual Studio Express

Topic appliesTopic does not applyTopic does not applyTopic does not apply

Before you can add data binding to a Web request, you must add a data source to the Web performance test. After you add a data source to a Web performance test, you can bind a Web request to the data. For more information, see How to: Add Data Binding to a Web Request. After you add data binding to a Web request, you must configure the test run to access one or more rows of data. For more information, see How to: Configure Web Performance Tests to Run Once Per Data Row Using Test Settings.

NoteNote

You can use a Comma Separated Value (CSV) file as a data source only if the first row of the CSV file is a row of column headers. If the file does not have a row of column headers, you must add the file as a database data source and add a schema description file as explained in How to: Add a Schema Definition to a Text File Data Source for a Web Performance Test.

To add the data source to the Web performance test

  1. In the Web Performance Test Editor, right-click the top node of the Web performance test and then click Add Data Source.

    The New Test Data Source Wizard appears.

  2. In the Data source name box type a name for your data source.

  3. In the Data source type list click CSV File.

  4. Click Next.

  5. In the Choose a CSV file box type the path and name of the file, or click the ellipsis (…) to browse to the file. For example, type the following text:

    <Your Path>\FileName.csv

    The data from the CSV file appears in the Preview data pane. The first 1,000 rows of data are displayed.

  6. Click Finish.

    A dialog box appears that prompts you to add the file to your current project. You can use the following information to help you decide:

    Response

    Result

    Advantage

    Yes

    The file is copied to the project.

    When the project is deployed, there is no extra work that is required.

    No

    The file is not copied to the project. When the project is deployed, you might have to update the path of the file.

    Some data files can be very large, and should be maintained separate from the project. Some data files must be shared among several members of a team, and should be maintained in a central location that all members can access.

  7. Click Yes or No.

    A Data Sources node will be added to the Web performance test, and the text file will appear as a table in the hierarchy.

  8. On the File menu, click Save to save the Web performance test.

    Caution noteCaution

    Using CSV files containing Unicode characters might not work correctly. This is because the character set expected by the driver is ANSI. To work around this issue, use one of the following options:

    • Change your system registry, by setting the CharacterSet value to Unicode under this key:

      HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Jet\4.0\Engines\Text

      Save your CSV file in Unicode format.

    • Use a schema.ini file. For more information, see Schema.ini File (Text File Driver).

Community Additions

ADD
Show:
© 2014 Microsoft