如何在 Visual Studio 中调试 mbunit/Gallio 单元测试

发布于 2024-07-19 03:24:08 字数 199 浏览 3 评论 0原文

我试图弄清楚如何在用 MbUnit/Gallio 编写的单元测试中达到断点。 我尝试运行 Gallio.Icarus,附加 vs 调试器,但没有命中断点。 接下来,我尝试从项目属性启动 Gallio.Echo,但在提供 dll 后收到一条错误消息,说只能测试 .exe。 Gallio.Icarus 的单元测试运行良好,但是我无法调试它们。

谢谢!

I am trying to figure out how I can hit breakpoints in my unit tests that are written with MbUnit/Gallio. I tried running Gallio.Icarus, attaching vs debugger to it, the breakpoints weren't hit.
Next I tried to start Gallio.Echo from project properties, but I was getting an error message, after supplying the dll, saying only .exe's can be tested.
The unit test runs fine from Gallio.Icarus, however, I am unable to debug them.

Thanks!

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

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

发布评论

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

评论(3

眼角的笑意。 2024-07-26 03:24:08

获取 Gallio v3.0.6 更新 1。加载测试并单击 Icarus GUI 本身中闪亮的新“调试”按钮。

Grab Gallio v3.0.6 Update 1. Load up your tests and click on the shiny new "Debug" button in the Icarus GUI itself.

三生殊途 2024-07-26 03:24:08

我将使用 TestDriven.Net 来实现此目的。 它支持 MbUnit 测试,您只需在 Visual Studio 中右键单击即可进行调试

I would use TestDriven.Net for this. It supports MbUnit tests, and you can debug by simply right clicking from within Visual Studio

梦旅人picnic 2024-07-26 03:24:08

在这里可以找到更好的答案:
gallio 测试运行器插件到可视化studio 2010

答案是将以下部分添加到 *.csproj 文件中的之后: 部分 部分:

    <ProjectTypeGuids>
        {3AC096D0-A1C2-E12C-1390-A8335801FDAB}
      ; {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
    </ProjectTypeGuids>

另请参阅:
Visual Studio Identiy 如何测试项目?
支持的 VS2010 项目类型列表 < br>
支持的项目类型的第二个 GUID 列表

A much better answer is found here:
gallio test runner plugin to visual studio 2010

The answer is to add the following section to your *.csproj file the after the <ProjectGuid> section section:

    <ProjectTypeGuids>
        {3AC096D0-A1C2-E12C-1390-A8335801FDAB}
      ; {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
    </ProjectTypeGuids>

See Also:
How Does Visual Studio Identiy test projects?
A list of supported VS2010 project types
Second list of GuIDs for supported project types

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