Ignore IgnoreAttribute

前端 未结 3 1661
孤独总比滥情好
孤独总比滥情好 2021-01-31 02:43

We have MSTest tests which automatically run in hourly production. One of these tests is marked with [Ignore] attribute because it is not yet ready

3条回答
  •  别那么骄傲
    2021-01-31 02:54

    You could also use a test category to mark the test methods you do not want to be included in your automated test, e.g.

    [TestCategory("IgnoreOnBuild")]
    

    Thus not using the [Ignore] attribute. And combine this with a filter in your build definition, under Basic -> Automated Test -> Test Source -> Test Case Filter:

    TestCategory!=IgnoreOnBuild
    

提交回复
热议问题