SetupFixture methods are executed even if no tests from their namespace are selected to run

Bug #1045646 reported by Alex Shtof
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
NUnit Framework
Triaged
Wishlist
Unassigned

Bug Description

We have test fixtures that are marked with the [Explicit] attribute. Their namespace also contains a class with [SetupFixture] attribute and [SetUp] and [TearDown] methods.

When we use the console runner it successfully ignores those tests, but their SetupFixture code still runs.

We assumed that it would not run. It seems that this behavior is undocumented anywhere.

Revision history for this message
Charlie Poole (charlie.poole) wrote :

Although this is currently by design, it could be changed in NUnit 3.0. I've re-directed this bug to that project and I'll start a discussion about the issue on the nunit-discuss list. If you're not already a member, you may wish to join it in order to participate.

affects: nunitv2 → nunit-3.0
Changed in nunit-3.0:
status: New → Triaged
importance: Undecided → Wishlist
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.