0

Using VS 2013 and TFS 2013, I have 4 unit tests but I want a TFS build to run only one of them. For this I have assigned [TestCategory("bvt")] as an attribute of the method.

enter image description here

I edit the build definition, and within the "Add/Edit Test Run" dialog I give a value for "Test case filter:" of "TestCategory=bvt"

enter image description here

With the filter added, no tests are executed. If I remove the filter then a team build using "ReleaseTfvcTemplate.12.xaml" result in all 4 tests being executed. I've tried wrapping the filter in quotes etc but haven't been able to get it to work - where am I going wrong?

Rob Bowman
  • 7,632
  • 22
  • 93
  • 200
  • Given `[TestMethod]` this seems to be MSTest as opposed to NUnit, right? – CodeCaster Jan 06 '15 at 13:21
  • Yes, I'm using MS Test. More detail here: https://social.msdn.microsoft.com/Forums/vstudio/en-US/d187aeb9-eac1-4f24-81f4-de0b153b0bc2/visual-studio-test-runner-criteria-is-filtering-all-tests?forum=tfsbuild#9a3cc591-ec84-4706-967f-9b9c32a93048 – Rob Bowman Jan 12 '15 at 12:50

1 Answers1

0

I solved this by reverting back to using the old default.xaml rather the the new TfsDefault.xaml

Rob Bowman
  • 7,632
  • 22
  • 93
  • 200