Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to achieve 'not contains' logic using vstest TestCaseFilter?

I am using vstest TestCaseFilter for running selective unit tests in VS 2013.

My goal is to to run all tests with categories that do not contain a certain string.

From what I have read so far (here), the operators that are supported are:

= (equals)
!= (not equals)
~ (contains or substring only for string values)
& (and)
| (or)
( ) (paranthesis for grouping) 

Filtering all categories which contain a string is trivial but how do I achieve the opposite?

Could not figure a way to achieve this so far...

like image 540
akrabi Avatar asked Jun 08 '15 11:06

akrabi


1 Answers

This feature has been added to VSTest recently (See the PR here) using !~. However, it doesn't seem to be available until VS2019 (I get errors trying to use it in VS2017.9, but it works in VS2019).

like image 94
Jimmy Avatar answered Nov 15 '22 21:11

Jimmy