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.
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
andMSTest.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:
MSTest.TestAdapter
andMSTest.TestFramework
to the latest version on the build agent machine.Also below related issues for your reference: