public void CreateNewUser() { //WORKING IISExpress.Start("RestSys"); I.Open("http://localhost:56345/"); //TODO this isn't a global address I.Click("#menu li:nth-child(4) a"); Login(); I.Click("#content p a"); //creating user without data I.Click("input[type=submit]"); //Creating user test1234 I.Focus("#Name").Type("chief"); I.Focus("#Username").Type("chief"); I.Focus("input[name=newpassword]").Type("abcdef"); I.Focus("input[name=confirmpassword]").Type("abcdef"); I.Click("#IsWaiter"); I.Click("input[type=submit]"); //is new user exists ? I.Assert.Text("chief").In("tbody tr:last-child > td:nth-child(1)"); I.Assert.Text("chief").In("tbody tr:last-child > td:nth-child(2)"); //finishing test by removing user test1234 I.Click("tbody tr:last-child > td:last-child > a:last-child"); I.Click("input[type=submit]"); }
public void CreateProduct() { //WORKING IISExpress.Start("RestSys"); I.Open("http://localhost:56345/"); //TODO this isn't a global address I.Click("#menu li:nth-child(1) a"); Login(); I.Click("#content p a"); //save without any input I.Click("input[type=submit]"); //check for warning messages !!!!!!!!!! // add title I.Focus("#Title").Type("STAROPRAMEN 11°0,5l"); I.Focus("#Price").Type("25"); //save I.Click("input[type=submit]"); //is new product exists ? I.Assert.Text("STAROPRAMEN 11°0,5l").In("tbody tr:last-child > td:nth-child(1)"); I.Assert.Text("25").In("tbody tr:last-child > td:nth-child(3)"); //finishing test by removing product STAROPRAMEN 11°0,5l I.Click("tbody tr:last-child > td:last-child > a:last-child"); I.Click("input[type=submit]"); }
public WebAppFixture() { Settings.EnsureApplicationHostConfig(); SetupWebConfig(); cmswebInstance = IISExpress.Start(Settings.ApplicationHostConfig, "CMSWeb"); Warmup(); }
public void CreateStock() { //WORKING IISExpress.Start("RestSys"); I.Open("http://localhost:56345/"); //TODO this isn't a global address I.Click("#menu li:nth-child(2) a"); Login(); I.Click("#content p a"); //test empty input I.Click("input[type=submit]"); I.Focus("#Title").Type("STAROPRAMEN °11"); I.Click("input[type=submit]"); //is new stock exists ? I.Assert.Text("STAROPRAMEN °11").In("tbody tr:last-child > td:nth-child(1)"); //finishing test by removing stock STAROPRAMEN °11 I.Click("tbody tr:last-child > td:last-child > a:last-child"); I.Click("input[type=submit]"); }
public static void Init(TestContext ctx) { ServicePointManager.Expect100Continue = false; ServicePointManager.CheckCertificateRevocationList = false; ServicePointManager.ServerCertificateValidationCallback = (sender, certificate, chain, errors) => { return(true); }; _serviceManager = ServerManager.Servers().StartAll(); var iexps = Process.GetProcessesByName("IISExpress"); foreach (var iexp in iexps) { iexp.Kill(); } var projDir = new FileInfo(Assembly.GetExecutingAssembly().Location).Directory.Parent.Parent.FullName; var webroot = Path.Combine(projDir, "Websites"); _iisExpress = new IISExpress(new Parameters { Path = webroot, Port = 56123, Systray = false }); }
public void SetUp() { applicationPath = CreateATemporalCopy(Path.GetFullPath(@"..\..\..\RestService\")); UpdateConnectionString(applicationPath); iis = IISExpress.Start(applicationPath, port, sysTray: true); }
public UnauthenticatedUser(ITestOutputHelper output, IISExpress issexpress) : base(output, issexpress) { driver.Url = Site.BaseUrl + "/Account/Logout"; indexPage = new IndexPage(driver); indexPage.Browse(); }
public void Dispose() { cmswebInstance?.Stop(); cmswebInstance = null; SharedWebDriver?.Quit(); SharedWebDriver = null; CleanupWebConfig(); }
public LoginWithInvalidDetails(ITestOutputHelper output, IISExpress issexpress) : base(output, issexpress) { loginPage = new LoginPage(driver); loginPage.Browse(); loginPage.EmailAddress = "*****@*****.**"; loginPage.Password = "******"; }
public void TestFixtureSetUp() { _iisExpress = new IISExpress(); _iisExpress.Start(); string url = ConfigurationManager.AppSettings["url"]; if (string.IsNullOrEmpty(url)) url = "http://localhost:9876"; BaseUrl = url; }
public Login(ITestOutputHelper output, IISExpress issexpress) : base(output, issexpress) { loginPage = new LoginPage(driver); loginPage.Browse(); loginPage.EmailAddress = "*****@*****.**"; loginPage.Password = "******"; indexPage = new IndexPage(driver); }
public void Setup() { DeleteSqliteBinaries(); _iisExpress = new IISExpress(); _iisExpress.Start(); ConfigFileManager.CopyWebConfig(); ConfigFileManager.CopyConnectionStringsConfig(); ConfigFileManager.CopyRoadkillConfig(); Driver = LaunchChrome(); }
public void SetUp() { var testDirectoryPath = Path.Combine(TestContext.CurrentContext.TestDirectory, "..", ".."); var solutionDir = Directory.GetParent(testDirectoryPath); var path = Path.Combine(solutionDir.FullName, "SignalR.HubStrong.Tests.HubForTests"); var parameters = new Parameters { Path = path, Port = TestHubSite.Port }; iisExpress = new IISExpress(parameters); }
public void Setup() { var pathRoot = GetRootPath(); var fullPathEsb = GetPath(pathRoot, _host.Key); if (fullPathEsb == null) { throw new InvalidOperationException($"Não foi possível obter o diretório: {_host.Key} raiz da solução de testes de integração"); } _iisExpressWebApi = IISExpress.Start(fullPathEsb, 53290); }
public void EditProduct() { //WORKING IISExpress.Start("RestSys"); I.Open("http://localhost:56345/"); //TODO this isn't a global address I.Click("#menu li:nth-child(2) a"); Login(); //before test (create stock) I.Click("#content p a"); I.Focus("#Title").Type("STAROPRAMEN °11"); I.Click("input[type=submit]"); I.Click("#menu li:nth-child(1) a"); //choise edit on last I.Click("tbody tr:last-child > td:last-child > a:nth-child(1)"); //add title I.Focus("#Title").Press("{DEL 20}"); I.Focus("#Title").Type("STAROPRAMEN 11° 0,5l"); //add Stock STAROPRAMEN 11° I.Select("STAROPRAMEN °11").From(".selAddStock"); I.Focus("#amount").Press("{DEL 10}"); I.Focus("#amount").Type("0.5"); I.Click("button[type=button]"); //add correct count I.Focus("#amount").Press("{BACKSPACE 10}"); I.Focus("#amount").Type("1"); I.Click("button[type=button]"); //save all I.Click("input[type=submit]"); //control of adding informations I.Click("tbody tr:last-child > td:last-child > a:nth-child(2)"); //title asserttesttest I.Assert.Text("STAROPRAMEN 11°0,5l").In("#detailTitle"); //Stock assert I.Assert.Text("STAROPRAMEN °11 1").In("#detailStock > li:last-child"); //after test (remove stock) I.Click("#menu li:nth-child(2) a"); I.Click("tbody tr:last-child > td:last-child > a:last-child"); I.Click("input[type=submit]"); }
public void TestFixtureSetUp() { _iisExpress = new IISExpress(); _iisExpress.Start(); string url = ConfigurationManager.AppSettings["url"]; if (string.IsNullOrEmpty(url)) { url = "http://localhost:9876"; } BaseUrl = url; }
private void MainWindow_Load(object sender, EventArgs e) { _store = Data.SQLite.DataStore.Instance; _parser = new PartyPoker.PartyPokerParser(_store); _parser.HandImported += new EventHandler(parser_HandImported); string exe = Application.ExecutablePath; System.IO.FileInfo exeInfo = new System.IO.FileInfo(exe); System.IO.DirectoryInfo dirInfo = exeInfo.Directory; string programDir = dirInfo.FullName; string appPath = System.IO.Path.Combine(programDir, "Http"); int port = this.IISExpressPort; bool sysTray = this.IISExpressSysTray; _iisExpress = new IISExpress(appPath, port, sysTray); string httpPath = _iisExpress.Path; bool httpPathExists = System.IO.Directory.Exists(httpPath); if (httpPathExists) { if (_iisExpress.IsRunning == false) { this.StartIIS(); } } else { Logger.Warn("Hand Analysis ASP.NET Applicaton not found at {0}", httpPath); } // Parse existing files this.DiscoverExistingFiles(); this.UpdateStats(); this.StartImport(); _monitor = new PartyPoker.HandHistoryMonitor(_parser.HandHistoryDir); _monitor.FileChanged += new FileSystemEventHandler(this._monitor_FileChanged); _monitor.Start(); _statsRefreshTimer.Start(); this.RefreshPlayers(); }
static void Main(string[] args) { Console.Out.WriteLine("Launching IIS Express..."); IISExpress iis1 = IISExpress.Start( @"C:\Users\Administrator\Documents\IISExpress\config\applicationhost.config", @"WebSite1(1)", @"Clr4IntegratedAppPool"); IISExpress iis2 = IISExpress.Start( @"C:\Users\Administrator\Documents\IISExpress\config\applicationhost2.config", @"WebSite1(1)", @"Clr4IntegratedAppPool"); Console.Out.WriteLine("Press ENTER to kill"); Console.In.ReadLine(); iis1.Stop(); iis2.Stop(); }
public Logout(ITestOutputHelper output, IISExpress issexpress) : base(output, issexpress) { //driver.Url = "http://*****:*****@aspnetboilerplate.com"; loginPage.Password = "******"; loginPage.Login(); WaitForUrlChange(driver.Url); WaitForReady(); // check redirected to index }
public void EditUser() { //WORKING IISExpress.Start("RestSys"); I.Open("http://localhost:56345/"); //TODO this isn't a global address I.Click("#menu li:nth-child(4) a"); Login(); newUserForTest();//create user test1234 with pass test1234 // I.Click("#menu li:nth-child(4) a"); I.Click("tbody tr:last-child > td:last-child > a:nth-child(1)"); //change to null I.Focus("#Name").Press("{DEL 10} "); I.Focus("#Username").Press("{DEL 10}"); I.Click("input[type=submit]"); //test after setting all null //poresit kontrolu // I.Assert.Text("The Name field is required.").In(".form-horizontal > div:nth-child(2) > div > span"); // I.Assert.Text(" The Username field is required.").In(".form-horizontal > div:nth-child(3) > div > span"); //set new data of user I.Focus("#Name").Type("John T"); I.Focus("#Username").Type("testcase"); I.Focus("input[name=newpassword]").Type("12345"); I.Focus("input[name=confirmpassword]").Type("12345"); I.Click("#IsWaiter"); //set from true to false I.Click("input[type=submit]"); // is user name and username has changed ? I.Assert.Text("John T").In("tbody tr:last-child > td:nth-child(1)"); I.Assert.Text("testcase").In("tbody tr:last-child > td:nth-child(2)"); // removing user test12345 I.Click("tbody tr:last-child > td:last-child > a:last-child"); I.Click("input[type=submit]"); }
private void YesButton_Click(object sender, RoutedEventArgs e) { busyIndicator.IsBusy = true; BackgroundWorker worker = new BackgroundWorker(); //worker.WorkerReportsProgress = true; worker.DoWork += delegate(object s, DoWorkEventArgs args) { Thread.Sleep(1000); args.Result = IISExpress.Initialize(); }; worker.RunWorkerCompleted += delegate(object s, RunWorkerCompletedEventArgs args) { busyIndicator.IsBusy = false; bool isTimedOut = false; if (args.Error != null) { ResultText = "There was an error! " + args.Error; } else { isTimedOut = !((bool)args.Result); ResultText = isTimedOut ? "Timeout During Initialization" : "Initialization Done!"; } this.DialogResult = !isTimedOut; }; //worker.ProgressChanged += delegate(object s, ProgressChangedEventArgs args) //{ // ResultText = args.ProgressPercentage.ToString() + "%"; //}; if (worker.IsBusy != true) { worker.RunWorkerAsync(); } }
/// <summary> /// Start IIS Express hosts according to the config file /// </summary> public static void StartIfEnabled() { string enableIISExpress = ConfigurationManager.AppSettings["EnableIISExpress"]; // bool value from config file string pathToConfigFile = ConfigurationManager.AppSettings["IISExpressConfigFile"]; // path string to iis configuration file string quotedPathToConfigFile = '"' + pathToConfigFile + '"'; if (bool.TryParse(enableIISExpress, out bool isIISExpressEnabled) && isIISExpressEnabled && File.Exists(pathToConfigFile)) { hosts.Add(IISExpress.Start( new Dictionary <string, string> { { "systray", "false" }, { "config", quotedPathToConfigFile }, { "site", "Site1" } })); hosts.Add(IISExpress.Start( new Dictionary <string, string> { { "systray", "false" }, { "config", quotedPathToConfigFile }, { "site", "Site2" } })); } }
public WorkOnTask(ITestOutputHelper output, IISExpress issexpress) : base(output, issexpress) { }
public AddPublicTask(ITestOutputHelper output, IISExpress issexpress) : base(output, issexpress) { }
public ConfirmFriendRequest(ITestOutputHelper output, IISExpress issexpress) : base(output, issexpress) { }
public AssignExistingTaskToUser(ITestOutputHelper output, IISExpress issexpress) : base(output, issexpress) { }
private void Start(WebSite webSite) { var iisExpressInstance = IISExpress.Start(webSite); this.runningProcesses[webSite.Id] = iisExpressInstance; }
public AddFriend(ITestOutputHelper output, IISExpress issexpress) : base(output, issexpress) { }
public AddFriendWithUnknownEmail(ITestOutputHelper output, IISExpress issexpress) : base(output, issexpress) { }
public ForgotPasswordUnknownEmail(ITestOutputHelper output, IISExpress issexpress) : base(output, issexpress) { loginPage = new LoginPage(driver); loginPage.Browse(); }
public RegisterUser(ITestOutputHelper output, IISExpress issexpress) : base(output, issexpress) { registerPage = new RegisterPage(driver); }
public void Dispose() { cmswebInstance.Stop(); cmswebInstance = null; CleanupWebConfig(); }
public DeclineFriendRequest(ITestOutputHelper output, IISExpress issexpress) : base(output, issexpress) { }