Can you mark XUnit tests as Explicit?

后端 未结 4 1426
你的背包
你的背包 2021-02-05 05:43

I\'m making the transition from NUnit to XUnit (in C#), and I was writing some \"Integrated Tests\" (ITs) that I don\'t necessarily want the test runner to run as part of my aut

4条回答
  •  灰色年华
    2021-02-05 05:54

    You can use the [Trait] attribute for that, like in the xunit example, e.g.,

    [Trait ("Category", "Integration")]
    

    This project takes it a little further and inherits categories like unit, integration, etc.

提交回复
热议问题