Home > Articles > Programming > Windows Programming

  • Print
  • + Share This
From the author of

Implementing a Test Suite

NUnit contains several tools: A good one is the SuiteAttribute. Using the SuiteAttribute, you can indicate several test fixtures to be run as part of a test suite. To create a TestSuite, follow these steps (code is left as an exercise):

  1. Adorn a read-only, static property that returns an instance of NUnit.Core.TestSuite with the SuiteAttribute.

  2. Create an instance of the NUnit.Core.TestSuite.

  3. Add instances of each TestFixtureAttribute-adorned class to the TestSuite instance with TestSuite.Add.

  4. Return the instance of the TestSuite object.

For a hint, check out the NUnit documentation online.

  • + Share This
  • 🔖 Save To Your Account