How to output debug logging from NUnit tests?

I would like to be able to see write debug logging information in my tests and see the output in tests that failed in TeamCity. Any idea how to accomplish this?

I must be able to build with Release configuration.

Any help much appreciated.

4 comments
Comment actions Permalink

Hello,

Every failed test is shown with stacktrace and output. What kind of output do you mean?

0
Comment actions Permalink

I mean my own debugging messages like the ones I get with Debug.WriteLine or Console.WriteLine().

0
Comment actions Permalink

Debug.Write messages may not be placed in the build log until you configure Debug to use stdout.
Do you see those messages in the build log?

Only messages from FixtureSetup, FixtureTearDown methods are not reported.

What NUnit version do you use?

0
Comment actions Permalink

I'm building in Release so Debug.WriteLine() is not working.

But I tried Trace.WriteLine() and it shows in the "Full build log" so my problem is solved

0

Please sign in to leave a comment.