Example #1
0
        /// <summary>
        ///     Handles a run event on this test case
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="args"></param>
        public void RunHandler(object sender, EventArgs args)
        {
            ClearMessages();

            ExecuteTestsHandler executeTestHandler = new ExecuteTestsHandler(BaseForm as Window, Item);

            executeTestHandler.ExecuteUsingProgressDialog(GuiUtils.MdiWindow, "Executing test steps");

            Window window = BaseForm as Window;

            if (window != null)
            {
                window.tabControl1.SelectedTab = window.testExecutionTabPage;
            }

            string runtimeErrors = "Succesful sub sequence execution.\n";

            Util.IsThereAnyError isThereAnyError = new Util.IsThereAnyError();
            if (isThereAnyError.ErrorsFound.Count > 0)
            {
                runtimeErrors = "Errors were raised while executing sub sequence.\n";
            }

            if (!executeTestHandler.Dialog.Canceled)
            {
                MessageBox.Show(
                    Resources.SubSequenceTreeNode_RunHandler_ + runtimeErrors +
                    Resources.SubSequenceTreeNode_RunHandler_Test_duration___ +
                    Math.Round(executeTestHandler.Span.TotalSeconds) + Resources.SubSequenceTreeNode_RunHandler__seconds,
                    Resources.SubSequenceTreeNode_RunHandler_Execution_report);
            }

            EfsSystem.Instance.Context.HandleEndOfCycle();
        }
Example #2
0
        /// <summary>
        /// Handles a run event on this test case
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="args"></param>
        public void RunHandler(object sender, EventArgs args)
        {
            ClearMessages();
            ExecuteTestsHandler executeTestHandler = new ExecuteTestsHandler(BaseForm as Window, Item);
            ProgressDialog      dialog             = new ProgressDialog("Executing test steps", executeTestHandler);

            dialog.ShowDialog();

            MainWindow.RefreshModel();
        }
Example #3
0
        /// <summary>
        /// Handles a run event on this test case
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="args"></param>
        public void RunHandler(object sender, EventArgs args)
        {
            ClearAll();
            ClearMessages();

            ExecuteTestsHandler executeTestsHandler = new ExecuteTestsHandler(BaseForm as Window, Item);
            ProgressDialog      dialog = new ProgressDialog("Executing test frames", executeTestsHandler);

            dialog.ShowDialog();
            MainWindow.RefreshModel();
            System.Windows.Forms.MessageBox.Show(Item.Tests.Count + " test frame(s) executed, " + executeTestsHandler.Failed + " test frame(s) failed.\nTest duration : " + Math.Round(executeTestsHandler.Span.TotalSeconds) + " seconds", "Execution report");
        }
Example #4
0
        /// <summary>
        ///     Handles a run event on this test case
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="args"></param>
        public void RunHandler(object sender, EventArgs args)
        {
            CheckRunner();
            ClearMessages();

            ExecuteTestsHandler executeTestsHandler = new ExecuteTestsHandler(BaseForm as Window, Item);
            ProgressDialog      dialog = new ProgressDialog("Executing test steps", executeTestsHandler);

            dialog.ShowDialog();

            EfsSystem.Instance.Context.HandleEndOfCycle();
        }
Example #5
0
        /// <summary>
        ///     Handles a run event on this step
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="args"></param>
        public void RunForExpectationsHandler(object sender, EventArgs args)
        {
            CheckRunner();

            Window window = BaseForm as Window;

            if (window != null)
            {
                ExecuteTestsHandler executeTestHandler = new ExecuteTestsHandler(window, Item, false);
                executeTestHandler.ExecuteUsingProgressDialog(GuiUtils.MdiWindow, "Executing test steps");

                EfsSystem.Instance.Context.HandleEndOfCycle();
                window.tabControl1.SelectedTab = window.testExecutionTabPage;
            }
        }
Example #6
0
        /// <summary>
        ///     Handles a run event on this test case
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="args"></param>
        public void RunHandler(object sender, EventArgs args)
        {
            ClearAll();
            ClearMessages();

            ExecuteTestsHandler executeTestsHandler = new ExecuteTestsHandler(Item);

            executeTestsHandler.ExecuteUsingProgressDialog(GuiUtils.MdiWindow, "Executing test frames");

            if (!executeTestsHandler.Dialog.Canceled)
            {
                MessageBox.Show(
                    Item.Tests.Count + " test frame(s) executed, " + executeTestsHandler.Failed +
                    " test frame(s) failed.\nTest duration : " + Math.Round(executeTestsHandler.Span.TotalSeconds) +
                    " seconds", "Execution report");
            }
        }