[BUG] Web Test New Datasource Wizard problems with UTF-8 CSV (text) files containing Byte Order Mark (BOM) RRS feed

  • Question

  • Hi,

    I noticed some strange behavior, which I think is a bug in both Visual Studio 2013 and 2015:

    When you create a Web Performance Test (.webtest) you have the ability to define data sources. Using Visual Studio I created a new Text File named "Customers.csv" that contained the following comma-separated content:

    John,Doe,New York

    As you can see the first line contains the headers and the following lines contain the comma-separated data. I then right-clicked on the main Web Test node in the Web Test Editor and selected "Add Data Source..." to open the New Data Source Wizard. On the first page of the wizard I typed a data source name and selected the CSV File data source type. On the next page I chose my CSV file and immediately after I chose the file, the "Preview data" grid got filled with a preview of my data. To my surprise the header title of the first column was "FirstName" instead of just "FirstName" (see screenshot below).

    It appears the New Data Source Wizard has problems when a CSV file that's defined as the data source is an UTF-8 file that contains a Byte Order Mark (BOM or signature). Visual Studio by default creates text files as UTF-8 with a BOM.

    The BOM errors also appear in the Properties window's data source binding editor:

    And the .webtest file itself:

    Can you confirm this is a bug?

    Monday, August 31, 2015 1:29 PM


All replies