NUnit Console command line regex case insensitive? NUnit Console command line regex case insensitive? jenkins jenkins

NUnit Console command line regex case insensitive?


The NUnit console runner --where=EXPRESSION uses a specific test selection language (TSL) where

an expression indicating which tests to run. It may specify test names, classes, methods, categories or properties comparing them to actual values with the operators ==, !=, =~ and !~.

For matching regular expressions, NUnit users .NET's Regex.IsMatch method... as described here.

Try it like this and check out the samples in the linked TSL doc above.

--where "test =~ /(?i).*mytest/"

However, if you are using NUnit V2 you are probably out of luck:

The driver for NUnit V2 supports a subset of TSL. Because the V2 NUnit framework only allowed filtering on test names and categories, you may only use the cat and test keywords in comparisons. In addition, the regular expression operators =~ and !~ are not supported.