MSTest Exit code 0 does not fail build

I'm currently setting up MSTest and was expecting the build to fail because i haven't install some of the depenacies the tests use. I ran the build and it passed, looking at the log MSTest has an exit code of 1 but this didn't fail the build. Why?

Step 4/5: Run Automated Tests (MSTest) (7s)
[13:26:35][Step 4/5] Starting: C:\TeamCity\buildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher.exe #TeamCityImplicit
[13:26:35][Step 4/5] in directory: C:\TeamCity\buildAgent\work\bef245e14c18e572
[13:26:42][Step 4/5] Microsoft (R) Test Execution Command Line Tool Version 11.0.50727.1
[13:26:42][Step 4/5] Copyright (c) Microsoft Corporation. All rights reserved.
[13:26:42][Step 4/5]     
[13:26:42][Step 4/5] File name "C:\TeamCity\buildAgent\work\bef245e14c18e572\Artifacts\TestResults.trx" is invalid.
[13:26:42][Step 4/5] For switch syntax, type "MSTest /help"
[13:26:42][Step 4/5] Process exited with code 1

Also why does the log say its starting NUnitLauncher.exe for a MSTest step?

Please sign in to leave a comment.