NUnit测试没有执行

问题描述:

我想配置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

最后,我发现TeamCity没有重建测试,程序集仍然使用MSTest属性,因此NUnit找不到它们。