Unit testing frameworks extensibility

time to read 2 min | 208 words

I just run into a road block, and I am posting before lunch, hopefully I'll get some ideas about how to solve this.

I have a directory full of source files, which contains tests. What I want to do is to write something like this:

public class MyTest
{
	[ExecuteAllTestsIn("tests/validators")]
	public void Validators()
	{
	}
}

The typical scenario for each source file is something like:

public void ExecuteSingleTest(string path)
{
      var test = CompileAndGetInstance(path);
ExecuteTestInUnitTestingFramework(test); }

A source file can contain more than a single test, and I want all those individual tests to be reported as part of the overall test run.

The problem is that I took a look at the extensibility mechanisms for both NUnit and MbUnit, and they are so big. It is not that I can't see how I would solve the issue, but it would require a lot of work to do so.

I know how I can do this with xUnit, where it would be a truly trivial affair.

Am I missing something? I never really had to deal with the extensibility mechanisms in NUnit or MbUnit before.