How to use test suite in NUnit 3

2019-07-08 11:12发布

I'm using NUnit 3 and having problems using test suites. I saw this Documentation page, but it's for the old version and I can't find anything in the new documentation.

This does not work, because [Suite] is invalid.

[Suite]
public static IEnumerable Suite
{
  get
  {
    ArrayList suite = new ArrayList();
    suite.Add(typeof(OneTestCase));
    suite.Add(typeof(AssemblyTests));
    suite.Add(typeof(NoNamespaceTestFixture));
    return suite;
  }

1条回答
成全新的幸福
2楼-- · 2019-07-08 11:16

The SuiteAttribute has been removed from NUnit 3 (see the Attributes table).

You should instead use the expanded Test Selection Language in the command line runner to control the groups of tests you want to run, or alternatively structure your tests differently.

查看更多
登录 后发表回答