System.Diagnostics.Debug.WriteLine()在NUnit控制台下不起作用

时间:2014-04-02 15:34:35

标签: maven nunit

当我把

System.Diagnostics.Debug.WriteLine("Test Output");

在我的NUnit测试中,控制台上没有任何内容。它应该出现在控制台上,还是最终会出现在Windows系统日志的某个神秘位置?我查看了系统日志,但找不到任何内容。

[INFO]  | NUnit-Console version 2.6.3.13283
[INFO]  | Copyright (C) 2002-2012 Charlie Poole.
[INFO]  | Copyright (C) 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov.
[INFO]  | Copyright (C) 2000-2002 Philip Craig.
[INFO]  | All Rights Reserved.
[INFO]  |
[INFO]  | Runtime Environment -
[INFO]  |    OS Version: Microsoft Windows NT 6.2.9200.0
[INFO]  |   CLR Version: 2.0.50727.8000 ( Net 3.5 )
[INFO]  |
[INFO]  | ProcessModel: Default    DomainUsage: Single
[INFO]  | Execution Runtime: net-3.5
[INFO]  |
[INFO]  | Tests run: 2, Errors: 0, Failures: 0, Inconclusive: 0, Time: 0.148235177410271 seconds
[INFO]  |   Not run: 0, Invalid: 0, Ignored: 0, Skipped: 0
[INFO]  |
[INFO]  +--[ DONE ]

我从Maven调用NUnit:这会引起某种问题吗?

有趣的是,在JUnit下,System.out.println()可以正常工作,正如您所期望的那样。

0 个答案:

没有答案