> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of 
> Gary Feldman
> Sent: vrijdag 3 juni 2005 15:51
> To: nant-users@lists.sourceforge.net
> Subject: Re: [Nant-users] Support for NUnit categories
> 
> Gert Driesen wrote:
> 
> >>-----Original Message-----
> >>From: [EMAIL PROTECTED] 
> >>[mailto:[EMAIL PROTECTED] On Behalf Of 
> >>Gary Feldman
> >>Sent: donderdag 2 juni 2005 19:43
> >>...
> >>
> >>What's wrong with simply:
> >>
> >>    <test ... include="category1,category2,category3" 
> >>exclude="category4,category5,category6" > ...</test>
> >>
> >
> >1) The names of the attributes say nothing about categories
> >
> That's a nit, particularly since those names are the same ones that 
> NUnit uses on the command line.  Pick names you prefer, 
> though I think 
> that it's a bad idea to use something other than NUnit's names.
> 
> >2) You cannot conditionally set/remove certain categories, 
> without falling
> >back to ugly constructs.
> >
> I'm sorry, but I don't see that.  I'm not sure what syntax you're 
> suggesting for conditionally including or excluding categories, but
>    <property name="test.includes" value="${test.includes},categoryX" 
> if="${property::exists('test.use.category.x')} />
> doesn't seem ugly to me.  It's even cleaner if you use a specific 
> configuration target or include file, as suggested in another 
> recent thread.
> 
> What construct did you have in mind for conditional 
> categories, and why 
> is it important to have it?

You could have something like this:

<test ...>
        <categories>
                <!-- exclude tests that should not run on MS.NET -->
                <exclude name="NotDotNet" if="framework.family != 'net'" />

                <!-- if we're not building a release, exclude tests that
require an internet connection -->
                <exclude name="InetAccess" if="build.config != 'release'" />
        </categories>
</test>

Each individual excluded category can be easily made conditional and cleaner
comments can be added.

> 
> >Guess I just prefer more explicit (but therefore also more verbose)
> >definitions ...
> >
> Verbosity is bad, very bad, especially with XML because the signal to 
> noise ratio is so poor.  The more complex the construct, the 
> harder it 
> is to find the relevant information or see problems, and the 
> easier it 
> is to make typos and miss them.  The more there is, the more 
> there is to 
> go wrong.  The KISS principle rules.

I'm trying to keep to simple but still allow flexibility. Would the
construct mentioned above be too verbose ?

Again, thanks for the feedback. Nothing like a constructive discussion ;-)

Gert



-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.  
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
_______________________________________________
Nant-users mailing list
Nant-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to