Hi,

A while ago, support for including or excluding certain categories of
(N)unit tests was introduced in NAnt.

Now it seems that the implementation was not very good, and I'd like to
correct this.

To specify a set of categories to include/exclude, you have two options:

- either you specify them inline the in NUnit <test> element

        For example:

        <nunit2 ...>
                <test ...>
                        <categories>
                                <includes>
                                        <category name="..." />
                                        <category name="..." />
                                </includes>
                                <excludes>
                                        <category name="..." />
                                        <category name="..." />
                                </excludes>
                        </categories>
                </test>
        </nunit2>       

Or

- you define them globally, and reference them in your individual tests

        For example:

        <categories id="test.categories">
                <includes>
                        <category name="..." />
                        <category name="..." />
                </includes>
                <excludes>
                        <category name="..." />
                        <category name="..." />
                </excludes>             
        </categories>

        <nunit2 ...>
                <test ...>
                        <categories refid="test.categories" />
                </test>
        </nunit2>


Now, the questions I have on this are:

- Is it enough to be able to define the complete set of categories globally
(meaning both the includes and excludes together), or do you want to be able
to define the includes and excludes seperately ?

        For example:

        <categories id="test.include.categories">
                <category name="..." />
                <category name="..." />
        </categories>

        <categories id="test.exclude.categories">
                <category name="..." />
                <category name="..." />
        </categories>

        <nunit2 ...>
                <test ...>
                        <categories>
                                <includes refid="test.include.categories" />
                                <excludes refid="test.exclude.categories" />
                        </categories>
                </test>
        </nunit2>       

- Do you want to take it even one step further and define categories
globally on two levels, meaning both as a group of included/excluded
categories and included/excluded categories individually ?

        For example:

        <categories id="test.include.categories">
                <category name="..." />
                <category name="..." />
        </categories>

        <categoryset id="release.categories">
                <includes refid="test.include.categories" />
                <excludes>
                        <category name="..." />
                        <category name="..." />
                </excludes>
        </categories>

        <nunit2 ...>
                <test ...>
                        <categories refid="release.categories" />
                </test>
        </nunit2>       

        If we do support this, then what names should we use for these two
global types ?  Wouldn't it be confusing for users ?

Let me know what you think !

Gert



-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
Nant-users mailing list
Nant-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to