Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support "not contains" operator on TestCaseFilter CLI parameter #1385

Closed
julealgon opened this issue Jan 23, 2018 · 0 comments
Closed

Support "not contains" operator on TestCaseFilter CLI parameter #1385

julealgon opened this issue Jan 23, 2018 · 0 comments

Comments

@julealgon
Copy link

I'd like to propose the introduction of a "not contains" (!~) operator in vstest.console TestCaseFilter.

For vstest.console, we currently have the following operations:

  • equals (=)
  • not equals (!=)
  • contains (~)

This is bad because it allows you to negate equality but not the contains, it is not orthogonal.

Supporting "not contains" would allow some business cases that are completely impossible today, like:

Run all tests that are not in namespace X

I needed this behavior recently but it is completely impossible to represent it using the current operators. I'll be forced to split the tests in 2 different projects or call vstest.console twice to make it work, and this seems unnecessary to me.

I feel like a generic "not" operator (!) that could negate any expression would be more flexible, but that is a bit more work and would probably also impact the != functionality. This is why I'm limiting my suggestion to a less flexible, "hardcoded" not contains !~.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants