在 TFS 2008 中记录 VS2010 单元测试结果不起作用

发布于 2024-10-08 09:46:01 字数 330 浏览 0 评论 0原文

编译后测试似乎运行良好,但结果却没有任何结果。写入 .trx 文件并指示所有测试均已通过。 Team Build 认为尚未执行任何测试,并给出可怕的“部分成功”结果。我怀疑TFS由于某种原因无法将trx发布到数据库...可能是因为VS2010版本的测试结果不向后兼容TFS 2008...?

我正在使用 MSBUILD 4.0 运行构建并使用 MSTEST 版本 10。

我读到,使用以前版本的 MSTEST(VS 2008 的版本 9)可能会有所帮助。我尝试了这个...MSTEST 正确地抱怨测试程序集是针对更新版本的 .NET 框架构建的。

其他人在这方面取得了成功吗?接下来我应该尝试什么?

The tests appear to run fine after compliation, but the results don't go anywhere. A .trx file is written and indicates all tests passing. Team Build thinks no tests have been executed and gives the dreaded "Partial Success" result. I suspect that TFS cannot publish the trx to the database for some reason...possibly because the VS2010 version of the test results is not backwards compatible with TFS 2008...?

I'm running the build with MSBUILD 4.0 and using version 10 of MSTEST.

I've read that using the previous version of MSTEST (version 9 with VS 2008) could help. I tried this...MSTEST rightly complained that the test assembly was built against a more recent version of the .NET framework.

Anyone else had success with this? What should I try next?

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

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

发布评论

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

评论(1

夜唯美灬不弃 2024-10-15 09:46:01

结果我在 GAC 中没有正确的 Microsoft.TeamSystem 程序集。版本 9 的程序集在那里,但版本 10 没有。这可能是由于 VS2010 与 VS2008 一起卸载/重新安装(或者其他什么,谁知道)。 “修复安装”设置步骤解决了该问题。

因此,看起来 MSTEST 10 确实可以将结果发布到 TFS 2008 数据存储。威!

Turns out I didn't have the right Microsoft.TeamSystem assemblies in the GAC. The version 9 assemblies were there but not version 10. This likely is due to VS2010 being uninstalled / reinstalled out of order w/ VS2008 (or something, who knows). A "Repair Installation" setup step solved the problem.

So, it looks like MSTEST 10 can indeed post results to a TFS 2008 datastore. Wee!

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