Question

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?

Was it helpful?

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.

OTHER TIPS

Today we have faced same exception:

Run Visual Studio Test Runner for Test Sources 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 Test Run Completed. 0
tests executed. Test Run Failed.

All unit test case are aborted. We don't know why and which test case caused the crash.

We have followed "Collecting User-Mode Dumps" to configure tfs build server to collect dumps file for the issue.

And use DebugDiag to analysis dump file. And at last we find out the root cause.

Root cause is that one unit test case call following method and result thead locks:

[[PrestubMethodFrame] (System.Messaging.Interop.SafeNativeMethods.IntMQPathNameToFormatName)] System.Messaging.Interop.SafeNativeMethods.IntMQPathNameToFormatName(System.String, System.Text.StringBuilder, Int32ByRef) System.Messaging.Interop.SafeNativeMethods.MQPathNameToFormatName(System.String, System.Text.StringBuilder, Int32 ByRef)+1c System.Messaging.MessageQueue.ResolveFormatNameFromQueuePath(System.String, Boolean)+154 System.Messaging.MessageQueue.Exists(System.String)+ea

Ensure you have Visual Studio 2012 installed on the build server.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top