Gallio Icarus "NOT" testFilter and wildcards

31 views
Skip to first unread message

v8ramair

unread,
Aug 15, 2012, 1:40:45 AM8/15/12
to galli...@googlegroups.com
I'm using a .gallio project file when I launch Icarus (3.2 build 749). Everything works fine except for testFilter special logic. The issue I'm having is that the <testfilter filtername="AutoSave" filterexpr=""> doesn't work in all cases. For example, tests in the DLL I load look like this:
[Test]
[Category("US")]
[Ignore("MyIgnoreReason")]
public void TestIgnoreThis()
{
}

[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!

Reply all
Reply to author
Forward
0 new messages