3

I have a visual studio test assembly. There are several test methods of which a few methods have TestCategoryAttribute on them and others don't. I want to filter out all the methods that do not contain the attribute from getting executed, i.e, uncategorized tests should not be executed.

I am trying to have something like this which does not work. vstest.console.exe MyTests.dll /TestCaseFilter:"(TestCategory!=)"

Looking for the right syntax. I am using Visual Studio 2015.

Kannan D
  • 467
  • 1
  • 4
  • 15
  • Do you have any updates on this? I'd like to rely on this kind of filter as well. – julealgon Jan 22 '18 at 13:03
  • I did not find the right way of doing it. I managed to filter-out all the categorized test cases like this. `TestCaseFilter:(TestCategory!=Category1&TestCategory!=Category2&TestCategory!=Category3)` – Kannan D Jan 23 '18 at 13:20
  • Thanks for the update @Kannan. Unfortunately, that would be prohibitively complex in my case as we have at least 15 different categories and this list is growing consistently over time :S – julealgon Jan 23 '18 at 21:14

0 Answers0