How to exclude certain tests in the Visual Studio Test Runner?

前端 未结 7 1134
春和景丽
春和景丽 2020-12-09 01:45

I have attributes on certain tests that I ideally don\'t want to run on every build. Most of my tests are normal unit tests and I do want them to run on every build.

7条回答
  •  情话喂你
    2020-12-09 02:20

    The only "solution" (or better workaround) I found to work is to specify a "FullName" filter. Basically I usually structure my solution like

    • ProjectA
    • ProjectA.UnitTests
    • ProjectA.IntegrationTests

    and so on. Now I can specify a filter in the Test Explorer like FullName: "UnitTests" which seems to work.
    (I'd expected to be able to use a regex within the search name but it doesn't seem to be supported.)

    enter image description here

提交回复
热议问题