我正在使用 TeamCity Enterprise 9.1.5(内部版本 37377)。
我已经创建了一个构建配置。
我创建了一个 NUnit 构建步骤。
对于 NUnit Runner,我选择了 NUnit 3
.
对于 NUnit Console Runner 的路径,我输入了:packages\NUnit.ConsoleRunner.3.7.0\tools\nunit3-console.exe
在我的 Visual Studio 解决方案中,我安装了 NUnit.Runner 包。
当我运行构建配置时,我在日志中收到以下错误:File type is not supported
如何让我的 NUnit 测试在 TeamCity 中运行?
最佳答案
什么对我有用:
我卸载了 NUnit.Runner 并安装了以下软件包:
为什么会产生错误?
The ConsoleRunner can't handle .nunit files. That ability is part of NUnit.Extension.NUnitProjectLoader.扩展所在的目录需要作为 .addins 文件的一部分列出。 (我找不到找到该信息的 GitHub 链接。)
我如何排除故障:
TeamCity 生成了一个 .nunit 文件。我将该文件从代理复制到我的开发机器以进行故障排除并自己运行 nunit3-console.exe。一旦它在我的开发机器上运行,TeamCity 也能运行。
关于teamcity - 使用 NUnit 3 时,为什么我在 TeamCity 9 上收到 "File type is not supported"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47635611/