Recently we are getting cases, where users get the below error when a data-driven test method is referring parameter values from a test case WorkItem.
Test execution failure error:
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: Could not load file or assembly ‘Microsoft.TeamFoundation.TestManagement.Controller, PublicKeyToken=b03f5f7f11d50a3a’ or one of its dependencies. The system cannot find the file specified.
To resolve the error above, follow the steps:
Add a runsettings file in the test project.
Append the text below in the runsettings file:
Select the runsettings file and then execute the test case.
In case you are running the test on a test agent machine as a part TFS build, you need Visual Studio 2015 on the test agent machine.
Also, configure the runsettings file with the ForcedLegacyMode tag in the test execution step.
Content: Sinjith Haridasan Reeja
Review: Deepak Mittal