How to get NUnit build step to accept Category Expressions

Hi,

We have tests that are organized by categories.  In order to run specific tests, we make use of the Category Expressions that are available since 2.4.6 (see below).  From http://www.nunit.org/index.php?p=consoleCommandLine&r=2.5.5 in the 'Specifying Test Categories to Include or Exclude' section:

Beginning with NUnit 2.4.6, you may use a Category Expression with either of these options:

A|B|C
Selects tests having any of the categories A, B or C.
A,B,C
Selects tests having any of the categories A, B or C.
A+B+C
Selects only tests having all three of the categories assigned
A+B|C
Selects tests with both A and B OR with category C.
A+B-C
Selects tests with both A and B but not C.
-A
Selects tests not having category A assigned
A+(B|C)
Selects tests having both category A and either of B or C

For example in your test assembly, there are a group of tests marked with one category (say 'RRR').  Each of those are categorized under other categories (i.e. 'A1', 'A2', 'A3', etc).  To run the tests that are in the intersection RRR and A1 you would use RRR+A1.  However, if you use the NUnit step and include the RRR+A1 no tests are run.  You can get tests to run by using RRR or A1 as the category, but not the RRR+A1.

Please let me know if you know of a way to use the expression in the build step.

2 comments
Comment actions Permalink

Hello,

Sorry for delay. Please feel free to post the issue for that at http://youtrack.jetbrains.net
I believe the most easiest way for you to run the tests is to use TeamCity addin for NUnit,
please take a look to the related documentation on it at
http://confluence.jetbrains.net/display/TCD6/TeamCity+Addin+for+NUnit

Thanks!

0
Comment actions Permalink

Thanks.  Issue created.

0

Please sign in to leave a comment.