Question

I'm using NUnit (but have also tried this with VS testing) and I'm having a problem getting TestDriven.Net to recognize and run different test fixtures in a single .cs file.

I'm trying to do a little BDD style testing. So what I have in one file is something like this:

[TestFixture]
public class when_view_is_ready : AAA
{
  // setup, tests
}

[TestFixture]
public class when_something_happens : AAA
{
   // setup, tests
}

When I run this in the NUnit GUI runner it sees the different test fixtures just fine and runs all the tests. When I run it via TestDriven.NET context menu and watch the Output window, it only runs the first fixture's tests. Is there a reason for this? Can this be fixed?

I think I'm running TestDriven.Net 2.0. I can't be certain; not exactly sure how to check my version.

Appreciate any help!

Was it helpful?

Solution

You can check the version of TestDriven in Help -> About in Visual Studio, or in Tools -> Addin Manager.

I can confirm that this is an issue in 3.0.2556, when running tests it runs only the first TestFixture in the file, when you right-click the file, and select "Run Tests". When you right-click on the containing directory or project, and "Run Tests", it runs both fixtures.

When using other test runners, like Resharper's testrunner, even running it on the file runs both fixtures.

Best thing to do, is probably to report a bug with TestDriven.net

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top