I tried to use Combinatorial
/Values
attributes in NUnit.
While it works locally, the test decorated with those attributes are skipped in TeamCity build running NUnit 2.6.2—the build report indicates that the test was ignored, without giving any details about the reason to ignore it.
According to the documentation, Combinatorial
attribute (as well as the Values
attribute) exists in NUnit 2.5, and so I would expect it to still be supported in NUnit 2.6.
Why is the test ignored?
Here's a most basic example which reproduces the issue. Locally, both tests run and give the exact same results. On TeamCity, only Test1
is executed, and Test2
is marked as ignored.
[TestCase("a", "1")]
[TestCase("a", "2")]
[TestCase("b", "1")]
[TestCase("b", "2")]
public void Test1(string x, string y) {
Assert.AreEqual(x + "," + y, string.Format("{0},{1}", x, y));
}
[Test, Combinatorial]
public void Test2([Values("a", "b")] string x, [Values("1", "2")] string y) {
Assert.AreEqual(x + "," + y, string.Format("{0},{1}", x, y));
}