This feature will be in MbUnit v3. We will be releasing an Alpha version of MbUnit v3 within the next couple of weeks. The nice thing is that MbUnit v3 (actually the Gallio Test Automation Platform underneath it) can run MbUnit v2 tests unmodified. The syntax for OR currently looks a bit like this: Gallio.Echo.exe SomeAssembly.dll /f:Category=Foo,Bar,Blah You can AND filters together like this: Gallio.Echo.exe SomeAssembly.dll /f:Category=Foo,Bar;Type=SomeType,SomeOtherType Assuming a != condition is added, you examples could get translated to something like this: WinXP or WinVista: "Category=WinXP, WinVista" NOT Excel: "Category!=Excel2003, Excel2007" Debug or Release: "Category=Debug, Release" WinXP and Debug and not Excel: "Category=WinXP, WinVista; Category=Debug; Category!=Excel2003" To make things fully general we'll need grouping operators and combinators. This is already fully supported by the infrastructure but not available in the syntax: (NOT (WinXP AND Excel2003)) OR Foo: "! (Category=WinXP; Category=Excel2003) | Category=Foo" Jeff.
________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Leonid Lastovkin Sent: Monday, October 29, 2007 5:22 PM To: [email protected] Subject: MbUnit Is it possible to "AND" categories (in addition to "OR"-ing) for /fc and /ec flags of the MbUnit.Cons/GUI.exe ? I need to partition (in proper mathematical sense - mutually exclusive and collectively exhaustive) the tests (actually test fixtures) that I have while not separating them into different assemblies. Each set (or a pair of sets in the case of Debug vs Release) of test fixtures will run on a designated test host (with different versions of Windows and Excel installed). Each will spit out its own xml result, which will get merged into a single report. Each test host will have to work with the exact same C# project containing tests. Each host will be able to compile the project in Debug | Release or other, but will have to figure out how to run only the tests that are appropriate for the versions of Windows and Office installed. Right now my 8 categories are: 1) Tests that are meant to run under Windows XP, with Office 2003 in Debug mode. ... 8) Tests that are meant to run under Windows Vista, with Office 2007 in Release mode. I can add several categories to each test fixture; for example: [TestFixture] [FixtureCategory("WinXP")] [FixtureCategory("Excel2003")] [FixtureCategory("Debug")] I may want to complicate things slightly by introducing other categories: * "AnyWin" = "WinXP" OR "WinVista", ** "NoExcel" = NOT ("Excel2003" OR "Excel 2007"), *** "AnyTarget" = "Debug" OR "Release", I can use the switches /fc = /filter-category and /ec = /exclude-category to achieve some filtering, but I cannot do everything that I would like to do. If I understand the documentation correctly, multiple categories get OR-ed when I supply a comma-separated list of them. For example, the following switch for the MbUnit.Cons.exe: "/fc:x1,x2,x3,...xn /ec:y1,y2,y3,...ym" is logically equivalent to: [(x1 OR x2 OR x3 ... OR xn)] AND [( NOT (y1 OR y2 OR y3 ... OR ym))] The structure of this logical expression is restricted to at most: a single AND, a single NOT, two (though arbitrary long) ORs and 10 parenthesis's. I cannot create a category filter like: (WinXP only) and (Debug only) and no Excel. ======================================================================== ================================= Or can I? Am I missing something about the usage of MbUnit.Cons/GUI.exe ? I would find this feature useful. Thanks. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "MbUnit.User" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/MbUnitUser?hl=en -~----------~----~----~----~------~----~------~--~---
