TestDriven.Net没有找到测试没有找到、测试、TestDriven、Net

2023-09-05 03:06:43 作者:牵妮走红地毯好麽

我在使用MbUnit的和TestDriven.Net一个测试项目。

I have a test project using MbUnit and TestDriven.Net.

如果我在一个单独的测试方法,用鼠标右键单击,并说运行测试的测试运行成功。同样的事情,如果我点击在Solution Explorer中的文件名。

If I right-click on an individual test method and say "Run Tests" the test runs successfully. Same thing if I click on a file name in the solution explorer.

不过,如果我点击右键并说该项目或解决方案运行测试,TestDriven.Net报告0过去了,0失败,0跳过。

However, if I right click and say run tests on the project or the solution, TestDriven.Net reports "0 Passed, 0 Failed, 0 Skipped."

我有其他的工作就好了类似的项目,是的,这些类被标记为[的TestFixture]和方法标记为[测试]。

I have other similar projects that work just fine, and yes, the classes are labeled [TestFixture] and the methods are labeled [Test].

推荐答案

我有一次类似的问题。问题是,我忘了用的公开的修改。

I had once similar problem. The problem was that I forgot to declare my test class with public modifier.