/// <summary> /// Is not threaded yet. Will need major logic overhaul to make that happen. /// This does pass along the GUI information to run a script set. Individual tests are launched from the Individual test start button /// </summary> private void ThreadRun() { if (radioButtonBuyGarmin.Checked == true) //Send off to the BuyClass to run the test. { controller = new BuyGarmin(sBuilder, browser, scriptlist, ref ReportingBox, URLBox.Text); } else if (radioButtonConnect.Checked == true) //Send off to the Connect class to run the test { controller = new GarminConnect(sBuilder, browser, scriptlist, ref ReportingBox, URLBox.Text); } else if (radioButtonmyGarmin.Checked == true) //Send off to my class to run test. { controller = new MyGarmin(sBuilder, browser, scriptlist, ref ReportingBox, URLBox.Text); } else if (radioButtonElastic.Checked == true) { controller = new ElasticPath(sBuilder, browser, scriptlist, ref ReportingBox, URLBox.Text); } else if (radioButtonAutoOEM.Checked == true) { controller = new AutoOEM(sBuilder, browser, scriptlist, ref ReportingBox, URLBox.Text); } BoxTotalTests.Text = controller.testcount.ToString(); BoxTotalPassed.Text = controller.passedcount.ToString(); BoxTotalFailed.Text = controller.errorcount.ToString(); BoxTotalWarning.Text = controller.warningcount.ToString(); string time = System.DateTime.Now.ToLongDateString(); ReportingBox.SaveFile(@SaveFileBox.Text); }
private void startIndBtn_Click(object sender, EventArgs e) { #region Start Test Validation if (testready == true) //test is ready { if (listBoxTests.SelectedItems.Count == 1) { ReportingBox.Clear(); int index, test; index = ScriptBox.SelectedIndex; test = listBoxTests.SelectedIndex; controller.RunTests(index, test); //PopulateBrowserList(); //grab all selected browsers //PopulateScriptList(); //grap all selected scripts //ThreadRun(); BoxTotalTests.Text = controller.testcount.ToString(); BoxTotalPassed.Text = controller.passedcount.ToString(); BoxTotalFailed.Text = controller.errorcount.ToString(); BoxTotalWarning.Text = controller.warningcount.ToString(); string time = System.DateTime.Now.ToLongDateString(); ReportingBox.SaveFile(@SaveFileBox.Text); } else { MessageBox.Show("Please only choose one test for this action"); } } else // If something was forgotten. { MessageBox.Show("Please choose a project, browser(s) and script(s)"); } #endregion }