對於我的生活,我想爲Teamcity運行MSTests幾周,我在我的單元測試項目中,這是我正在構建的解決方案的一部分,我失敗了。teamcity說測試xxx不能用於MSTests
下面我列出了我嘗試過的各種設置組合及其結果。
我得到的最好的是我可以儘可能讓TeamCity知道我的測試,但它找不到它們。我有triedseveralsolutions但所有這些都有兩個結果。
這裏是設置屏幕,以供參考MSTests:
如果我指定的.vsmdi文件的相對路徑,然後我得到:
[Step 7/7] Starting: C:\TeamCity\buildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher.exe #TeamCityImplicit
[18:00:13][Step 7/7] in directory: C:\TeamCity\buildAgent\work\5caf6e77ce7b0d2a
[18:00:14][Step 7/7] Microsoft (R) Test Execution Command Line Tool Version 12.0.21005.1
[18:00:14][Step 7/7] Copyright (c) Microsoft Corporation. All rights reserved.
[18:00:14][Step 7/7]
[18:00:14][Step 7/7] Loading C:\TeamCity\buildAgent\work\5caf6e77ce7b0d2a\XXXX.Engine\XXXX.Engine.vsmdi...
[18:00:16][Step 7/7] Starting execution...
[18:00:16][Step 7/7] Test Check_blah_blah cannot be found.
[18:00:16][Step 7/7] Test blah_blah2 cannot be found.
[18:00:16][Step 7/7] No tests to execute.
[18:00:16][Step 7/7] Process exited with code 0
等,所以它知道什麼測試有,但不能運行它們! (
其他解決方案來自interwebs像(1)爲單元測試項目做一個MSBuild步驟,(2)指定.testsettings文件的路徑(3)僅指定程序集列表(4)將自己的值的路徑,而不是TeamCity的環境變量的mstest.exe(5)創建一個測試表,並指定其...等他們在這一結果的所有結果:
[Step 4/4] Starting: C:\TeamCity\buildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher.exe #TeamCityImplicit
[17:54:50][Step 4/4] in directory: C:\TeamCity\buildAgent\work\ccf38e24ca82b24
[17:54:58][Step 4/4] No assemblies, run configuration and test metadata were found (THIS LINE VARIES BASED ON MY SETTINGS BUT the rest is the same)
[17:55:01][Step 4/4] Microsoft (R) Test Execution Command Line Tool Version 10.0.30319.1
[17:55:01][Step 4/4] Copyright (c) Microsoft Corporation. All rights reserved.
[17:55:01][Step 4/4]
[17:55:01][Step 4/4] Please specify tests to run, or specify the /publish switch to publish results.
[17:55:01][Step 4/4] For switch syntax, type "MSTest /help"
[17:55:01][Step 4/4] Process exited with code 1
[17:55:01][Step 4/4] Step RunTests (MSTest) failed
如何這個東西應該是配置?有什麼明目張膽的我失蹤?或者可能是愚蠢的東西?
請幫助!
啊哈!現在有一個線索! :)我會嘗試一下。 – gideon
謝謝,完美無缺。我知道這是問了一下,但我還有一個第二個問題,你會介意在這裏檢查它:http://stackoverflow.com/questions/31183858/copying-to-teamcitys-out-directory-before-running-unit-測試?lq = 1 – gideon
沒問題。我也這樣做:) –