private void onTestExecutionComplete(TestExecutor testExecutor, TestExecutionCompleteArgs args)
        {
            var description = $"Browser:  {_browser}{Environment.NewLine}Environment:  {_targetEnvironment}{Environment.NewLine}" +
                              $"Total test cases: { _totalRunTestCases}, total test steps: { _totalRunTestSteps}, total test checks: { _totalRunTestChecks}";

            _testRailClient.UpdateRun(_testRailRun.ID ?? 0, name: _testRailRun.Name, description: description);
        }
コード例 #2
0
 public override void OnTestExecutionComplete(TestExecutor testExecutor, TestExecutionCompleteArgs args)
 {
     if (sqlConnection.State != System.Data.ConnectionState.Closed)
     {
         sqlConnection.Close();
     }
 }
        private void onTestExecutionComplete(TestExecutor testExecutor, TestExecutionCompleteArgs args)
        {
            // Update UI accordingly.
            setExecutionUI(false);

            // Stop timers
            m_stopWatch.Stop();
            m_executionTimer.Stop();

            // Update trace viewer
            m_traceViewer.AppendText("Execution complete\n\n");
            m_traceViewer.ScrollToCaret();

            // Flip viewer tab control to results viewer tab.
            m_viewersTabControl.SelectedTab = m_resultsViewerTabPage;

            var node = m_testTreeView.FindNode(args.TestScriptObject);

            m_testTreeView.SelectedNode = node;

            if (node.TestScriptResult != null)
            {
                m_resultsViewer.Text = node.TestScriptResult.ToString();
            }

            Cursor.Current = Cursors.Default;
        }
        public override void OnTestExecutionComplete(TestExecutor testExecutor, TestExecutionCompleteArgs args)
        {
            int time = 1;

            Thread.Sleep(time * 1000);
            LogEvent.Debug($"{MethodInfo.GetCurrentMethod().Name} {VirtualUser}, sleep time: {time}");
        }
 private void onTestExecutionComplete(TestExecutor testExecutor, TestExecutionCompleteArgs args)
 {
     m_testOutputViewer.AppendText("Execution complete\n\n");
     m_testOutputViewer.ScrollToCaret();
     m_treeView.SelectedNode      = m_treeView.FindNode(args.TestScriptObject);
     m_tabCtrlResults.SelectedTab = this.m_tpTestResults;
     m_executionTimer.Stop();
 }
        private void onTestExecutionComplete(TestExecutor testExecutor, TestExecutionCompleteArgs args)
        {
            _isExecuting = false;

            // Give a little time to let UI processing to complete.
            Thread.Sleep(1000);

            // Set testtree to initial node executed.
            SelectedNode = FindNode(args.TestScriptObject);
        }
 private void TestExecutor_OnExecutionComplete(TestExecutor testExecutor, TestExecutionCompleteArgs args)
 {
     if (this.InvokeRequired)
     {
         OnTestExecutorExecutionCompleteDelegate d = new OnTestExecutorExecutionCompleteDelegate(onTestExecutionComplete);
         BeginInvoke(d, new object[] { testExecutor, args });
     }
     else
     {
         onTestExecutionComplete(testExecutor, args);
     }
 }
コード例 #8
0
        public override void OnTestExecutionComplete(TestExecutor testExecutor, TestExecutionCompleteArgs args)
        {
            using (StreamWriter sw = File.AppendText(_resultsFile))
            {
                sw.WriteLine(_resultsContent.ToString());
            }

            using (StreamWriter sw = File.AppendText(_metricsFile))
            {
                sw.WriteLine(_metricsContent.ToString());
            }
        }
コード例 #9
0
        public override void OnTestExecutionComplete(TestExecutor testExecutor, TestExecutionCompleteArgs args)
        {
            // Prepare and add test run summary to mail body.
            string format = "Test case summary:  Passed: {0} ({1:p1}), Failed:  {2} ({3:p1}), " +
                            "Errored:  {4} ({5:P1}), Inactive:  {6} ({7:p1}),  Total:  {8} (100%)";

            decimal total = _totalPassed + _totalFailed + _totalErrored + _totalInactive;

            string summary = string.Format(format,
                                           _totalPassed,
                                           total != 0 ? _totalPassed / total : 0,
                                           _totalFailed,
                                           total != 0 ? _totalFailed / total : 0,
                                           _totalErrored,
                                           total != 0 ? _totalErrored / total : 0,
                                           _totalInactive,
                                           total != 0 ? _totalInactive / total : 0,
                                           total);

            appendToBody(summary);

            // Prepare and send summary email.
            MailMessage mail = new MailMessage();

            mail.From = new MailAddress(_sender);

            // Add senders to collection.
            foreach (string recipient in _recipients)
            {
                mail.To.Add(recipient);
            }

            // Prepare subject line and body.
            mail.Subject = _mailSubject;
            mail.Body    = _mailBody;

            // Send it.
            SmtpClient client = new SmtpClient(_mailHost, _port);

            client.Send(mail);

            // Cleaning (probably unnecessary).
            _mailHost     = null;
            _sender       = null;
            _recipients   = null;
            _build        = null;
            _buildTrigger = null;
        }
