xUnit.net does not capture console output

前端 未结 5 1347
轮回少年
轮回少年 2020-12-05 06:39

I just started testing xUnit.net, but it doesn\'t seem to capture any output (Console, Debug, Trace), as I would have expected.

Is that possible? I am using a sample

5条回答
  •  醉梦人生
    2020-12-05 07:21

    There is a solution as found here: https://xunit.codeplex.com/discussions/211566

    Simply add this to your constructor or method where you want debugging output:

    Debug.Listeners.Add(new DefaultTraceListener());
    

提交回复
热议问题