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; }
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); }
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); } }
/// <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); } }
/// <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); }
void TestHarness_TestHarnessCompleted(object sender, TestHarnessCompletedEventArgs e) { var harness = new MyHarness(); vsProvider.WriteLogFile(harness); InvokeDomMethod("testCompleted", harness.TrxContent); }
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); }
/// <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); } }
private static void Harness_Completed (object sender, TestHarnessCompletedEventArgs e) { try { if (moonlog.ProcessCompleted (e, ShutdownHarness)) { ShutdownHarness (); } } catch (Exception ex) { Console.WriteLine (ex.Message); } }
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); } } }