nunit-core team mailing list archive
-
nunit-core team
-
Mailing list archive
-
Message #03253
[Bug 1071819] Re: Test time includes execution time of Setup and Teardown methods
Hi Dave,
First I'll address NUnit 2.6.x, then NUnit 3.0....
NUnit 2.6.x
SetUp plus Test plus TearDown have been treated as a single conceptual unit for 12 years and it seems like a very big surprise for users for us to change it. However, now that you have explained why it seems misleading, I think we could explain it a lot better in the docs. We'll do that for 2.6.3.
Regarding the xml output, I'm a bit confused. There is no "test-step"
element in the NUnit xml results. Are you looking at something created
by another app from the NUnit output?
NUnit 3.0
For 3.0, the door is open to making more significant changes. In fact,
some greater level of detail in the xml is a direction I'd like to go.
I'm adding this issue to the NUnit 3.0 project as well, as a reminder to
re-consider the issues you raise there.
Charlie
** Changed in: nunitv2
Status: New => Triaged
** Changed in: nunitv2
Importance: Undecided => Low
** Also affects: nunit-3.0
Importance: Undecided
Status: New
** Changed in: nunit-3.0
Status: New => Triaged
** Changed in: nunit-3.0
Importance: Undecided => Wishlist
--
You received this bug notification because you are a member of NUnit
Developers, which is subscribed to NUnit V2.
https://bugs.launchpad.net/bugs/1071819
Title:
Test time includes execution time of Setup and Teardown methods
Status in NUnit Test Framework:
Triaged
Status in NUnit V2 Test Framework:
Triaged
Bug description:
The calculated time of a test includes its SetUp and TearDown methods.
This includes:
The "time" attribute in the "test-case" element in an XML report is
not limited to the execution time of the decorated test method.
The "MaxTime" attribute fails on this same value (time of Setup + time
of teardown + time of test). This is first of all misleading, and
secondly problematic.
A work around would appear to be to avoid Setup and Teardown methods
(as has been suggested for other reasons by some) and do
setup/teardown in the scope of the fixture or the test class
constructor/destructor. In many cases, inlining setup and teardown
within the test case itself is not a feasible workaround.
To manage notifications about this bug go to:
https://bugs.launchpad.net/nunit-3.0/+bug/1071819/+subscriptions
References