private static StatLightConfiguration CreateStatLightConfiguration(SilverlightTask silverlightTask, DebugLogger logger, MethodTask[] testMethods) { var configurationFactory = new StatLightConfigurationFactory(logger); return silverlightTask.HasXapPath() ? CreateStatLightConfigurationForXap(configurationFactory, testMethods, silverlightTask.GetXapPath()) : CreateStatLightConfigurationForDll(configurationFactory, testMethods, silverlightTask.GetDllPath()); }
private static StatLightConfiguration CreateStatLightConfiguration(IEnumerable<MethodTask> testMethods, ILogger logger, string xapPath) { var configurationFactory = new StatLightConfigurationFactory(logger); return configurationFactory.GetStatLightConfigurationForXap( unitTestProviderType: UnitTestProviderType.Undefined, // Let StatLight figure it out xapPath: xapPath, microsoftTestingFrameworkVersion: null, // Let StatLight figure it out methodsToTest: new Collection<string>(testMethods.Select(m => m.GetFullMethodName()).ToList()), tagFilters: null, numberOfBrowserHosts: 1, // Maybe you spin up 3 or 4 here if you know you're running a ton of tests isRemoteRun: false, queryString: "", // This is passed to the browser host page (say your test need some configuration - could be passed here - probably not a use case in ReSharper runner) webBrowserType: WebBrowserType.SelfHosted, forceBrowserStart: false, showTestingBrowserHost: false // If you need UI support this needs to be true ); }
protected override void Because() { base.Because(); var statLightConfigurationFactory = new StatLightConfigurationFactory(_testLogger); var statLightConfiguration = statLightConfigurationFactory.GetStatLightConfigurationForXap( ClientTestRunConfiguration.UnitTestProviderType, _pathToIntegrationTestXap, MSTestVersion, ClientTestRunConfiguration.MethodsToTest, ClientTestRunConfiguration.TagFilter, 1, false, "", StatLight.Core.WebBrowser.WebBrowserType.SelfHosted, forceBrowserStart:true, showTestingBrowserHost:false); //bool showTestingBrowserHost = statLightConfiguration.Server.XapHostType == XapHostType.MSTestApril2010; _testLogger.Debug("Setting up xaphost {0}".FormatWith(statLightConfiguration.Server.XapHostType)); Runner = _statLightRunnerFactory.CreateOnetimeConsoleRunner(statLightConfiguration); TestReport = Runner.Run(); }