NUnit测试未执行

时间:2012-10-24 12:31:55

标签: nunit teamcity teamcity-7.0

我正在尝试配置TeamCity来运行我们的测试。

我创建了一个NUnit Build Step,我选择了这些参数:

亚军类型:NUnit 步骤名称:测试 执行步骤:仅当前面的所有步骤都成功时 NUnit runner: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()测试。

仅供参考:项目使用的是.NET 4.5,NUnit程序集是2.6.2

感谢。

1 个答案:

答案 0 :(得分:1)

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