nunit-core team mailing list archive
-
nunit-core team
-
Mailing list archive
-
Message #03231
[Bug 1071819] Re: Test time includes execution time of Setup and Teardown methods
Hi Dave,
it would be useful to know the reasons why you think that this behavior
is misleading and problematic.
--
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 V2 Test Framework:
New
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/nunitv2/+bug/1071819/+subscriptions
Follow ups
References