新的 NCover 3.4.2 使我所有的 MSTest 单元测试失败

发布于 2024-08-30 12:59:52 字数 571 浏览 0 评论 0原文

昨天,我决定安装最新的 NCover 版本(3.4.2)。然而,当我在现有的 .ncover 配置文件上运行它时,NCover 输出突然报告我的所有 MSTest 测试都失败了。当然,这些测试在 Visual Studio 中运行时会成功。因此,NCover 无法确定任何承保范围。

不知何故,旧配置似乎不适用于新版本。

有谁知道问题可能是什么或如何解决?

顺便提一句。这是我的 ncover 配置。

项目设置: 应用程序到配置文件的路径: c:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\MSTest.exe

要分析的应用程序的参数: /testcontainer:D:\dev\MyApp\MyApp.Services.Tests.Unit\bin\Debug\MyApp.Services.Tests.Unit.dll /testcontainer:D:\dev\MyApp\MyApp.WS.Tests。 Unit\bin\Debug\MyApp.WS.Tests.Unit.dll

工作文件夹: D:\dev\MyApp

Yesterday, I decided to install the newest NCover version (3.4.2). However, when I ran it on my existing .ncover configuration file, the NCover output suddenly reported that all my MSTest tests failed. Of course those tests succeed when ran within Visual Studio. Because of this, NCover isn't able to determine any coverage.

Somehow the old configuration doesn't seem to work with the new version.

Does anyone have any idea what the problem could be or how to solve it?

Btw. Here is my ncover configuration.

Project settings:
Path to application to profile:
c:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\MSTest.exe

Arguments for the application to profile:
/testcontainer:D:\dev\MyApp\MyApp.Services.Tests.Unit\bin\Debug\MyApp.Services.Tests.Unit.dll /testcontainer:D:\dev\MyApp\MyApp.WS.Tests.Unit\bin\Debug\MyApp.WS.Tests.Unit.dll

Working folder:
D:\dev\MyApp

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

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

发布评论

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

评论(1

‘画卷フ 2024-09-06 12:59:52

我发现了这个问题,而且它(当然)与NCover 无关。问题是 MSTest.exe 找不到我的测试程序集之一。该程序集仅在配置文件中引用,并未在代码中使用。当在 Visual Studio 中运行时,这是有效的。在 Visual Studio 外部运行失败。

I found out the problem, and it had (of course) nothing to do with NCover. The problem was that MSTest.exe couldn't find one of my test assemblies. This assembly was only referenced in the configuration file and wasn't used in code. When run within Visual Studio, this works. Running outside of Visual Studio failed.

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