我希望能够根据几个标准有选择地运行NUnit测试.在我的情况下,选择将基于:测试优先级和/或测试类型.
测试类/方法看起来像这样:
namespace NUnit.Tests
{
using System;
using NUnit.Framework;
[TestFixture]
public class MathTests
{
[Test, Property("Priority", "Critical"), Property("Type", "Fully automatic")]
public void AdditionTest()
{ /* ... */ }
[Test, Property("Priority", "High"), Property("Type", "Partly automatic")]
public void MultiplicationTest()
{ /* ... */ }
}
}
Run Code Online (Sandbox Code Playgroud)
我想只运行具有"优先级"="严重"和"类型"="全自动"的测试.
是否可以使用NUnit实现此类选择?我知道可以选择属于特定"类别"的测试来执行,但它只有1个标准......