← Back to team overview

nunit-core team mailing list archive

[Bug 601108] [NEW] Duplicate test using abstract test fixtures

 

Public bug reported:

Reported on nunit-discuss by Victor Kropp:

I've found bug in NUnit 2.5.5 with abstract TestFixtures.
Please find the sample in attached file.

You'll see DuplicateTest 2 times (actually, as much as marked abstract classes in hierarchy)
If non-abstract class is marked as TestFixture test appears only once.

This bug was introduced in version 2.5.3.

Code that reproduces this bug...

using NUnit.Framework;

namespace NUnitBug
{
  [TestFixture]
  public abstract class NUnitDuplicateTestsBaseBaseBase
  {
  }

  [TestFixture]
  public abstract class NUnitDuplicateTestsBaseBase : NUnitDuplicateTestsBaseBaseBase
  {
  }

  public class NUnitDuplicateTests : NUnitDuplicateTestsBaseBase
  {
    [Test]
    public void DuplicateTest()
    {
    }
  }
}

** Affects: nunitv2
     Importance: Undecided
         Status: New

** Description changed:

  Reported on nunit-discuss by Victor Kropp:
  
  I've found bug in NUnit 2.5.5 with abstract TestFixtures.
  Please find the sample in attached file.
  
  You'll see DuplicateTest 2 times (actually, as much as marked abstract classes in hierarchy)
  If non-abstract class is marked as TestFixture test appears only once.
  
  This bug was introduced in version 2.5.3.
+ 
+ Code that reproduces this bug...
+ 
+ using NUnit.Framework;
+ 
+ namespace NUnitBug
+ {
+   [TestFixture]
+   public abstract class NUnitDuplicateTestsBaseBaseBase
+   {
+   }
+ 
+   [TestFixture]
+   public abstract class NUnitDuplicateTestsBaseBase : NUnitDuplicateTestsBaseBaseBase
+   {
+   }
+ 
+   public class NUnitDuplicateTests : NUnitDuplicateTestsBaseBase
+   {
+     [Test]
+     public void DuplicateTest()
+     {
+     }
+   }
+ }

-- 
Duplicate test using abstract test fixtures
https://bugs.launchpad.net/bugs/601108
You received this bug notification because you are a member of NUnit
Developers, which is subscribed to NUnit V2.

Status in NUnit V2 Test Framework: New

Bug description:
Reported on nunit-discuss by Victor Kropp:

I've found bug in NUnit 2.5.5 with abstract TestFixtures.
Please find the sample in attached file.

You'll see DuplicateTest 2 times (actually, as much as marked abstract classes in hierarchy)
If non-abstract class is marked as TestFixture test appears only once.

This bug was introduced in version 2.5.3.

Code that reproduces this bug...

using NUnit.Framework;

namespace NUnitBug
{
  [TestFixture]
  public abstract class NUnitDuplicateTestsBaseBaseBase
  {
  }

  [TestFixture]
  public abstract class NUnitDuplicateTestsBaseBase : NUnitDuplicateTestsBaseBaseBase
  {
  }

  public class NUnitDuplicateTests : NUnitDuplicateTestsBaseBase
  {
    [Test]
    public void DuplicateTest()
    {
    }
  }
}





Follow ups

References