1

I'm trying to only run a certain subsection of xunit tests using the tfs Test Filter Criteria:

enter image description here

The problem is that this is not doing anything, it still runs every test regardless of it's name, what might I be missing here? Is there something else I need to be doing since I'm using Xunit? Or is there another method of excluding tests in the test unit step I can use.

RichardMc
  • 844
  • 1
  • 9
  • 33

1 Answers1

1

Test filter criteria: Filters tests from within the test assembly files. For example, “Owner=james&Priority=1”. This option works the same way as the console option /TestCaseFilter for vstest.console.exe For more information, see https://msdn.microsoft.com/en-us/library/jj155796.aspx

Please double check your property of FullyQualifiedName in your assembly files. I'm not sure if /TestCaseFilter is also support in xUnit. You could give a try with directly running the test using command line (vstest.console.exe). If it's not work, then this should also not work in TFS build task.

Add a related link talk about test filter for your reference: VSTS/TFS VISUAL STUDIO TEST TASK – FILTER CRITERIA

Community
  • 1
  • 1
PatrickLu-MSFT
  • 49,478
  • 5
  • 35
  • 62
  • Have find a link: [Test discovery order is meaningful when filtering tests to a specific trait with vstest.console /TestCaseFilter](https://github.com/xunit/xunit/issues/610) seems it's support. – PatrickLu-MSFT Feb 15 '17 at 10:33