【发布时间】:2015-03-12 16:11:15
【问题描述】:
W.r.t.单元; 是否有有条件地忽略特定测试用例的机制?
以下内容:
[TestCase(1,2)]
[TestCase(3,4, Ignore=true, IgnoreReason="Doesn't meet conditionA", Condition=IsConditionA())]
public voidTestA(int a, int b)
那么有没有这样的机制或者唯一的方法是为每个案例创建单独的测试并在测试主体中执行 Assert.Ignore?
【问题讨论】:
-
您是否尝试过使用 Assert.Ignore()? nunit.org/index.php?p=utilityAsserts&r=2.5.2
-
谢谢,用 Assert.Ignore 更新了问题,尽管我认为这意味着我们仍然为每个案例创建单独的测试(复制测试主体)?
标签: unit-testing testing nunit