private void OnTestHarnessCompleted(object sender, TestHarnessCompletedEventArgs e)
        {
            // Setup initial conditions.
            if (!IsRunning) return;

            // Write output to HTML DOM.
            runState.Write();
            runState = null;

            // Finish up.
            IsRunning = false;
        }
示例#2
0
 private void HandleTestCompleted(object sender, TestHarnessCompletedEventArgs e)
 {
     var testHarness = sender as UnitTestHarness;
     foreach (var result in testHarness.Results)
     {
         switch (result.Result)
         {
             case TestOutcome.Passed:
             case TestOutcome.Completed:
                 break;
             default:
                 if (System.Diagnostics.Debugger.IsAttached)
                 {
                     System.Diagnostics.Debugger.Break();
                 }
                 break;
         }
     }
     BrightstarDB.Client.BrightstarService.Shutdown(false);
 }
示例#3
0
        private void CurrentHarness_TestHarnessCompleted(object sender, TestHarnessCompletedEventArgs e)
        {
            if (!_hasAlreadySentSignalTestCompleteClientEvent)
            {
                _hasAlreadySentSignalTestCompleteClientEvent = true;

                var state = e.State;
                var signalTestCompleteClientEvent = new SignalTestCompleteClientEvent
                {
                    Failed = state.Failed,
                    TotalFailureCount = state.Failures,
                    TotalTestsCount = state.TotalScenarios,
                };
                Server.SignalTestComplete(signalTestCompleteClientEvent);
            }
        }
示例#4
0
 /// <summary>
 /// Call the TestHarnessCompleted event.
 /// </summary>
 /// <param name="args">The test harness completed event arguments.</param>
 private void OnTestHarnessCompleted(TestHarnessCompletedEventArgs args)
 {
     var handler = TestHarnessCompleted;
     if (handler != null)
     {
         handler(this, args);
     }
 }
示例#5
0
		/// <summary>
		/// Returns true to indicate that the process can be shut down.
		/// </summary>
		/// <param name="e"></param>
		/// <returns></returns>
		public bool ProcessCompleted (TestHarnessCompletedEventArgs e, Action onCompleted)
		{
			string msg;

			try {
				if (filename == null)
					return true;

				if (writer != null)
					writer.Flush ();

				msg = text.ToString ();

				if (string.IsNullOrEmpty (msg))
					return true;

				LogRequest request = new LogRequest ();
				request.provider = this;
				request.uri = new Uri (baseuri + "MoonLogProvider.aspx?filename=" + filename, UriKind.Absolute);
object _o = WebRequest.Create (request.uri);
Console.WriteLine (_o.GetType());
				request.httprequest = (HttpWebRequest) _o;
				//request.httprequest = (HttpWebRequest) WebRequest.Create (request.uri);
				request.httprequest.Method = "POST";
				request.httprequest.ContentType = "text/xml";// "application/x-www-form-urlencoded";
				request.message = msg + Environment.NewLine;
				
				// This cwl is required, the test harness looks for it in stdout to find
				// the filename we write to.
				Console.WriteLine ("MoonLogProvider: sending request to: {0}", request.uri);
				
				request.httprequest.BeginGetRequestStream (RequestCallback, request);

				on_completed = onCompleted;

				return false;
			} catch (Exception ex) {
				Console.WriteLine ("Exception while trying to send result: {0}", ex.ToString ());
				return true;
			}
		}
 /// <summary>
 /// Handles the test harness complete event, to display results.
 /// </summary>
 /// <param name="sender">The source object.</param>
 /// <param name="e">The event data.</param>
 private void OnTestHarnessCompleted(object sender, TestHarnessCompletedEventArgs e)
 {
     ExpandCollapseTestStage(false);
 }
示例#7
0
文件: App.xaml.cs 项目: igalse/NLog
        void TestHarness_TestHarnessCompleted(object sender, TestHarnessCompletedEventArgs e)
        {
            var harness = new MyHarness();

            vsProvider.WriteLogFile(harness);
            InvokeDomMethod("testCompleted", harness.TrxContent);
        }
示例#8
0
文件: App.xaml.cs 项目: semirs/CellAO
        void TestHarness_TestHarnessCompleted(object sender, TestHarnessCompletedEventArgs e)
        {
            var harness = new MyHarness();

            vsProvider.WriteLogFile(harness);

            var wc = new WebClient();
            wc.UploadStringAsync(new Uri(baseUrl, "/Completed"), harness.TrxContent);
        }
示例#9
0
 /// <summary>
 /// Call the TestHarnessCompleted event.
 /// </summary>
 /// <param name="args">The test harness completed event arguments.</param>
 private void OnTestHarnessCompleted(TestHarnessCompletedEventArgs args)
 {
     if (TestHarnessCompleted != null)
     {
         TestHarnessCompleted(this, args);
     }
 }
示例#10
0
文件: Testing.cs 项目: snorp/moon
		private static void Harness_Completed (object sender, TestHarnessCompletedEventArgs e)
		{
			try {
				if (moonlog.ProcessCompleted (e, ShutdownHarness)) {
					ShutdownHarness ();
				}
			} catch (Exception ex) {
				Console.WriteLine (ex.Message);
			}
		}
示例#11
0
 static void TestHarnessCompleted(object sender, TestHarnessCompletedEventArgs e) {
     ((SilverlightTestGUILog)TestHarness.Settings.LogProviders[0]).ProcessEndMessage();
 }
        /// <summary>
        /// Handles the test harness complete event, to display results.
        /// </summary>
        /// <param name="sender">The source object.</param>
        /// <param name="e">The event data.</param>
        private void OnTestHarnessCompleted(object sender, TestHarnessCompletedEventArgs e)
        {
            _slides.Add(SlideTestAssemblies);
            _slides.MoveTo(SlideTestAssemblies);

            _slides.Add(SlideTestClasses);
            _slides.Add(SlideTestMethods);
            _slides.Add(SlideTestMethodDetails);

            if (_model.Data.TestAssemblies.Count > 0)
            {
                SlideTestClasses.DataContext = _model.Data.TestAssemblies[0];

                // Auto-matically navigate, just one result
                if (_model.Data.TestAssemblies.Count == 1)
                {
                    _slides.MoveTo(SlideTestClasses);
                }
            }
        }