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

Hi,

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,

Jim

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

11 comments

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

Please check there is no setUp/tearDown methods that crashes

0

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?

0

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.

0

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"

0

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?

0

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

0

Any idea why those namespaces are coming up as ignored?

0

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

0

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

0

It is a bug, could you please post it to our tracker at http://youtrack.jetbrains.net

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.

0

Please sign in to leave a comment.