Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to create a test suite using NUnit.

In java, I could use the name of the classes and do something like this:

TestSuite suite = new TestSuite();
suite.addTest(new JUnit4TestAdapter(Class.forName({Name of my test class here})));

In NUnit, I have a TestSuite created (from NUnit.Core) but I can't create Tests dynamically and add them to the suite.

I appreciate the help, thanks.

share|improve this question

In NUnit 2.4.4, there is a new feature - the Suite Attribute that allows you to return an array of tests as opposed to using the TestSuite class in previous versions. To add tests, it would look something like this:

public static IEnumerable Suite
      ArrayList suite = new ArrayList();
      suite.Add(new AddAll());
      return suite;
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.