1
votes

I want to utilize TFS and MSTest for regression testing. I have a few long running unit tests (10+ minutes). The unit tests can be run successfully locally on developer's machine inside VS2017. The unit test were shown as passed on TFS2017. However the build was marked as failed. This problem looks like a timeout to me between the executor and the unit test. Is there a way to increase the timeout setting in TFS? Any other ideas to fix the build?

2017-11-28T14:01:00.8504854Z ##[error]Error: An exception occurred while invoking executor 'executor://mstestadapter/v2': Object '/fe158daa_975c_4c26_818d_b79d26604456/ekqkfvms170qdx3bql9dzzy2_318.rem' has been disconnected or does not exist at the server.

1

1 Answers

3
votes

Check what's exact version of Visual Studio 2017 do you installed on the build agent machine. Seems there's an issue on the MSTest.TestAdapter and MSTest.TestFramework on earlier version. Based on this thread the issue has been fixed and it's available in v1.1.13.

See the github bug: Run tests fail intermittently with a disconnected from server exception.

Please try below items to fix that:

  • Enable Clean option for Get Sources and Build step, then try it again.
  • Just try upgrading to the latest version of VS 2017, then try it again.
  • Update the MSTest.TestAdapter and MSTest.TestFramework to the latest version on the build agent machine.
  • Check if all the test projects refer to the same version of the test adapter. If not just try moving all test projects in a solution to refer the same version of the adapter.

Also below related issues for your reference: