如何在NUnit 3中使用测试套件 [英] How to use test suite in NUnit 3

查看:80
本文介绍了如何在NUnit 3中使用测试套件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用NUnit 3,并且在使用测试套件时遇到问题.我看到了文档页面,但这是旧版本的版本,在新文档中找不到任何内容.

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.

这无效,因为[Suite]无效.

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;
  }

推荐答案

SuiteAttribute 已从NUnit 3中删除(请参见属性表).

您应该在命令中使用扩展的测试选择语言行运行器来控制要运行的测试组,或者以不同的方式构造测试.

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.

这篇关于如何在NUnit 3中使用测试套件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