Creates an IIS Express config file that hosts two websites (Witness and website under test). Can start the website processes. Deletes the file when disposed.
Inheritance: IDisposable
Ejemplo n.º 1
0
        public override bool Execute()
        {
            ExpandPropertyValues();

            using (var iisConfig = new IisConfiguration(witnessRootDirectory, Witness, WitnessPort, Website, WebsitePort))
            {
                var websites = iisConfig.StartWebsites();
                foreach (var website in websites)
                {
                    PipeProcessToLog(website);
                }

                var phantomjs = StartPhantomJS();
                phantomjs.WaitForExit();

                foreach (var website in websites)
                {
                    if (website.HasExited)
                    {
                        continue;
                    }
                    Log.LogMessage("Stopping IIS Express.");
                    website.Kill();
                    website.WaitForExit();
                }
            }

            return(true);
        }
Ejemplo n.º 2
0
        public override bool Execute()
        {
            ExpandPropertyValues();

            using (var iisConfig = new IisConfiguration(witnessRootDirectory, Witness, WitnessPort, Website, WebsitePort))
            {
                var websites = iisConfig.StartWebsites();
                foreach (var website in websites)
                {
                    PipeProcessToLog(website);
                }

                var phantomjs = StartPhantomJS();
                phantomjs.WaitForExit();

                foreach (var website in websites)
                {
                    if (website.HasExited) continue;
                    Log.LogMessage("Stopping IIS Express.");
                    website.Kill();
                    website.WaitForExit();
                }
            }

            return true;
        }