private void StartIisExpress() { int PortNumber = int.Parse(this.BaseUrl.Substring(this.BaseUrl.LastIndexOf(':') + 1, 5)); var app = new WebApplication(ProjectLocation.FromFolder("PPCRental"), PortNumber); app.AddEnvironmentVariable("UITests"); WebServer = new IisExpressWebServer(app); WebServer.Start("Release"); }
public void SetUp() { var app = new WebApplication(ProjectLocation.FromFolder("ContosoUniversity"), 12365); app.AddEnvironmentVariable("FunctionalTests"); WebServer = new IisExpressWebServer(app); WebServer.Start("Release"); Browser = Browsers.Chrome; _mvcUrlHelper = new MvcUrlHelper(RouteConfig.RegisterRoutes(new RouteCollection())); }
private void StartIisExpress() { //int PortNumber = int.Parse(SeleniumController.BaseUrl.Substring(SeleniumController.BaseUrl.LastIndexOf(':') + 1, 5)); int PortNumber = int.Parse(BaseUrl.Substring((BaseUrl.LastIndexOf(':') + 1), (BaseUrl.LastIndexOf('/') - (BaseUrl.LastIndexOf(':') + 1)))); var app = new WebApplication(ProjectLocation.FromFolder("PPC_Rental"), PortNumber); app.AddEnvironmentVariable("UITests"); WebServer = new IisExpressWebServer(app); WebServer.Start("Release"); }
/// <summary> /// Adds an environment variable to be injected into the web application process /// </summary> /// <param name="name">The name of the environment variable</param> /// <param name="value">The optional value of the environment variable</param> public IAppConfigurator WithEnvironmentVariable(string name, string value = null) { WebApplication.AddEnvironmentVariable(name, value); return(this); }