I need to run individual C# NUnit tests programmatically. I found another post that was very helpful in showing me how to run an entire set of tests programmatically, but I need to be able to select individual tests.
I thought that setting up a NameFilter would do the trick, but the RemoteTestRunner only seems to think that there's one test in my suite when there are over fifty. Is it really lumping all tests in a single DLL into one gargantuan test? Is there a way that I can separate them out and run individual test cases?
CoreExtensions.Host.InitializeService();
TestPackage testPackage = new TestPackage(@"C:\Dev\MyUnitTests.dll");
RemoteTestRunner remoteTestRunner = new RemoteTestRunner();
remoteTestRunner.Load(testPackage);
TestResult testResult = remoteTestRunner.Run(new NullListener(), TestFilter.Empty, false, LoggingThreshold.Error);
– Huitzilopochtli