3

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

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.

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

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

brien
  • 4,400
  • 4
  • 30
  • 32
  • FWIW, I had a similar problem with NaturalSpec [http://www.navision-blog.de/2009/11/08/getting-started-with-naturalspec/] but this was b/c I was following the examples which don't tell you to use a test class but instead define the specs as variables. I switched over to use a test class and specs as members and TD.Net was able to find the tests. – Bryan Matthews Jan 07 '12 at 17:07

6 Answers6

4

Are the classes public?

Lasse V. Karlsen
  • 380,855
  • 102
  • 628
  • 825
3

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

Vertigo
  • 2,714
  • 1
  • 22
  • 24
0

I've seen TestDriven.Net not finding any tests if I used newest version of NUnit, reinstalling TestDriven.Net fixed the issue.

Pawel Lesnikowski
  • 6,264
  • 4
  • 38
  • 42
0

Just make sure TestDriven.Net was installed before Gallio, otherwise Gallio won't install its extensions for TestDriven.Net.

Gallio v3.0.4 and more recent include a 64-bit installer.

Jeff Brown
  • 467
  • 3
  • 3
0

You need to add testing attributes for your favorite testing framework. TestDriven picks up these attributes by reflection in order to know what tests to run.

For example, using NUnit.Framework - each test class needs [TextFixture] and each test method needs [Test]

Here's an example

Amy B
  • 108,202
  • 21
  • 135
  • 185
0

If you're on Windows x64, it may be an installer problem. It bit me on Server 20080 x64.

Mark Brackett
  • 84,552
  • 17
  • 108
  • 152