public IRunner CreateRemotelyHostedRunner(StatLightConfiguration statLightConfiguration) { if (statLightConfiguration == null) { throw new ArgumentNullException("statLightConfiguration"); } ClientTestRunConfiguration clientTestRunConfiguration = statLightConfiguration.Client; ServerTestRunConfiguration serverTestRunConfiguration = statLightConfiguration.Server; throw new NotImplementedException(); //var urlToTestPage = statLightConfiguration.Client.XapToTestUrl.ToUri(); //var location = new RemoteSiteOverriddenLocation(logger, urlToTestPage); //var debugAssertMonitorTimer = new TimerWrapper(serverTestRunConfiguration.DialogSmackDownElapseMilliseconds); //SetupDebugClientEventListener(logger); //var webServer = CreateWebServer(logger, statLightConfiguration, location); // //var showTestingBrowserHost = serverTestRunConfiguration.ShowTestingBrowserHost; // //var querystring = "?{0}={1}".FormatWith(StatLightServiceRestApi.StatLightResultPostbackUrl, // HttpUtility.UrlEncode(location.BaseUrl.ToString())); //var testPageUrlAndPostbackQuerystring = new Uri(location.TestPageUrl + querystring); //logger.Debug("testPageUrlAndPostbackQuerystring={0}".FormatWith(testPageUrlAndPostbackQuerystring.ToString())); //var webBrowsers = GetWebBrowsers(logger, testPageUrlAndPostbackQuerystring, clientTestRunConfiguration, showTestingBrowserHost, serverTestRunConfiguration.QueryString, statLightConfiguration.Server.ForceBrowserStart); // //var dialogMonitorRunner = SetupDialogMonitorRunner(logger, webBrowsers, debugAssertMonitorTimer); // //StartupBrowserCommunicationTimeoutMonitor(); //CreateAndAddConsoleResultHandlerToEventAggregator(logger); // //IRunner runner = new OnetimeRunner(logger, _eventSubscriptionManager, _eventPublisher, webServer, webBrowsers, statLightConfiguration.Server.XapToTestPath, dialogMonitorRunner); //return runner; }
private ServerTestRunConfiguration GetDummyServerTestRunConfiguration() { var config = new ServerTestRunConfiguration(xapHost: () => _hostXap, xapToTest: "", xapHostType: XapHostType.MSTest2010April, queryString: "foo", forceBrowserStart: false, windowGeometry: new WindowGeometry() ); return(config); }
protected override void Before_all_tests() { base.Before_all_tests(); _pathToTempXapFile = Path.GetTempFileName(); Func <byte[]> xapToTestFactory = () => File.ReadAllBytes(_pathToTempXapFile); using (var writer = File.CreateText(_pathToTempXapFile)) { writer.Close(); } var mockXapHostFileLoaderFactory = new Mock <XapHostFileLoaderFactory>(TestLogger); mockXapHostFileLoaderFactory .Setup(s => s.LoadXapHostFor(It.IsAny <XapHostType>())) .Returns(new byte[] { 0, 1, 1, 2, 3, 1, }); _mockServerTestRunConfiguration = new ServerTestRunConfiguration(() => new byte[] { 1, 2 }, _pathToTempXapFile, XapHostType.MSTest2009November, "", true, new WindowGeometry()); Assert.IsTrue(File.Exists(_pathToTempXapFile)); }
private void BuildAndReturnWebServiceAndBrowser( ILogger logger, StatLightConfiguration statLightConfiguration, out IWebServer webServer, out List <IWebBrowser> webBrowsers, out IDialogMonitorRunner dialogMonitorRunner) { ClientTestRunConfiguration clientTestRunConfiguration = statLightConfiguration.Client; ServerTestRunConfiguration serverTestRunConfiguration = statLightConfiguration.Server; var location = new WebServerLocation(logger); var debugAssertMonitorTimer = new TimerWrapper(serverTestRunConfiguration.DialogSmackDownElapseMilliseconds); webServer = CreateWebServer(logger, statLightConfiguration, location); webBrowsers = GetWebBrowsers(logger, location.TestPageUrl, clientTestRunConfiguration, serverTestRunConfiguration.ShowTestingBrowserHost, serverTestRunConfiguration.QueryString, statLightConfiguration.Server.ForceBrowserStart); dialogMonitorRunner = SetupDialogMonitorRunner(logger, webBrowsers, debugAssertMonitorTimer); StartupBrowserCommunicationTimeoutMonitor(); }