### ExplicitAttribute (NUnit 2.2)

The Explicit attribute causes a test or test fixture to be ignored unless it is explicitly selected for running. The test or fixture will be run if it is selected in the gui, if its name is specified on the console runner command line as the fixture to run or if it is included by use of a Category filter.

If a test or fixture with the Explicit attribute is encountered in the course of running tests, the runner treats it as if it had been ignored. The progress bar turns yellow and the test is listed in the report of tests not run

#### Test Fixture Syntax

C#
VB
C++
J#

    namespace NUnit.Tests
    {
      using System;
      using NUnit.Framework;

      [TestFixture, Explicit]
      public class ExplicitTests
      {
        // ...
      }
    }

    Imports System
    Imports Nunit.Framework

    Namespace Nunit.Tests

      <TestFixture(), Explicit()>
      Public Class ExplicitTests
        ' ...
      End Class
    End Namespace

    #using <Nunit.Framework.dll>
    using namespace System;
    using namespace NUnit::Framework;

    namespace NUnitTests
    {
      [TestFixture]
      [Explicit]
      public __gc class ExplicitTests
      {
        // ...
      };
    }

    #include "cppsample.h"

    namespace NUnitTests {
      // ...
    }

    package NUnit.Tests;

    import System.*;
    import NUnit.Framework.TestFixture;

    /** @attribute NUnit.Framework.TestFixture() */
    /** @attribute NUnit.Framework.Explicit() */
    public class ExplicitTests
    {
      // ...
    }

#### Test Syntax

C#
VB
C++
J#

    namespace NUnit.Tests
    {
      using System;
      using NUnit.Framework;

      [TestFixture]
      public class SuccessTests
      {
        [Test, Explicit]
        public void ExplicitTest()
        { /* ... */ }
    }

    Imports System
    Imports Nunit.Framework

    Namespace Nunit.Tests

      <TestFixture()>
      Public Class SuccessTests
        <Test(), Explicit()> Public Sub ExplicitTest()
          ' ...
        End Sub
      End Class
    End Namespace

    #using <Nunit.Framework.dll>
    using namespace System;
    using namespace NUnit::Framework;

    namespace NUnitTests
    {
      [TestFixture]
      public __gc class SuccessTests
      {
        [Test][Explicit] void ExplicitTest();
      };
    }

    #include "cppsample.h"

    namespace NUnitTests {
      // ...
    }

    package NUnit.Tests;

    import System.*;
    import NUnit.Framework.TestFixture;

    /** @attribute NUnit.Framework.TestFixture() */
    public class SuccessTests
    {
      /** @attribute NUnit.Framework.Test() */
      /** @attribute NUnit.Framework.Explicit() */
      public void ExplicitTest()
      { /* ... */ }
    }