コード例 #1
0
 /// <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);
 }
コード例 #2
0
        private void getTestBtn_Click(object sender, EventArgs e)
        {
            #region Start Test Validation
            CheckSelections(); //Check to make sure the test is ready
            if (testready == true) //test is ready
            {
                if (ScriptBox.SelectedItems.Count == 1)
                {
                    ReportingBox.Clear();

                    PopulateBrowserList(); //grab all selected browsers
                    PopulateScriptList();  //grap all selected scripts

                    if (radioButtonConnect.Checked == true) //Send off to the Connect class to run the test
                    {
                        controller = new GarminConnect(browser, scriptlist,
                            ref ReportingBox, URLBox.Text);

                    }

                    else if (radioButtonBuyGarmin.Checked == true)  //Send off to the BuyClass to run the test.
                    {
                        controller = new BuyGarmin(browser, scriptlist,
                            ref ReportingBox, URLBox.Text);
                    }
                    else if (radioButtonmyGarmin.Checked == true)  //Send off to my class to run test.
                    {
                        controller = new MyGarmin(browser, scriptlist,
                            ref ReportingBox, URLBox.Text);
                    }
                    else if (radioButtonElastic.Checked == true)
                    {
                        controller = new ElasticPath(browser, scriptlist,
                            ref ReportingBox, URLBox.Text);
                    }
                    else if (radioButtonAutoOEM.Checked == true)
                    {
                        controller = new AutoOEM(browser, scriptlist,
                            ref ReportingBox, URLBox.Text);
                    }

                    testlist = controller.SendTests();
                    listBoxTests.Items.Clear();
                    for (int i = 0; i < testlist[ScriptBox.SelectedIndex].Count; i++)
                    {
                        listBoxTests.Items.Add(testlist[ScriptBox.SelectedIndex][i]);
                    }
                }
                else
                {
                    MessageBox.Show("Please only select one Script");
                }

            }
            else  // If something was forgotten.
            {
                MessageBox.Show("Please choose a project, browser(s) and script(s)");
            }
            #endregion
        }