Пример #1
0
 public void TearDown()
 {
     Console.WriteLine("TearDown SystemTests");
     DevWebServer.Stop();
     BrowserApp.Stop();
     VstsSettings.RestoreWebConfig();
 }
Пример #2
0
        public virtual void SetUp()
        {
            IE.Settings.AutoMoveMousePointerToTopLeft = false;

            _webServer = new DevWebServer();
            _webServer.Start();
            _ie = new IE(_webServer.BaseUrl, true);
        }
Пример #3
0
        public void RunAndStop()
        {
            DevWebServer server = new DevWebServer(1111, Path.GetFullPath(TEST_DIRECTORY));

            Assert.AreNotEqual(null, server.WebServerExecutablePath);

            server.Run();
            System.Threading.Thread.Sleep(3000);
            int     serverProcessID = server.ProcessID;
            Process serverProcess   = System.Diagnostics.Process.GetProcessById(serverProcessID);

            Assert.AreEqual(true, serverProcess.Responding);
            Assert.AreEqual(false, serverProcess.HasExited);

            server.Stop();
            server.Dispose();
            Assert.AreEqual(true, serverProcess.HasExited);
        }
Пример #4
0
        public void SetUp()
        {
            if (TestRegistry.TestHasFailed)
            {
                return; // no need to setup Selenium
            }
            Console.WriteLine("SetUp SystemTests");
            var runHeadless = RunHeadless();

            try
            {
                VstsSettings.UpdateWebConfig();
                DevWebServer.Start();
                BrowserApp.Start(runHeadless);
            }
            catch
            {
                TearDown();
                throw;
            }
        }