On May 2, 10:35 pm, "Jeff Brown" <[email protected]> wrote: > Take a look at the TestLauncher > API.http://www.gallio.org/api/html/T_Gallio_Runner_TestLauncher.html >
Hi Jeff, How do I tell the TestLauncher which tests to launch? It looks like I need to set the TestPackageConfig.AssemblyFiles, like so: var launcher = new TestLauncher(); launcher.TestPackageConfig.AssemblyFiles.Add(typeof (ExampleFixture).Assembly.Location); Possibly also set the FilterSet, like this? launcher.TestExecutionOptions.FilterSet = new FilterSet<ITest>(new TypeFilter<ITest>(new EqualityFilter<string>(typeof (ExampleFixture).AssemblyQualifiedName), true)); Running that with launcher.Run(), I get a "The runtime has not been initialized." exception. Guessing from the documentation, perhaps something like this: launcher.RuntimeSetup = new Gallio.Runtime.RuntimeSetup(); launcher.RuntimeSetup.SetConfigurationFilePathFromAssembly(typeof (ExampleFixture).Assembly); Then I get a "The runtime could not be initialized." exception, which I suppose is an improvement. Having a look at the SampleRunner source [1], I can't see where it sets up a RuntimeSetup, but it looks like I need to set the TestRunnerFactoryName too, I tried adding this, launcher.TestRunnerFactoryName = StandardTestRunnerFactoryNames.Local; but I feel like I'm shooting in the dark. How do I get it to find my fixture? Douglas [1] http://www.google.com/codesearch/p?hl=en#--kv20-JHyI/v3/src/Gallio/Gallio/Framework/Utilities/SampleRunner.cs&q=TestLauncher%20Gallio&l=259 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "MbUnit.User" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/MbUnitUser?hl=en -~----------~----~----~----~------~----~------~--~---
