moq/Nunit - 未加载或禁用任何测试
当我尝试运行测试时,我收到一条消息,指出测试未加载或已禁用。我看不到如何启用或激活已创建的测试代码。
这似乎是安装/使用插件 Nunit 或 Moq 时的常见错误,但我尚未找到具有解决方案的链接。
如果您知道如何解决这个问题,请告诉我们:) 谢谢。
Visual Studio 2008 SP1 3.5SP1.net 微软测试运行正常。
When I try to run the tests, I get a message saying that the tests are not loaded or are disabled. I cannot see how to enable or activate the test code that has been created.
This seems to be a common error when installing/using addon Nunit or Moq but I have yet to find a link that has a solution.
If you know how to solve this problem please let us all know :) Thanks.
Visual Studio 2008 SP1 3.5SP1 .net
The Microsoft tests run ok.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这听起来可能很愚蠢,但它不止一次地让我困惑,你的测试类是 1.Public 和 2.Decorated with [TestFixture()] 属性吗?
另外,您的测试具有 [Test] 属性,对吗?
This may sound stupid, but it's tripped me up more than once, are your test classes 1. Public and 2. Decorated with the [TestFixture()] attribute?
Also, your tests have the [Test] attribute, correct?
如果要使用 Visual Studio Test Runner,则需要安装 NUnit 测试适配器:
http://nunit.org/index.php?p=vsTestAdapter&r=2.6
if you want to use Visual Studio Test Runner, you need to install the NUnit Test Adapter:
http://nunit.org/index.php?p=vsTestAdapter&r=2.6