public void RunAssemblyUsingBeginAndEndRun() { runner.Load(package1); runner.BeginRun(NullListener.NULL); TestResult result = runner.EndRun(); Assert.IsNotNull(result); ResultSummarizer summary = new ResultSummarizer(result); Assert.AreEqual(MockAssembly.Tests - MockAssembly.NotRun, summary.TestsRun); }
/// <summary> /// Handle watcher event that signals when the loaded assembly /// file has changed. Make sure it's a real change before /// firing the SuiteChangedEvent. Since this all happens /// asynchronously, we use an event to let ui components /// know that the failure happened. /// </summary> public void OnTestChanged(string testFileName) { if (Running) { reloadPending = true; } else { ReloadTest(); if (lastFilter != null && Services.UserSettings.GetSetting("Options.TestLoader.RerunOnChange", false)) { testRunner.BeginRun(this, lastFilter); } } }
/// <summary> /// Handle watcher event that signals when the loaded assembly /// file has changed. Make sure it's a real change before /// firing the SuiteChangedEvent. Since this all happens /// asynchronously, we use an event to let ui components /// know that the failure happened. /// </summary> public void OnTestChanged(string testFileName) { if (Running) { reloadPending = true; } else { ReloadTest(); if (rerunOnChange && lastFilter != null) { testRunner.BeginRun(this, lastFilter); } } }
/// <summary> /// Handle watcher event that signals when the loaded assembly /// file has changed. Make sure it's a real change before /// firing the SuiteChangedEvent. Since this all happens /// asynchronously, we use an event to let ui components /// know that the failure happened. /// </summary> public void OnTestChanged(string testFileName) { log.Info("Assembly changed: {0}", testFileName); if (Running) { reloadPending = true; } else { ReloadTest(); if (lastFilter != null && Services.UserSettings.GetSetting("Options.TestLoader.RerunOnChange", false)) { testRunner.BeginRun(this, lastFilter, lastTracing, lastLogLevel); } } }
/// <summary> /// Handle watcher event that signals when the loaded assembly /// file has changed. Make sure it's a real change before /// firing the SuiteChangedEvent. Since this all happens /// asynchronously, we use an event to let ui components /// know that the failure happened. /// </summary> public void OnTestChanged(string testFileName) { if (Running) { reloadPending = true; } else { try { events.FireTestReloading(testFileName); // Don't unload the old domain till after the event // handlers get a chance to compare the trees. TestRunner newRunner = CreateRunner( ); newRunner.Load(MakeTestPackage(loadedTestName)); testRunner.Unload(); testRunner = newRunner; loadedTest = testRunner.Test; reloadPending = false; events.FireTestReloaded(testFileName, loadedTest); } catch (Exception exception) { lastException = exception; events.FireTestReloadFailed(testFileName, exception); } } if (rerunOnChange && lastFilter != null) { testRunner.BeginRun(this, lastFilter); } }
public void RunTesterAsync() { _testRunner = GetTestRunner(); _testRunner.BeginRun(this, Filter, false, LoggingThreshold.Off); }