nunit-core team mailing list archive
-
nunit-core team
-
Mailing list archive
-
Message #01640
[Bug 691455] [NEW] Overriding test result in TearDown
You have been subscribed to a public bug:
NUnit version 2.5.7
Runner: Console and GUI
Feature Request:
I'd love to have the ability to override a test's result (e.g.
Pass/Fail/Error) in the [TearDown] method along with the option to
overwrite the error message.
Some more background:
I just started with a team that uses NUnit for running for automation
testing. Given that NUnit is specifically built for unit testing, I've
been surprised just how well it meets our needs. The only hangup I
currently have is that we have certain classes of errors that only occur
on threads other than the main thread. Without going into details, it's
basically impossible for us respond to these errors on the main thread
without adding code everywhere to poll if any of these errors have
occurred, and if so, Assert.Fail(). Without detecting the errors at all,
our code ends up asserting or throwing an exception for something else
on the main thread which just ends up obfuscating the real problem in
the resulting TestResult.xml file.
I understand why NUnit doesn't pick up assertions/exceptions on
different threads, but we could easily workaround this if we had the
ability to override the test result and error message in the [TearDown]
method. At that point we'd know if any of these errors had occurred and
could signal the test as failing and give a more appropriate message.
** Affects: nunit-3.0
Importance: Undecided
Status: New
** Tags: feature
--
Overriding test result in TearDown
https://bugs.launchpad.net/bugs/691455
You received this bug notification because you are a member of NUnit Core Developers, which is the registrant for NUnit Framework.
References