问题 W.r.t. Nunit; Is there a mechanism to conditionally ignore a specific test case? Something in the lines of : [TestCase(1,2)] [TestCase(3,4, Ignore=true, IgnoreReason="Doesn't meet conditionA", Condition=IsConditionA())] public voidTestA(int a, int b) So is there any such mechanism or the only way to do so is to create separate test for each case and do Assert.Ignore in the test body? 回答1: You could add the following to the body of the test: if (a==3 && b == 4 && !IsConditionA()) { Assert