nunit-core team mailing list archive
-
nunit-core team
-
Mailing list archive
-
Message #01832
[Bug 730891] Re: GUI runner option to stop upon failure
There is a more flexible way to do this that I just found out about.
In TearDown() one could write:
if (TestContext.CurrentContext.Result.Status == TestStatus.Failed)
{ Thread.Sleep(Timeout.Infinite); }
The problems with that approach are:
1. The error call stack does not get printed in the "Error and Failures" tab (which makes sense, since TearDown() has not completed). Ideally the CurrentContext would include the exception also, so that the call stack could be output to the "Text Output" tab.
2. Thread.Sleep(Timeout.Infinite) does not allow the GUI to close cleanly, so the process has to be killed through task manager. Ideally there would be a way to tell any NUnit client (whether GUI or console) to stop running a batch of tests from inside teardown.
Could the above two changes be considered instead of my original feature
request? I rather like those than a GUI-centric feature. Plust they
allow for a higher control and granularity than a simple global GUI
setting to "Stop Upon Failure".
Are TextContexts something carried over to NUnit 3.0?
--
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