public static void Recycle() { if (_server != null) { _server.Dispose(); } var port = PortFinder.FindPort(5500); var runtime = bootstrapRuntime(); _server = new EmbeddedFubuMvcServer(runtime, GetRootDirectory(), port); }
public bool RunAllSpecs() { string title = "Running Jasmine specs for project at " + _input.SerenityFile; Console.WriteLine(title); string line = "".PadRight(title.Length, '-'); Console.WriteLine(line); buildApplication(); bool returnValue = true; resetServer(); _driver.NavigateTo <JasminePages>(x => x.AllSpecs()); IWebDriver browser = _applicationUnderTest.Driver; Wait.Until(() => browser.FindElement(By.ClassName("finished-at")).Text.IsNotEmpty(), timeoutInMilliseconds: _input.TimeoutFlag * 1000); ReadOnlyCollection <IWebElement> failures = browser.FindElements(By.CssSelector("div.suite.failed")); if (_input.Mode == JasmineMode.run && _input.VerboseFlag) { browser.As <IJavaScriptExecutor>().ExecuteScript("$('#jasmine-reporter').show();"); ReadOnlyCollection <IWebElement> logs = browser.FindElements(By.ClassName("jasmine-reporter-item")); logs.Each(message => Console.WriteLine(message.Text)); browser.As <IJavaScriptExecutor>().ExecuteScript("$('#jasmine-reporter').hide();"); } if (failures.Any()) { returnValue = false; Console.WriteLine(line); writeFailures(failures); } Console.WriteLine(); Console.WriteLine(line); writeTotals(browser); browser.Quit(); browser.SafeDispose(); _server.Dispose(); return(returnValue); }
public static void Shutdown() { _server.Dispose(); }
public void StopServer() { _server.Dispose(); }
public void TearDown() { _server.Dispose(); }
public void Dispose() { _server.Dispose(); }
public void TearDown() { _application.Dispose(); }