Nunit Category Exclusions Ignored

My current configuration is TC 3.1.1:
XP SP2 Machine 1 - TC Server
XP SP2 Machine 2 - TC Build Agent

C# .NET 2.0
Build Runner - NAnt 86 beta 1
Testing Framework - NUnit 2.2.9.r1

I'm trying to leverage TC as our build management suite. However, when TC runs our build script using NAnt as the build runner for some reason the NUnit category exclusions are being ignored. If the same build script is run under our previous setup, calling NAnt directly from the command prompt via a .cmd or .bat file our NUnit category exclusions are NOT ignored and the build runs through properly.

Has anyone seen TC ignore NUnit category exclusions running under NAnt build runner? Is there any special configuration I need to do for this to work?

An example of how we are using NUnit attributes:
[Test, Explicit, Category("GUI_Tests")]
public void MyTest()
{ .. }

The build script defines a variable called unit.test.exclude as seen below with the categories to ignore.
The build references this property in the exclusion when calling the nunit tests. ]]>
<test assemblyname="$\$\Name.Tests.dll" appconfig="$\$\Name.Tests.dll.config">

Any assistance on this matter would be greatly appreciated.




Thank you.
I have created an issue for the problem
Please watch/vote for that issue. I plan to attach a patch fixing the issue in the sort while.

There is an workaround for the problem. For that, please specify categories include and exclude in the element: Example: ]]>



Sorry, I just realizaed I sent you the same code sample.

I checked the documentation of NUnit2 task. We do not support coma separated list of categories.

Please watch/vote for the issue. I will attach the patch here in a while.



Okay, thanks! Do you have an estimate of when the patch you refer to will be available?

Thanks again,



I will need this too, pls pls


Thanks Mr. Eugene Petrenko!

I've installed the patch you so graciously and quickly released. Our exclusions are now working as expected.

We appreciate the quick turnaround!

Sean Gilbert


Please sign in to leave a comment.