I have two questions.
I run TeamCity 6.5 build and one of the steps is MSTest tests. And in case when MSTest can't find the tests described in vsmdi file, I expect that the test run fails.
[17:47:01]: [Step 2/2] Loading (Path)\LocalTestRun.testrunconfig...
[17:47:01]: [Step 2/2] Loading (Path)\Tests.vsmdi...
[17:47:01]: [Step 2/2] Starting execution...
[17:47:01]: [Step 2/2] Test BlaBla1 cannot be found.
[17:47:01]: [Step 2/2] Test BlaBla2 cannot be found.
[17:47:01]: [Step 2/2] Test BlaBla3 cannot be found.
[17:47:01]: [Step 2/2] No tests to execute.
[17:47:07]: [Step 2/2] Process exited with code 0
I launched MSTest from command line, and it really returns zero as exit code when it doesn't find any tests. Does anyone know how to force it to fail, when no tests are found?
Second problem is more connected to TeamCity, I think. In case if MSTest can't find vsmdi file, it prints to log
[17:59:16]: [Step 2/2] File "(Path)\Tests.vsmdi" not found .
[17:59:16]: [Step 2/2] For switch syntax, type "MSTest /help"
[17:59:16]: [Step 2/2] Process exited with code 1
This build configuration has Fail condition "build process exit code is not zero" turned on, nevertheless, the step doesn't fail. Does anyone know how to deal with it?