How can I ignore NUnit tests of a certain category while doing a Jenkins build? How can I ignore NUnit tests of a certain category while doing a Jenkins build? jenkins jenkins

How can I ignore NUnit tests of a certain category while doing a Jenkins build?


If you are using a Windows Batch command to execute the NUnit tests as part of the Jenkins job, you may simply use the command-line option "/exclude" on the category you've assigned to the test. For the example you've given, the command would be something akin to...

nunit-console /exclude:DBExclude nunit.tests.dll

And, just for the record, you can do it the other way and select to run tests WITH a certain category as opposed to only those WITHOUT by using the following (again, making use of your example):

nunit-console /include:DBExclude nunit.tests.dll

NUnit has documentation that details these options and more here: NUnit Documentation