Phantom ignored NUnit tests

We're using the sln2008 and NUnit 2.5.0 runners in our project. We've told TeamCity to run tests from 'Company.Product.Tests\bin\Release\Company.Product.Tests.dll' and it finds them and runs fine. However, it clearly gets confused by the results and wrongly reports that the following tests were ignored:

  • Product.Tests (Company.Product.Tests.dll: Company)
  • Company.Product (Company.Product.Tests.dll)
  • Company (Company.Product.Tests.dll)
  • C:\Program Files\JetBrains\TeamCity\BuildAgent\work\37a770e368ecec56\src\ Company.Product.Tests\bin\Release\ Company.Product.Tests.dll (Rockshore.DataSpendManager.Tests.dll)
  • Tests.dll (Company.Product)


The assembly right now just has three tests in it for testing with TeamCity - there are no ignored tests in there. What can we do to get it reporting just valid tests?

5 comments
Comment actions Permalink

Hello,

Please check those tests does not marked with [Explicit] attribute.

Attach a screenshot of settings of NUnit runner from your runner settings and attach a build log of that build configuration.

What version of TeamCity was it?

Thanks!

0
Comment actions Permalink

We're on version 4.5.1 (build 8975). I've simplified the test in question to:

using NUnit.Framework;
namespace Compay.Product.Tests
{
     [TestFixture]
     public class HookupTests
     {
         [Test]
         public void ShouldPass()
         {
             Assert.That(true, Is.True);
         }
     }
}


Attached are (slightly anonymised) versions of the NUnit settings and build log. Thanks for looking!

Edited code formatting.



Attachment(s):
Project_Test_Machine_-_E0056001_32.log
NUnit Test Settings.png
0
Comment actions Permalink

I have reproduced you issue and added it to our tracker at http://www.jetbrains.net/tracker/issue2/TW-8401
Could you please watch/vote for the issue.

Please disable 'run recently failed tests first' as workaround.

Thanks!

0
Comment actions Permalink

Thanks - the workaraound works.

0
Comment actions Permalink

I think this happens to me as well. I'm on 5.1.3.

0

Please sign in to leave a comment.