Exemple #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);
        }
Exemple #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
        }
Exemple #3
0
        private void startbutton_Click(object sender, EventArgs e)
        {
            CheckSelections();     //Check to make sure the test is ready
            #region Start Test Validation
            if (testready == true) //test is ready
            {
                ReportingBox.Clear();

                PopulateBrowserList(); //grab all selected browsers
                PopulateScriptList();  //grap all selected scripts
                runthread = new Thread(ThreadRun);
                runthread.Start();
                //ThreadRun();
            }
            else  // If something was forgotten.
            {
                MessageBox.Show("Please choose a project, browser(s) and script(s)");
            }
            #endregion
        }
Exemple #4
0
        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
        }