Can you mark XUnit tests as Explicit?

后端 未结 4 1419
你的背包
你的背包 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 06:00

    I used

    #if DEBUG
    // Must test manually with https://docs.microsoft.com/en-us/sysinternals/downloads/process-explorer
    [Fact]
    #endif
    

    So this is not even considered to be a test on a build server while a developer who usually builds a debug version will notice that this test fails

提交回复
热议问题