The tricky part here is that since Gallio is plugin-based you need to tell it where to load plugins. Ordinarily it will look for plugins in the installation path but that's not always available.
To work around this problem, be sure to add the path to the Gallio bin folder to the RuntimeSetup.PluginPaths collection. Jeff. -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Douglas Livingstone Sent: Thursday, May 07, 2009 4:52 PM To: [email protected] Subject: MbUnit Re: Run test fixtures from inside application 2009/5/4 Jeff Brown <[email protected]>: > > TestLauncher really needs to be refactored at some point. It's doing > too many things and it inadequately abstracts the complexity of what's > underneath. Lots of Law of Demeter violations here. > > Here's how you would use it: > > var fixtureType = typeof(ExampleFixtute); > > var testLauncher = new TestLauncher(); > > testLauncher.RuntimeSetup = new RuntimeSetup(); > > testLauncher.TestRunnerFactoryName = > StandardTestRunnerFactoryNames.Local; > > testLauncher.TestPackageConfig.Add(fixtureType.Assembly.Location); > > testLauncher.TestExecutionOptions.FilterSet = > FilterUtils.ParseFilterSet("ExactType:" + fixtureType.FullName); > > TestLauncherResult result = testLauncher.Run(); > Hi Jeff, thanks for the reply. I've had a go at getting this example working, (using MbUnit 3.0.6) but couldn't see definitions for TestPackageConfig.Add or FilterUtils.ParseFilterSet, but I think this code has the same effect as your example: var fixtureType = typeof(ExampleFixtute); var testLauncher = new TestLauncher(); testLauncher.RuntimeSetup = new RuntimeSetup(); testLauncher.TestRunnerFactoryName = StandardTestRunnerFactoryNames.Local; testLauncher.TestPackageConfig.AssemblyFiles.Add(fixtureType.Assembly.Locati on); testLauncher.TestExecutionOptions.FilterSet = new FilterSet<ITest>(new TypeFilter<ITest>(new EqualityFilter<string>(fixtureType.FullName), true)); TestLauncherResult result = testLauncher.Run(); This builds, but at runtime I'm getting a "Could not resolve service of type Gallio.Runner.Reports.IReportManager." exception. Do I have to register one myself? How do I get at the Windsor container instance? I guess I'll have to download the source to have a proper look at how this is implemented :-) Cheers, Douglas --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
