Esempio n. 1
0
        /// <summary>
        /// Control.Click Event handler. Where control is a single test menu item.
        /// </summary>
        /// <param name="sender">Event sender.</param>
        /// <param name="e">The <see cref="object"/> instance containing the event data.</param>
        private void TestMenu_Click(object sender, EventArgs e)
        {
            Control test = (Control)sender;

            if (!String.IsNullOrEmpty(test.Name))
            {
                DateTime startTest  = System.DateTime.Now;
                bool     testResult = ExecuteTest.Run(test.Name);
                AddTestRegistry(test.Name, testResult);
                AnimateResult(test, testResult);
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Runs all available tests
        /// </summary>
        private void RunAllTests()
        {
            //Rally, Jul 27, 2015;
            this.testResults = new Dictionary <string, bool>();

            for (int i = 0; i < this.MenuListTable.Controls.Count; i++)
            {
                Control test = this.MenuListTable.Controls[i];
                if (!String.IsNullOrEmpty(test.Name))
                {
                    //If 'Run All' is not complete, skip the ones with results
                    if (!IsFinish &&
                        test.BackColor != Color.DimGray)
                    {
                        continue;
                    }
                    DateTime startTest  = System.DateTime.Now;
                    bool     testResult = ExecuteTest.Run(test.Name);
                    AddTestRegistry(test.Name, testResult);
                    AnimateResult(test, testResult);

                    //Rally, Jul 27, 2015;
                    this.testResults.Add(test.Name, testResult);

                    //if test item fail: stop autorun
                    if (!testResult)
                    {
                        RunButton.Text      = LocRM.GetString("Resume");
                        RunButton.BackColor = Color.YellowGreen;
                        return;
                    }
                }
            }
            //When Run All completes
            RunButton.Text      = LocRM.GetString("RunAll");
            RunButton.BackColor = Color.YellowGreen;
            IsFinish            = true;
        }
Esempio n. 3
0
 /// <summary>
 /// Control.Click Event handler. Where control is a settings.
 /// Will Run app "GenerateSystemSettings"
 /// </summary>
 /// <param name="sender">Event sender.</param>
 /// <param name="e">The <see cref="object"/> instance containing the event data.</param>
 private void SettingsBtn_Click(object sender, EventArgs e)
 {
     ExecuteTest.Run("GenerateSystemSettings");
 }