コード例 #10
0
        private void TestExecutor_OnExecutionComplete(TestExecutor testExecutor, TestExecutionCompleteArgs args)
        {
            _listenerEventsClient?.OnTestExecutionComplete(args);

            Thread.Sleep(3000);

            var available = _listenerEventsClient?.ServiceAvailability();


            _virtualUserRuntimeState.Remove(args.VirtualUser);

            if (_virtualUserRuntimeState.Count <= 0)
            {
                finalizeTestExecution();
            }
        }
        public override void OnTestExecutionComplete(TestExecutor testExecutor, TestExecutionCompleteArgs args)
        {
            LogEvent.Debug($"{MethodInfo.GetCurrentMethod().Name} {args.VirtualUser}");

            try
            {
                if (_validExecution)
                {
                    onTestExecutionComplete(testExecutor, args);
                }
            }
            catch (Exception e)
            {
                _validExecution = false;
                LogEvent.Error(e.ToString());
                throw;
            }
        }
コード例 #12
0
        private void onTestExecutionComplete(TestExecutor testExecutor, TestExecutionCompleteArgs args)
        {
            // Stop timers
            m_stopWatch.Stop();
            m_executionTimer.Stop();

            // Update trace viewer
            var explanation = args.Explanation ?? "None";

            m_traceViewer.AppendText($"Execution complete.  Source: {args.TerminationSource}, Explanation:  {explanation}\n\n");
            m_traceViewer.ScrollToCaret();

            var node = m_testTreeView.FindNode(args.TestScriptObject);

            m_testTreeView.SelectedNode = node;

            if (node.TestScriptResult != null)
            {
                m_resultsViewer.Text = node.TestScriptResult.ToString();
            }
        }
コード例 #13
0
 public abstract void OnTestExecutionComplete(TestExecutor testExecutor, TestExecutionCompleteArgs args);
コード例 #14
0
 public override void OnTestExecutionComplete(TestExecutor testExecutor, TestExecutionCompleteArgs args)
 {
     _extent.Flush();
 }
コード例 #15
0
 public override void OnTestExecutionComplete(TestExecutor testExecutor, TestExecutionCompleteArgs args)
 {
     Debug.WriteLine("SampleTestListener2 method:  " + MethodInfo.GetCurrentMethod().Name);
     Thread.Sleep(5000);
     Debug.WriteLine("Test execution sleep complete");
 }
コード例 #16
0
 public override void OnTestExecutionComplete(TestExecutor testExecutor, TestExecutionCompleteArgs args)
 {
     resultFile           = null;
     testObjectDictionary = null;
 }
 public override void OnTestExecutionComplete(TestExecutor testExecutor, TestExecutionCompleteArgs args)
 {
     childTestPlanRunIds = new Dictionary <string, string>();
 }
コード例 #18
0
 public override void OnTestExecutionComplete(TestExecutor testExecutor, TestExecutionCompleteArgs args)
 {
     Debug.WriteLine("ExampleListener method:  " + MethodInfo.GetCurrentMethod().Name);
 }
コード例 #19
0
 internal static void fireExecutionCompleteEvent(TestExecutor testExecutor, TestExecutionCompleteArgs args)
 {
     OnExecutionComplete?.Invoke(testExecutor, args);
 }
コード例 #20
0
 private static void TestExecutor_OnExecutionComplete(TestExecutor testExecutor, TestExecutionCompleteArgs args)
 {
     LogEvent.Info(message: $"Test execution complete ({args.VirtualUser}/{args.ElapsedTime})");
 }
コード例 #21
0
 public override void OnTestExecutionComplete(TestExecutor testExecutor, TestExecutionCompleteArgs args)
 {
     throw new NotImplementedException();
 }
コード例 #22
0
        private static void TestExecutor_OnExecutionComplete(TestExecutor testExecutor, TestExecutionCompleteArgs args)
        {
            LogEvent.Info("Test execution complete");

            manualReset.Set();
        }