我正在使用 NUnit 3,但在使用测试套件时遇到问题。我看到这个Documentation page , 但它是针对旧版本的,我在新文档中找不到任何内容。
这不起作用,因为 [Suite] 无效。
[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
has been removed from NUnit 3 (参见属性表)。
您应该改用扩展的 Test Selection Language在命令行运行程序中控制要运行的测试组,或者以不同方式构建测试。
关于c# - 如何在 NUnit 3 中使用测试套件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38955854/