Explicit test runs if /exclude parameter is used

Bug #1006604 reported by Vitalii Maklai
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
NUnit V2
Fix Released
High
Charlie Poole

Bug Description

Assume we have the following test fixture:
[TestFixture]
class Test1
{
    [Test]
    [Category("Negative")]
    public void SomeNegativeTest()
    {
        // ...
    }

    [Test]
    [Explicit]
    public void SomeExplicitTest()
    {
        // ...
    }
}

If one runs nunit.exe against this test fixture using '/exclude=Negative', the explicit test runs. The same issue appears when Negative category is excluded manually in UI.

UPDATE:
NUnit version: 2.6.0.12051

Related branches

Revision history for this message
Charlie Poole (charlie.poole) wrote : Re: [Nunit-core] [Bug 1006604] [NEW] Explicit test runs if /exclude parameter is used

What version of NUnit are you running? Some problems with Explicit
were fixed in 2.6, but it's also possible that new issues were
introduced.

Charlie

On Wed, May 30, 2012 at 10:31 PM, Vitalii Maklai <email address hidden> wrote:
> Public bug reported:
>
> Assume we have the following test fixture:
> [TestFixture]
> class Test1
> {
>    [Test]
>    [Category("Negative")]
>    public void SomeNegativeTest()
>    {
>        // ...
>    }
>
>    [Test]
>    [Explicit]
>    public void SomeExplicitTest()
>    {
>        // ...
>    }
> }
>
> If one runs nunit.exe against this test fixture using
> '/exclude=Negative', the explicit test runs. The same issue appears when
> Negative category is excluded manually in UI.
>
> ** Affects: nunitv2
>     Importance: Undecided
>         Status: New
>
> --
> You received this bug notification because you are a member of NUnit
> Developers, which is subscribed to NUnit V2.
> https://bugs.launchpad.net/bugs/1006604
>
> Title:
>  Explicit test runs if /exclude parameter is used
>
> Status in NUnit V2 Test Framework:
>  New
>
> Bug description:
>  Assume we have the following test fixture:
>  [TestFixture]
>  class Test1
>  {
>      [Test]
>      [Category("Negative")]
>      public void SomeNegativeTest()
>      {
>          // ...
>      }
>
>      [Test]
>      [Explicit]
>      public void SomeExplicitTest()
>      {
>          // ...
>      }
>  }
>
>  If one runs nunit.exe against this test fixture using
>  '/exclude=Negative', the explicit test runs. The same issue appears
>  when Negative category is excluded manually in UI.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/nunitv2/+bug/1006604/+subscriptions
>
> _______________________________________________
> Mailing list: https://launchpad.net/~nunit-core
> Post to     : <email address hidden>
> Unsubscribe : https://launchpad.net/~nunit-core
> More help   : https://help.launchpad.net/ListHelp

Revision history for this message
Vitalii Maklai (vmcl) wrote :

Sorry, I forgot to mention the version: 2.6.0.12051.

Vitalii Maklai (vmcl)
description: updated
Revision history for this message
Charlie Poole (charlie.poole) wrote :

It would be great if someone else could also try this and verify the problem.

The proper behavior - as designed - is that use of /exclude alone (without also using /include) should _not_ cause any explicit tests to be run. This behavior was introduced some time back and has worked for a long time but it's possible that some recent changes have caused a regression.

Revision history for this message
Jv (jv-ravichandran) wrote : Re: [Bug 1006604] Re: Explicit test runs if /exclude parameter is used

i would but i m not sure of the scenarios when /exclude or /include in a
positive/negative state makes a difference.

jv

On Wed, Jun 6, 2012 at 2:13 AM, Charlie Poole <email address hidden> wrote:

> It would be great if someone else could also try this and verify the
> problem.
>
> The proper behavior - as designed - is that use of /exclude alone
> (without also using /include) should _not_ cause any explicit tests to
> be run. This behavior was introduced some time back and has worked for a
> long time but it's possible that some recent changes have caused a
> regression.
>
> --
> You received this bug notification because you are a member of NUnit
> Developers, which is subscribed to NUnit V2.
> https://bugs.launchpad.net/bugs/1006604
>
> Title:
> Explicit test runs if /exclude parameter is used
>
> Status in NUnit V2 Test Framework:
> New
>
> Bug description:
> Assume we have the following test fixture:
> [TestFixture]
> class Test1
> {
> [Test]
> [Category("Negative")]
> public void SomeNegativeTest()
> {
> // ...
> }
>
> [Test]
> [Explicit]
> public void SomeExplicitTest()
> {
> // ...
> }
> }
>
> If one runs nunit.exe against this test fixture using
> '/exclude=Negative', the explicit test runs. The same issue appears
> when Negative category is excluded manually in UI.
>
> UPDATE:
> NUnit version: 2.6.0.12051
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/nunitv2/+bug/1006604/+subscriptions
>

--
Regards,

Ravichandran Jv
http://ravichandranjv.blogspot.com

Revision history for this message
Charlie Poole (charlie.poole) wrote :

Oddly, in my tests, this only occurs when running the entire assembly but not when selecting the test fixture and running it alone. However, I can verify the bug.

Changed in nunitv2:
status: New → Triaged
importance: Undecided → High
assignee: nobody → Charlie Poole (charlie.poole)
milestone: none → 2.6.1
Revision history for this message
Charlie Poole (charlie.poole) wrote :

This is fixed for the Gui, but I'm unable to reproduce it for the console runner following the steps given.

Changed in nunitv2:
status: Triaged → Fix Committed
Changed in nunitv2:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.