TeamCity 5.1: NUnit is ignoring some of my tests. Why?


I have an assembly that contains NUnit tests for my project.  128 tests run just fine, but all tests (an additional 12) after that are ignored.  The tests that are ignored look like the tests that are executed correctly, so I'm at a loss for why some execute and some are ignored.  All test classes are public and have [TestFixture] decorating them.  I am using the NUnit 2.5.4 runner.

Thanks for any help,


Update: As a side note, Resharper recognizes all tests and runs them just fine.


What NUnit version do you use to run those tests from TeamCity?

Please check there is no setUp/tearDown methods that crashes


I was mistaken with the version of NUnit I'm running from TeamCity.  I have it set to 2.5.3, the same version that is referenced from my tests assembly.

I dug around things a bit more and noticed that the reported ignores are just namespaces where my test classes reside.  There are only test classes in those namespaces and the base class that my test classes inherit is an abstract class, so I'm not really sure why it would report the namespace as ignored.   NUnit doesn't report that a specific test is being ignored, just a  specific namespace.  I looked through the success statuses and my NUnit tests in the "ignored" namespaces are in fact run and successful.

Although the false positives appear harmless, they are not very useful.  Is there a way to have it be silent about reporting the namespaces as ignored?


Could you please attach some example of tests that makes TeamCity NUnit reporting ignored tests.

Please check weather you use package setup / package teardown feature of NUnit.


I use [TestFixtureSetUp] and [TestFixtureTearDown], but am not aware of package setup/teardown.  I even tried moving the logic in TestFixtureSetUp and TestFixtureTearDown to each test, but that didn't help things.

I've attached a test class where the tests are run but the namespace shows up as "ignored"


Please attach build log.

Check if your test classes does not throw an exception.

What is the version of NUnit you use for tests and what is the version of NUnit set in TeamCity?


I'm using NUnit 2.5.3 with my tests and set TeamCity to use NUnit 2.5.3 as well.


Any idea why those namespaces are coming up as ignored?


Please try swithing off 'Run recently failed tests first' on build runner settings.


That fixed it, thanks!  Is this a bug or is there a reason why that was happening?


It is a bug, could you please post it to our tracker at

Test reordering feature add's some test run filtering to NUnit and run test twice. It turned out thats of a package were included in the first run.


Please sign in to leave a comment.