[Test]
[Category("US")]
public void TestUS()
{
}
[Test]
[Category("Australia")]
public void TestAustralia()
{
}
Say I want to exclude all Australia category tests. I would then set:
<testFilter filterName="AutoSave" filterExpr="NOT Category: Australia" />
This does not work and the filter does not filter out Australia. So I injected an inclusion condition of:
<testFilter filterName="AutoSave" filterExpr="TestKind: Test AND NOT Category: Australia" />
This works for excluding the country. However, the test marked with ignore now shows. But any test can have any ignored reason - all I care about is the fact that they are marked with ignored. So I was looking at "IgnoreReason" and tried to play with wildcards and regex expressions. I tried the following (and dozens more combinations, but none work):
<testFilter filterName="AutoSave" filterExpr="TestKind: Test AND NOT Category: Australia AND NOT IgnoreReason:*" />
<testFilter filterName="AutoSave" filterExpr="TestKind: Test AND NOT Category: Australia AND NOT IgnoreReason:[A-Za-z0-9]" />
<testFilter filterName="AutoSave" filterExpr="TestKind: Test AND NOT Category: Australia AND NOT IgnoreReason:." />
I can't figure out to say "Ignore any test marked with any IgnoreReason" into the logic. I cannot work around by changing the exclusion to an inclusion - meaning, I have to exclude certain categories and exclude all tests marked with Ignore. Any ideas? Thanks a bunch in advance!