internal TeamCityRunner(
     ILogger logger,
     IEventSubscriptionManager eventSubscriptionManager,
     IEventPublisher eventPublisher,
     IWebServer webServer,
     List<IWebBrowser> webBrowsers,
     TeamCityTestResultHandler teamCityTestResultHandler,
     string xapPath,
     IDialogMonitorRunner dialogMonitorRunner)
     : base(logger, eventSubscriptionManager, eventPublisher, webServer, webBrowsers, xapPath, dialogMonitorRunner)
 {
     _eventSubscriptionManager = eventSubscriptionManager;
     _teamCityTestResultHandler = teamCityTestResultHandler;
 }
        private void BuildAndReturnWebServiceAndBrowser(
            ILogger logger,
            out IWebServer webServer,
            out IEnumerable <IWebBrowser> webBrowsers,
            out IDialogMonitorRunner dialogMonitorRunner)
        {
            webServer = _ioc.Resolve <InMemoryWebServer>();

            webBrowsers = GetWebBrowsers();

            dialogMonitorRunner = SetupDialogMonitorRunner(logger, webBrowsers);

            StartupBrowserCommunicationTimeoutMonitor();
        }
Exemple #3
0
 internal TeamCityRunner(
     ILogger logger,
     IEventSubscriptionManager eventSubscriptionManager,
     IEventPublisher eventPublisher,
     IWebServer webServer,
     List <IWebBrowser> webBrowsers,
     TeamCityTestResultHandler teamCityTestResultHandler,
     string xapPath,
     IDialogMonitorRunner dialogMonitorRunner)
     : base(logger, eventSubscriptionManager, eventPublisher, webServer, webBrowsers, xapPath, dialogMonitorRunner)
 {
     _eventSubscriptionManager  = eventSubscriptionManager;
     _teamCityTestResultHandler = teamCityTestResultHandler;
 }
        internal OnetimeRunner(
            ILogger logger,
            IEventSubscriptionManager eventSubscriptionManager,
            IEventPublisher eventPublisher,
            IWebServer webServer,
            List <IWebBrowser> webBrowsers,
            string xapPath,
            IDialogMonitorRunner dialogMonitorRunner)
        {
            _logger = logger;
            _eventSubscriptionManager = eventSubscriptionManager;
            _webServer           = webServer;
            _webBrowsers         = webBrowsers;
            _xapPath             = xapPath;
            _dialogMonitorRunner = dialogMonitorRunner;

            _testResultAggregator = new TestResultAggregator(logger, eventPublisher, _xapPath);
            _eventSubscriptionManager.AddListener(_testResultAggregator);
            _eventSubscriptionManager.AddListener(this);
        }
        public IRunner CreateContinuousTestRunner(IEnumerable <StatLightConfiguration> statLightConfigurations)
        {
            if (statLightConfigurations == null)
            {
                throw new ArgumentNullException("statLightConfigurations");
            }

            var webServer = _ioc.Resolve <InMemoryWebServer>();

            IEnumerable <IWebBrowser> webBrowsers = GetWebBrowsers().ToList();

            IDialogMonitorRunner dialogMonitorRunner = SetupDialogMonitorRunner(_logger, webBrowsers);

            StartupBrowserCommunicationTimeoutMonitor();

            CreateAndAddConsoleResultHandlerToEventAggregator();

            return(new ContinuousConsoleRunner(_logger, _eventSubscriptionManager, _eventPublisher,
                                               webServer, webBrowsers, dialogMonitorRunner, _ioc.Resolve <ICurrentStatLightConfiguration>()));
        }
Exemple #6
0
        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();
        }
Exemple #7
0
        internal ContinuousConsoleRunner(
            ILogger logger,
            IEventSubscriptionManager eventSubscriptionManager,
            IEventPublisher eventPublisher,
            IWebServer webServer,
            IEnumerable <IWebBrowser> webBrowsers,
            IDialogMonitorRunner dialogMonitorRunner,
            ICurrentStatLightConfiguration currentStatLightConfiguration)
        {
            eventSubscriptionManager.AddListener(this);
            _logger = logger;
            _eventSubscriptionManager = eventSubscriptionManager;
            _eventPublisher           = eventPublisher;
            _webServer                     = webServer;
            _webBrowsers                   = webBrowsers;
            _dialogMonitorRunner           = dialogMonitorRunner;
            _currentStatLightConfiguration = currentStatLightConfiguration;
            Func <string, string> getFullXapPath = path => new FileInfo(path).FullName;
            var xapFiles = currentStatLightConfiguration.Select(x => getFullXapPath(x.Server.XapToTestPath));

            _statLightConfigurations    = currentStatLightConfiguration.ToDictionary(x => getFullXapPath(x.Server.XapToTestPath), x => x);
            _xapFileBuildChangedMonitor = new XapFileBuildChangedMonitor(eventPublisher, xapFiles);
            xapFiles.Each(e => _initialXaps.Add(new XapFileBuildChangedServerEvent(e)));
            _currentFilterString = currentStatLightConfiguration.First().Client.TagFilter;
            QueueInitialXaps();

            _runnerTask = new Thread(() =>
            {
                TryRun();

                while (!ShouldExitFromInput())
                {
                    TryRun();
                }
            });
        }
        private void BuildAndReturnWebServiceAndBrowser(
            ILogger logger,
            out IWebServer webServer,
            out IEnumerable<IWebBrowser> webBrowsers,
            out IDialogMonitorRunner dialogMonitorRunner)
        {
            webServer = _ioc.Resolve<InMemoryWebServer>();

            webBrowsers = GetWebBrowsers();

            dialogMonitorRunner = SetupDialogMonitorRunner(logger, webBrowsers);

            StartupBrowserCommunicationTimeoutMonitor();
        }
        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();
        }