vstest.executionengine.exe crahed on TFS, but on my local VS2012 all ok

tfs, tfsbuild, unit-testing, visual-studio-2012

Solution

We had the same problem in one of our CI builds. The reason was that one (or more) tests were starting separate threads and when a crash occurs in such thread and not in the main thread of vstest.executionengine the process simply crashes without additional information. Enabling the crash dump as suggested in the error message helped us localize the problematic module. Another approach was to start removing test assemblies from the build definition so that we're running only part of the unit tests until we localize the problematic test.

The difference between the local environment and TFS is the different folder structure that the build server creates compared to the local, so some relative paths become wrong. Exactly in our situation we were missing some data files. We had both forgotten to map them in the "Source settings" path of the build definition and forgotten to deploy them properly.

Problem

When I run test on TFS server I got the following error: ``` The active Test Run was aborted because the execution process exited unexpectedly. To investigate further, enable local crash dumps either at the machine level or for process vstest.executionengine.exe. Go to more details: [http://go.microsoft.com/fwlink/?linkid=232477] ``` When I run this tests on local machine, I got "All Passed" result. I do not know what could be the reason and what is the difference between the tests are run on the TFS server and locally?

Original source