Unit Tests Without Ignore Label Being Ignored

When running unit tests using nunit, multiple tests are getting ignored despite not being marked as "Explicit". This is the code I am trying to run:

 

using NUnit.Framework;

namespace TDMS.Library.Test
{
    [TestFixture]
    class TestFile
    {
        [Test]
        public void Test1()
        {
        }

        [Test]
        public void Test2()
        {
        }

        //[Test]
        //[TestCase(1)]
        //[TestCase(10)]
        //[TestCase(100)]
        //public void TestWithTestCases(int input)
        //{
        //}

        [Test]
        [Explicit("DummyTest1")]
        [TestCase(185, 2017)]
        public void TestExplicit1(int param1, int param2)
        {
        }

        [Test]
        [Explicit("DummyTest2")]
        [TestCase(200, 1990)]
        public void TestExplicit2(int param1, int param2)
        {
        }
    }
}

The output I get from using 'Run All' is as follows:

 

   TestFile (4 tests) [0:00.001] Ignored
    Test1 [0:00.000] Ignored: DummyTest2
    Test2 [0:00.001] Ignored: DummyTest2
    TestExplicit1 (1 test) [0:00.000] Ignored: DummyTest1
     TestExplicit1(185,2017) [0:00.007] Ignored: Test should be run explicitly
    TestExplicit2 (1 test) [0:00.000] Ignored: DummyTest2
     TestExplicit2(200,1990) [0:00.000] Ignored: DummyTest1

 

My co-worker ran this same file, and had the test ignored at first, but then they ran and completed, so I think my test process is just not completing fully. When running these tests, I get this pop-up after:

If I hit no, the pop-up just keeps happening. Seems like something is happening to single that all tests are complete without them actually being complete. I am out of ideas at this point though.

0

Please sign in to leave a comment.