← Back to team overview

nunit-core team mailing list archive

[Bug 730891] Re: GUI runner option to stop upon failure

 

For anyone interested, I think I found a workaround.  The following
adding seems to do the trick:

   [NUnitAddin(Description = "Stop Upon Failure")] 
   public class StopUponFailureAddIn : IAddin, EventListener
   {
      #region IAddin Members

      public bool Install(IExtensionHost host)
      {
         if (host == null)
            throw new ArgumentNullException("host");

         IExtensionPoint listeners = host.GetExtensionPoint("EventListeners");
         if (listeners == null)
            return false;

         listeners.Install(this);
         return true;
      }

      #endregion

      #region EventListener Members

      public void RunFinished(Exception exception)
      {
      }

      public void RunFinished(TestResult result)
      {
      }

      public void RunStarted(string name, int testCount)
      {
      }

      public void SuiteFinished(TestResult result)
      {
      }

      public void SuiteStarted(TestName testName)
      {
      }

      public void TestFinished(TestResult result)
      {
         if (result.IsError || result.IsFailure)
         {
            Trace.WriteLine("STOPPING TEST EXECUTION");
            Thread.Sleep(Timeout.Infinite);
         }
      }

      public void TestOutput(TestOutput testOutput)
      {
      }

      public void TestStarted(TestName testName)
      {
      }

      public void UnhandledException(Exception exception)
      {
      }

      #endregion
   }

-- 
You received this bug notification because you are a member of NUnit
Core Developers, which is the registrant for NUnit Framework.
https://bugs.launchpad.net/bugs/730891

Title:
  GUI runner option to stop upon failure

Status in NUnit Test Framework:
  New

Bug description:
  Feature request.  Add an option to the GUI runner (maybe in Settings)
  to allow the user to specify whether to stop running multiple tests
  upon first failure.  By default the feature would be off.

  This feature would make it easier to debug intermittent failures while
  running integration tests with the GUI runner.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nunit-3.0/+bug/730891/+subscriptions


Follow ups

References