VS2017 using MTM DataSouce produces ERROR RRS feed

  • Question

  • When I am trying to run a Unit Test using a DataSource I receive the following error:

    Message: The unit test adapter failed to connect to the data source or to read the data. For more information on troubleshooting this error, see "Troubleshooting Data-Driven Unit Tests" (http://go.microsoft.com/fwlink/?LinkId=62412) in the MSDN Library. Error details: Format of the initialization string does not conform to specification starting at index 121.

    In VS2015 I added a .testsettings file and it worked fine. In VS2017 adding a .testsettings or .runsettings does not help and break the VS test. The following code is what I am running: 

    [DataSource("Microsoft.VisualStudio.TestTools.DataSource.TestCase", "https://tfs.eleadcrm.com/tfs/DefaultCollection;service-one", "87622", DataAccessMethod.Sequential)]
    public void TestMethod1()
      var user = this.TestContext.DataRow["username"].ToString();
      var r = new Random(0);
      var num = r.Next(0, 1000);
      Assert.IsTrue(num < 100, $"'{num}' is greater than 99.");

    Can anyone point me in the right direction?


    Thursday, April 12, 2018 12:49 PM

All replies

  • Hi,

    Welcome to MSDN forum.

    I test in visual studio 2015 and visual studio 2017, both of them work fine.

    the following screenshot is in visual studio 2017:

    In visual studio 2017, try uninstall MSTest.TestAdapter and MSTest.TestFramework and install Microsoft.VisualStudio.QualityTools.UnitTestFramework.Updated via nuget and check it if the issue persists.

    Best regards,


    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, April 13, 2018 10:01 AM