【问题标题】:Nunit 3.0 Tests not running in parallel in TeamCityNunit 3.0 测试未在 TeamCity 中并行运行
【发布时间】:2016-02-08 15:23:05
【问题描述】:

我们有一套 API 测试,我们一直在使用 MBunit 在 Teamcity 上运行。大约有 200 个测试设置为并行运行 12 个,运行大约需要 7 分钟。 Nunit 最近发布了第 3 版并支持夹具并行性。这在本地对我有用,我已经看到测试在 Visual Studios 中的运行速度与它们在 MBunit 中的运行速度一样快。

在使用 NUnit 运行器类型的 TeamCity 中,测试需要 3 个多小时才能运行。前 20 次测试每次大约需要 90 秒,其余的每次需要 15 分钟,并且没有并行运行。

我对测试所做的唯一更改是从 MBUnit 切换到 NUnit。

我已附上我正在使用的 teamcity NUnit 构建步骤配置here

【问题讨论】:

  • 日志中是否有命令行显示 Teamcity 传递给 nunit 以运行测试的命令行参数?
  • "C:\Program Files (x86)\NUnit.org\nunit-console\nunit-console.exe" C:\BuildAgent\temp\buildTmp\q3AUY8NnxNuE2gzUANbaWYDr31RSZzLE.nunit --work=C: \BuildAgent\work\97e2dc30fe0ff3d4 --noresult --noheader --framework=net-4.0 --workers=12
  • 这很奇怪,因为 NUnit 3.0 控制台运行程序的名称是 nunit3-console.exe。 TeamCity 有自己的重命名副本吗?
  • 问题是如果你使用 nunit runner 类型,team city 会寻找 Nunit-console.exe,所以我只是重命名了我安装在构建代理上的 3.0 exe。

标签: nunit teamcity parallel-testing nunit-3.0


【解决方案1】:

对于遇到此问题的其他人来说,这是一个 TeamCity 错误。更新到最新版本,它将修复它。我升级到的版本是9.1.6

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-09-14
    • 2011-10-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2010-12-26
    • 1970-01-01
    • 2012-07-19
    相关资源
    最近更新 更多