The Suite Attribute is used to define subsets of suites based on user preference. It was introduced in NUnit 2.0 to replace inheritance from the TestSuite class.
Originally, the NUnit developers believed that the need for the Suite mechanism would diminish because of the dynamic creation of suites based on namespaces. It was provided for backwards compatibility.
That has not proven to be true. Suites are still used today by many people, so we are making an effort to revive them in terms of usability. The current release supports suites using the classic mechanism: a static property with the SuiteAttribute returns a TestSuite, populated with the tests that are to be executed.
This approach currently has some limitations, which we hope to remove in a future NUnit release:
namespace NUnit.Tests { using System; using NUnit.Framework; using NUnit.Core; public class AllTests { [Suite] public static TestSuite Suite { get { TestSuite suite = new TestSuite("All Tests"); suite.Add(new OneTestCase()); suite.Add(new Assemblies.AssemblyTests()); suite.Add(new AssertionTest()); return suite; } } } }