Beenish Khan
Beenish Khan

Reputation: 1583

MSTest Crashing While Publishing Results

Our TFS 2013 server and Build server resides on two different machines, same domain. Build server has Visual studio installed on it. When I push a build, everything goes fine except that MSTest fails with following error :

TF270015: 'MSTest.exe' returned an unexpected exit code. Expected '0'; actual '255'. See the build logs for more details.

The Event log shows me following error,

Faulting application name: MSTest.exe, version: 12.0.21005.1, time stamp: 0x524fbee4 Faulting module name: clr.dll, version: 4.0.30319.34014, time stamp: 0x52e0b784 Exception code: 0xc0000005 Fault offset: 0x0001bc37 Faulting process id: 0xafc Faulting application start time: 0x01cf8efc8557a612 Faulting application path: C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\MSTest.exe Faulting module path: C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll Report Id: c510b7a4-faef-11e3-80d0-0026b9534e01 Faulting package full name: Faulting package-relative application ID:

The Diagnostics shows me that all the tests passed successfully and MSTest failed at the publishing-the-results-to-TFS stage :

Results file: C:\Builds\2\CommonTest\CommonQA\TestResults\tfsbuild3_WKTOBLD03 2014-06-23 12_02_24_Any CPU_Release.trx Test Settings: Default Test Settings Waiting to publish...

That's where it crashes.

I have tried pretty much everything, including,

  1. Giving permission to TFSBuild and TFSService accounts on the BuildDrops folder.

  2. Clearing TFS Cache on the server and client machine.

  3. Installing VS 2013 SP1.

Anyone has any idea as to what might be the issue here ?

Upvotes: 4

Views: 2074

Answers (2)

dee-see
dee-see

Reputation: 24078

Updating to VS2013.3/TFS2013.3 didn't completely solve the issue for me. Looking at the Windows Event Log shows this error after MSTest crashes on publishing

Application: MSTest.exe 
Framework Version: v4.0.30319
Description: The process was terminated due to an internal error in the .NET Runtime at  IP 74BFAA23 (74BE0000) with exit code 80131506.

In the end I ended up moving all my test runs to the "Visual Studio Test Runner" (AgileTestPlatformSpec in the workflow) and everything worked fine. The only downside is that it requires changing all your build definitions!

Upvotes: 1

Richard Banks
Richard Banks

Reputation: 12546

I had mstest.exe crash on publishing today when using TFS2013.3 on the server but only Visual Studio 2013 RTM build on the build server. Installing VS2013.3 on the build server fixed the problem for me.

Upvotes: 1

Related Questions