I have a bunch of testcases within my test-class:
[TestFixture]
class MyTestClass
{
[Test]
public void Test1() { ... }
[Test(Category = "MyCategory")]
public void Test2() { ... }
}
What I want to achieve now is to run only the tests that have no category set using nunit-console
. So in my example only Test1
should run.
nunit3-console.exe MyAssembly.dll where "cat == null"
I also tried "cat == ''"
with the same result.
However that won't give me any test. Of course I could use "cat != 'MyCategory'"
in this contrived example, however as I have many categories I don't want to exlcude every one but instead chose just those without any category.