从 Team city 运行 NUnit 测试

发布于 2024-10-01 12:38:34 字数 816 浏览 2 评论 0原文

我已成功地为 TeamCity 服务器上的每个构建运行 MSTest。

我有几个使用 NUnit 的项目,因此希望让 TeamCity 运行 NUnit 测试就像运行 MSTests 一样简单:

Team City 中的 MS 测试设置

因此,当我尝试对 NUnit 测试执行相同操作时,构建完成后测试选项卡不会显示,所以我猜测它尚未运行我的测试。

Team City 中的 Nunit 测试设置

有谁知道我做错了什么?

不确定这是否有帮助,但这来自构建日志:

[Project "AssemblyName.proj.teamcity.patch.tcprojx" (Build;TeamCity_Generated_NUnitTests target(s)):] C:\Program Files\TeamCity\buildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher.exe "@@" "C:\Program Files\TeamCity\buildAgent\temp\buildTmp\tmp2867.tmp"
[13:22:57]: Start TeamCity NUnit Test Runner
[13:22:59]: Build finished

就像它启动了 nunit 构建运行程序,然后停止了?

谢谢

戴夫

I've successfully managed to get MSTests running for each of the builds on our TeamCity Server.

I've got a couple of projects that use NUnit, so was hoping that getting TeamCity to run NUnit tests would be as simple as running MSTests:

MS Test Settings in Team City

So when I try to do the same for my NUnit Tests the Testing Tab doesn't show up when the Build finishes, so I'm guessing it hasn't run my tests.

Nunit Test Settings in Team City

Does anyone know what I'm doing wrong?

Not sure if this will help, but this is from the build log:

[Project "AssemblyName.proj.teamcity.patch.tcprojx" (Build;TeamCity_Generated_NUnitTests target(s)):] C:\Program Files\TeamCity\buildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher.exe "@@" "C:\Program Files\TeamCity\buildAgent\temp\buildTmp\tmp2867.tmp"
[13:22:57]: Start TeamCity NUnit Test Runner
[13:22:59]: Build finished

It's like it starts the nunit build runner, then just stops?

Thanks

Dave

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

波浪屿的海角声 2024-10-08 12:38:34

NUnit 测试程序集路径是相对于解决方案文件夹进行解析的。尝试在开头添加 %teamcity.build.checkoutDir% 。

NUnit test assemblies path is resolved relative to solution file folder. Try adding %teamcity.build.checkoutDir% at the beginning.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文