2012-10-24 56 views
2

我想配置TeamCity來運行我們的測試。NUnit測試沒有執行

我創建了一個NUnit的建設步驟,我選擇了這些參數:

亞軍類型:NUnit的 步驟名稱:測試 執行的步驟:只有當所有先前步驟成功 NUnit的亞軍:NUnit的2.6.1 .NET運行時:x64,v4.0 運行以下測試:'測試** \ bin \ Debug \ Tests。*。dll'

其餘爲空。

這是在生成日誌

[14:03:31]Step 2/2: Tests (NUnit) (14s) 
[14:03:31][Step 2/2] Starting: C:\BuildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher.exe #TeamCityImplicit 
[14:03:31][Step 2/2] in directory: C:\BuildAgent\work\743f6358429d804a 
[14:03:39][Step 2/2] Start TeamCity NUnit Test Runner 
[14:03:39][Step 2/2] Running NUnit-2.6.1 tests under .NET Framework v4.0 x64 
[14:03:40][Step 2/2] Tests.Application.XmlImport.dll 
[14:03:44][Step 2/2] Start TeamCity NUnit Test Runner 
[14:03:44][Step 2/2] Running NUnit-2.6.1 tests under .NET Framework v4.0 x64 
[14:03:45][Step 2/2] Tests.Infrastructure.Framework.dll 
[14:03:45][Step 2/2] Process exited with code 0 

可以肯定的是,測試不運行,每個組件具有一個Assert.Fail()測試輸出。

FYI:該項目使用.NET 4.5和NUnit的組件是2.6.2

感謝。

+0

當您從nunit-console.exe調用它們時,測試是否運行? – Simone

回答

1

最後,我發現TeamCity沒有重建測試,程序集仍然使用MSTest屬性,因此NUnit找不到它們。