为什么 TestDriven.Net 不能与我的 gallio/mbunit 测试一起使用?
我已经将 TDD.Net 与 MbUnit v2 一起使用,没有遇到任何问题,但在我的新电脑上使用新的 gallio 版本时,它没有任何作用。
从解决方案资源管理器中的 tdd 右键单击菜单中,如果我执行“使用调试器进行测试”,我会在屏幕底部的 VS 状态栏中得到“0 通过、0 失败、0 跳过”。
如果我右键单击我的固定装置并执行相同的操作,我会得到
"The target type doesn't contain tests from a known test framework or a 'Main' method."
如果我在单独的测试中执行此操作,则看起来它没有运行设置,因此测试失败(但至少它运行)
我知道这听起来像 这个问题,但我的注册表看起来是正确的。
如果我尝试从 TDD.Net 菜单运行 NCover,则不会发生任何事情(除了输出窗口闪烁)。
当我使用 resharper 进行“运行单元测试”时,它会将它们全部拾取并正确运行。
我使用 Gallio/MbUnit 3.0.5.546、TDD.Net 2.18.2268、Resharper 4.1、VS 2k8 Pro 9.0.30729.1 SP、.Net 3.5 SP1、Windows Server 2k8 (x86)
Why doesnt TestDriven.Net work with my gallio/mbunit tests?
I've used TDD.Net with MbUnit v2 and not had any problems, but with the new gallio release on my new pc, it does nothing.
From the tdd right click menu in solution explorer, if i do "test with debugger" i get "0 passed, 0 failed, 0 skipped" in the VS status bar at the bottom of the screen.
If i right click my fixture and do the same, i get
"The target type doesn't contain tests from a known test framework or a 'Main' method."
If i do it on an individual test, it looks like its not running the SetUp, so the test fails (but at least it runs)
I know this sounds like this problem, but my registry looks correct.
If i try and run NCover from the TDD.Net menu, nothing happens (other than an an output window flicker)
When i do "run unit tests" with resharper it picks them all up and runs correctly.
Im using Gallio/MbUnit 3.0.5.546, TDD.Net 2.18.2268, Resharper 4.1, VS 2k8 Pro 9.0.30729.1 SP, .Net 3.5 SP1, Windows Server 2k8 (x86)
发布评论
评论(4)
您只需确保在 Gallio 之前安装 TestDriven.Net 即可。 否则,Gallio 安装程序将不会安装 TestDriven.Net 的扩展。
You just need to make sure you install TestDriven.Net before Gallio. Otherwise the Gallio installer will not install its extensions for TestDriven.Net.
还要检查您的装置设置中是否没有抛出异常。 这会导致完全相同相同的错误消息。
请参阅错误消息之前的“测试报告”超链接以获取更多详细信息(我通常忽略此链接!)
Also check that you are not throwing an exception in your fixture setup. This results in exactly the same error message.
See the 'Test Report' hyperlink just before the error message for further details (I usually ignore this link!)
大量卸载、重新启动和重新安装似乎已经解决了这个问题:s
Lots of uninstalling, rebooting and reinstalling seems to have solved it :s
当我的测试规范类位于测试项目/命名空间之外的项目中时,我收到此错误。
I was getting this error when my test specification class was in a project other than the tests project/namespace.